Advertisement
Guest User

EVENT

a guest
Apr 25th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.43 KB | None | 0 0
  1. variables:
  2. {event.wlaczony} = false
  3. {event.dolaczyl.%player%} = false
  4. {klasa.rycerz.%player%} = false
  5. {klasa.lucznik.%player%} = false
  6. {druzyna.red.%player%} = false
  7. {druzyna.blue.%player%} = false
  8.  
  9. options:
  10. tag: &f&l[&cMC&f-PL&7.net&f&l] &a
  11. line: &b&l:: &a
  12.  
  13. command /event [<text>] [<text>]:
  14. trigger:
  15. if argument 1 is not set:
  16. send "{@tag}Komendy eventu:"
  17. send "{@line}Dolaczanie do eventu - &b/event dolacz"
  18. send "{@line}Wyjscie z eventu - &b/event wyjdz"
  19. send ""
  20. if argument 1 is "dolacz":
  21. if {event.wlaczony} is true:
  22. if {event.dolaczyl.%player%} is false:
  23. add 1 to {event::ilosc}
  24. teleport the player to {event.lobby}
  25. send "{@tag}Dolaczyles do eventu! (&b%{event::ilosc}%&a)"
  26. send "{@tag}Wybierz klase i druzyne."
  27. else:
  28. send "{@tag}Juz jestes w evencie!"
  29. else:
  30. send "{@tag}Aktualnie nie trwa zaden event!"
  31. if argument 1 is "wyjdz":
  32. if {event.wlaczony} is true:
  33. if {event.dolaczyl.%player%} is true:
  34. remove player from {event.red::*}
  35. remove player from {event.blue::*}
  36. set {event.dolaczyl.%player%} to false
  37. teleport the player to {event.spawn}
  38. remove 1 from {event::ilosc}
  39. send "{@tag}Wyszedles z eventu!"
  40. else:
  41. send "{@tag}Nie jestes w evencie!"
  42. else:
  43. send "{@tag}Aktualnie nie trwa zaden event!"
  44.  
  45. command /aevent [<text>] [<text>]:
  46. trigger:
  47. if player has permission "event.admin":
  48. if argument 1 is not set:
  49. send "{@tag}Komendy eventu dla administratora:"
  50. send "{@line}Wlaczenie eventu - &b/aevent wlacz"
  51. send "{@line}Wylacznie eventu - &b/aevent wylacz"
  52. send "{@line}Ogloszenie o evencie - &b/aevent ogloszenie"
  53. send "{@line}Start eventu - &b/aevent start"
  54. send "{@line}Stop eventu - &b/aevent stop"
  55. send "{@line}Ustawianie lokalizacji - &b/aevent ustaw <spawn/lobby/start>"
  56. send ""
  57. if argument 1 is "wlacz":
  58. if {event.wlaczony} is false:
  59. set {event.wlaczony} to true
  60. send "{@tag}Wlaczyles event!"
  61. send "{@tag}Teraz wpisz &b/event ogloszenie &aaby wyslac ogloszenie o evencie."
  62. else:
  63. send "{@tag}Event juz jest wlaczony!"
  64. if argument 1 is "wylacz":
  65. if {event.wlaczony} is true:
  66. set {event.wlaczony} to false
  67. loop {event.red::*}:
  68. teleport the loop-value to {event.spawn}
  69. set {event.dolaczyl.%loop-value%} to false
  70. set {druzyna.red.%loop-value%} to false
  71. loop {event.blue::*}:
  72. teleport the loop-value to {event.spawn}
  73. set {event.dolaczyl.%loop-value%} to false
  74. set {druzyna.red.%loop-value%} to false
  75. send "{@tag}Wylaczyles event!"
  76. broadcast ""
  77. broadcast "{@tag}Event zostal wylaczony!"
  78. broadcast ""
  79. if argument 1 is "ogloszenie":
  80. if {event.wlaczony} is true:
  81. broadcast ""
  82. broadcast "{@tag}Zapraszamy na event!"
  83. broadcast "{@tag}Komenda dolaczenia - &b/event dolacz"
  84. broadcast ""
  85. else:
  86. send "{@tag}Najpierw musisz wlaczyc event!"
  87. if argument 1 is "start":
  88. if {event.wlaczony} is true:
  89. loop {event.red::*}:
  90. teleport the loop-value to {event.red}
  91. loop {event.blue::*}:
  92. teleport the loop-value to {event.blue}
  93. broadcast ""
  94. broadcast "{@tag}Event sie rozpoczal!"
  95. broadcast "{@tag}Szukajcie skrzynek i uzbrojenia!"
  96. broadcast ""
  97. else:
  98. send "{@tag}Najpierw musisz wlaczyc event!"
  99. if argument 1 is "stop":
  100. if {event.wlaczony} is true:
  101. loop {event.red::*}:
  102. teleport the loop-value to {event.lobby}
  103. loop {event.blue::*}:
  104. teleport the loop-value to {event.lobby}
  105. broadcast ""
  106. broadcast "{@tag}Event zostal wylaczony!"
  107. broadcast ""
  108. else:
  109. send "{@tag}Najpierw musisz wlaczyc event!"
  110. if argument 1 is "ustaw":
  111. if argument 2 is "spawn":
  112. if {event.spawn} is not set:
  113. set {event.spawn} to location of the player
  114. send "{@tag}Ustawiles lokalizacje spawnu!"
  115. else:
  116. set {event.spawn} to location of the player
  117. send "{@tag}Zmieniles lokalizacje spawnu!"
  118. if argument 2 is "lobby":
  119. if {event.lobby} is not set:
  120. set {event.lobby} to location of the player
  121. send "{@tag}Ustawiles lokalizacje lobby!"
  122. else:
  123. set {event.lobby} to location of the player
  124. send "{@tag}Zmieniles lokalizacje lobby!"
  125. if argument 2 is "red":
  126. if {event.red} is not set:
  127. set {event.red} to location of the player
  128. send "{@tag}Ustawiles lokalizacje druzyny czerwonej!"
  129. else:
  130. set {event.red} to location of the player
  131. send "{@tag}Zmieniles lokalizacje druzyny czerwonej!"
  132. if argument 2 is "blue":
  133. if {event.blue} is not set:
  134. set {event.blue} to location of the player
  135. send "{@tag}Ustawiles lokalizacje druzyny niebieskiej!"
  136. else:
  137. set {event.blue} to location of the player
  138. send "{@tag}Zmieniles lokalizacje druzyny niebieskiej!"
  139. else:
  140. send "{@tag}Nie masz do tego uprawnien!"
  141.  
  142. on sign change:
  143. if line 1 is "[event]":
  144. if player has permission "event.admin":
  145. if line 2 is "druzyna":
  146. if line 3 is "red":
  147. set line 1 to "&a&lEvent"
  148. set line 2 to "&b&lDruzyna"
  149. set line 3 to ""
  150. set line 4 to "&c&lRED"
  151. if line 3 is "blue":
  152. set line 1 to "&a&lEvent"
  153. set line 2 to "&b&lDruzyna"
  154. set line 3 to ""
  155. set line 4 to "&3&lBLUE"
  156. if line 2 is "klasa":
  157. if line 3 is "lucznik":
  158. set line 1 to "&a&lEvent"
  159. set line 2 to "&b&lKlasa"
  160. set line 3 to ""
  161. set line 4 to "&f&lLUCZNIK"
  162. if line 3 is "rycerz":
  163. set line 1 to "&a&lEvent"
  164. set line 2 to "&b&lKlasa"
  165. set line 3 to ""
  166. set line 4 to "&f&lRYCERZ"
  167. if line 2 is "wyjdz":
  168. set line 1 to "&a&lEvent"
  169. set line 2 to "&b&lWyjdz"
  170. set line 4 to "&lKliknij PPM"
  171.  
  172. on rightclick on sign:
  173. if line 1 is "&a&lEvent":
  174. if line 2 is "&b&lDruzyna":
  175. if line 4 is "&c&lRED":
  176. set {druzyna.red.%player%} to true
  177. add player to {event.red::*}
  178. equip player with leather helmet
  179. equip player with leather chestplate
  180. equip player with leather leggings
  181. equip player with leather boots
  182. dye player's helmet red
  183. dye player's chestplate red
  184. dye player's leggings red
  185. dye player's boots red
  186. send "{@tag}Dolaczyles do druzyny &cczerwonej&a!"
  187. if line 4 is "&3&lBLUE":
  188. set {druzyna.blue.%player%} to true
  189. add player to {event.blue::*}
  190. equip player with leather helmet
  191. equip player with leather chestplate
  192. equip player with leather leggings
  193. equip player with leather boots
  194. dye player's helmet blue
  195. dye player's chestplate blue
  196. dye player's leggings blue
  197. dye player's boots blue
  198. send "{@tag}Dolaczyles do druzyny &3niebieskiej&a!"
  199. if line 2 is "&b&lKlasa":
  200. if line 4 is "&f&lRYCERZ":
  201. if {klasa.rycerz.%player%} is false:
  202. set {klasa.lucznik.%player%} to false
  203. remove bow from player's inventory
  204. remove stone sword from player's inventory
  205. remove arrow from player's inventory
  206. give 1 diamond sword of sharpness 3 and fire aspect 1 named "&e&lMiecz" to player
  207. give 2 enchanted golden apple named "&e&lZlote jablko" to player
  208. send "{@tag}Wybrales klase &brycerz&a!"
  209. set {klasa.rycerz.%player%} to true
  210. else:
  211. send "{@tag}Juz wybrales te klase!"
  212. if line 4 is "&f&lLUCZNIK":
  213. if {klasa.lucznik.%player%} is false:
  214. set {klasa.rycerz.%player%} to false
  215. remove diamond sword from player's inventory
  216. remove 2 enchanted golden apple from player's inventory
  217. give 1 stone sword of sharpness 1 and knockback 2 named "&e&lNoz" to player
  218. give 1 bow of power 3 and flame 1 and infinity 1 named "&e&lLuk" to player
  219. give 1 arrow named "&e&lStrzala" to player
  220. send "{@tag}Wybrales klase &blucznik&a!"
  221. set {klasa.lucznik.%player%} to true
  222. else:
  223. send "{@tag}Juz wybrales te klase!"
  224. if line 2 is "&b&lWyjdz":
  225. set {druzyna.red.%player%} to false
  226. set {druzyna.blue.%player%} to false
  227. remove player from {event.red::*}
  228. remove player from {event.blue::*}
  229. set {event.dolaczyl.%player%} to false
  230. teleport the player to {event.spawn}
  231. send "{@tag}Wyszedles z eventu!"
  232. clear player's inventory
  233. remove 1 from {event::ilosc}
  234.  
  235. on respawn:
  236. if {druzyna.red.%victim%} is true:
  237. if health of victim is less than 1:
  238. teleport the victim to {event.red}
  239. if {druzyna.blue.%victim%} is true:
  240. if health of victim is less than 1:
  241. teleport the victim to {event.blue}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement