every second:
set {money::%player%} to placeholder "vault_eco_balance" parsed as a number
command /NPCbalTOP:
trigger:
loop {money::*}:
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
if {_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
set {_npc} to 3
loop {_high.to.low.list::*}:
#if {%{_player}%.staff} isn't set:
add 1 to {_topnumber}
set {_player} to "%loop-value%" parsed as offlineplayer
add 1 to {_npc}
make console execute command "/npc sel %{_npc}%"
make console execute command "/npc skin %loop-value%"
send "/npc sel %{_npc}%"
send "/npc skin %loop-value%"
set {baltopnpc.%{_npc}%.p} to "%loop-value%"
set {_player} to "%{%loop-value%.p}%"
add 1 to {_i}
if {_topnumber} > 10:
stop
stop
This code sometime exclude player's in the code, can someone help me?