Advertisement
Guest User

Untitled

a guest
Jun 6th, 2017
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. on join:
  2. if {totalvotes::%player%} is not set:
  3. set {totalvotes::%player%} to 0
  4. command /addvote [<text>]:
  5. executable by: console
  6. trigger:
  7. if arg 1 is player:
  8. add 1 to {totalvotes::%arg 1%}
  9. command /votetop:
  10. trigger:
  11. loop {totalvotes::*}:
  12. add 1 to {_size}
  13. if {_low.to.high.list::%loop-value%} is not set:
  14. set {_low.to.high.list::%loop-value%} to loop-index
  15. else:
  16. set {_n} to 0
  17. loop {_size} times:
  18. set {_n} to {_n}+1
  19. {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  20. set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  21. stop loop
  22. wait 1 tick
  23. set {_n} to size of {_low.to.high.list::*}
  24. loop {_low.to.high.list::*}:
  25. set {_high.to.low.list::%{_n}%} to loop-value
  26. set {_n} to {_n}-1
  27. wait 1 tick
  28. message "&8&m------------&r &b&lVote Top &8&m------------"
  29. loop {_high.to.low.list::*}:
  30. add 1 to {_result}
  31. send "&8[&b%{_result}%&8] &7%loop-value%&8 > &c%{totalvotes::%loop-value%}% &7votes"
  32. if {_result} is 10:
  33. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement