Skocz do zawartości
  • 0

Dodanie topki do skryptu


polp223

Pytanie

variables:
    {moby::%player%} = 0
on death:
    if attacker is a player:
        if victim is zombie:
            add 1 to {moby::%attacker%}
        if victim is creeper:
            add 1 to {moby::%attacker%}
        if victim is skeleton:
            add 1 to {moby::%attacker%}
        if victim is blaze:
            add 1 to {moby::%attacker%}
        if victim is irongolem:
            add 1 to {moby::%attacker%}
        if victim is spider:
            add 1 to {moby::%attacker%}
command /licznik:
    trigger:
        send "&8&l-->> &cZabite moby: &e %{moby::%player%}%

Moglby ktos dodac topke zabitych mobow pod /topmoby ? Z gory thx, bo tego akurat nie potrafie

Odnośnik do komentarza
https://skript.pl/temat/29108-dodanie-topki-do-skryptu/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /topmoby:
	trigger:
		loop {moby::*}:   # <-- zmiennna, przez którą będą sortowane wyniki
			add 1 to {_size}
			if {_list::%loop-value%.0} is not set:
				set {_list::%loop-value%.0} to loop-index
			else:
				set {_n} to 0
				loop {_size} times:
					add 1 to {_n}
					{_list::%loop-value-1%.%{_n}%} is not set
					set {_list::%loop-value-1%.%{_n}%} to loop-index
					stop loop
		set {_n} to size of {_list::*}
		if {_n} = 0:
			send "&cRanking nie zawiera jeszcze żadnych danych." 
			stop
		loop {_list::*}:
			set {_list2::%{_n}%} to loop-value
			remove 1 from {_n}
		set {_i} to 0
		set {_s} to 15   # <-- ilość pozycji wyświetlanych w topce
		if size of {_list2::*} < {_s}:
			set {_s} to size of {_list2::*}
		loop {_list2::*}:
			add 1 to {_i}
			set {_player} to "%loop-value%"  
			send "&7%{_i}%. &e%{_player}% &8(&c%{moby::%loop-value%}%&8)" # <-- wygląd wiadomości o top {_i}
			if {_i} = {_s}:
				stop loop

 

Odnośnik do komentarza
https://skript.pl/temat/29108-dodanie-topki-do-skryptu/#findComment-192082
Udostępnij na innych stronach

  • 0
variables:
	{top::stone::%player%} = 0

on mine of stone:
	add 1 to {top::stone::%player%}

command /topkamien [<text>]:
	trigger:
		loop {top::stone::*}:  
			add 1 to {_size}
			if {_list::%loop-value%.0} is not set:
				set {_list::%loop-value%.0} to loop-index
			else:
				set {_n} to 0
				loop {_size} times:
					add 1 to {_n}
					{_list::%loop-value-1%.%{_n}%} is not set
					set {_list::%loop-value-1%.%{_n}%} to loop-index
					stop loop
		set {_n} to size of {_list::*}
		if {_n} = 0:
			send "&cRanking nie zawiera jeszcze żadnych danych." 
			stop
		loop {_list::*}:
			set {_list2::%{_n}%} to loop-value
			remove 1 from {_n}
		set {_i} to 0
		set {_s} to 15   # <-- ilość pozycji wyświetlanych w topce
		if size of {_list2::*} < {_s}:
			set {_s} to size of {_list2::*}
		loop {_list2::*}:
			add 1 to {_i}
			set {_player} to "%loop-value%"  
			send "&7%{_i}%. &e%{_player}% &8(&c%top::stone::%loop-value%}%&8)" 
			if {_i} = {_s}:
				stop loop

Tutaj masz topkę wykopanego stone'a.

Odnośnik do komentarza
https://skript.pl/temat/29108-dodanie-topki-do-skryptu/#findComment-192096
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...