Damiankooo

Wielkanoc

Apr 1st, 2015
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. # # # # # # # # # # # # #
  2. # Edited By Damiankooo #
  3. # # # # # # # # # # # # #
  4.  
  5. Variables:
  6. {wielkanoc.use.%player%} = true
  7. {pamiatka.use.%player%} = true
  8.  
  9. # # # # #
  10. # Kod #
  11. # # # # #
  12.  
  13. Options:
  14. mob: villager
  15. namezajac: &c» &6&lWielkanocny Zajac
  16. namekoszyk: &e&lKoszyk
  17.  
  18. # # # # # #
  19. # Komendy #
  20. # # # # # #
  21.  
  22. command /wielkanoc [<text>]:
  23. trigger:
  24. if player has permission "wielkanoc.*":
  25. if arg 1 is not set:
  26. send "&c» &7Poprawne uzycie &c/wielkanoc zajac, koszyk"
  27. stop
  28. # Wielkanocny Zajac #
  29. if arg 1 is "zajac":
  30. spawn {@mob} at player
  31. apply slowness 100000 to spawned {@mob} for 9999999 days
  32. wait a tick
  33. set display name of spawned entity to "{@namezajac}"
  34. set name of spawned entity to "{@namezajac}"
  35. send "&c» &7Pomyslnie stworzono &c2Wielkanocnego zajaca"
  36. loop 15 times:
  37. broadcast ""
  38. broadcast "&6&lWielkanocny Zajac &7Nas odwiedził! :)"
  39. broadcast "&7Czeka na was na spawnie !"
  40. stop
  41. # Koszyk #
  42. if arg 1 is "koszyk":
  43. spawn {@mob} at player
  44. apply slowness 100000 to spawned {@mob} for 9999999 days
  45. wait a tick
  46. set display name of spawned entity to "{@namekoszyk}"
  47. set name of spawned entity to "{@namekoszyk}"
  48. send "&c» &7Pomyslnie stworzono &c2Koszyk!"
  49. loop 15 times:
  50. broadcast ""
  51. broadcast "&e&lKoszyk &7 Poszukajcie go i dajcie mu itemy od Wielkanocnego Zajaca! :)"
  52. broadcast "&7Znajdzcie go ! Powodzenia"
  53. stop
  54. # Reset Pamiatek #
  55. if arg 1 is "res" or "reset":
  56. broadcast "&8&l&m============"
  57. broadcast "&7Pamiatki zostaly odnowione!"
  58. broadcast "&8&l&m============"
  59. set {wielkanoc.use.::*} to true
  60. set {pamiatka.use.::*} to true
  61. stop
  62. else:
  63. send "&c» &4Brak uprawnien!"
  64. stop
  65. # # # # # # # # # #
  66. # On Right Click #
  67. # # # # # # # # # #
  68. on rightclick on {@mob}: #Zajac
  69. if name of clicked entity is "{@namezajac}":
  70. wait 2 ticks
  71. open chest with 3 rows named "{@namezajac}" to player
  72. wait 2 ticks
  73. format slot 12 of player with 1 chest named "&2&lZajac rozdaje" with lore "&7Odbierz prezent" to close then run "zajac %player%"
  74. format slot 13 of player with 1 book named "&2&lZajac opowiada" with lore "&7Witaj &c%player%, ||&7Przybylem tu z bieguna polnocnego,||&7spotkalem tam &cSwietego mikolaja||&7Ktory mi dal Dla was prezenty :) !" to close
  75. format slot 14 of player with 1 paper named "&e&lOdbierz pamiatke po mnie !" with lore "&7Otrzymasz pamiatke po Zajacu z bieguna polnocnego :)" to close then run "pamiatkaj %player%"
  76. format slot 22 of player with 1 emerald named "&a&lCzemu zombiaki na mnie patrza?" with lore "&7Zombiaki na mnie patrza bo mysla ze jestem ich panem. ||&7Przy drodze duzo mi towarzyszylo :)" to close
  77. stop
  78. #
  79. on rightclick on {@mob}: #Koszyk
  80. if name of clicked entity is "{@namekoszyk}":
  81. wait 2 ticks
  82. open chest with 3 rows named "{@namekoszyk}" to player
  83. wait 2 ticks
  84. format slot 13 of player with 1 ender chest named "&f" with lore "&7Witaj &c%player%, ||&7Widze ze mnie znalazles juz :) ||&7Mam nadzieje ze odebrales od &6&lZajaca &7pamiatke||&7W zamian za pamiatke dam ci prezent :)" to close then run "koszyk %player%"
  85. stop
  86. # # # # # # #
  87. # On Damage #
  88. # # # # # # #
  89.  
  90. on damage of {@mob}:
  91. if victim is a {@mob}:
  92. if name of victim is "{@namezajac}":
  93. cancel event
  94. stop
  95. on damage of {@mob}:
  96. if victim is a {@mob}:
  97. if name of victim is "{@namekoszyk}":
  98. cancel event
  99. stop
  100.  
  101. # # # # # # # # # # # # #
  102. # Commands from console #
  103. # # # # # # # # # # # # #
  104.  
  105. Command /zajac [<player>]:
  106. trigger:
  107. if sender is console:
  108. if arg 1 is online:
  109. if {wielkanoc.use.%player-arg%} is true:
  110. set {_wielkanoc} to 1 or 2 or 3
  111. if {_swieta} is 1:
  112. send "&6&lZajac &7Dostales Czapeczke i buty!" to player-arg
  113. give 1 diamond helmet of protection 4 and unbreaking 3 to player-arg
  114. give 1 diamond boots of protection 4 and unbreaking 3 to player-arg
  115. set {wielkanoc.use.%player-arg%} to false
  116. stop
  117. if {_wielkanoc} is 2:
  118. send "&6&lZajac &7Dostales sweter i spodenki!" to player-arg
  119. give 1 diamond chestplate of protection 4 and unbreaking 3 to player-arg
  120. give 1 diamond leggings of protection 4 and unbreaking 3 to player-arg
  121. set {wielkanoc.use.%player-arg%} to false
  122. stop
  123. if {_wielkanoc} is 3:
  124. send "&6&lZajac &7Dostales jabuszko i mieczyk!" to player-arg
  125. give 1 enchanted golden apple to player-arg
  126. give 1 diamond sword of sharpness 5 and fire aspect 2 to player-arg
  127. set {wielkanoc.use.%player-arg%} to false
  128. stop
  129. else:
  130. send "&6&lZajac &cJuz odebrales juz swoj prezent :(" to player-arg
  131. stop
  132. else:
  133. send "&cTa komende moze wykonywac tylko &6konsola&c!"
  134. stop
  135. Command /pamiatkaj [<player>]:
  136. trigger:
  137. if sender is console:
  138. if arg 1 is online:
  139. if {pamiatka.use.%player-arg%} is true:
  140. send "&6&lZajac &7Nie zgub jej :)" to player-arg
  141. give 1 paper named "&9&lPamiatka po &6&lZajacu" with lore "&7%player-arg% ||&7spotkal sie z &cWielkanocnym Zajacem ||&3&o&lWielkanocny Zajac" to player-arg
  142. set {pamiatka.use.%player-arg%} to false
  143. stop
  144. else:
  145. send "&6&lWielkanocny Zajac &7odebrales juz swoja pamiatke :(" to player-arg
  146. stop
  147. else:
  148. send "&cTa komende moze wykonywac tylko &6konsola&c!"
  149. stop
  150. Command /koszyk [<player>]:
  151. trigger:
  152. if sender is console:
  153. if arg 1 is online:
  154. if arg 1 has 1 paper named "&9&lPamiatka po &6&lWielkanocnym Zajacu" with lore "&7%player-arg% ||&7spotkal sie z &cWielkanocnym Zajacem":
  155. send "&6&lKoszyk &7Witaj przybyszu!" to player-arg
  156. send "&7Widze ze juz otrzymales pamiatke od &6&lWielkanocnego Zajaca." to player-arg
  157. send "&7W nagrode ze przyniosles mi pamiatke po nim dostaniesz prezent :)" to player-arg
  158. give 1 diamond helmet of protection 4 and unbreaking 3 named "&e&lSwieta" to player-arg
  159. give 1 diamond chestplate of protection 5 and unbreaking 4 named "&e&lSwieta" to player-arg
  160. give 1 diamond leggings of protection 4 and unbreaking 3 named "&e&lSwieta" to player-arg
  161. give 1 enchanted golden apple to player-arg
  162. give 4 golden apple to player-arg
  163. remove 1 paper named "&9&lPamiatka po &6&lWielkanocnym Zajacu" with lore "&7%player-arg% ||&7spotkal sie z &cWielkanocnym Zajacem" from player-arg
  164. stop
  165. else:
  166. send "&cNie masz pamiatki po &6&lWielkanocnym Zajacu" to player-arg
  167. stop
  168. else:
  169. send "&cTa komende moze wykonywac tylko &6konsola&c!"
  170. stop
  171. # # # #
  172. # End #
  173. # # # #
Advertisement
Add Comment
Please, Sign In to add comment