Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.99 KB | None | 0 0
  1. #on command "/duel":
  2. # if player is in world "Duels":
  3. # send "&cYou cannot use that command while in a Duel!"
  4. # cancel event
  5.  
  6. command /duel [<text>] [<text>]:
  7. permission: op
  8. trigger:
  9. if arg 1 is not set:
  10. send "&7&m---------------------------------------------------"
  11. send "&e&l&o/duel <player> &8- &c&l&oSend a duel request"
  12. send "&e&l&o/duel toggle &8- &c&l&oToggle receiving requests"
  13. send "&e&l&o/duel <accept/deny> <player> &8- &c&l&oAccept or Deny a request."
  14. send "&7&m---------------------------------------------------"
  15. if player is op:
  16. send "&9&l&oDuels Admin Commands&7:"
  17. send ""
  18. send "&e/duel create <arena name> &7- &cCreate an arena"
  19. send "&e/duel delete <arena name> &7- &cDelete an arena"
  20. send "&e/duel arenas &7- &cView all arenas"
  21. send "&e/duel setsp1 <arena name> &7- &cCreate and Set 1st spawn"
  22. send "&e/duel setsp2 <arena name> &7- &cSet 2nd spawn"
  23. send "&7&m---------------------------------------------------"
  24. stop
  25. if arg 1 is set:
  26. if arg 2 is not set:
  27. if arg 1 is "arenas":
  28. if {duels.arenas::*} is set:
  29. send "%{duels.arenas::*}%"
  30. else:
  31. send "&9&l&oDuels &7-> &c&l&oThere are currently no arenas!"
  32. stop
  33. if arg 1 is player:
  34. send "&9&l&oDuels &7-> &c&l&oYou cannot duel yourself!"
  35. stop
  36. if arg 1 is "toggle":
  37. if {duels.toggle.%player%} is not set:
  38. set {duels.toggle.%player%} to 1
  39. send "&9&l&oDuels &7-> &c&l&oDuel requests have been disabled!"
  40. stop
  41. else:
  42. clear {duels.toggle.%player%}
  43. send "&9&l&oDuels &7-> &a&l&oDuel requests have been enabled!"
  44. stop
  45. if {duels.toggle.%arg 1%} is set:
  46. send "&9&l&oDuels &7-> &c&l&o%arg 1% is currently not accepting duel requests."
  47. stop
  48. set {_player} to arg 1 parsed as offline player
  49. if {_player} is in world "Duels":
  50. send "&9&l&oDuels &7-> &c&l&o%arg 1% is currently in a Duel match!"
  51. stop
  52. set {_player} to arg 1 parsed as offline player
  53. if {_player} is online:
  54. send "&9&l&oDuels &7-> &a&l&oRequest sent to %arg 1%."
  55. send "&9&l&oDuels &7-> &a&l&o%player% would like to duel you with Kit %arg 2% &8- &fType /accept %player% to accept" to {_player}
  56. set {duels.opponent.%player%} to {_player}
  57. else:
  58. send "&9&l&oDuels &7-> &c&l&o%arg 1% is not online!"
  59. if arg 2 is set:
  60. if player is op:
  61. if arg 1 is "accept":
  62. set {_opponent} to arg 2 parsed as offline player
  63. if {duels.opponent.%arg 2%} is player:
  64. if {_opponent} is online:
  65. if player's gamemode is survival:
  66. if {_opponent}'s gamemode is survival:
  67. broadcast "%{_opponent}%'s GAMEMODE IS SURVIVAL"
  68. set {duels.tpback.%{_opponent}%} to {_opponent}'s location
  69. set {duels.tpback.%player%} to player's location
  70. teleport {_opponent} to {duels.arenas.poke.sp1}
  71. teleport player to {duels.arenas.poke.sp2}
  72. set {duels.opponent.%arg 2%} to player
  73. set {duels.opponent.%player%} to arg 2 parsed as offline player
  74. else:
  75. send "&9&l&oDuels &7-> &c&l&oCannot start match, %{_player}% is in Creative Mode!"
  76. stop
  77. else:
  78. send "&9&l&oDuels &7-> &c&l&oCannot start match, you''re in Creative Mode!"
  79. stop
  80. else:
  81. send "&9&l&oDuels &7-> &c&l&o%arg 2 % is no longer online."
  82. clear {duels.opponent.%arg 2%}
  83. stop
  84. else:
  85. send "&9&l&oDuels &7-> &c&l&oYou do not have a request from %arg 2%!"
  86. stop
  87. if arg 1 is "create":
  88. if {duels.arenas.%arg 2%} is set:
  89. send "&9&l&oDuels &7-> &c&l&oArena %arg 2% already exists!"
  90. stop
  91. else:
  92. set {duels.arenas.%arg 2%} to 0
  93. add arg 2 to {duels.arenas::*}
  94. send "&9&l&oDuels &7-> &a&l&oArena %arg 2% successfully created!"
  95. stop
  96. if arg 1 is "delete":
  97. if {duels.arenas.%arg 2%} is set:
  98. remove arg 2 from {duels.arenas::*}
  99. clear {duels.arenas.%arg 2%}
  100. clear {duels.arenas.%arg 2%.sp1}
  101. clear {duels.arenas.%arg 2%.sp2}
  102. send "&9&l&oDuels &7-> &a&l&oArena %arg 2% successfully deleted!"
  103. stop
  104. else:
  105. send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
  106. stop
  107. if arg 1 is "setsp1":
  108. if {duels.arenas.%arg 2%} is set:
  109. set {duels.arenas.%arg 2%.sp1} to player's location
  110. send "&9&l&oDuels &7-> &a&l&oSpawn 1 of %arg 2% set/updated successfully!"
  111. stop
  112. else:
  113. send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
  114. stop
  115. if arg 1 is "setsp2":
  116. if {duels.arenas.%arg 2%} is set:
  117. set {duels.arenas.%arg 2%.sp2} to player's location
  118. send "&9&l&oDuels &7-> &a&l&oSpawn 2 of %arg 2% set/updated successfully!"
  119. stop
  120. else:
  121. send "&9&l&oDuels &7-> &c&l&oArena %arg 2% does not exist!"
  122. stop
  123. else:
  124. make player execute command "duel"
  125. stop
  126. else:
  127. if arg 1 is "accept":
  128. if arg 1 is "deny":
  129. else:
  130. make player execute command "duel"
  131.  
  132. on drop:
  133. if player is in world "Duels":
  134. cancel event
  135.  
  136. on damage:
  137. if (victim's health - damage) is less than 0.1:
  138. cancel event
  139. clear victim's inventory
  140. make console execute command "gmsp %victim%"
  141. if attacker is in world "Duels":
  142. if {duels.opponent.%attacker%} is victim:
  143. strike lightning at the victim
  144. set the attacker's gamemode to creative
  145. apply mining fatigue 50 to the attacker for 5 seconds
  146. apply slowness 10 to the attacker for 5 seconds
  147. make console execute command "tm message %attacker% &a&lYou Win!\n&cDefeated %victim% with &b%attacker's health% hearts!"
  148. make console execute command "execute %attacker% ~ ~ ~ /particle fireworksSpark ~ ~ ~ 3 3 3 0.15 1000"
  149. broadcast "&9&l&oDuels &7-> &a&l&o%attacker% &7&l&owon the match against &c&l&o%victim% &7&l&owith &b&l&o%attacker's health% hearts!"
  150. wait 2 seconds
  151. teleport victim to {duels.tpback.%victim%}
  152. clear {duels.tpback.%victim%}
  153. clear {duels.opponent.%victim%}
  154. clear {duels.opponent.%attacker%}
  155. wait 4 seconds
  156. teleport attacker to {duels.tpback.%attacker%}
  157. clear {duels.tpback.%attacker%}
  158.  
  159. on damage:
  160. if attacker is in world "Duels":
  161. make console execute command "tm amessage %attacker% &c&l&o%victim%s HP: %victim's health%"
  162.  
  163. on world change:
  164. if player is in world "Duels":
  165. if {spec.%player%} is 1:
  166. stop
  167. else:
  168. if player is in world "Duels":
  169. make console execute command "tm message %player% &cMatch begins in &6&l5"
  170. make console execute command "xp -999999L %player%"
  171. make console execute command "xp 5L %player%"
  172. wait 1 second
  173. if player is in world "Duels":
  174. make console execute command "tm message %player% &cMatch begins in &6&l4"
  175. make console execute command "xp -1L %player%"
  176. wait 1 second
  177. if player is in world "Duels":
  178. make console execute command "tm message %player% &cMatch begins in &6&l3"
  179. make console execute command "xp -1L %player%"
  180. wait 1 second
  181. if player is in world "Duels":
  182. make console execute command "tm message %player% &cMatch begins in &6&l2"
  183. make console execute command "xp -1L %player%"
  184. wait 1 second
  185. if player is in world "Duels":
  186. make console execute command "tm message %player% &cMatch begins in &6&l1"
  187. make console execute command "xp -1L %player%"
  188. wait 1 second
  189. if player is in world "Duels":
  190. make console execute command "xp -1L %player%"
  191. make console execute command "tm message %player% &f\n&c&lF&4&lIGHT!"
  192. wait 0.1 second
  193. make console execute command "tm message %player% \n&4&lFI&c&lG&4&lHT!"
  194. wait 0.1 second
  195. make console execute command "tm message %player% \n&4&lFIG&c&lH&4&lT!"
  196. wait 0.1 second
  197. make console execute command "tm message %player% \n&4&lFIGH&c&lT&4&l!"
  198. wait 0.1 second
  199. make console execute command "tm message %player% \n&4&lFIGHT&c&l!"
  200. wait 0.1 second
  201. make console execute command "tm message %player% \n&4&lFIGHT!"
  202. wait 0.1 second
  203. make console execute command "tm message %player% \n&c&lFIGHT!"
  204. wait 0.1 second
  205. make console execute command "tm message %player% \n&4&lFIGHT!"
  206. wait 0.1 second
  207. make console execute command "tm message %player% \n&c&lFIGHT!"
  208. wait 0.1 second
  209. make console execute command "tm message %player% \n&4&lFIGHT!"
  210. wait 1 second
  211. make console execute command "tm message %player% &f\n&f"
  212. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement