command /top [<integer=1>]: trigger: set {_strony} to rounded up (size of {punkty::*} / 5) arg is between 1 and {_strony}: send "ranking kopaczy kamienia" loop {punkty::*}: set {_lista::%loop-index%} to loop-value set {_num} to size of {_lista::*} set {_max} to arg * 5 set {_min} to {_max} - 4 loop {_max} times: loop {_lista::*}: {_wartosc.%loop-number%} is not set: set {_wartosc.%loop-number%} to loop-value set {_nazwa.%loop-number%} to loop-index loop-value is more than {_wartosc.%loop-number%}: set {_wartosc.%loop-number%} to loop-value set {_nazwa.%loop-number%} to loop-index delete {_lista::%{_nazwa.%loop-number%}%} loop {_max} times: loop-number is between {_min} and {_max} loop-number <= {_num}: send "%loop-number%. %{nick::%{_nazwa.%loop-number%}%}% (%{_wartosc.%loop-number%}%)" {_max} is more than {_num}: set {_r} to {_num} loop {_max} - {_num} times: add 1 to {_r} send "%{_r}%. brak" send "Strona: %arg% z %{_strony}%" stop {_strony} is 1: send "Wyniki mieszcza sie na 1 stronie." stop send "Wyniki mieszcza sie na %{_strony}% stronach."
Pytanie
Szejkus 5
Kod:
command /top [<integer=1>]: trigger: set {_strony} to rounded up (size of {punkty::*} / 5) arg is between 1 and {_strony}: send "ranking kopaczy kamienia" loop {punkty::*}: set {_lista::%loop-index%} to loop-value set {_num} to size of {_lista::*} set {_max} to arg * 5 set {_min} to {_max} - 4 loop {_max} times: loop {_lista::*}: {_wartosc.%loop-number%} is not set: set {_wartosc.%loop-number%} to loop-value set {_nazwa.%loop-number%} to loop-index loop-value is more than {_wartosc.%loop-number%}: set {_wartosc.%loop-number%} to loop-value set {_nazwa.%loop-number%} to loop-index delete {_lista::%{_nazwa.%loop-number%}%} loop {_max} times: loop-number is between {_min} and {_max} loop-number <= {_num}: send "%loop-number%. %{nick::%{_nazwa.%loop-number%}%}% (%{_wartosc.%loop-number%}%)" {_max} is more than {_num}: set {_r} to {_num} loop {_max} - {_num} times: add 1 to {_r} send "%{_r}%. brak" send "Strona: %arg% z %{_strony}%" stop {_strony} is 1: send "Wyniki mieszcza sie na 1 stronie." stop send "Wyniki mieszcza sie na %{_strony}% stronach."Odnośnik do komentarza
https://skript.pl/temat/8112-top-5-nie-dzia%C5%82a-c/Udostępnij na innych stronach
5 odpowiedzi na to pytanie
Rekomendowane odpowiedzi