knugi

Untitled

Jun 4th, 2017
2,123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. on death of player:
  2. attacker is player
  3. if {stats.kill::%attacker%} is not set:
  4. set {stats.kill::%attacker%} to 1
  5. stop
  6. add 1 to {stats.kill::%attacker%}
  7. command /top [<integer=1>]:
  8. trigger:
  9. set {_strony} to rounded up (size of {stats.kill::*} / 54)
  10. if arg is between 1 and {_strony}:
  11. open chest with 6 rows named "&6Top kille &8(&3%arg%&8)" to player
  12. wait 2 tick
  13. loop {stats.kill::*}:
  14. set {_lista::%loop-index%} to loop-value
  15. set {_num} to size of {_lista::*}
  16. set {_max} to arg * 53 #54 slot -> przejście na kolejną stronę.
  17. set {_min} to {_max} - 52
  18. loop {_max} times:
  19. loop {_lista::*}:
  20. if {_v.%loop-number%} is not set:
  21. set {_v.%loop-number%} to loop-value
  22. set {_n.%loop-number%} to loop-index
  23. if loop-value is larger than {_v.%loop-number%}:
  24. set {_v.%loop-number%} to loop-value
  25. set {_n.%loop-number%} to loop-index
  26. delete {_lista::%{_n.%loop-number%}%}
  27. set {_i} to 0
  28. if (arg + 1) is larger than {_strony}:
  29. set player's current inventory's slot 53 to nether star named "&6Koniec" with lore "&aNie ma juz wiecej stron."
  30. else:
  31. set player's current inventory's slot 53 to nether star named "&6Nastepna strona." with lore "&6Przejdz na strone: &c%arg + 1%"
  32. loop {_max} times:
  33. loop-number is between {_min} and {_max}
  34. if loop-number <= {_num}:
  35. set player's current inventory's slot {_i} to paper named "&6Miejsce: &c&l%loop-number%" with lore "&aNazwa: &6%{_n.%loop-number%}%||&aPunkty: &6%{_v.%loop-number%}%"
  36. add 1 to {_i}
  37. stop
  38. send "&cBlad: &6Nikt jeszcze nikogo nie zabil."
  39. stop
  40. on inventory click:
  41. if "%inventory name of player's current inventory%" contains "&6Top kille ":
  42. if slot is smaller than 0:
  43. stop
  44. cancel event
  45. if player's current inventory's slot slot is nether star:
  46. if name of player's current inventory's slot slot is "&6Nastepna strona.":
  47. set {_strona} to "%uncoloured inventory name of player's current inventory%"
  48. replace all "Top kille (" in {_strona} with ""
  49. replace all ")" in {_strona} with ""
  50. set {_strona} to {_strona} parsed as integer
  51. close player's inventory
  52. wait 2 tick
  53. execute player command "top %{_strona} + 1%"
  54. stop
  55. command /fakekills:
  56. trigger:
  57. loop 150 times:
  58. set {stats.kill::wadawd%random integer between 0 and 1000%} to random integer between 0 and 100
Advertisement
Add Comment
Please, Sign In to add comment