Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.31 KB | None | 0 0
  1. command /sumo [<text>] [<player>]:
  2. trigger:
  3. if arg 1 is set:
  4. if arg 1 is "invite":
  5. if arg 2 is set:
  6. if {matchison} is true:
  7. send "&8[&aSumo&8]&r &aThere are is already a match on!"
  8. stop
  9. if {matchplayer.%arg 2%} is set:
  10. send "&8[&aSumo&8]&r &aThe player already got invited."
  11. stop
  12. message "&8[&aSumo&8]&r &aYou got invited by &f%player%&a for a sumo match" to arg 2
  13. message "&8[&aSumo&8]&r &a/sumo accept &for &a/sumo deceline" to arg 2
  14. set {matchplayer.%arg 2%} to player
  15. set {matchplayer.%player%} to arg-2
  16. set {matchplayer.%arg 2%.uuid} to player's UUID
  17. set {matchplayer.%player%.uuid} to arg-2's UUID
  18. set {invited.%arg 2%} to true
  19. message "&8[&aSumo&8]&r &aYou invited has been send to %arg 2%" to player
  20. stop
  21.  
  22. else if arg 1 is "accept":
  23. if {invited.%player%} is set:
  24. clear {invited.%player%}
  25. if {matchison} is true:
  26. message "&8[&aSumo&8]&r &aYou was too late someone else was already started a sumo match" to player
  27. message "&8[&aSumo&8]&r &f%player%&c was too late with accepting someone else already started a sumo match" to {matchplayer.%player%}
  28. clear {matchplayer.%player%}
  29. clear {matchplayer.%{matchplayer.%player%}%}
  30. stop
  31. set {matchison} to true
  32. message "&8[&aSumo&8]&r &aYou has accepted &f%player%'s &arequest. &fYou will be teleported over 10 seconds" to player
  33. message "&8[&aSumo&8]&r &a&f%player% &ahas accepted your sumo match request &fYou will be teleported over 10 seconds" to {matchplayer.%player%}
  34. wait 200 ticks
  35. teleport player to {matchplayer1spawn}
  36. set {tempplayer} to {matchplayer.%player%}
  37. teleport {tempplayer} to {matchplayer2spawn}
  38. set {donotmove.%player%} to true
  39. set {donotmove.%{matchplayer.%player%}%} to true
  40. set {_countt} to 0
  41. loop 36 times:
  42. set {in.%player%.%{_countt}%} to slot {_countt} of player's inventory
  43. set {in.%{matchplayer.%player%}%.%{_countt}%} to slot {_countt} of {matchplayer.%player%}'s inventory
  44. add 1 to {_countt}
  45. set {in.%player%.h} to player's helmet
  46. set {in.%{matchplayer.%player%}%.h} to {matchplayer.%player%}'s helmet
  47. set {in.%player%.c} to player's chestplate
  48. set {in.%{matchplayer.%player%}%.c} to {matchplayer.%player%}'s chestplate
  49. set {in.%player%.l} to player's leggings
  50. set {in.%{matchplayer.%player%}%.l} to {matchplayer.%player%}'s leggings
  51. set {in.%player%.b} to player's boots
  52. set {in.%{matchplayer.%player%}%.b} to {matchplayer.%player%}'s boots
  53. message "&8[&aSumo&8]&r &aYou get your items back after the match ended" to player
  54. message "&8[&aSumo&8]&r &aYou get your items back after the match ended" to {matchplayer.%player%}
  55. clear player's inventory
  56. clear {matchplayer.%player%}'s inventory
  57. send player title "&bSumo match begin over" with subtitle "&a3 seconds" for 1 seconds
  58. send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a3 seconds" for 1 seconds
  59. wait 20 ticks
  60. send player title "&bSumo match begin over" with subtitle "&a2 seconds" for 1 seconds
  61. send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a2 seconds" for 1 seconds
  62. wait 20 ticks
  63. send player title "&bSumo match begin over" with subtitle "&a1 second" for 1 seconds
  64. send {matchplayer.%player%} title "&bSumo match begin over" with subtitle "&a1 second" for 1 seconds
  65. wait 20 ticks
  66. clear {donotmove.%player%}
  67. clear {donotmove.%{matchplayer.%player%}%}
  68. message "&8[&aSumo&8]&r &b&lBEGIN!" to player
  69. message "&8[&aSumo&8]&r &b&lBEGIN!" to {matchplayer.%player%}
  70. stop
  71.  
  72.  
  73. else:
  74. send "&c(!) &aSorry, you don't has been invited"
  75.  
  76. else if arg 1 is "decline":
  77. if {matchplayer.%player%} is set:
  78. send "&8[&aSumo&8]&r aYou has declined &f%{matchplayer.%player%}%&c sumo match"
  79. message "&8[&aSumo&8] &f%player%&c has declined your sumo match" to {matchplayer.%player%}
  80. set {tempmatchplayer} to {matchplayer.%player%}
  81. clear {matchplayer.%player%}
  82. clear {matchplayer.%{tempmatchplayer}%}
  83. clear {tempmatchplayer}
  84.  
  85. else:
  86. send "&c(!) &aSorry, you don't has been invited"
  87. else if arg 1 is "leave":
  88. if {matchplayer.%player%} is set:
  89. send "&8[&aSumo&8]&r &aYou lose the sumo match"
  90. message "&8[&aSumo&8] &aYou won the sumo match!" to {matchplayer.%player%}
  91. execute console command "espawn %{matchplayer.%player%}%"
  92. execute console command "espawn %player%"
  93. add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
  94. add 1 to {sumostats.lose.%player's UUID%}
  95. set {matchison} to false
  96. set {_count} to 0
  97. loop 36 times:
  98. set slot {_count} of player's inventory to {in.%player%.%{_count}%}
  99. set slot {_count} of {matchplayer.%player%}'s inventory to {in.%{matchplayer.%player%}%.%{_count}%}
  100. add 1 to {_count}
  101. set the helmet of player to {in.%player%.h}
  102. set the chestplate of player to {in.%player%.c}
  103. set the leggings of player to {in.%player%.l}
  104. set the boots of player to {in.%player%.b}
  105. set the helmet of player to {in.%{matchplayer.%player%}%.h}
  106. set the chestplate of player to {in.%{matchplayer.%player%}%.c}
  107. set the leggings of player to {in.%{matchplayer.%player%}%.l}
  108. set the boots of player to {in.%{matchplayer.%player%}%.b}
  109. clear {matchplayer.%{matchplayer.%player%}%}
  110. clear {matchplayer.%player%}
  111. stop
  112. else if arg 1 is "stats":
  113. if {sumostats.win.%player's UUID%} is not set:
  114. set {sumostats.win.%player's UUID%} to 0
  115. if {sumostats.lose.%player's UUID%} is not set:
  116. set {sumostats.lose.%player's UUID%} to 0
  117. send "&a=-=-=-=-=-=-= &bStats &a=-=-=-=-=-=-="
  118. send "&r"
  119. send "&r"
  120. send "&r &r &aWins: &f%{sumostats.win.%player's UUID%}%"
  121. send "&r &r &aLoses: &f%{sumostats.lose.%player's UUID%}%"
  122. send "&r"
  123. else if arg 1 is "spectate":
  124. if {matchison} is true:
  125. teleport player to {sumospectate}
  126. send "&c(!) &aYou has been teleported to watch the match."
  127. stop
  128.  
  129. else:
  130. send "&4(!)&c There is no current match"
  131. stop
  132.  
  133.  
  134. else:
  135. make player execute "sumo"
  136. else:
  137. send "&b=-=-=-=-=-= &a&lHelp Menu &b=-=-=-=-=-="
  138. send "&r"
  139. send "&r"
  140. send "&b/sumo leave &f||&a Leave current sumo match"
  141. send "&b/sumo invite [player] &f||&a Invite a player for a sumo match"
  142. send "&b/sumo accept &f||&a Accept sumo match when you got invited"
  143. send "&b/sumo decline &f||&a Deceline sumo match when you get invited"
  144. send "&b/sumo stats ||&a See all sumo stats"
  145. send "&b/sumo spectate &f||&a Spectate current sumo match"
  146. send "&b/sumop &f||&a Admin help menu"
  147. stop
  148.  
  149. on any movement:
  150. if {donotmove.%player%} is set:
  151. cancel event
  152. message "&8[&aSumo&8]&r &aYou can move when timer is done" to player
  153.  
  154. on death:
  155. if {matchplayer.%player%} is set:
  156. set {giveitemsback.%player%} to true
  157. message "&8[&aSumo&8]&r &aYou lose the sumo match" to player
  158. message "&8[&aSumo&8]&r &aYou won the sumo match! The other died" to {matchplayer.%player%}
  159. execute console command "espawn %{matchplayer.%player%}%"
  160. execute console command "espawn %player%"
  161. add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
  162. add 1 to {sumostats.lose.%player's UUID%}
  163. set {matchison} to false
  164. set {_count} to 0
  165. loop 36 times:
  166. set slot {_count} of {matchplayer.%player%}'s inventory to {in.%{matchplayer.%player%}%.%{_count}%}
  167. add 1 to {_count}
  168. set the helmet of player to {in.%{matchplayer.%player%}%.h}
  169. set the chestplate of player to {in.%{matchplayer.%player%}%.c}
  170. set the leggings of player to {in.%{matchplayer.%player%}%.l}
  171. set the boots of player to {in.%{matchplayer.%player%}%.b}
  172. clear {matchplayer.%{matchplayer.%player%}%}
  173. clear {matchplayer.%player%}
  174. stop
  175. on quit:
  176. if {matchplayer.%player%} is set:
  177. set {giveitemsback.%player%} to true
  178. execute console command "espawn %{matchplayer.%player%}%"
  179. execute console command "espawn %player%"
  180. message "&8[&aSumo&8]&r &aYou won the sumo match!" to {matchplayer.%player%}
  181. add 1 to {sumostats.win.%{matchplayer.%player%.uuid}%}
  182. add 1 to {sumostats.lose.%player's UUID%}
  183. set {matchison} to false
  184. set {_count} to 0
  185. loop 36 times:
  186. set slot {_count} of {matchplayer.%player%}'s inventory to {i.%{matchplayer.%player%}%.%{_count}%}
  187. add 1 to {_count}
  188. set the helmet of player to {in.%{matchplayer.%player%}%.h}
  189. set the chestplate of player to {in.%{matchplayer.%player%}%.c}
  190. set the leggings of player to {in.%{matchplayer.%player%}%.l}
  191. set the boots of player to {in.%{matchplayer.%player%}%.b}
  192. clear {matchplayer.%{matchplayer.%player%}%}
  193. clear {matchplayer.%player%}
  194. stop
  195. on respawn:
  196. if {giveitemsback.%player%} is true:
  197. clear {giveitemsback.%player%}
  198. set {_count} to 0
  199. loop 36 times:
  200. set slot {_count} of player's inventory to {in.%player%.%{_count}%}
  201. add 1 to {_count}
  202. set the helmet of player to {in.%player%.h}
  203. set the chestplate of player to {in.%player%.c}
  204. set the leggings of player to {in.%player%.l}
  205. set the boots of player to {in.%player%.b}
  206.  
  207. on join:
  208. if {giveitemsback.%player%} is true:
  209. clear {giveitemsback.%player%}
  210. set {_count} to 0
  211. loop 36 times:
  212. set slot {_count} of player's inventory to {in.%player%.%{_count}%}
  213. add 1 to {_count}
  214. set the helmet of player to {in.%player%.h}
  215. set the chestplate of player to {in.%player%.c}
  216. set the leggings of player to {in.%player%.l}
  217. set the boots of player to {in.%player%.b}
  218. stop
  219.  
  220. command /sumop [<text>]:
  221. permission: "sumo.*"
  222. trigger:
  223. if arg 1 is set:
  224. if arg 1 is "spectate":
  225. set {sumospectate} to player's location
  226. send "&c(!) &aYou set spectate location!"
  227.  
  228. else if arg 1 is "player1spawn":
  229. set {matchplayer1spawn} to player's location
  230. send "&c(!) &aYou set player 1 spawn location!"
  231.  
  232. else if arg 1 is "player2spawn":
  233. set {matchplayer2spawn} to player's location
  234. send "&c(!) &aYou set player 2 spawn location!"
  235. else if arg 1 is "forceend":
  236. if {matchison} is true:
  237. loop all players:
  238. if {matchplayer.%loop-player%} is set:
  239. execute console command "espawn %loop-player%"
  240. message "&8[&aSumo&8]&r &f%player%&a Has ended your sumo match, stats are not affected" to loop-player
  241. clear {matchison}
  242. set {_count} to 0
  243. loop 36 times:
  244. set slot {_count} of loop-player's inventory to {in.%loop-player%.%{_count}%}
  245. add 1 to {_count}
  246. set the helmet of player to {in.%loop-player%.h}
  247. set the chestplate of player to {in.%loop-player%.c}
  248. set the leggings of player to {in.%loop-player%.l}
  249. set the boots of loop-layer to {in.%loop-player%.b}
  250.  
  251.  
  252.  
  253. else:
  254. send "&8[&aSumo&8]&r aThere is no current match on."
  255.  
  256. else:
  257. execute player command "sumop"
  258.  
  259. else:
  260. send "&a=-=-=-=-=-= &b&lAdmin Help &a=-=-=-=-=-="
  261. send "&r"
  262. send "&r"
  263. send "&b/sumop spectate &f|| &aSet spectate spawn location"
  264. send "&b/sumop player1spawn &f|| &aSet 1 player spawn location"
  265. send "&b/sumop player2spawn &f|| &aSet 2 player spawn location"
  266. send "&b/sumop forceend &f|| &aForce end the match"
  267. send "&r"
  268.  
  269. on walking on water:
  270. if {matchplayer.%player%} is set:
  271. if block above the block below player is water:
  272. kill player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement