ShooterowyPL

Pisanki

Apr 5th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. options:
  2. nazwa_pisanki: &aP&bi&cs&da&en&2k&3a
  3. szansa_pisanka: 20%
  4. typ_krolika: sheep
  5. nazwa_krolika: Krolik
  6. rozmiar_rankingu: 10
  7. on join:
  8. if {pisanki::%name of player%} is not set:
  9. set {pisanki::%name of player%} to 0
  10. on mine of stone:
  11. chance of {@szansa_pisanka}:
  12. drop egg named "{@nazwa_pisanki}" at event-block
  13. send "&aZnalazles pisanke. Oddaj ja krolikowi!"
  14. command /pisanki [<offlineplayer=%player%>]:
  15. trigger:
  16. if player has permissions "pisanka.sprawdz":
  17. if arg is player:
  18. send "&aDo tej pory znalazles i wymieniles &c%{pisanki::%name of player%}%&a pisanek."
  19. set {_top::*} to sorted {pisanki::*} from highest to lowest with output "&aNajwiecej pisanek wymienil gracz &6@index&a."
  20. loop {_top::*}:
  21. send "%loop-value%"
  22. stop
  23. else:
  24. if player has permissions "pisanka.sprawdz.others":
  25. if {pisanki::%argument%} is set:
  26. send "&aDo tej pory gracz &6%argument% &aznalazl i wymienil &c%{pisanki::%argument%}%&a pisanek."
  27. set {_top::*} to sorted {pisanki::*} from highest to lowest with output "&aNajwiecej pisanek wymienil gracz &6@index&a."
  28. loop {_top::*}:
  29. send "%loop-value%"
  30. stop
  31. else:
  32. send "&cTen gracz nie zbiera pisanek!"
  33. stop
  34. else:
  35. send "&cNie masz uprawnien do tej komendy."
  36. stop
  37. else:
  38. send "&cNie masz uprawnien do tej komendy."
  39. stop
  40. on rightclick on {@typ_krolika}:
  41. if name of event-entity is "{@nazwa_krolika}":
  42. cancel event
  43. set {_pisanki} to number of all egg named "{@nazwa_pisanki}" in player's inventory
  44. if {_pisanki} is 0:
  45. send "&cNie masz zadnych pisanek. Wroc do mnie kiedy jakies znajdziesz."
  46. stop
  47. else:
  48. remove all egg named "{@nazwa_pisanki}" from player
  49. add {_pisanki} to {pisanki::%name of player%}
  50. send "&aOddales &c%{_pisanki}% &apisanek krolikowi."
  51. on damage of {@typ_krolika}:
  52. if name of victim is "{@nazwa_krolika}":
  53. if attacker is a player:
  54. cancel event
  55. set {_pisanki} to number of all egg named "{@nazwa_pisanki}" in attacker's inventory
  56. if {_pisanki} is 0:
  57. send "&cNie masz zadnych pisanek. Wroc do mnie kiedy jakies znajdziesz." to attacker
  58. stop
  59. else:
  60. remove all egg named "{@nazwa_pisanki}" from attacker
  61. add {_pisanki} to {pisanki::%name of attacker%}
  62. send "&aOddales &c%{_pisanki}% &apisanek krolikowi." to attacker
  63. command /krolik [<text="przywolaj">] [<text>]:
  64. trigger:
  65. if player has permissions "krolik.sk":
  66. if arg 1 is "przywolaj":
  67. spawn a {@typ_krolika} at player
  68. apply slowness 200 to last spawned entity for 9999999 seconds
  69. set name of last spawned entity to "{@nazwa_krolika}"
  70. send "&aPrzywolales krolika."
  71. if arg 1 is "usun":
  72. if arg 2 is "all":
  73. loop all {@typ_krolika}s:
  74. if name of loop-entity is "{@nazwa_krolika}":
  75. kill loop-entity
  76. send "&aWszystkie kroliki zostaly usuniete."
  77. stop
  78. else if arg 2 is not set:
  79. if targeted entity is a {@typ_krolika}:
  80. if name of targeted entity is "{@nazwa_krolika}":
  81. kill targeted entity
  82. send "&aUsunieto wybranego krolika."
  83. stop
  84. else:
  85. send "&cTo nie jest krolik!"
  86. stop
  87. else:
  88. send "&cTo nie jest krolik!"
  89. stop
  90. else:
  91. send "&cNie masz uprawnien do tej komendy."
  92. stop
  93. on death of {@typ_krolika}:
  94. if name of victim is "{@nazwa_krolika}":
  95. clear drops
  96. command /pisankitop:
  97. aliases: ptop
  98. trigger:
  99. send "&3Ranking zbieraczy pisanek:"
  100. set {_top::*} to sorted {pisanki::*} from highest to lowest with output "@index"
  101. set {_rank} to 0
  102. loop {_top::*}:
  103. add 1 to {_rank}
  104. if {_rank} is more than {@rozmiar_rankingu}:
  105. stop
  106. if {pisanki::%loop-value%} is 0:
  107. stop
  108. send "&c%loop-index%. &6%loop-value% &7- &6 %{pisanki::%loop-value%}%"
  109. command /cleartop:
  110. aliases: ctop
  111. trigger:
  112. if player has permissions "top.clear":
  113. clear {pisanki::*}
  114. send "&aWyczysciles ranking."
  115. loop all players:
  116. if {pisanki::%name of loop-player%} is not set:
  117. kick loop-player due to "&aZostales wyrzucony z powodu konfiguracji skryptu. Mozesz juz wejsc na serwer."
  118. else:
  119. send "&cNie masz uprawnien do tej komendy."
  120. stop
Add Comment
Please, Sign In to add comment