Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /test:
- trigger:
- send "%formatNum({%player%.beacons})%"
- function formatNum(n: number) :: string:
- set {_l::*} to split "k,M,B,T,Qn,Qi,Sx" at ","
- set {_i} to min(floor(log({_n})/3), size of {_l::*})
- return "%{_n}%" if {_i} <= 0
- set {_i2} to 1000^{_i}
- return "%{_n}/{_i2}%%{_l::%{_i}%}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement