Guest User

Untitled

a guest
Aug 10th, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.96 KB | None | 0 0
  1. every second:
  2. if {game.start} is false:
  3. loop all players:
  4. wipe loop-player's sidebar
  5. set name of sidebar of loop-player to "&e&lDUELS"
  6. set score " " in sidebar of loop-player to 8
  7. set score "&fPlayers: &a%{game.players}%/2" in sidebar of loop-player to 7
  8. set score " " in sidebar of loop-player to 6
  9. if {game.players} = 2:
  10. set score "&fStarting in &a%{game.timer}%&as" in sidebar of loop-player to 5
  11. else:
  12. set score "&fWaiting..." in sidebar of loop-player to 5
  13. set score " " in sidebar of loop-player to 4
  14. set score "&fServer: &a%server name%" in sidebar of loop-player to 3
  15. set score "" in sidebar of loop-player to 2
  16. set score "&e%{serverip}%" in sidebar of loop-player to 1
  17. else:
  18. loop all players:
  19. wipe loop-player's sidebar
  20. set name of sidebar of loop-player to "&e&lDUELS"
  21. set score " " in sidebar of loop-player to 11
  22. if {gametimer.sec} > 10:
  23. set score "&fTime Left: &a0%{gametimer.min}%:%{gametimer.sec}%" in sidebar of loop-player to 10
  24. else if {gametimer.sec} < 10:
  25. set score "&fTime Left: &a0%{gametimer.min}%:0%{gametimer.sec}%" in sidebar of loop-player to 10
  26. else if {gametimer.sec} = 10:
  27. set score "&fTime Left: &a0%{gametimer.min}%:10" in sidebar of loop-player to 10
  28. set score " " in sidebar of loop-player to 9
  29. if {deathplayer} isn't set:
  30. set score "&a %{playerid.1}% %health of {playerid.1}%&c❤" in sidebar of loop-player to 8
  31. set score "&c %{playerid.2}% &a%health of {playerid.2}%&c❤" in sidebar of loop-player to 7
  32. else if {deathplayer} is {playerid.1}:
  33. set score "&a %{playerid.1}% &cDEAD" in sidebar of loop-player to 8
  34. set score "&c %{playerid.2}% &a%health of {playerid.2}%&c❤" in sidebar of loop-player to 7
  35. else if {deathplayer} is {playerid.2}:
  36. set score "&a %{playerid.1}% %health of {playerid.1}%&c❤" in sidebar of loop-player to 8
  37. set score "&c %{playerid.2}% &cDEAD" in sidebar of loop-player to 7
  38. set score " " in sidebar of loop-player to 6
  39. set score "&fMode: &a%{mode}% Duel" in sidebar of loop-player to 5
  40. set score " " in sidebar of loop-player to 4
  41. set score "&fMap: &a%{map}%" in sidebar of loop-player to 3
  42. set score "" in sidebar of loop-player to 2
  43. set score "&e%{serverip}%" in sidebar of loop-player to 1
  44. on break:
  45. if block isn't oak wood plank or cobblestone or obsidian:
  46. cancel the event
  47. on drop:
  48. cancel event
  49. On Hunger MEter Change:
  50. cancel event
  51.  
  52. every second:
  53. if {game.start} is true:
  54. if {end} is false:
  55. set {playerid.1} tab name to "&a%{playerid.1}%"
  56. set {playerid.1}'s tag to "&f%health of {playerid.1}% &c❤ &a"
  57. set {playerid.2} tab name to "&c%{playerid.2}%"
  58. set {playerid.2}'s tag to "&f%health of {playerid.2}% &c❤ &c"
  59. every second:
  60. if {game.start} is true:
  61. add 1 to {gameinvtimer.sec}
  62. if {gameinvtimer.sec} is higher than 59:
  63. if {game.start} is true:
  64. set {gameinvtimer.sec} to 0
  65. add 1 to {gameinvtimer.min}
  66. every second:
  67. if {game.start} is true:
  68. if {gametimer.min} isn't equal to 0:
  69. remove 1 from {gametimer.sec}
  70. if {gametimer.sec} = 0:
  71. if {game.start} is true:
  72. if {gametimer.min} isn't equal to 0:
  73. set {gametimer.sec} to 60
  74. remove 1 from {gametimer.min}
  75. if {gametimer.sec} = 60:
  76. if {game.start} is true:
  77. if {gametimer.min} = 0:
  78. if {gametimer.sec} > 0:
  79. remove 1 from {gametimer.sec}
  80. else if {gametimer.sec} < 60:
  81. if {game.start} is true:
  82. if {gametimer.min} = 0:
  83. if {gametimer.sec} > 0:
  84. remove 1 from {gametimer.sec}
  85.  
  86. if {gametimer.min} = 0:
  87. if {gametimer.sec} = 0:
  88. if {draw} = true:
  89. set {end} to true
  90. set {playerid.1} tab name to "&7%{playerid.1}%"
  91. set {playerid.1}'s tag to "&7"
  92. set {playerid.2} tab name to "&7%{playerid.2}%"
  93. set {playerid.2}'s tag to "&7"
  94. loop all players:
  95. clear loop-player's inventory
  96. set gamemode of loop-player to adventure
  97. hide loop-player from all players
  98. allow fly for loop-player
  99. set slot 8 of loop-player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  100. set slot 0 of loop-player to compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!"
  101. set slot 4 of loop-player to redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!"
  102. broadcast "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"
  103. if {mode} = "Classic":
  104. broadcast " &e&lClassic Duel &7- &f&l08:00"
  105. if {mode} = "Bow":
  106. broadcast " &e&lBow Duel &7- &f&l08:00"
  107. if {mode} = "Op":
  108. broadcast " &e&lOP Duel &7- &f&l08:00"
  109. if {mode} = "Potion":
  110. broadcast " &e&lPotion Duel &7- &f&l08:00"
  111. if {mode} = "UHC":
  112. broadcast " &e&lUHC Duel &7- &f&l08:00"
  113. broadcast "&r"
  114. broadcast "&r &fIt's a draw!"
  115. broadcast "&r &7%{playerid.1}% %{playerid.2}% "
  116. broadcast "&r"
  117. set {hv} to health of {playerid.1}
  118. set {ha} to health of {playerid.2}
  119. if {hv} = 10:
  120. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  121. else if {hv} > 10:
  122. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  123. if {hv} = 9:
  124. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  125. else if {hv} > 9:
  126. if {hv} < 10:
  127. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  128. if {hv} = 8:
  129. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  130. else if {hv} > 8:
  131. if {hv} < 9:
  132. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  133. if {hv} = 7:
  134. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  135. else if {hv} > 7:
  136. if {hv} < 8:
  137. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  138. if {hv} = 6:
  139. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  140. else if {hv} > 6:
  141. if {hv} < 7:
  142. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  143. if {hv} = 5:
  144. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  145. else if {hv} > 5:
  146. if {hv} < 6:
  147. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  148. if {hv} = 4:
  149. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  150. else if {hv} > 4:
  151. if {hv} < 5:
  152. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  153. if {hv} = 3:
  154. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  155. else if {hv} > 3:
  156. if {hv} < 4:
  157. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  158. if {hv} = 2:
  159. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  160. else if {hv} > 2:
  161. if {hv} < 3:
  162. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  163. if {hv} = 1:
  164. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  165. else if {hv} > 1:
  166. if {hv} < 2:
  167. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  168. if {hv} = 0:
  169. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  170. else if {hv} > 0:
  171. if {hv} < 1:
  172. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.1} %'s Health " to {playerid.2}
  173. if {ha} = 10:
  174. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  175. else if {ha} > 10:
  176. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  177. if {ha} = 9:
  178. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  179. else if {ha} > 9:
  180. if {ha} < 10:
  181. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  182. if {ha} = 8:
  183. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  184. else if {ha} > 8:
  185. if {ha} < 9:
  186. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  187. if {ha} = 7:
  188. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  189. else if {ha} > 7:
  190. if {ha} < 8:
  191. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  192. if {ha} = 6:
  193. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  194. else if {ha} > 6:
  195. if {ha} < 7:
  196. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  197. if {ha} = 5:
  198. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  199. else if {ha} > 5:
  200. if {ha} < 6:
  201. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  202. if {ha} = 4:
  203. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  204. else if {ha} > 4:
  205. if {ha} < 5:
  206. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  207. if {ha} = 3:
  208. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  209. else if {ha} > 3:
  210. if {ha} < 4:
  211. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  212. if {ha} = 2:
  213. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  214. else if {ha} > 2:
  215. if {ha} < 3:
  216. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  217. if {ha} = 1:
  218. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  219. else if {ha} > 1:
  220. if {ha} < 2:
  221. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  222. if {ha} = 0:
  223. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  224. else if {ha} > 0:
  225. if {ha} < 1:
  226. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%{playerid.2}%'s Health " to {playerid.1}
  227. broadcast "&r"
  228. broadcast "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"
  229. send all players title "&e&lDRAW!" with subtitle "&fOut of time!" for 6 second
  230. set {draw} to false
  231. wait 7 seconds
  232. execute console command "/xreg regen UHC"
  233. loop all players:
  234. send loop-player to "%{hubserver}%"
  235. wait 1.5 second
  236. restart server
  237.  
  238. On Pick Up arrow:
  239. if {end} is true:
  240. cancel event
  241. if {game.start} is true:
  242. if player's gamemode is adventure:
  243. cancel event
  244.  
  245. on skript load:
  246. clear {deathplayer}
  247. clear {playerid.1}
  248. clear {playerid.2}
  249. set {playerid} to 0
  250. set {end} to false
  251. set {draw} to true
  252. if folder "plugins/Duels" doesn't exists:
  253. create folder "plugins/Duels"
  254. if file "plugins/Duels/config.yml" doesn't exists:
  255. create file "plugins/Duels/config.yml"
  256. wf "" to "plugins/Duels/config.yml"
  257. wf "##----------------------------------------------##" to "plugins/Duels/config.yml"
  258. wf "## DUELS BY _EMME_ENNE_ ##" to "plugins/Duels/config.yml"
  259. wf "##----------------------------------------------##" to "plugins/Duels/config.yml"
  260. WF "" to "plugins/Duels/config.yml"
  261. wf "##Map name displays in Scoreboard" to "plugins/Duels/config.yml"
  262. wf "MapName: Courtyard v3" to "plugins/Duels/config.yml"
  263. wf "" to "plugins/Duels/config.yml"
  264. wf "##Server to send players when game finishes" to "plugins/Duels/config.yml"
  265. wf "HubServer: lobby" to "plugins/Duels/config.yml"
  266. wf "" to "plugins/Duels/config.yml"
  267. wf "##Server Ip displays in Scoreboard" to "plugins/Duels/config.yml"
  268. wf "ServerIp: www.hypixel.net" to "plugins/Duels/config.yml"
  269. wf "" to "plugins/Duels/config.yml"
  270. wf "##Modes: Op - Bow - UHC - Potion - Classic" to "plugins/Duels/config.yml"
  271. wf "Mode: Classic" to "plugins/Duels/config.yml"
  272. set {map} to value "MapName" get of "plugins/Duels/config.yml"
  273. set {hubserver} to value "HubServer" get of "plugins/Duels/config.yml"
  274. set {serverip} to value "ServerIp" get of "plugins/Duels/config.yml"
  275. set {mode} to value "Mode" get of "plugins/Duels/config.yml"
  276. else:
  277. set {map} to value "MapName" get of "plugins/Duels/config.yml"
  278. set {hubserver} to value "HubServer" get of "plugins/Duels/config.yml"
  279. set {serverip} to value "ServerIp" get of "plugins/Duels/config.yml"
  280. set {mode} to value "Mode" get of "plugins/Duels/config.yml"
  281. set {game.start} to false
  282. set {game.players} to 0
  283. clear {playerid.1}
  284. clear {playerid.2}
  285. set {playerid} to 0
  286. set {gametimer.sec} to 60
  287. set {gametimer.min} to 7
  288. set difficulty of world "world" to hard
  289. clear {gameinvtimer.sec}
  290. set {gameinvtimer.min} to 0
  291. if {mode} != "Classic" or "Op" or "Bow" or "UHC" or "Potion":
  292. message "&f[Duels] &cMode &e""%{mode}%""&c Unknown! Modes Available: Classic - Op - Bow - UHC - Potion" to console
  293. message "&f[Duels] &cMode set to &eClassic&c!" to console
  294.  
  295. on chat:
  296. if player's gamemode is survival:
  297. if {game.start} is true:
  298. cancel event
  299. broadcast "&a[GAME] &7%player%: %message%"
  300. else:
  301. if {end} is false:
  302. cancel event
  303. broadcast "&7&k%player%&r&7: %message%"
  304. else:
  305. cancel event
  306. broadcast "&7[SPECTATOR] %player%&r&7: %message%"
  307. else:
  308. cancel event
  309. loop all players:
  310. if loop-player's gamemode is adventure:
  311. send "&7[SPECTATOR] %player%&r&7: %message%" to loop-player
  312.  
  313. on rightclick:
  314. set {_name} to name of player's tool
  315. if {_name} contains "&6Golden":
  316. remove player head from player
  317. apply potion of swiftness 1 to the player for 10 seconds
  318. apply regeneration 1 to the player for 5 seconds
  319. apply regeneration 1 to the player for 5 seconds
  320.  
  321. on join:
  322. if {game.start} is false:
  323. if {game.players} != 2:
  324. if {mode} != "Classic" or "Op" or "Bow" or "UHC" or "Potion":
  325. send "&cMode &e""%{mode}%""&c Unknown! Modes Available: Classic - Op - Bow - UHC - Potion"
  326. set {mode} to "Classic"
  327. send "&cMode set to &eClassic&c!"
  328. set {enderpearl.%player%} to true
  329. if {mode} = "Potion":
  330. set {enderpearl.%player%.time} to 15
  331. else if {mode} = "Bow":
  332. set {enderpearl.%player%.time} to 3
  333. set {autoteleport.%player%} to false
  334. set {nightvision.%player%} to true
  335. set {showspectator.%player%} to false
  336. set {sendhub.%player%} to true
  337. set {fly.%player%} to true
  338. disable fly for player
  339. heal player
  340. set player's level to 0
  341. set player's xp to 0
  342. apply night vision to player for 10000 seconds
  343. remove speed from player
  344. remove invisibility from player
  345. disable fly for player
  346. set the player's food level to 10
  347. set the maximum health of the player to 10
  348. set player's gamemode to survival
  349. add 1 to {playerid}
  350. if {playerid.%{playerid}%} isn't set:
  351. set {playerid.%{playerid}%} to player
  352. add 1 to {game.players}
  353. if {playerid.1} = player:
  354. teleport {playerid.1} to {gamespawn.1}
  355. else if {playerid.2} = player:
  356. teleport {playerid.2} to {gamespawn.2}
  357. set player tab name to "&f&k%player%"
  358. set player's tag to "&f&k"
  359. set join message to "&7&k%player%&r&e has joined (&b%{game.players}%&e/&b2&e)!"
  360. clear player's inventory
  361. set slot 8 of player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  362. if {game.players} = 2:
  363. set {game.timer} to 10
  364. else:
  365. set {autoteleport.%player%} to false
  366. set {nightvision.%player%} to true
  367. set {showspectator.%player%} to false
  368. set {sendhub.%player%} to true
  369. set {fly.%player%} to true
  370. apply night vision to player for 10000 seconds
  371. heal player
  372. set join message to ""
  373. set player tab name to "&7%player%"
  374. set player's tag to "&7"
  375. teleport player to {gamespawn.spectator}
  376. set gamemode of player to adventure
  377. loop all players:
  378. if gamemode of loop-player is adventure:
  379. hide loop-player to all players
  380. apply invisibility to player for 10000 seconds
  381. allow fly for player
  382. set slot 8 of player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  383. set slot 0 of player to compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!"
  384. set slot 4 of player to redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!"
  385. else:
  386. set {autoteleport.%player%} to false
  387. set {nightvision.%player%} to true
  388. set {showspectator.%player%} to false
  389. set {sendhub.%player%} to true
  390. apply night vision to player for 10000 seconds
  391. heal player
  392. set {fly.%player%} to true
  393. set join message to ""
  394. set player tab name to "&7%player%"
  395. set player's tag to "&7"
  396. teleport player to {gamespawn.spectator}
  397. set gamemode of player to adventure
  398. loop all players:
  399. if gamemode of loop-player is adventure:
  400. hide loop-player to all players
  401. apply invisibility to player for 10000 seconds
  402. allow fly for player
  403. set slot 8 of player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  404. set slot 0 of player to compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!"
  405. set slot 4 of player to redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!"
  406.  
  407.  
  408. on quit:
  409. if player's gamemode is not adventure:
  410. if {game.start} is false:
  411. if {game.players} > 0:
  412. remove 1 from {game.players}
  413. if {playerid.1} = player:
  414. clear {playerid.1}
  415. if {playerid} > 0:
  416. remove 1 from {playerid}
  417. else if {playerid.2} = player:
  418. clear {playerid.2}
  419. if {playerid} > 0:
  420. remove 1 from {playerid}
  421. set quit message to "&7&k%player%&r&e has quit!"
  422. else:
  423. set quit message to "&7%player% forfeited the Duel."
  424. loop all players:
  425. clear loop-player's inventory
  426. set gamemode of loop-player to adventure
  427. hide loop-player from all players
  428. allow fly for loop-player
  429. set slot 8 of loop-player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  430. set slot 0 of loop-player to compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!"
  431. set slot 4 of loop-player to redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!"
  432. send loop-player title "&6&lVICTORY!" with subtitle "&f%loop-player% won the duel!" for 6 second
  433. wait 7 seconds
  434. loop all players:
  435. send loop-player to "%{hubserver}%"
  436. wait 1.5 second
  437. restart server
  438. else:
  439. set quit message to ""
  440. if {game.players} = 0:
  441. restart server
  442.  
  443. every second:
  444. if {game.players} = 2:
  445. if {game.timer} > 0:
  446. remove 1 from {game.timer}
  447. if {game.timer} = 9:
  448. wait a tick
  449. broadcast "&eThe game starts in &610&e seconds!"
  450. if {game.timer} = 5:
  451. broadcast "&eThe game starts in &c5&e seconds!"
  452. send all players title "&e5" with subtitle "&r" for 1 second
  453. if {game.timer} = 4:
  454. broadcast "&eThe game starts in &c4&e seconds!"
  455. send all players title "&e4" with subtitle "&r" for 1 second
  456. if {game.timer} = 3:
  457. broadcast "&eThe game starts in &c3&e seconds!"
  458. send all players title "&c3" with subtitle "&r" for 1 second
  459. if {game.timer} = 2:
  460. broadcast "&eThe game starts in &c2&e seconds!"
  461. send all players title "&c2" with subtitle "&r" for 1 second
  462. if {game.timer} = 1:
  463. broadcast "&eThe game starts in &c1&e seconds!"
  464. send all players title "&c1" with subtitle "&r" for 1 second
  465. wait 1 second
  466. if {game.players} = 2:
  467. make console execute command "/game start"
  468. else:
  469. broadcast "&cWe don't have enough players! Start cancelled."
  470. stop
  471.  
  472. command /game [<text>] [<number>]:
  473. permission: game.admin
  474. permission message: &cYou don't have permissions!
  475. trigger:
  476. if arg 1 is "spawn":
  477. if arg 2 isn't set:
  478. send "&cNot enough args! Try with /game spawn 1 or /game spawn 2 !"
  479. if arg 2 is 1:
  480. set {gamespawn.1} to position of player
  481. send "Spawn 1 Set"
  482. else if arg 2 is 2:
  483. set {gamespawn.2} to position of player
  484. send "Spawn 2 Set"
  485. else if arg 2 is 3:
  486. set {gamespawn.spectator} to position of player
  487. send "Spawn Spectator Set"
  488. if arg 1 is "start":
  489. set {game.start} to true
  490. teleport {playerid.1} to {gamespawn.1}
  491. teleport {playerid.2} to {gamespawn.2}
  492. set {playerid.1} tab name to "&a%{playerid.1}%"
  493. set {playerid.1}'s tag to "&f%health of {playerid.1}%&c❤ &a"
  494. set {playerid.2} tab name to "&c%{playerid.2}%"
  495. set {playerid.2}'s tag to "&f%health of {playerid.2}%&c❤ &c"
  496. send all players title "&aGO!" with subtitle "&r" for 2 second
  497. loop all players:
  498. if gamemode of loop-player is survival:
  499. if {mode} = "Classic":
  500. heal loop-player
  501. set the loop-player's food level to 10
  502. clear loop-player's inventory
  503. set slot 0 of loop-player to iron sword
  504. set slot 1 of loop-player to bow
  505. set slot 2 of loop-player to fishing rod
  506. set slot 3 of loop-player to 10 arrow
  507. equip loop-player with iron helmet
  508. equip loop-player with iron chestplate
  509. equip loop-player with iron leggings
  510. equip loop-player with iron boots
  511. if {mode} = "Bow":
  512. apply speed 2 to player for 10000 seconds
  513. heal loop-player
  514. set the loop-player's food level to 10
  515. clear loop-player's inventory
  516. set slot 0 of loop-player to bow of Infinity 1
  517. set slot 1 of loop-player to 4 ender pearl
  518. set slot 2 of loop-player to arrow
  519. set slot 3 of loop-player to compass named "&aEnemy Tracker"
  520. equip loop-player with iron helmet
  521. equip loop-player with iron chestplate
  522. equip loop-player with iron leggings
  523. equip loop-player with iron boots
  524. if {mode} = "Op":
  525. heal loop-player
  526. set the loop-player's food level to 10
  527. clear loop-player's inventory
  528. set slot 0 of loop-player to diamond sword of sharpness 5
  529. set slot 1 of loop-player to bow of power 4
  530. set slot 2 of loop-player to fishing rod
  531. set slot 3 of loop-player to flint and steel
  532. set durability of slot 3 of inventory of loop-player to 54
  533. set slot 4 of loop-player to 30 arrow
  534. set slot 5 of loop-player to 3 golden apple
  535. set slot 6 of loop-player to splash potion of speed 2
  536. set slot 7 of loop-player to splash potion of regeneration 2
  537. equip loop-player with diamond helmet
  538. equip loop-player with diamond chestplate
  539. equip loop-player with diamond leggings
  540. equip loop-player with diamond boots
  541. if {mode} = "Potion":
  542. heal loop-player
  543. set the loop-player's food level to 10
  544. clear loop-player's inventory
  545. set slot 0 of loop-player to diamond sword of sharpness 1
  546. set slot 1 of loop-player to 16 ender pearl
  547. set slot 2 of loop-player to 64 golden carrot
  548. set slot 3 of loop-player to 4 potion of speed 2
  549. set slot 4 of loop-player to 2 splash potion of poison 2
  550. set slot 5 of loop-player to splash potion of instant health 2
  551. set slot 6 of loop-player to splash potion of instant health 2
  552. set slot 7 of loop-player to splash potion of instant health 2
  553. set slot 8 of loop-player to splash potion of instant health 2
  554. set slot 9 of loop-player to splash potion of instant health 2
  555. set slot 10 of loop-player to splash potion of instant health 2
  556. set slot 11 of loop-player to splash potion of instant health 2
  557. set slot 12 of loop-player to splash potion of instant health 2
  558. set slot 13 of loop-player to splash potion of instant health 2
  559. set slot 14 of loop-player to splash potion of instant health 2
  560. set slot 15 of loop-player to splash potion of instant health 2
  561. set slot 16 of loop-player to splash potion of instant health 2
  562. set slot 17 of loop-player to splash potion of instant health 2
  563. set slot 18 of loop-player to splash potion of instant health 2
  564. set slot 19 of loop-player to splash potion of instant health 2
  565. set slot 20 of loop-player to splash potion of instant health 2
  566. set slot 21 of loop-player to splash potion of instant health 2
  567. set slot 22 of loop-player to splash potion of instant health 2
  568. set slot 23 of loop-player to splash potion of instant health 2
  569. set slot 24 of loop-player to splash potion of instant health 2
  570. set slot 25 of loop-player to splash potion of instant health 2
  571. set slot 26 of loop-player to splash potion of instant health 2
  572. set slot 27 of loop-player to splash potion of instant health 2
  573. set slot 28 of loop-player to splash potion of instant health 2
  574. set slot 29 of loop-player to splash potion of instant health 2
  575. set slot 30 of loop-player to splash potion of instant health 2
  576. set slot 31 of loop-player to splash potion of instant health 2
  577. set slot 32 of loop-player to splash potion of instant health 2
  578. set slot 33 of loop-player to splash potion of instant health 2
  579. set slot 34 of loop-player to splash potion of instant health 2
  580. set slot 35 of loop-player to splash potion of instant health 2
  581. set slot 36 of loop-player to splash potion of instant health 2
  582. set slot 37 of loop-player to splash potion of instant health 2
  583. equip loop-player with diamond helmet
  584. equip loop-player with diamond chestplate
  585. equip loop-player with diamond leggings
  586. equip loop-player with diamond boots
  587. if {mode} = "UHC":
  588. heal loop-player
  589. set the loop-player's food level to 10
  590. clear loop-player's inventory
  591. set slot 0 of loop-player to diamond sword of sharpness 3
  592. set slot 1 of loop-player to bow of power 3
  593. set slot 2 of loop-player to fishing rod
  594. set slot 3 of loop-player to diamond axe
  595. set slot 4 of loop-player to 6 golden apple
  596. set slot 5 of loop-player to 3 of ("zsoccer23" parsed as offline player)'s skull named "&6Golden Head"
  597. set slot 6 of loop-player to 1 lava bucket
  598. set slot 7 of loop-player to 1 lava bucket
  599. set slot 8 of loop-player to 1 water bucket
  600. set slot 9 of loop-player to 1 water bucket
  601. set slot 10 of loop-player to 24 arrow
  602. set slot 11 of loop-player to 64 oak wood planks
  603. set slot 12 of loop-player to 64 oak wood planks
  604. set slot 13 of loop-player to iron pickaxe
  605. equip loop-player with diamond helmet of protection 2
  606. equip loop-player with diamond chestplate of protection 2
  607. equip loop-player with diamond leggings of protection 2
  608. equip loop-player with diamond boots of protection 2
  609. if loop-player's gamemode is survival:
  610. if {mode} = "Classic":
  611. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  612. send " &f&lClassic Duel" to loop-player
  613. send "&r" to loop-player
  614. send " &e&lEliminate your opponent!" to loop-player
  615. send "&r" to loop-player
  616. if {mode} = "Bow":
  617. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  618. send " &f&lBow Duel" to loop-player
  619. send "&r" to loop-player
  620. send " &e&lWork to eliminate your opponent using your bow!" to loop-player
  621. send "&r" to loop-player
  622. if {mode} = "UHC":
  623. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  624. send " &f&lUHC Duel" to loop-player
  625. send "&r" to loop-player
  626. send " &e&lEliminate your opponent!" to loop-player
  627. send "&r" to loop-player
  628. if {mode} = "Op":
  629. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  630. send " &f&lOP Duel" to loop-player
  631. send "&r" to loop-player
  632. send " &e&lEliminate your opponent!" to loop-player
  633. send "&r" to loop-player
  634. if {mode} = "Potion":
  635. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  636. send " &f&lPotion Duel" to loop-player
  637. send "&r" to loop-player
  638. send " &e&lEliminate your opponent!" to loop-player
  639. send "&r" to loop-player
  640. send " &f&lOpponent: &7%{playerid.2}%" to {playerid.1}
  641. send " &f&lOpponent: &7%{playerid.1}%" to {playerid.2}
  642. loop all players:
  643. if loop-player's gamemode is survival:
  644. send "&r" to loop-player
  645. send "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" to loop-player
  646.  
  647. on damage:
  648. if damage cause is attack:
  649. if {mode} = "Bow":
  650. cancel event
  651.  
  652. on health regen:
  653. if {mode} = "Bow":
  654. Cancel event
  655.  
  656. on burn of wood or log or wool or leaves:
  657. cancel event
  658.  
  659. every second:
  660. loop all players:
  661. if {enderpearl.%loop-player%} is false:
  662. if {mode} = "Potion":
  663. if {enderpearl.%loop-player%.time} < 16:
  664. remove 1 from {enderpearl.%loop-player%.time}
  665. if {mode} = "Bow":
  666. if {enderpearl.%loop-player%.time} < 4:
  667. remove 1 from {enderpearl.%loop-player%.time}
  668.  
  669. on right click holding a ender pearl:
  670. if {mode} = "Potion":
  671. if {enderpearl.%player%} is true:
  672. set {enderpearl.%player%} to false
  673. wait 15 seconds
  674. set {enderpearl.%player%} to true
  675. set {enderpearl.%player%.time} to 15
  676. else:
  677. send "&cYour must wait &e%{enderpearl.%player%.time}%&es&c before using this!"
  678. cancel event
  679. if {mode} = "Bow":
  680. if {enderpearl.%player%} is true:
  681. set {enderpearl.%player%} to false
  682. wait 3 seconds
  683. set {enderpearl.%player%} to true
  684. set {enderpearl.%player%.time} to 3
  685. else:
  686. send "&cYour must wait &e%{enderpearl.%player%.time}%&es&c before using this!"
  687. cancel event
  688.  
  689. on damage:
  690. if {game.start} is true:
  691. if attacker's gamemode isn't adventure:
  692. if victim's gamemode isn't adventure:
  693. if damage cause is not fall:
  694. if damage cause is a projectile:
  695. if attacker isn't holding a fishing rod:
  696. wait a tick
  697. if {playerid.1} = victim:
  698. send "&a%victim%&7 is on &c%health of victim% &7HP!" to attacker
  699. else if {playerid.2} = victim:
  700. send "&c%victim%&7 is on &c%health of victim% &7HP!" to attacker
  701. send action bar from "&fDamage Dealt: &a&l%damage%&r&c❤" to attacker
  702. else:
  703. if {mode} != "Bow":
  704. if attacker isn't holding a fishing rod:
  705. wait a tick
  706. send action bar from "&fDamage Dealt: &a&l%damage%&r&c❤" to attacker
  707. else:
  708. cancel event
  709. else:
  710. cancel event
  711.  
  712. else:
  713. cancel event
  714. else:
  715. cancel event
  716.  
  717. on item damage:
  718. if item is not flint and steel:
  719. cancel event
  720.  
  721. on right click:
  722. if player is holding a bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!":
  723. if {sendhub.%player%} is true:
  724. set {sendhub.%player%} to false
  725. send "&a&lTeleporting you to the lobby in 3 seconds..."
  726. send "&a&l Right-click again to cancel the teleport!"
  727. wait 3 seconds
  728. if {sendhub.%player%} is false:
  729. set {sendhub.%player%} to true
  730. send player to "%{hubserver}%"
  731. else:
  732. set {sendhub.%player%} to true
  733. send "&c&lTeleport cancelled!"
  734. stop
  735. if player is holding a compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!":
  736. open chest with 1 row named "&8Teleporter" to player
  737. wait a tick
  738. set slot 0 of player's current inventory to skull of {playerid.1} named "&7%{playerid.1}%" with lore "&r||&7Click to spectate!"
  739. set slot 1 of player's current inventory to skull of {playerid.2} named "&7%{playerid.2}%" with lore "&r||&7Click to spectate!"
  740. if is holding a redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!":
  741. open chest with 4 row named "&8Spectator Settings" to player
  742. wait a tick
  743. set slot 11 of player's current inventory to leather boots named "&aNo Speed"
  744. set slot 12 of player's current inventory to chain boots named "&aSpeed I"
  745. set slot 13 of player's current inventory to iron boots named "&aSpeed II"
  746. set slot 14 of player's current inventory to gold boots named "&aSpeed III"
  747. set slot 15 of player's current inventory to diamond boots named "&aSpeed IV"
  748. if {autoteleport.%player%} is false:
  749. set slot 20 of player's current inventory to compass named "&aEnable Auto Teleport" with lore "&7Click to enable auto teleport!"
  750. else:
  751. set slot 20 of player's current inventory to compass named "&cDisable Auto Teleport" with lore "&7Click to disable auto teleport!"
  752. if {nightvision.%player%} is true:
  753. set slot 21 of player's current inventory to ender pearl named "&cDisable Night Vision" with lore "&7Click to disable night vision!"
  754. else:
  755. set slot 21 of player's current inventory to eye of ender named "&aEnable Night Vision" with lore "&7Click to enable night vision!"
  756. if {showspectator.%player%} is true:
  757. set slot 23 of player's current inventory to redstone named "&cHide Spectators" with lore "&7Click to hide other spectators!"
  758. else:
  759. set slot 23 of player's current inventory to glowstone dust named "&aShow Spectators" with lore "&7Click to show other spectators!"
  760. if {fly.%player%} is true:
  761. set slot 24 of player's current inventory to feather named "&cDisable Fly" with lore "&7Click to disable always flying!"
  762. else:
  763. set slot 24 of player's current inventory to feather named "&aEnable Fly" with lore "&7Click to enable always flying!"
  764. on inventory click:
  765. if inventory name of player's current inventory is "&8Teleporter":
  766. if clicked slot is 0:
  767. close inventory of player
  768. teleport player to {playerid.1}
  769. else if clicked slot is 1:
  770. close inventory of player
  771. teleport player to {playerid.2}
  772. if inventory name of player's current inventory is "&8Spectator Settings":
  773. if clicked slot is 11:
  774. close inventory of player
  775. remove speed from player
  776. send "&cYou no longer have any speed effects!"
  777. if clicked slot is 12:
  778. close inventory of player
  779. apply speed 1 to player for 10000 seconds
  780. send "&aYou now have Speed I!"
  781. if clicked slot is 13:
  782. close inventory of player
  783. apply speed 2 to player for 10000 seconds
  784. send "&aYou now have Speed II!"
  785. if clicked slot is 14:
  786. close inventory of player
  787. apply speed 3 to player for 10000 seconds
  788. send "&aYou now have Speed III!"
  789. if clicked slot is 15:
  790. close inventory of player
  791. apply speed 4 to player for 10000 seconds
  792. send "&aYou now have Speed IV!"
  793. if clicked slot is 20:
  794. if {autoteleport.%player%} is false:
  795. close inventory of player
  796. set {autoteleport.%player%} to true
  797. send "&aOnce you select a player using your compass, it will auto teleport you to them!"
  798. else:
  799. close inventory of player
  800. set {autoteleport.%player%} to false
  801. send "&cYou will no longer auto teleport to targets!"
  802. if clicked slot is 21:
  803. if {nightvision.%player%} is true:
  804. close inventory of player
  805. set {nightvision.%player%} to false
  806. remove night vision from player
  807. send "&cYou no longer have night vision!"
  808. else:
  809. apply night vision to player for 10000 seconds
  810. close inventory of player
  811. set {nightvision.%player%} to true
  812. send "&aYou now have night vision!"
  813. if clicked slot is 23:
  814. {showspectator.%player%} is true:
  815. close inventory of player
  816. set {showspectator.%player%} to false
  817. loop all players:
  818. if loop-player's gamemode is adventure:
  819. hide loop-player to player
  820. send "&cYou can no longer see other spectators!"
  821. else:
  822. close inventory of player
  823. set {showspectator.%player%} to true
  824. loop all players:
  825. if loop-player's gamemode is adventure:
  826. reveal loop-player to player
  827. send "&aYou can now see other spectators!"
  828. if clicked slot is 24:
  829. if {fly.%player%} is true:
  830. close inventory of player
  831. set {fly.%player%} to false
  832. disable fly for player
  833. send "&cYou can no longer fly!"
  834. else:
  835. close inventory of player
  836. set {fly.%player%} to true
  837. enable fly for player
  838. send "&aYou can now fly!"
  839. on break:
  840. world is "arena1"
  841. add location of block to {broken.blocks::*}
  842. add type of block to {broken.type::*}
  843. set {ignore.locations::%location of event-block%} to true
  844. on place:
  845. world is "arena1"
  846. add location of block to {placed.blocks::*}
  847. set {ignore.locations::%location of event-block%} to true
  848.  
  849.  
  850. command /regen:
  851. trigger:
  852. loop {broken.blocks::*}:
  853. set {_loc} to loop-value
  854. set block at {_loc} to {broken.type::%loop-index%}
  855. loop {placed.blocks::*}:
  856. set {_loc} to loop-value
  857. set block at {_loc} to air
  858. delete {broken.blocks::*}
  859. delete {placed.blocks::*}
  860. delete {broken.type::*}
  861. delete {ignore.locations::*}
  862.  
  863. on block form:
  864. world is "arena1"
  865. if event-block is obsidian:
  866. add location of event-block to {placed.blocks}
  867. loop all blocks in a radius 3 around event-block:
  868. if loop-block is cobble stone:
  869. add location of loop-block to {placed.blocks::*}
  870. on death:
  871. if victim is a player:
  872. launch ball large firework colored red and green at attacker timed 1
  873. launch ball large firework colored yellow and blue at attacker timed 1
  874. strike lightning effect at the victim
  875. clear drops
  876. set the death message to "&r"
  877. set {deathplayer} to victim
  878. wait 1 tick
  879. exter force respawn player
  880. set {end} to true
  881. set {playerid.1} tab name to "&7%{playerid.1}%"
  882. set {playerid.1}'s tag to "&7"
  883. set {playerid.2} tab name to "&7%{playerid.2}%"
  884. set {playerid.2}'s tag to "&7"
  885. loop all players:
  886. clear loop-player's inventory
  887. set gamemode of loop-player to adventure
  888. hide loop-player from all players
  889. allow fly for loop-player
  890. set slot 8 of loop-player to bed named "&c&lReturn to Lobby &r&7(Right Click)" with lore "&7Right-click to leave to the lobby!"
  891. set slot 0 of loop-player to compass named "&a&lTeleporter &r&7(Right Click)" with lore "&7Right-click to spectate players!"
  892. set slot 4 of loop-player to redstone comparator item named "&b&lSpectator Settings &r&7(Right Click)" with lore "&7Right-click to change your spectator settings!"
  893. broadcast "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"
  894. if {gameinvtimer.sec} < 10:
  895. if {mode} = "Classic":
  896. broadcast " &e&lClassic Duel&7 - &f&l0%{gameinvtimer.min}%:0%{gameinvtimer.sec}%"
  897. if {mode} = "Bow":
  898. broadcast " &e&lBow Duel&7 - &f&l0%{gameinvtimer.min}%:0%{gameinvtimer.sec}%"
  899. if {mode} = "UHC":
  900. broadcast " &e&lUHC Duel&7 - &f&l0%{gameinvtimer.min}%:0%{gameinvtimer.sec}%"
  901. if {mode} = "Op":
  902. broadcast " &e&lOP Duel&7 - &f&l0%{gameinvtimer.min}%:0%{gameinvtimer.sec}%"
  903. if {mode} = "Potion":
  904. broadcast " &e&lPotion Duel&7 - &f&l0%{gameinvtimer.min}%:0%{gameinvtimer.sec}%"
  905. else if {gameinvtimer.sec} > 10:
  906. if {mode} = "Classic":
  907. broadcast " &e&lClassic Duel&7 - &f&l0%{gameinvtimer.min}%:%{gameinvtimer.sec}%"
  908. if {mode} = "Bow":
  909. broadcast " &e&lBow Duel&7 - &f&l0%{gameinvtimer.min}%:%{gameinvtimer.sec}%"
  910. if {mode} = "UHC":
  911. broadcast " &e&lUHC Duel&7 - &f&l0%{gameinvtimer.min}%:%{gameinvtimer.sec}%"
  912. if {mode} = "Op":
  913. broadcast " &e&lOP Duel&7 - &f&l0%{gameinvtimer.min}%:%{gameinvtimer.sec}%"
  914. if {mode} = "Potion":
  915. broadcast " &e&lPotion Duel&7 - &f&l0%{gameinvtimer.min}%:%{gameinvtimer.sec}%"
  916. broadcast "&r"
  917. if {playerid.1} is attacker:
  918. broadcast "&r &e&LWINNER!"
  919. broadcast "&r &7%{playerid.1}% %{playerid.2}% "
  920. else if {playerid.2} is attacker:
  921. broadcast "&r &e&LWINNER!"
  922. broadcast "&r &7%{playerid.1}% %{playerid.2}% "
  923. broadcast "&r"
  924. set {hv} to health of player
  925. set {ha} to health of attacker
  926. if {hv} = 10:
  927. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  928. else if {hv} > 10:
  929. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  930. if {hv} = 9:
  931. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%victim%'s Health " to attacker
  932. else if {hv} > 9:
  933. if {hv} < 10:
  934. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%victim%'s Health " to attacker
  935. if {hv} = 8:
  936. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%victim%'s Health " to attacker
  937. else if {hv} > 8:
  938. if {hv} < 9:
  939. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%victim%'s Health " to attacker
  940. if {hv} = 7:
  941. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%victim%'s Health " to attacker
  942. else if {hv} > 7:
  943. if {hv} < 8:
  944. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%victim%'s Health " to attacker
  945. if {hv} = 6:
  946. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%victim%'s Health " to attacker
  947. else if {hv} > 6:
  948. if {hv} < 7:
  949. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%victim%'s Health " to attacker
  950. if {hv} = 5:
  951. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  952. else if {hv} > 5:
  953. if {hv} < 6:
  954. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  955. if {hv} = 4:
  956. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  957. else if {hv} > 4:
  958. if {hv} < 5:
  959. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  960. if {hv} = 3:
  961. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  962. else if {hv} > 3:
  963. if {hv} < 4:
  964. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  965. if {hv} = 2:
  966. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  967. else if {hv} > 2:
  968. if {hv} < 3:
  969. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  970. if {hv} = 1:
  971. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  972. else if {hv} > 1:
  973. if {hv} < 2:
  974. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  975. if {hv} = 0:
  976. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  977. else if {hv} > 0:
  978. if {hv} < 1:
  979. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%victim%'s Health " to attacker
  980. if {ha} = 10:
  981. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  982. else if {ha} > 10:
  983. send "&r &c❤❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  984. if {ha} = 9:
  985. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%attacker%'s Health " to player
  986. else if {ha} > 9:
  987. if {ha} < 10:
  988. send "&r &c❤❤❤❤❤❤❤❤❤&f❤ &7- &a%attacker%'s Health " to player
  989. if {ha} = 8:
  990. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%attacker%'s Health " to player
  991. else if {ha} > 8:
  992. if {ha} < 9:
  993. send "&r &c❤❤❤❤❤❤❤❤&f❤❤ &7- &a%attacker%'s Health " to player
  994. if {ha} = 7:
  995. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%attacker%'s Health " to player
  996. else if {ha} > 7:
  997. if {ha} < 8:
  998. send "&r &c❤❤❤❤❤❤❤&f❤❤❤ &7- &a%attacker%'s Health " to player
  999. if {ha} = 6:
  1000. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%attacker%'s Health " to player
  1001. else if {ha} > 6:
  1002. if {ha} < 7:
  1003. send "&r &c❤❤❤❤❤❤&f❤❤❤❤ &7- &a%attacker%'s Health " to player
  1004. if {ha} = 5:
  1005. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1006. else if {ha} > 5:
  1007. if {ha} < 6:
  1008. send "&r &c❤❤❤❤❤&f❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1009. if {ha} = 4:
  1010. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1011. else if {ha} > 4:
  1012. if {ha} < 5:
  1013. send "&r &c❤❤❤❤&f❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1014. if {ha} = 3:
  1015. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1016. else if {ha} > 3:
  1017. if {ha} < 4:
  1018. send "&r &c❤❤❤&f❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1019. if {ha} = 2:
  1020. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1021. else if {ha} > 2:
  1022. if {ha} < 3:
  1023. send "&r &c❤❤&f❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1024. if {ha} = 1:
  1025. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1026. else if {ha} > 1:
  1027. if {ha} < 2:
  1028. send "&r &c❤&f❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1029. if {ha} = 0:
  1030. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1031. else if {ha} > 0:
  1032. if {ha} < 1:
  1033. send "&r &f❤❤❤❤❤❤❤❤❤❤ &7- &a%attacker%'s Health " to player
  1034. broadcast "&r"
  1035. broadcast "&a&l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬"
  1036. if {playerid.1} is attacker:
  1037. send {playerid.1} title "&6&lVICTORY!" with subtitle "&f%{playerid.1}% won the duel!" for 6 seconds
  1038. send {playerid.2} title "&c&lGAME OVER!" with subtitle "&f%{playerid.1}% won the duel!" for 6 seconds
  1039. else if {playerid.2} is attacker:
  1040. send {playerid.2} title "&6&lVICTORY!" with subtitle "&f%{playerid.2}% won the duel!" for 6 seconds
  1041. send {playerid.1} title "&c&lGAME OVER!" with subtitle "&f%{playerid.2}% won the duel!" for 6 seconds
  1042. delete all arrows
  1043. extinguish player
  1044. execute console command "/regen"
  1045. wait 7 seconds
  1046. loop all players:
  1047. send loop-player to "%{hubserver}%"
  1048. wait 1.5 second
  1049. restart server
Advertisement
Add Comment
Please, Sign In to add comment