Oxalist

Untitled

Apr 21st, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.87 KB | None | 0 0
  1. variables:
  2. {duelaccept::%player%} = "True"
  3. {arenaused} = "False"
  4. {kills::%player%} = 0
  5. {deaths::%player%} = 0
  6.  
  7. command /duel [<player>]:
  8. trigger:
  9. if arg 1 is not set:
  10. send "&8(&2Duels&8) &cCorrect Usage: /duel <player>"
  11. stop
  12. if arg 1 is set:
  13. if {ingame::%player%} is "True":
  14. send "&8(&2Duels&8) &aYou cannot request a duel because you are in a game"
  15. stop
  16. if {duelaccept::%arg 1%} is "True":
  17. json("%arg-1%","&8(&2Duels&8) &aClick to accept &2%player%'s &aduel request||cmd:/duelaccept %player%")
  18. send "&8(&2Duels&8) &aSuccesfully sent a duel request to &2%arg 1%" to player
  19.  
  20. command /duelaccept <player>:
  21. trigger:
  22. if {ingame::%player%} is "True":
  23. send "&8(&2Duels&8) &aYou cannot request a duel because you are in a game"
  24. stop
  25. if {arenaused} is "True":
  26. teleport arg 1 to {arenalobby}
  27. send "&8(&2Duels&8) &aThe arena is currently being used, wait here until they finish" to player
  28. send "&8(&2Duels&8) &aThe arena is currently being used, wait here until they finish" to arg 1
  29. if {arenaused} is "False":
  30. set {arenaused} to "True"
  31. teleport arg 1 to {arenaspawn1}
  32. teleport player to {arenaspawn2}
  33. add 2 to {arenaplayers}
  34. add arg 1 to {arenausers::*}
  35. add player to {arenausers::*}
  36. set {player2} to player
  37. set {player1} to arg 1
  38. set {ingame::%player%} to "True"
  39. set {ingame::%arg 1%} to "True"
  40. set {gamestarting::%player%} to "True"
  41. set {gamestarting::%arg 1%} to "True"
  42. send "&8(&2Duels&8) &aThe game will start in &25 &aseconds" to arg 1
  43. send "&8(&2Duels&8) &aThe game will start in &25 &aseconds" to player
  44. wait 1 second
  45. send "&8(&2Duels&8) &aThe game will start in &24 &aseconds" to arg 1
  46. send "&8(&2Duels&8) &aThe game will start in &24 &aseconds" to player
  47. wait 1 second
  48. send "&8(&2Duels&8) &aThe game will start in &23 &aseconds" to arg 1
  49. send "&8(&2Duels&8) &aThe game will start in &23 &aseconds" to player
  50. wait 1 second
  51. send "&8(&2Duels&8) &aThe game will start in &22 &aseconds" to arg 1
  52. send "&8(&2Duels&8) &aThe game will start in &22 &aseconds" to player
  53. wait 1 second
  54. send "&8(&2Duels&8) &aThe game will start in &21 &asecond" to arg 1
  55. send "&8(&2Duels&8) &aThe game will start in &21 &asecond" to player
  56. wait 1 second
  57. send "&8(&2Duels&8) &aThe game has started" to arg 1
  58. send "&8(&2Duels&8) &aThe game has started" to player
  59. set {gamestarting::%player%} to "False"
  60. set {gamestarting::%arg 1%} to "False"
  61.  
  62.  
  63. on death:
  64. if victim is a player:
  65. if attacker is a player:
  66. remove 1 from {arenaplayers}
  67. remove victim from {arenausers::*}
  68. set {ingame::%Victim%} to "False"
  69. send victim title "&c&lGAME OVER" with subtitle "&f%attacker% won the duel" for 3 seconds
  70. send attacker title "&6&lVICTORY" with subtitle "&f%attacker% won the duel" for 3 seconds
  71. launch creeper firework colored red at attacker timed 1
  72. wait 1 second
  73. launch creeper firework colored red at attacker timed 1
  74. wait 1 second
  75. launch creeper firework colored red at attacker timed 1
  76. wait 1 second
  77. launch creeper firework colored red at attacker timed 1
  78. add 1 to {kills::%attacker%}
  79. add 1 to {death::%victim%}
  80. teleport attacker to {lobby}
  81. teleport victim to {lobby}
  82. clear drops
  83.  
  84. command /test:
  85. trigger:
  86. send "%{arenausers::*}%"
  87.  
  88. command /resetarena:
  89. trigger:
  90. set {arenaused} to "False"
  91. delete {arenausers::*}
  92. delete {arenaplayers}
  93. set {ingame::%player%} to "False"
  94.  
  95. every tick:
  96. loop all players:
  97. if {arenaused} is "True":
  98. if {arenaplayers} is less than 2:
  99. set {ingame::%loop-player%} to "False"
  100. broadcast "&8(&2Duels&8) &2%{arenausers::*}% &Ahas won the duel"
  101. delete {arenausers::*}
  102. delete {arenaplayers}
  103. delete {player1}
  104. delete {player2}
  105. teleport loop-player to {lobby}
  106. set {arenaused} to "False"
  107.  
  108. on any movement:
  109. if {gamestarting::%player%} is "True":
  110. cancel event
  111. send "&8(&2Duels&8) &aYou cannot move while the game is starting"
  112.  
  113. command /arena [<text>]:
  114. permission: arena.set
  115. trigger:
  116. if arg 1 is "setspawn1":
  117. set {arenaspawn1} to location of player
  118. send "&8(&2Duels&8) &aSet arena spawn point 1 to your location"
  119. if arg 1 is "setspawn2":
  120. set {arenaspawn2} to location of player
  121. send "&8(&2Duels&8) &aSet arena spawn point 2 to your location"
  122. if arg 1 is "arenalobby":
  123. set {arenalobby} to location of player
  124. send "&8(&2Duels&8) &aSet arena lobby to your location"
  125.  
  126. every second:
  127. loop all players:
  128. if {ingame::%loop-player%} is "True":
  129. set {_now} to "%now%"
  130. wipe loop-player's sidebar
  131. set name of sidebar of loop-player to "&e&lDUELS"
  132. set score "&7%{_now}%" in sidebar of loop-player to 7
  133. set score "&a" in sidebar of loop-player to 6
  134. set score "&e%{player1}% &a%health of {player1}% &c&l❀" in sidebar of loop-player to 5
  135. set score "&e%{player2}% &a%health of {player2}% &c&l❀" in sidebar of loop-player to 4
  136. set score "&2" in sidebar of loop-player to 3
  137. set score "&fMap: &aHigh Vally" in sidebar of loop-player to 2
  138. set score "&6" in sidebar of loop-player to 1
  139. if {ingame::%loop-player%} is "False":
  140. set {_now} to "%now%"
  141. wipe loop-player's sidebar
  142. set name of sidebar of loop-player to "&e&lDUELS LOBBY"
  143. set score " &7%{_now}%" in sidebar of loop-player to 5
  144. set score "&a" in sidebar of loop-player to 4
  145. set score " &fKills: &a%{kills::%loop-player%}%" in sidebar of loop-player to 3
  146. set score " &fDeaths: &a%{deaths::%loop-player%}%" in sidebar of loop-player to 2
  147. set score "&6" in sidebar of loop-player to 1
  148.  
  149. Options:
  150. bowmesagge : &e%victim% &fhas &c%health of victim%&c&Lβ™₯
  151.  
  152. on damage of player:
  153. wait 1 tick
  154. attacker is a player:
  155. projectile exists
  156. if projectile is arrow:
  157. wait 1 tick
  158. victim is not dead:
  159. set action bar of attacker to "{@bowmesagge}"
Advertisement
Add Comment
Please, Sign In to add comment