Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.62 KB | None | 0 0
  1. #Duel Mode################
  2.  
  3. command /duel <player>:
  4. description: Duels the specified player
  5. trigger:
  6. if {duelYes} is true:
  7. send "&f[&9Duel&f] &7There is already a duel going on!" to player
  8. stop
  9. else if {duelYes} is false:
  10. if {_duelercd.%player%} = 1:
  11. send "&f[&9Duel&f] &7You are on cooldown! Wait 30 seconds..." to player
  12. stop
  13. else:
  14. play raw sound "mob.enderdragon.growl" at player with pitch 1 volume 0.3
  15. set {_duelercd.%player%} to 1
  16. set {_dueler.%player%} to player
  17. set {_dueler2.%player%} to argument 1
  18. if {_dueler.%player%} is equal to {_dueler2.%player%}:
  19. send "&f[&9Duel&f] &7You can't duel yourself!"
  20. stop
  21. else:
  22. wait 1 tick
  23. #set {duelYes} to true#
  24. message "&f[&9Duel&f] &7Your duel request has been sent to &6%{_dueler2.%player%}%. &7Waiting for a response..."
  25. wait 1 tick
  26. send "&f[&9Duel&f] &7You have been challenged to a duel by &6%{_dueler.%player%}%. &7Would you like to accept this duel?" to argument 1
  27. play raw sound "mob.enderdragon.growl" at argument 1 with pitch 1 volume 0.3
  28. execute console command "/tellraw %{_dueler2.%player%}% ["""",{""text"":""["",""clickEvent"":{""action"":""run_command"",""value"":""""}},{""text"":""Yes"",""color"":""green"",""clickEvent"":{""action"":""run_command"",""value"":""/duelyes %{_dueler.%player%}% %{_dueler2.%player%}%""},""hoverEvent"":{""action"":""show_text"",""value"":{""text"":"""",""extra"":[{""text"":""Accept the Duel"",""color"":""green""}]}}},{""text"":""]"",""color"":""none""}]"
  29. execute console command "/tellraw %{_dueler2.%player%}% ["""",{""text"":""["",""clickEvent"":{""action"":""run_command"",""value"":""""}},{""text"":""No"",""color"":""red"",""clickEvent"":{""action"":""run_command"",""value"":""/duelno %{_dueler.%player%}%""},""hoverEvent"":{""action"":""show_text"",""value"":{""text"":"""",""extra"":[{""text"":""Deny the Duel"",""color"":""green""}]}}},{""text"":""]"",""color"":""none""}]"
  30. set {hasClicked::%{button.%player%}%} to false
  31. wait 30 seconds
  32. if {hasClicked::%{button.%player%}%} is false:
  33. send "&f[&9Duel&f] &6%{_dueler2.%player%}% &7did not take any action within 30 seconds. Cancelling..."
  34. make argument 1 execute command "/duelno %{_dueler.%player%}%"
  35. set {duelYes} to false
  36. stop
  37. else:
  38. wait 1 tick
  39. set {duelercd.%player%} to 0
  40. stop
  41.  
  42. command /duelno <player>:
  43. trigger:
  44. set {_dueler.%player%} to argument 1
  45. set {_dueler2.%player%} to player
  46. if {hasClicked::%{button.%player%}%} is false:
  47. send "&f[&9Duel&f] &6%{_dueler2.%player%}% &7has declined the duel." to argument 1
  48. send "&f[&9Duel&f] &7You declined the duel." to {_dueler2.%player%}
  49. set {hasClicked::%{button.%player%}%} to true
  50. set {duelYes} to false
  51. set {_duelercd.%player%} to 1
  52. stop
  53. else:
  54. send "&f[&9Duel&f] &7You don't have a duel to decline." to {_dueler2.%player%}
  55.  
  56. command /duelyes <player> <player>:
  57. trigger:
  58. set {_dueler.%player%} to argument 1
  59. set {_dueler2.%player%} to argument 2
  60. if {hasClicked::%{button.%player%}%} is false:
  61. play raw sound "random.pop" at argument 1 with pitch 1 volume 0.3
  62. play raw sound "random.pop" at argument 2 with pitch 1 volume 0.3
  63. send "&f[&9Duel&f] &6%{_dueler2.%player%}% &7has accepted the duel." to argument 1
  64. send "&f[&9Duel&f] &7You accepted the duel." to argument 2
  65. set {hasClicked::%{button.%player%}%} to true
  66. set {duelYes} to true
  67. wait 1 second
  68. make argument 1 execute command "/duelspecnot %{_dueler.%player%}% %{_dueler2.%player%}%"
  69. send "&f[&9Duel&f] &715 seconds until teleportation..." to argument 1
  70. send "&f[&9Duel&f] &715 seconds until teleportation..." to argument 2
  71. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  72. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  73. wait 5 seconds
  74. send "&f[&9Duel&f] &710 seconds until teleportation..." to argument 1
  75. send "&f[&9Duel&f] &710 seconds until teleportation..." to argument 2
  76. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  77. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  78. wait 5 seconds
  79. send "&f[&9Duel&f] &75 seconds until teleportation..." to argument 1
  80. send "&f[&9Duel&f] &75 seconds until teleportation..." to argument 2
  81. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  82. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  83. wait 5 seconds
  84. send "&f[&9Duel&f] &7Teleporting..." to argument 1
  85. send "&f[&9Duel&f] &7Teleporting..." to argument 2
  86. play raw sound "random.pop" at argument 1 with pitch 1 volume 0.3
  87. play raw sound "random.pop" at argument 2 with pitch 1 volume 0.3
  88. wait 1 second
  89. make argument 1 execute command "/dueltps"
  90. make argument 2 execute command "/dueltp"
  91. wait 1 second
  92. set {duelStart} to true
  93. set {_dueler.%player%} to argument 1
  94. set {_dueler2.%player%} to argument 2
  95. set {score2.%{_dueler.%player%}%} to 0
  96. set {score1.%{_dueler.%player%}%} to 0
  97. make argument 1 execute command "/duelcheck %{_dueler.%player%}% %{_dueler2.%player%}%"
  98. else:
  99. play raw sound "tile.piston.in" at argument 2 with pitch 1 volume 0.3
  100. send "&f[&9Duel&f] &7You don't have a duel to accept." to {_dueler2.%player%}
  101.  
  102. command /duelcheck <player> <player>:
  103. trigger:
  104. set {_dueler.%player%} to argument 1
  105. set {_dueler2.%player%} to argument 2
  106. wait 1 tick
  107. wait 1 second
  108. make argument 1 execute command "/dueltps"
  109. make argument 2 execute command "/dueltp"
  110. apply potion of slowness 10 to {_dueler.%player%} for 5 seconds
  111. apply potion of slowness 10 to {_dueler2.%player%} for 5 seconds
  112. wait 1 tick
  113. send "&f[&9Duel&f] &75 seconds until start..." to argument 1
  114. send "&f[&9Duel&f] &75 seconds until start..." to argument 2
  115. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  116. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  117. wait 1 second
  118. send "&f[&9Duel&f] &74 seconds until start..." to argument 1
  119. send "&f[&9Duel&f] &74 seconds until start..." to argument 2
  120. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  121. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  122. wait 1 second
  123. send "&f[&9Duel&f] &73 seconds until start..." to argument 1
  124. send "&f[&9Duel&f] &73 seconds until start..." to argument 2
  125. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  126. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  127. wait 1 second
  128. send "&f[&9Duel&f] &72 seconds until start..." to argument 1
  129. send "&f[&9Duel&f] &72 seconds until start..." to argument 2
  130. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  131. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  132. wait 1 second
  133. send "&f[&9Duel&f] &71 seconds until start..." to argument 1
  134. send "&f[&9Duel&f] &71 seconds until start..." to argument 2
  135. play raw sound "random.orb" at argument 1 with pitch 1 volume 0.3
  136. play raw sound "random.orb" at argument 2 with pitch 1 volume 0.3
  137. wait 1 second
  138. send "&f[&9Duel&f] &7The Duel begins, fight with honor &c%{_dueler.%player%}% &7and &9%{_dueler2.%player%}%!" to argument 1
  139. send "&f[&9Duel&f] &7The Duel begins, fight with honor &c%{_dueler.%player%}% &7and &9%{_dueler2.%player%}%!" to argument 2
  140. play raw sound "random.pop" at argument 1 with pitch 1 volume 0.3
  141. play raw sound "random.pop" at argument 2 with pitch 1 volume 0.3
  142. make argument 1 execute command "/dueltps"
  143. make argument 2 execute command "/dueltp"
  144. wait 1 second
  145. loop 120 times:
  146. loop all players:
  147. set {dueler.%loop-player%} to argument 1
  148. set {dueler2.%loop-player%} to argument 2
  149. if {dueler.%loop-player%} is dead:
  150. send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the round!" to argument 1
  151. send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the round!" to argument 2
  152. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  153. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  154. wait 2 seconds
  155. make argument 1 execute command "/duelscore %{_dueler.%player%}% %{_dueler2.%player%}%"
  156. stop
  157. else if {dueler2.%loop-player%} is dead:
  158. send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the round!" to argument 1
  159. send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the round!" to argument 2
  160. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  161. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  162. make argument 1 execute command "/duelerscore %{_dueler.%player%}% %{_dueler2.%player%}%"
  163. stop
  164. wait 1 second
  165. wait 1 second
  166. send "&f[&9Duel&f] &7The duel has taken too long, ending..." to argument 1
  167. send "&f[&9Duel&f] &7The duel has taken too long, ending..." to argument 2
  168. wait 1 second
  169. broadcast "&f[&9Duel&f] &7The Duel ended in a draw!"
  170. wait 1 second
  171. make argument 1 execute command "/spawn"
  172. make argument 2 execute command "/spawn"
  173. set {duelStart} to false
  174. set {duelYes} to false
  175. set {score1} to 0
  176. set {score2} to 0
  177. stop
  178.  
  179. command /dueltp:
  180. trigger:
  181. execute console command "/warp duel2 %player%"
  182.  
  183. command /dueltps:
  184. trigger:
  185. execute console command "/warp duel1 %player%"
  186.  
  187. command /duelend:
  188. permission: kukky.duel
  189. trigger:
  190. set {duelYes} to false
  191. set {duelStart} to false
  192. set {score1} to 0
  193. set {score2} to 0
  194. send "&f[&9Duel&f] &cYou have forced the duel to end."
  195.  
  196. command /duelscore <player> <player>:
  197. trigger:
  198. set {_dueler.%player%} to argument 1
  199. set {_dueler2.%player%} to argument 2
  200. wait 1 tick
  201. if argument 1 is {_dueler2.%player%}:
  202. wait 1 second
  203. add 1 to {score1}
  204. send "&f[&9Duel&f] &cYour score went up by 1." to argument 1
  205. else if argument 1 is {_dueler.%player%}:
  206. wait 1 second
  207. add 1 to {score2}
  208. send "&f[&9Duel&f] &9Your score went up by 1." to argument 2
  209. wait 1 second
  210. send "&f[&9Duel&f] &7The score is now &c%{score1}% &7to &9%{score2}%&7!" to argument 1
  211. send "&f[&9Duel&f] &7The score is now &c%{score1}% &7to &9%{score2}%&7!" to argument 2
  212. play raw sound "random.pop" at argument 1 with pitch 1 volume 0.3
  213. play raw sound "random.pop" at argument 2 with pitch 1 volume 0.3
  214. wait 1 second
  215. if {score1} is 2:
  216. #send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!" to argument 1#
  217. #send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!" to argument 2#
  218. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  219. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  220. wait 1 second
  221. make argument 1 execute command "/spawn"
  222. make argument 2 execute command "/spawn"
  223. set {duelStart} to false
  224. set {duelYes} to false
  225. clear {score1}
  226. clear {score2}
  227. stop
  228. else if {score2} is 2:
  229. #send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the duel!" to argument 1#
  230. #send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the duel!" to argument 2#
  231. broadcast "&f[&9Duel&f] &c%{_dueler2.%player%}% &7has won the duel!"
  232. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  233. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  234. wait 1 second
  235. make argument 1 execute command "/spawn"
  236. make argument 2 execute command "/spawn"
  237. set {duelStart} to false
  238. set {duelYes} to false
  239. clear {score1}
  240. clear {score2}
  241. stop
  242. wait 1 tick
  243. make argument 1 execute command "/duelcheck %{_dueler.%player%}% %{_dueler2.%player%}%"
  244. stop
  245.  
  246. command /duelerscore <player> <player>:
  247. trigger:
  248. set {_dueler.%player%} to argument 1
  249. set {_dueler2.%player%} to argument 2
  250. wait 1 tick
  251. if argument 1 is {_dueler.%player%}:
  252. wait 1 second
  253. add 1 to {score1}
  254. send "&f[&9Duel&f] &cYour score went up by 1." to argument 1
  255. else if argument 1 is {_dueler2.%player%}:
  256. wait 1 second
  257. add 1 to {score2}
  258. send "&f[&9Duel&f] &9Your score went up by 1." to argument 1
  259. wait 1 tick
  260. send "&f[&9Duel&f] &7The score is now &c%{score1}% &7to &9%{score2}%&7!" to argument 1
  261. send "&f[&9Duel&f] &7The score is now &c%{score1}% &7to &9%{score2}%&7!" to argument 2
  262. play raw sound "random.pop" at argument 1 with pitch 1 volume 0.3
  263. play raw sound "random.pop" at argument 2 with pitch 1 volume 0.3
  264. wait 1 second
  265. if {score1} is 2:
  266. #send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!" to argument 1#
  267. #send "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!" to argument 2#
  268. broadcast "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!"
  269. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  270. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  271. wait 1 second
  272. make argument 1 execute command "/spawn"
  273. make argument 2 execute command "/spawn"
  274. set {duelStart} to false
  275. set {duelYes} to false
  276. set {score1} to 0
  277. set {score2} to 0
  278. stop
  279. else if {score2} is 2:
  280. #send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the duel!" to argument 1#
  281. #send "&f[&9Duel&f] &9%{_dueler2.%player%}% &7has won the duel!" to argument 2#
  282. broadcast "&f[&9Duel&f] &c%{_dueler.%player%}% &7has won the duel!"
  283. play raw sound "random.levelup" at argument 1 with pitch 1 volume 0.3
  284. play raw sound "random.levelup" at argument 2 with pitch 1 volume 0.3
  285. wait 1 second
  286. make argument 1 execute command "/spawn"
  287. make argument 2 execute command "/spawn"
  288. set {duelStart} to false
  289. set {duelYes} to false
  290. clear {score1}
  291. clear {score2}
  292. stop
  293. wait 1 tick
  294. make argument 1 execute command "/duelcheck %{_dueler.%player%}% %{_dueler2.%player%}%"
  295. stop
  296.  
  297. command /duelspecnot <player> <player>:
  298. trigger:
  299. set {_dueler.%player%} to argument 1
  300. set {_dueler2.%player%} to argument 2
  301. if {duelYes} is true:
  302. loop all players:
  303. wait 1 tick
  304. send "&f[&9Duel&f] &c%{_dueler.%player%}% &7and &9%{_dueler2.%player%}% &7are duelling!" to loop-player
  305. execute console command "/tellraw %loop-player% ["""",{""text"":""["",""clickEvent"":{""action"":""run_command"",""value"":""""}},{""text"":""Spectate the Duel"",""color"":""blue"",""clickEvent"":{""action"":""run_command"",""value"":""/duelspec""},""hoverEvent"":{""action"":""show_text"",""value"":{""text"":"""",""extra"":[{""text"":""Spectate the Duel"",""color"":""light gray""}]}}},{""text"":""]"",""color"":""none""}]"
  306. else:
  307. stop
  308.  
  309. command /duelspec:
  310. trigger:
  311. execute console command "/warp duelspectate %player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement