knugi

Untitled

Dec 27th, 2015
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. on join:
  2. if {statystyki::apple::%player%} is not set:
  3. set {statystyki::%player%} to true
  4. set {statystyki::apple::%player%} to 0
  5. set {statystyki::kills::%player%} to 0
  6. set {statystyki::death::%player%} to 0
  7. set {statystyki::place::%player%} to 0
  8. set {statystyki::break::%player%} to 0
  9. on place:
  10. add 1 to {statystyki::place::%player%}
  11. on break:
  12. add 1 to {statystyki::break::%player%}
  13. on eat enchanted golden apple:
  14. add 1 to {statystyki::apple::%player%}
  15. on death:
  16. if victim is a player:
  17. if attacker is a player:
  18. add 1 to {statystyki::kills::%attacker%}
  19. add 1 to {statystyki::death::%victim%}
  20. else:
  21. add 1 to {statystyki::death::%victim%}
  22. every 5 minutes:
  23. set {_list::*} to "apple" and "kills","death","place","break"
  24. loop {_list::*}:
  25. clear {top5::%loop-value%::*}
  26. set {_size} to size of {statystyki::apple::*}
  27. loop {_list::*}:
  28. loop {_size} times:
  29. loop {statystyki::%loop-value%::*}:
  30. if {_v.%loop-number%.%loop-value-1%} is not set:
  31. set {_v.%loop-number%.%loop-value-1%} to loop-value-2
  32. set {_n.%loop-number%.%loop-value-1%} to loop-index-2
  33. if loop-value-2 is larger than {_v.%loop-number%.%loop-value-1%}:
  34. set {_v.%loop-number%.%loop-value-1%} to loop-value-2
  35. set {_n.%loop-number%.%loop-value-1%} to loop-index-2
  36. remove {_v.%loop-number%.%loop-value-1%} from {statystyki::%loop-value-1%::*}
  37. loop {_size} times:
  38. if loop-number is smaller than or equal to 5:
  39. add "&c%loop-number%. &6%{_n.%loop-number%.%loop-value%}%&8: &7%{_v.%loop-number%.%loop-value%}%" to {top5::%loop-value%::*}
  40. set {statystyki::%loop-value%::%{_n.%loop-number%.%loop-value%}%} to {_v.%loop-number%.%loop-value%}
  41. command /statystyki [<text>] [<player>]:
  42. aliases: staty
  43. trigger:
  44. wait 5 tick
  45. if arg 1 is not set:
  46. open chest with 1 row named "&cStatystyki" to player
  47. wait 1 tick
  48. format slot 2 of player with diamond named "&aTwoje statystyki" to close then run [execute player command "statystyki player"]
  49. format slot 6 of player with redstone named "&aTop 5" with lore "&aStatystyki odswiezaja sie co 5 minut" to close then run [execute player command "statystyki serwer"]
  50. format slot 8 of player with paper named "&aWyjscie" to close
  51. if arg 1 is "serwer":
  52. open chest with 1 row named "&cTop 5" to player
  53. wait 1 tick
  54.  
  55. set {_lore} to "&aTwoje: &c%{statystyki::kills::%player%}%||%{top5::kills::1}%||%{top5::kills::2}%||%{top5::kills::3}%||%{top5::kills::4}%||%{top5::kills::5}%"
  56. replace all "<none>" with "" in {_lore}
  57. format slot 1 of player with diamond sword named "&7Kille" with lore {_lore} to be unstealable
  58.  
  59. set {_lore} to "&aTwoje: &c%{statystyki::place::%player%}%||%{top5::place::1}%||%{top5::place::2}%||%{top5::place::3}%||%{top5::place::4}%||%{top5::place::5}%"
  60. replace all "<none>" with "" in {_lore}
  61. format slot 2 of player with stone named "&7Postawione bloki" with lore {_lore} to be unstealable
  62.  
  63. set {_lore} to "&aTwoje: &4%{statystyki::apple::%player%}%||%{top5::apple::1}%||%{top5::apple::2}%||%{top5::apple::3}%||%{top5::apple::4}%||%{top5::apple::5}%"
  64. replace all "<none>" with "" in {_lore}
  65. format slot 3 of player with enchanted golden apple named "&7Zjedzone koxy" with lore {_lore} to be unstealable
  66.  
  67. set {_lore} to "&aTwoje: &4%{statystyki::break::%player%}%||%{top5::break::1}%||%{top5::break::2}%||%{top5::break::3}%||%{top5::break::4}%||%{top5::break::5}%"
  68. replace all "<none>" with "" in {_lore}
  69. format slot 4 of player with diamond pickaxe named "&7Wykopane bloki" with lore {_lore} to be unstealable
  70.  
  71. set {_lore} to "&aTwoje: &4%{statystyki::death::%player%}%||%{top5::death::1}%||%{top5::death::2}%||%{top5::death::3}%||%{top5::death::4}%||%{top5::death::5}%"
  72. replace all "<none>" with "" in {_lore}
  73. format slot 5 of player with bone named "&7Smierci" with lore {_lore} to be unstealable
  74.  
  75. format slot 8 of player with paper named "&7Powrot" to close then run [execute player command "statystyki"]
  76. stop
  77. if arg 1 is "player":
  78. wait 1 tick
  79. open chest with 1 row named "&aStatystyki &2%player%" to player
  80. wait 1 tick
  81. format slot 1 of player with diamond sword named "&7Twoje kille" with lore "&c%{statystyki::kills::%player%}%" to be unstealable
  82. format slot 2 of player with stone named "&7Postawione bloki" with lore "&c%{statystyki::place::%player%}%" to be unstealable
  83. format slot 3 of player with enchanted golden apple named "&7Zjedzone koxy" with lore "&4%{statystyki::apple::%player%}%" to be unstealable
  84. format slot 4 of player with diamond pickaxe named "&7Wykopane bloki" with lore "&4%{statystyki::break::%player%}%" to be unstealable
  85. format slot 5 of player with bone named "&7Smierci" with lore "&4%{statystyki::death::%player%}%" to be unstealable
  86. format slot 8 of player with paper named "&7Powrot" to close then run [execute player command "statystyki"]
  87. stop
Advertisement
Add Comment
Please, Sign In to add comment