Advertisement
xNawi

Parkour

Dec 8th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.27 KB | None | 0 0
  1. options:
  2. tag: &8[&6Castle&8]
  3. command /castle [<text="info">] [<text>] [<text>]:
  4. trigger:
  5. if arg 1 is "info":
  6. send "{@tag}"
  7. send " "
  8. send "&6/castle add &8- &7Dodaje nowa arene"
  9. send "&6/castle remove &8- &7Usuwa arene"
  10. send "&6/castle list &8- &7Lista aren"
  11. send "&6/castle setspawn &8- &7Ustawia spawny"
  12. send "&6/castle active &8- &7Aktywuje arene"
  13. send "&6/castle minplayers &8- &7Ustawia minimalna liczbe graczy na arenie"
  14. send "&6/castle join &8- &7Dolacza do areny"
  15. send "&6/castle leave &8- &7Opuszcza arene"
  16. if arg 1 is "active":
  17. if arg 2 is set:
  18. loop {castle::list::*}:
  19. if loop-value is arg 2:
  20. if {castle::REDresp::%arg 2%} is set:
  21. if {castle::BLUEresp::%arg 2%} is set:
  22. if {castle::lobby::%arg 2%} is set:
  23. if {castle::minplayers::%arg 2%} is set:
  24. set {castle::status::%arg 2%} to "oczekuje"
  25. send "{@tag} &7Aktywowales arene &6%arg 2%"
  26. else:
  27. send "{@tag} &7Ustaw liczbe graczy wymagana do startu gry, &6/castle minplayers <arena> <liczba>"
  28. else:
  29. send "{@tag} &7Ustaw lobby areny, &6/castle setspawn LOBBY <arena>"
  30. else:
  31. send "{@tag} &7Ustaw BLUE resp areny, &6/castle setspawn BLUE <arena>"
  32. else:
  33. send "{@tag} &7Ustaw RED resp areny, &6/castle setspawn RED <arena>"
  34. stop
  35. send "{@tag} &7Taka arena nie istnieje!"
  36. else:
  37. send "{@tag} &6/castle active <arena>"
  38. if arg 1 is "add":
  39. if arg 2 is set:
  40. loop {castle::list::*}:
  41. if loop-value is arg 2:
  42. send "{@tag} &7Taka arena juz istnieje!"
  43. stop
  44. add arg 2 to {castle::list::*}
  45. set {castle::minplayers::%arg 2%} to 16
  46. set {castle::status::%arg 2%} to "niedostepna"
  47. send "{@tag} &7Dodano arene o nazwie &6%arg 2%&7."
  48. else:
  49. send "&6/castle add <name>"
  50. if arg 1 is "remove":
  51. if arg 2 is set:
  52. loop {castle::list::*}:
  53. if loop-value is arg 2:
  54. delete {castle::REDresp::%arg 2%}
  55. delete {castle::BLUEresp::%arg 2%}
  56. delete {castle::lobby::%arg 2%}
  57. delete {castle::status::%arg 2%}
  58. delete {castle::minplayers::%arg 2%}
  59. remove arg 2 from {castle::list::*}
  60. send "{@tag} &7Usunieto arene o nazwie &6%arg 2%&7."
  61. stop
  62. send "{@tag} &7Arena nie istnieje!"
  63. else:
  64. send "&6/castle remove <name>"
  65. if arg 1 is "setspawn":
  66. if arg 2 is set:
  67. if arg 3 is set:
  68. loop {castle::list::*}:
  69. if loop-value is arg 3:
  70. if arg 2 is "RED":
  71. set {castle::REDresp::%arg 3%} to location of player
  72. send "{@tag} &7Ustawiono RED resp dla areny &6%arg 3%&7."
  73. if arg 2 is "BLUE":
  74. set {castle::BLUEresp::%arg 3%} to location of player
  75. send "{@tag} &7Ustawiono BLUE resp dla areny &6%arg 3%&7."
  76. if arg 2 is "LOBBY":
  77. set {castle::lobby::%arg 3%} to location of player
  78. send "{@tag} &7Ustawiono LOBBY resp dla areny &6%arg 3%&7."
  79. stop
  80. send "{@tag} &7Arena nie istnieje!"
  81. else:
  82. send "&6/castle setspawn BLUE / RED / LOBBY <arena>"
  83. else:
  84. send "&6/castle setspawn BLUE / RED / LOBBY <arena>"
  85. if arg 1 is "minplayers":
  86. if arg 2 is set:
  87. loop {castle::list::*}:
  88. if loop-value is arg 2:
  89. if arg 3 is set:
  90. set {castle::minplayers::%arg 2%} to arg 3
  91. send "{@tag} &7Ustawiono &6%arg 3% &7minimalnych garczy dla areny &6%arg 2%&7."
  92. else:
  93. send "&6/castle minplayers <name> <number>"
  94. stop
  95. send "{@tag} &7Arena nie istnieje!"
  96. else:
  97. send "&6/castle minplayers <name> <number>"
  98. if arg 1 is "list":
  99. loop {castle::list::*}:
  100. send "&8%loop-index%. &6%loop-value%"
  101. if arg 1 is "join":
  102. if arg 2 is set:
  103. loop {castle::list::*}:
  104. if loop-value is arg 2:
  105. if {castle::status::%arg 2%} is "oczekuje":
  106. if {castle::join::%player%} is set:
  107. add player to {castle::players::%arg 2%::*}
  108. set {castle::join::%player%} to arg 2
  109. teleport player to {castle::lobby::%arg 2%}
  110. send "{@tag} &6%player% &7dolaczyl do gry. &8[&6%size of {castle::players::%arg 2%::*}%&8/&6%{castle::minplayers::%arg 2%}%&8]" to {castle::players::%arg 2%::*}
  111. if (size of {castle::players::%arg 2%::*}) = {castle::minplayers::%arg 2%}:
  112. set {castle::status::%arg 2%} to "w trakcie"
  113. loop {castle::players::%arg 2%::*}:
  114. set level of loop-value-2 to 30
  115. loop 30 times:
  116. if (size of {castle::players::%arg 2%::*}) = {castle::minplayers::%arg 2%}:
  117. loop {castle::players::%arg 2%::*}:
  118. set {_value} to loop-value-2
  119. play raw sound "note.pling" at {_value} with pitch 1 volume 5
  120. set {_x} to level of {_value} - 1
  121. set level of {_value} to {_x}
  122. send "{@tag} &7Gra rozpocznie sie za &6%{_x}% sekund &7!" to {_value}
  123. wait 1 second
  124. else:
  125. exit loop
  126. set {castle::status::%arg 2%} to "oczekuje"
  127. send "{@tag} &6%player% &7Opuscil gre. &8[&6%{castle::players::%arg 2%::*}%&8/&6%{castle::minplayers::%arg 2%}%&8]" to {castle::players::%arg 2%::*}
  128. send "{@tag} &cOdliczanie zatrzymane." to {castle::players::%arg 2%::*}
  129. play raw sound "note.pling" at {castle::players::%arg 2%::*} with pitch 2 volume 5
  130. set level of {castle::players::%arg 2%::*} to 0
  131. set {_number} to size of {castle::players::%arg 2%::*}
  132. loop {castle::players::%arg 2%::*}:
  133. set {_y} to loop-value-2
  134. loop {_number}/2 times:
  135. set {_x%loop-number%} to random element out of {_y}
  136. add {_x%loop-number%} to {castle::REDteam::%arg 2%}
  137. remove {_x%loop-number%} from {_y}
  138. add {_y} to {castle::BLUEteam::%arg 2%}
  139. teleport {castle::REDteam::%arg 2%} to {castle::REDresp::%arg 2%}
  140. teleport {castle::BLUEteam::%arg 2%} to {castle::BLUEresp::%arg 2%}
  141. else:
  142. send "{@tag} &7Jestes juz na arenie."
  143. else if {castle::status::%arg 2%} is "w trakcie":
  144. send "{@tag} &7Arena jest w trakcie gry."
  145. else if {castle::status::%arg 2%} is "niedostepna":
  146. send "{@tag} &7Arena nie jest dostepna."
  147. stop
  148. send "{@tag} &7Ta arena nie jest dostepna"
  149. else:
  150. send "{@tag} &6/castle join <nazwa>"
  151. if arg 1 is "leave":
  152. if {castle::join::%player%} is set:
  153. send "{@tag} &6%player% &7Opuscil gre. &8[&6%{castle::players::%{castle::join::%player%}%::*}%&8/&6%{castle::minplayers::%{castle::join::%player%}%}%&8]" to {castle::players::%{castle::join::%player%}%::*}
  154. clear {castle::join::%player%}
  155. remove player from {castle::players::%{castle::join::%player%}%::*}
  156.  
  157.  
  158. command /test:
  159. trigger:
  160. delete {castle::join::%player%}
  161.  
  162.  
  163. every 1 seconds:
  164. loop all players:
  165. loop all blocks in radius 20 of loop-player:
  166. if loop-block is sign:
  167. if line 1 of loop-block is "{@tag}":
  168. if line 2 of loop-block is set:
  169. if {castle::status::%uncolored line 2 of loop-block%} is set:
  170. if {castle::status::%uncolored line 2 of loop-block%} is "oczekuje":
  171. set line 3 of loop-block to "&aOczekuje"
  172. et line 4 of loop-block to "&8[&6%size of {castle::players::%uncolored line 2 of loop-block%::*}%&8/&6%{castle::minplayers::%uncolored line 2 of loop-block%}%&8]"
  173. else if {castle::status::%uncolored line 2 of loop-block%} is "w trackie":
  174. set line 3 of loop-block to "&cW trakcie"
  175. set line 4 of loop-block to "&8[&6%size of {castle::players::%uncolored line 2 of loop-block%::*}%&8/&6%{castle::minplayers::%uncolored line 2 of loop-block%}%&8]"
  176. else if {castle::status::%uncolored line 2 of loop-block%} is "niedostepna":
  177. set line 3 of loop-block to "&6Niedostepna"
  178. set line 4 of loop-block to " "
  179. on sign change:
  180. if line 1 is "castle":
  181. set line 1 to "{@tag}"
  182. if line 2 is set:
  183. loop {castle::list::*}:
  184. if loop-value is line 2:
  185. set line 2 to "&l%line 2%"
  186. stop
  187. set line 2 to "&c<none>"
  188. on rightclick on sign:
  189. if line 1 of clicked block is "{@tag}":
  190. if line 2 of clicked block is set:
  191. loop {castle::list::*}:
  192. if loop-value is line 2:
  193. execute player command "/castle join %uncolored line 2 of clicked block%"
  194. on quit:
  195. if {castle::join::%player%} is true:
  196. execute player command "castle leave"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement