#stat top
1 messages · Page 1 of 1 (latest)
code: ``command /TokenTop:
trigger:
loop {Tokens::}:
add 1 to {_size}
if {_low.to.high.list::%loop-value%} is not set:
set {_low.to.high.list::%loop-value%} to loop-index
else:
set {_n} to 0
loop {_size} times:
set {_n} to {_n}+1
{_low.to.high.list::%loop-value-1%.%{_n}%} is not set
set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
stop loop
wait 1 tick
set {_n} to size of {_low.to.high.list::}
loop {_low.to.high.list::*}:
set {_high.to.low.list::%{_n}%} to loop-value
set {_n} to {_n}-1
wait 1 tick
set {_i} to 0
#THIS IS THE MESSAGE WITH TOP
send "&7 &l&m &7&l<&6&lTOKEN TOP&7&l>&7&l&m "
send ""
loop {_high.to.low.list::*}:
add 1 to {_topnumber}
set {_player} to "%loop-value%" parsed as offlineplayer
send "&7%{_topnumber}%. &6%{_player}% &8» &e%format({Tokens::%loop-value%})% Tokens"
add 1 to {_i}
if {_topnumber} > 10:
stop
send ""
send "&7 &l&m "``
i want it to make this:
1. Name >> 10412421412414 Tokens 2. Name >> 10421414 Tokens 3. Name >> 9000 Tokens 4. Name >> 6000 Tokens 5. Name >> 1000 Tokens 6. Name >> 500 Tokens 7. Name >> 300 Tokens 8. Name >> 200 Tokens 9. Name >> 100 Tokens 10. Name >> 10 Tokens 912. Me >> 2 Tokens < how can i make this
Lmao
I've seen this code before
On an skunity forum post
Can't you just send {tokens::%uuid of player%}
yes but i need the number line number <Number>. Me >> {tokens::%uuid of player%} Tokens
oh
i dont think there is a very efficient way to do so but i guess you can loop until you get the players index
yes but how
loop {tokens::*}:
add 1 to {_i}
if loop-index is equal to loop value:
send "%{_i}%. %player% >> %{tokens::%uuid of player%}% tokens"
stop
?