Guest User

Untitled

a guest
Dec 20th, 2014
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.07 KB | None | 0 0
  1. # Autor: MrPatryk07 #
  2. # Nazwa skryptu: 2vs2 #
  3. # Wersja: 1.0 #
  4. # Regulamin: #
  5. # Możesz: #
  6. #Edytować kod skryptu #
  7. #Nie wolno Usuwać tej stopki #
  8. # #
  9.  
  10.  
  11. command /2v2 [<text>] [<text>] [<text>]:
  12. trigger:
  13. if arg 1 is "create":
  14. add arg 2 to {areny::*}
  15. send "&eStworzyles arene %arg 2%"
  16. stop
  17. if arg 1 is "delete":
  18. remove arg 2 from {areny::*}
  19. send "&eUsunoles arene %arg 2%"
  20. stop
  21. if arg 1 is "setspawna":
  22. if arg 2 is set:
  23. if arg 3 is set:
  24. if arg 3 is "1":
  25. if {areny::*} contains arg 2:
  26. set {spawn.1.%arg 2%} to location of player
  27. send "&4Ustawiles spawn 1 dla areny %arg 2%"
  28. if arg 3 is "2":
  29. if {areny::*} contains arg 2:
  30. set {spawn.2.%arg 2%} to location of player
  31. send "&4Ustawiles spawn 2 dla areny %arg 2%"
  32. stop
  33. if arg 1 is "slobby":
  34. set {lobby} to location of player
  35. send "&eUstawiles lobby"
  36. stop
  37. if arg 1 is "setspawn":
  38. set {spawn} to location of player
  39. send "&eUstawiles spawn"
  40. stop
  41. if arg 1 is "join":
  42. if arg 2 is set:
  43. if {arena.start.%arg 2%} is false:
  44. if {areny::*} contains arg 2:
  45. if {gra.%player%} is false:
  46. add player to {lgracze.%arg 2%::*}
  47. send "&eDolaczyles do kolejki 2vs2!"
  48. send "&eWybierz nr Druzyny!"
  49. send "&e/2v2 team %arg 2% [nr teamu]"
  50. set {gra.%player%} to true
  51. teleport player to {lobby}
  52. set {inv.%player%} to player's serialized inventory
  53. set {helm.%player%} to "%helmet of player%"
  54. set {napiersnik.%player%} to "%chestplate of player%"
  55. set {spodnie.%player%} to "%legging of player%"
  56. set {buty.%player%} to "%boots of player%"
  57. set {inv.%player%} to serialized inventory of player
  58. clear player's inventory
  59. set the player's chestplate slot to diamond chestplate
  60. set the player's leggings slot to diamond leggings
  61. set the player's boots slot to diamond boots
  62. add diamond sword to player
  63. add golden apple to player
  64. add golden apple to player
  65. add golden apple to player
  66. add golden apple to player
  67. else:
  68. send "&4Juz grasz"
  69. else:
  70. send "&4Nie ma takiej areny"
  71. else:
  72. send "&4Arena wystartowala"
  73. else:
  74. send "&4/2v2 join [nr areny]"
  75. if arg 1 is "team":
  76. if arg 2 is set:
  77. if arg 3 is set:
  78. if {areny::*} contains arg 2:
  79. if {wybral.%player%} is false:
  80. if arg 3 is "1":
  81. if {lteam.1.%arg 2%} is equal to 2:
  82. send "&eTa druzyna jest pelna"
  83. else:
  84. add player to {team.1.%arg 2%::*}
  85. add 1 to {gracze.%arg 2%}
  86. add 1 to {lteam.1.%arg 2%}
  87. add player to {lgracze.%arg 2%::*}
  88. set {wybral.%player%} to true
  89. send "&eWybrales druzyne nr 1"
  90. if arg 3 is "2":
  91. if {lteam.2.%arg 2%} is equal to 2:
  92. send "&eTa druzyna jest pelna"
  93. else:
  94. add player to {team.2.%arg 2%::*}
  95. add 1 to {gracze.%arg 2%}
  96. add 1 to {lteam.2.%arg 2%}
  97. add player to {lgracze.%arg 2%::*}
  98. set {wybral.%player%} to true
  99. send "&eWybrales druzyne nr 2"
  100. else:
  101. send "&eWyrbales juz klase!"
  102.  
  103.  
  104. if arg 1 is "leave":
  105. if arg 2 is set:
  106. if {gra.%player%} is true:
  107. set {gra.%player%} to false
  108. remove player from {team.1.%arg 2%::*}
  109. remove player from {team.2.%arg 2%::*}
  110. remove 1 from {gracze.%arg 2%::*}
  111. if {team.1.%arg 2%::*} contains player:
  112. remove 1 from {lteam.1.%arg 2%}
  113. if {team.2.%arg 2%::*} contains player:
  114. remove 1 from {lteam.2.%arg 2%}
  115. remove player from {lgracze.%arg 2%::*}
  116. teleport player to {spawn}
  117. send "&eWyszles z gry"
  118. restore inventory of player from {inv.%player%}
  119. equip the player with {helm.%player%} parsed as item
  120. equip the player with {napiersnik.%player%} parsed as item
  121. equip the player with {spodnie.%player%} parsed as item
  122. equip the player with {buty.%player%} parsed as item
  123. restore inventory of player from {inv.%player%}
  124. stop
  125. else:
  126. send "&4Nie jestes podczas gry"
  127. if arg 1 is "stoparena":
  128. if arg 2 is set:
  129. set {arena.start.%arg 2%} to false
  130. loop {lgracze.%arg 2%::*}:
  131. set {gra.%loop-value%} to false
  132. teleport loop-value to {spawn}
  133. set {wybral.%loop-value%} to false
  134. send "&4Stop areny %arg 2% udal sie"
  135. clear {team.1.%arg 2%::*}
  136. clear {team.2.%arg 2%::*}
  137. clear {gracze.%arg 2%}
  138. clear {lgracze.%arg 2%::*}
  139. set {lteam.1.%arg 2%} to 0
  140. set {lteam.2.%arg 2%} to 0
  141. if arg 1 is "vote":
  142. if arg 2 is set:
  143. if {gracze.%arg 2%} is greater than or equal to 4:
  144. set {arena.start.%arg 2%} to true
  145. send "&4Walka rozpocznie sie za 10s" to {lgracze.%arg 2%::*}
  146. wait 5 seconds
  147. send "&eWalka rozpocznie sie za 4s" to {lgracze.%arg 2%::*}
  148. wait 1 seconds
  149. send "&eWalka rozpocznie sie za 3s" to {lgracze.%arg 2%::*}
  150. wait 1 seconds
  151. send "&eWalka rozpocznie sie za 2s" to {lgracze.%arg 2%::*}
  152. wait 1 seconds
  153. send "&eWalka rozpocznie sie za 1s" to {lgracze.%arg 2%::*}
  154. wait 1 seconds
  155. teleport {team.1.%arg 2%::*} to {spawn.1.%arg 2%}
  156. teleport {team.1.%arg 2%::*} to {spawn.1.%arg 2%}
  157. wait 1 ticks
  158. teleport {team.2.%arg 2%::*} to {spawn.2.%arg 2%}
  159. teleport {team.2.%arg 2%::*} to {spawn.2.%arg 2%}
  160. send "&eWALCZ!!!" to {lgracze.%arg 2%::*}
  161. if arg 1 is not set:
  162. send "&e&m---> &62 vs 2 &e&m<---"
  163. send "&e/2v2 join [nr areny] - Dolącza gracza do kolejki"
  164. send "&e/2v2 leave - Wychodzi z kolejki"
  165. send "&e/2v2 vote [nr areny] - Gdy jest full osób w teamach wpisz to, aby zaczeła się gra!"
  166. if player has permissions "2vs2.admin":
  167. send "&c/2v2 setspawn - ustawia spawn"
  168. send "&c/2v2 slobby - ustawia lobby"
  169. send "&c/2v2 create [nr areny/nazwa] - tworzy arene"
  170. send "&c/2v2 delete [nr areny/nazwa] - usuwa arene"
  171. send "&c/2v2 setspawna [nr areny] [1/2] - ustawia spawny dla danej areny"
  172. send "&c/2v2 stoparena [nr areny] - stopuje i teleportuje graczy na spawn, gdy arena wystartowała [gdy coś pójdzie nie tak użyj tego np gdy pisze, że jestes podczas gry itp]"
  173. on respawn:
  174. if {gra.%player%} is true:
  175. set {gra.%player%} to false
  176. remove player from {team.1.%arg 2%::*}
  177. remove player from {team.2.%arg 2%::*}
  178. remove 1 from {gracze.%arg 2%::*}
  179. if {team.1.%arg 2%::*} contains player:
  180. remove 1 from {lteam.1.%arg 2%}
  181. if {team.2.%arg 2%::*} contains player:
  182. remove 1 from {lteam.2.%arg 2%}
  183. remove player from {lgracze.%arg 2%::*}
  184. teleport player to {spawn}
  185. send "&eWyszles z gry"
  186. restore inventory of player from {inv.%player%}
  187. equip the player with {helm.%player%} parsed as item
  188. equip the player with {napiersnik.%player%} parsed as item
  189. equip the player with {spodnie.%player%} parsed as item
  190. equip the player with {buty.%player%} parsed as item
  191. restore inventory of player from {inv.%player%}
  192. stop
  193.  
  194. on damage:
  195. attacker is player:
  196. if {gra.%victim%} is true:
  197. if {team.1.1} contains victim:
  198. if {team.1.1} contains attacker:
  199. cancel event
  200. on damage:
  201. attacker is player:
  202. if {gra.%victim%} is true:
  203. if {team.2.1} contains victim:
  204. if {team.2.1} contains attacker:
  205. cancel event
Advertisement
Add Comment
Please, Sign In to add comment