Anteks12345

Untitled

Aug 22nd, 2014
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. command /statystyki [<text>] [<integer=1>]:
  2. aliases: staty
  3. trigger:
  4. if arg 1 is not set:
  5. send "&3/staty stone - &cTOP 5. Wykopanego &8stone/cobblestone &cna serwerze!"
  6. send "&3/staty diamenty - &cTOP 5. Zdobytych &8diamentow &cna serwerze!"
  7. stop
  8. if arg 1 is "stone":
  9. set {_strony} to rounded up (size of {stone::*} / 5)
  10. arg 2 is between 1 and {_strony}:
  11. send "&a| &9Ranking kopaczy &a|"
  12. loop {stone::*}:
  13. set {_lista::%loop-index%} to loop-value
  14. set {_num} to size of {_lista::*}
  15. set {_max} to arg 2 * 5
  16. set {_min} to {_max} - 4
  17. loop {_max} times:
  18. loop {_lista::*}:
  19. {_wartosc.%loop-number%} is not set:
  20. set {_wartosc.%loop-number%} to loop-value
  21. set {_nazwa.%loop-number%} to loop-index
  22. loop-value is more than {_wartosc.%loop-number%}:
  23. set {_wartosc.%loop-number%} to loop-value
  24. set {_nazwa.%loop-number%} to loop-index
  25. remove {_wartosc.%loop-number%} from {_lista::*}
  26. loop {_max} times:
  27. loop-number is between {_min} and {_max}
  28. loop-number <= {_num}:
  29. send "&6%loop-number%&7. &e&l%{nick::%{_nazwa.%loop-number%}%}% &e(&c%{_wartosc.%loop-number%}%&e)"
  30. {_max} is more than {_num}:
  31. set {_r} to {_num}
  32. loop {_max} - {_num} times:
  33. add 1 to {_r}
  34. send "%{_r}%. brak"
  35. send "&9Strona: &e%arg 2% &9z &e%{_strony}%"
  36. stop
  37. {_strony} is 1:
  38. send "&9Wyniki mieszcza sie na &e1 &9stronie."
  39. stop
  40. send "&9Wyniki mieszcza sie na &e%{_strony}% &9stronach."
  41. if arg 1 is "diamenty" or "diaxy":
  42. set {_strony} to rounded up (size of {diamenty::*} / 5)
  43. arg 2 is between 1 and {_strony}:
  44. send "&a| &9Ranking kopaczy diamentow &a|"
  45. loop {diamenty::*}:
  46. set {_lista::%loop-index%} to loop-value
  47. set {_num} to size of {_lista::*}
  48. set {_max} to arg 2 * 5
  49. set {_min} to {_max} - 4
  50. loop {_max} times:
  51. loop {_lista::*}:
  52. {_wartosc.%loop-number%} is not set:
  53. set {_wartosc.%loop-number%} to loop-value
  54. set {_nazwa.%loop-number%} to loop-index
  55. loop-value is more than {_wartosc.%loop-number%}:
  56. set {_wartosc.%loop-number%} to loop-value
  57. set {_nazwa.%loop-number%} to loop-index
  58. remove {_wartosc.%loop-number%} from {_lista::*}
  59. loop {_max} times:
  60. loop-number is between {_min} and {_max}
  61. loop-number <= {_num}:
  62. send "&6%loop-number%&7. &e&l%{nick::%{_nazwa.%loop-number%}%}% &e(&c%{_wartosc.%loop-number%}%&e)"
  63. {_max} is more than {_num}:
  64. set {_r} to {_num}
  65. loop {_max} - {_num} times:
  66. add 1 to {_r}
  67. send "%{_r}%. brak"
  68. send "&9Strona: &e%arg 2% &9z &e%{_strony}%"
  69. stop
  70. {_strony} is 1:
  71. send "&9Wyniki mieszcza sie na &e1 &9stronie."
  72. stop
  73. send "&9Wyniki mieszcza sie na &e%{_strony}% &9stronach."
  74. #
  75. on join:
  76. {diamenty::%player%} is not set:
  77. set {diamenty::%player%} to 0
  78. {stone::%player%} is not set:
  79. set {stone::%player%} to 0
  80. {nick::%player%} is not set:
  81. set {nick::%player%} to uncolored display name of player
  82. {wejscia::%player%} is not set:
  83. set {wejscia::%player%} to 1
  84. send "&6To juz twoje %{wejscia::%player%}% wejscie!"
  85. on mine of a stone or a cobblestone:
  86. add 1 to {stone::%player%}
Advertisement
Add Comment
Please, Sign In to add comment