Guest User

Wielkanoc v0.2

a guest
Apr 2nd, 2015
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. variables:
  2. {zajac} = true
  3. {pisanki.%player%} = 0
  4. {rozmowa.zajac.%player%} = false
  5.  
  6. ###########
  7. # Pisanki #
  8. ###########
  9.  
  10. command /jajko:
  11. trigger:
  12. player has permission "jajko.wielkanoc":
  13. give 16 egg named "&1P&2i&3s&4a&5n&6k&7a" to the player
  14.  
  15. ##############
  16. # Stworzenie #
  17. # Zajaca #
  18. ##############
  19. command /zajac:
  20. trigger:
  21. player has permission "zajac.wielkanoc":
  22. spawn villager at player
  23. apply slowness 100000 to spawned villager for 9999999 days
  24. set display name of spawned entity to "&b&lZajac Wielkanocny"
  25. set name of spawned entity to "&b&lZajac Wielkanocny"
  26. send "&e&l>> &7Pomyslnie stworzono &aZajaca Wielkanocnego"
  27. broadcast ""
  28. broadcast "&a&lZajac Wielkanocny &e&lOdwiedzil nas :)"
  29. broadcast "&7&lCzeka na was na spawnie!"
  30. set {zajac.ruch} to location of player
  31.  
  32. every 5 tick:
  33. loop all entities:
  34. loop-entity is villager:
  35. name of loop-entity is "&b&lZajac Wielkanocny":
  36. location of loop-entity is not {zajac.ruch}:
  37. teleport loop-entity to {zajac.ruch}
  38.  
  39. every 5 tick:
  40. loop all entities:
  41. loop-entity is zombie:
  42. name of loop-entity is "&6&lKoszyk Wielkanocny":
  43. location of loop-entity is not {kosz.ruch}:
  44. teleport loop-entity to {kosz.ruch}
  45. ##############
  46. # Stworzenie #
  47. # Koszyka #
  48. ##############
  49.  
  50. command /koszyk:
  51. trigger:
  52. player has permission "koszyk.wielkanoc":
  53. spawn zombie at player
  54. apply slowness 100000 to spawned zombie for 9999999 days
  55. set helmet of the spawned zombie to a chest
  56. set display name of spawned entity to "&6&lKoszyk Wielkanocny"
  57. set name of spawned entity to "&6&lKoszyk Wielkanocny"
  58. send "&e&l>> &7Pomyslnie stworzono &6Koszyk Wielkanocny"
  59. set {kosz.ruch} to location of player
  60.  
  61. on damage of villager:
  62. victim is a villager:
  63. {zajac} is true:
  64. name of victim is "&b&lZajac Wielkanocny":
  65. cancel event
  66. stop
  67.  
  68. on damage of zombie:
  69. victim is a zombie:
  70. {kosz} is true:
  71. name of victim is "&6&lKoszyk Wielkanocny":
  72. cancel event
  73. stop
  74.  
  75. on rightclick holding egg:
  76. player is holding egg named "&1P&2i&3s&4a&5n&6k&7a":
  77. cancel event
  78.  
  79. #################
  80. # Bicie #
  81. # Zajaca #
  82. # Wielkanocnego #
  83. #################
  84.  
  85. command /bicie [<text>]:
  86. trigger:
  87. arg 1 is "tak":
  88. set {zajac} to true
  89. send "&c&l>> &a&lNie mozna bic zajaca!"
  90. arg 1 is "nie":
  91. set {zajac} to false
  92. send "&c&l>> &a&lMocna bic zajaca!"
  93. #################
  94. # Bicie #
  95. # Koszyka #
  96. # Wielkanocnego #
  97. #################
  98.  
  99. command /kosz [<text>]:
  100. trigger:
  101. arg 1 is "tak":
  102. set {kosz} to true
  103. send "&c&l>> &a&lNie mozna bic koszyk!"
  104. arg 1 is "nie":
  105. set {kosz} to false
  106. send "&c&l>> &a&lMocna bic koszyk!"
  107.  
  108. on rightclick on a villager:
  109. name of clicked entity is "&b&lZajac Wielkanocny":
  110. cancel event
  111.  
  112. ##############
  113. # Wkladanie #
  114. # Pisanek #
  115. ##############
  116.  
  117. on rightclick holding egg on a zombie:
  118. player is holding egg named "&1P&2i&3s&4a&5n&6k&7a":
  119. wait 1 tick
  120. name of clicked entity is "&6&lKoszyk Wielkanocny":
  121. send "&c&l>> &a&lDodano 1 pisanke do koszyka!"
  122. remove 1 egg named "&1P&2i&3s&4a&5n&6k&7a" from the player
  123. add 1 to {pisanki.%player%}
  124.  
  125. ##############
  126. # Wyciaganie #
  127. # Pisanek #
  128. ##############
  129.  
  130. on rightclick on a zombie:
  131. name of clicked entity is "&6&lKoszyk Wielkanocny":
  132. player is not holding egg named "&1P&2i&3s&4a&5n&6k&7a":
  133. {pisanki.%player%} is greater than 0:
  134. send "&c&l>> &a&lWyciagnieto 1 pisanke z koszyka!"
  135. give 1 egg named "&1P&2i&3s&4a&5n&6k&7a" to the player
  136. remove 1 from {pisanki.%player%}
  137. else:
  138. send "&c&l>> &a&lNie masz pisanek w koszyku!"
  139.  
  140.  
  141. ##########
  142. # Koszyk #
  143. ##########
  144.  
  145. command /pisanki:
  146. trigger:
  147. send "&c&l>> &a&lMasz %{pisanki.%player%}% pisanek w koszyku!"
  148.  
  149. ###################
  150. # Rozmowa z #
  151. # Zajacem #
  152. ###################
  153.  
  154.  
  155. on rightclick on a villager:
  156. name of clicked entity is "&b&lZajac Wielkanocny":
  157. {rozmowa.zajac.%player%} is false:
  158. set {rozmowa.zajac.%player%} to true
  159. send "&7&l[&b&lZajac&7&l] &aJaka nagrode mozesz dostac:"
  160. wait 1 second
  161. send "&7&l[&b&lZajac&7&l] &a1. 1 Diax - 10 Pisanek"
  162. wait 1 second
  163. send "&7&l[&b&lZajac&7&l] &a2. 10 Diaxow - 50 Pisanek"
  164. wait 1 second
  165. send "&7&l[&b&lZajac&7&l] &aAby cos zakupic wpisz /wielkanoc (numer nagrody)"
  166. set {rozmowa.zajac.%player%} to false
  167. #################
  168. # Wybor #
  169. # Nagrody #
  170. #################
  171.  
  172. command /wielkanoc [<integer>]:
  173. trigger:
  174. arg 1 is 1:
  175. {pisanki.%player%} is greater than 9:
  176. send "&aWybrales nagrode nr.1!"
  177. give 1 diamond named "&bDiamond" to the player
  178. remove 10 from {pisanki.%player%}
  179. arg 1 is 2:
  180. {pisanki.%player%} is greater than 49:
  181. send "&aWybrales nagrode nr.2!"
  182. give 10 diamond named "&bDiamond" to the player
  183. remove 50 from {pisanki.%player%}
Advertisement
Add Comment
Please, Sign In to add comment