Advertisement
Guest User

UHC by CommandsPVP

a guest
Jan 8th, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 180.00 KB | None | 0 0
  1. options:
  2. name: UHC by CommandsPVP#Max 30 caractères
  3. serverName: CommandsPVP#Max 15 caractères
  4. TS: commandspvp.com
  5. twitter: @CommandsPVP
  6. motd: &r §6&k|||&r §a§lUHC by CommandsPVP §r§6&k|||&r%nl%
  7.  
  8. on skript load:
  9. unload world "lobby"
  10. load world "lobby"
  11.  
  12. command /load:
  13. trigger:
  14. if command sender is op:
  15. reset recipes
  16. set {UHCStart} to false
  17. set {WHOpen} to false
  18. set {chat} to true
  19. set {nether} to "ON"
  20. set {TeamsStatus} to false
  21. set {TeamsNumbers} to 1
  22. set {TeamsNumbersName} to "FFA"
  23. set {meetupTime} to 80
  24. set {pvpTime} to 20
  25. set {secondsTime} to 00
  26. set {pvpTab} to "%{pvpTime}%:00"
  27. set {meetupTab} to "%{meetupTime}%:00"
  28. set {msg} to true
  29. set {open} to false
  30. set {whCounter} to ""
  31. set {eternalDay} to false
  32. disable PvP in all worlds
  33. set the time to 0:00
  34. teleport command sender to location (0, 100, 0) in world "world"
  35. set the time to 6:00
  36. teleport command sender to location (0, 102, 0) in world "lobby"
  37. set the time to 0:00
  38. set {TempHealth} to 20
  39. set {SensHealth} to 2
  40. set {CutClean} to "OFF"
  41. set {potions2} to "OFF"
  42. set {Start} to false
  43. set {border} to 2000
  44. set {invinc} to false
  45. set {weather} to false
  46. set {spawnsReady} to false
  47. set {allTeleported} to false
  48. set {spawnsStart} to false
  49. delete {programHour}
  50. set {pve} to 0
  51. loop {Sc::*}:
  52. set {Sc::%loop-index%} to false
  53. set {Sc::goldenretriever::name} to "Golden Retriever"
  54. set {Sc::barebones::name} to "Barebones"
  55. set {Sc::rush::name} to "Rush"
  56. delete {Team::*}
  57. delete {invite::*}
  58. delete {Spec::*}
  59. delete {tplocation::*}
  60. delete {death::*}
  61. delete {inviteConfirm::*}
  62. delete {nodamage::*}
  63. delete {teleported::*}
  64. delete {chatname::*}
  65. delete {invinc::*}
  66. delete {onGround::*}
  67. delete {starterfood::*}
  68. delete {lastmsg::*}
  69. delete {Rand::*}
  70. delete {invOpen::*}
  71. delete {jump-user::*}
  72. delete {kills::*}
  73. delete {actionbarused::*}
  74. delete {death::*}
  75. delete {mute::*}
  76. set the spawn point of "lobby" to location (0, 102.5, 0) in the world "lobby"
  77. teleport all players to location (0.5, 102.5, 0.5) in the world "lobby"
  78. if command sender is not in world "world":
  79. set {_loc} to location of command sender
  80. teleport command sender to location (0, 100, 0) in world "world"
  81. make player execute command "/worldborder center 0.0 0.0"
  82. make player execute command "/worldborder damage buffer 20.0"
  83. make player execute command "/worldborder damage amount 0.1"
  84. make player execute command "/worldborder warning distance 20"
  85. make player execute command "/worldborder warning time 20"
  86. make player execute command "/worldborder set %{border}%"
  87. make player execute command "/difficulty 0"
  88. if {_loc} is set:
  89. teleport command sender to {_loc}
  90. set {UHC1} to 0
  91. set {UHC2} to 0
  92. set {UHC3} to 0
  93. set {UHC4} to 0
  94. set {UHC5} to 0
  95. set {UHC6} to 0
  96. set {UHC7} to 0
  97. set {UHC8} to 0
  98. set {UHC9} to 0
  99. set {UHC10} to 0
  100. set {UHC11} to 0
  101. set {UHC12} to 0
  102. set {UHC13} to 0
  103. set {UHC14} to 0
  104. set {UHC15} to 0
  105. loop {WH::*}:
  106. set {_name} to ("%loop-index%" parsed as offlineplayer)
  107. set {chatname::%loop-index%} to "&7%{_name}%"
  108. execute command "/ne clear %{_name}%"
  109. loop all players:
  110. set slot 8 of loop-player to air
  111. set the loop-player's gamemode to adventure
  112. clear the inventory of player
  113. close inventory of loop-player
  114. set {chatname::%loop-player%} to "&7%name of loop-player%"
  115. execute command "/ne clear %loop-player%"
  116. set the saturation of loop-player to 20
  117. set the food level of loop-player to 20
  118. loop all players:
  119. reveal loop-player-2 to loop-player-1
  120. execute command "/updatescoreboard"
  121. register new shaped recipe for golden apple item named "&6Golden Head" using Gold ingot, Gold ingot, Gold ingot, Gold ingot, player head, Gold ingot, Gold ingot, Gold ingot, Gold ingot
  122. register new shaped recipe for glistering melon named "&6Glistering Melon" using Gold ingot, Gold ingot, Gold ingot, Gold ingot, melon slice, Gold ingot, Gold ingot, Gold ingot, Gold ingot
  123. loop all players:
  124. set tab score of player to 100 for loop-player
  125. set tab score of loop-player to 100 for player
  126. wait 1 second
  127. else:
  128. send "Unknown command." to command sender
  129.  
  130. on join:
  131. set tab header to "\n&7 Welcome on the UHC, &a%player% &7! \n &b@CommandsPVP &7⋯ &aTS: &b{@TS} \n" and footer to "\n &7UHC &a%{TeamsNumbersName}% &7⋯ Nether &a%{nether}% &7⋯ CutClean &a%{CutClean}% \n\n &7PVP: &a%{pvpTab}% &7⋯ Meetup: &a%{meetupTab}% &7⋯ Map: &a%{border}%x%{border}% \n\n &7Players: &a%{players}% &7⋯ Ping: &a%ping of player%ms &7⋯ TPS: &a%tps% \n" for player
  132. if {UHCStart} is not true:
  133. send player title "&a{@name}" with subtitle "&7UHC &a%{TeamsNumbersName}% &7⋯ Nether &a%{nether}% &7⋯ CutClean &a%{CutClean}%" for 4 seconds with 0 second fade in and 0.5 second fade out
  134. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  135. if {TeamsStatus} is true:
  136. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  137. else:
  138. set slot 8 of player to air
  139. set the player's gamemode to adventure
  140. set the saturation of player to 20
  141. set the food level of player to 20
  142. teleport player to location (0.5, 102.5, 0.5) in the world "lobby"
  143. if {Team::%player%} is equal to "UHC1":
  144. set {chatname::%player%} to "&0%name of player%"
  145. execute command "/ne prefix %player% &0"
  146. else if {Team::%player%} is equal to "UHC2":
  147. set {chatname::%player%} to "&1%name of player%"
  148. execute command "/ne prefix %player% &1"
  149. else if {Team::%player%} is equal to "UHC3":
  150. set {chatname::%player%} to "&2%name of player%"
  151. execute command "/ne prefix %player% &2"
  152. else if {Team::%player%} is equal to "UHC4":
  153. set {chatname::%player%} to "&3%name of player%"
  154. execute command "/ne prefix %player% &3"
  155. else if {Team::%player%} is equal to "UHC5":
  156. set {chatname::%player%} to "&4%name of player%"
  157. execute command "/ne prefix %player% &4"
  158. else if {Team::%player%} is equal to "UHC6":
  159. set {chatname::%player%} to "&5%name of player%"
  160. execute command "/ne prefix %player% &5"
  161. else if {Team::%player%} is equal to "UHC7":
  162. set {chatname::%player%} to "&6%name of player%"
  163. execute command "/ne prefix %player% &6"
  164. else if {Team::%player%} is equal to "UHC8":
  165. set {chatname::%player%} to "&7%name of player%"
  166. execute command "/ne prefix %player% &7"
  167. else if {Team::%player%} is equal to "UHC9":
  168. set {chatname::%player%} to "&8%name of player%"
  169. execute command "/ne prefix %player% &8"
  170. else if {Team::%player%} is equal to "UHC10":
  171. set {chatname::%player%} to "&9%name of player%"
  172. execute command "/ne prefix %player% &9"
  173. else if {Team::%player%} is equal to "UHC11":
  174. set {chatname::%player%} to "&a%name of player%"
  175. execute command "/ne prefix %player% &a"
  176. else if {Team::%player%} is equal to "UHC12":
  177. set {chatname::%player%} to "&b%name of player%"
  178. execute command "/ne prefix %player% &b"
  179. else if {Team::%player%} is equal to "UHC13":
  180. set {chatname::%player%} to "&c%name of player%"
  181. execute command "/ne prefix %player% &c"
  182. else if {Team::%player%} is equal to "UHC14":
  183. set {chatname::%player%} to "&d%name of player%"
  184. execute command "/ne prefix %player% &d"
  185. else if {Team::%player%} is equal to "UHC15":
  186. set {chatname::%player%} to "&e%name of player%"
  187. execute command "/ne prefix %player% &e"
  188. else:
  189. set {chatname::%player%} to "&7%name of player%"
  190. execute command "/ne clear %player%"
  191. if {UHCStart} is true:
  192. if {Spec::%player%} is not set:
  193. if {teleported::%player%} is not set:
  194. teleport player to {tplocation::%player%}
  195. set {teleported::%player%} to true
  196. delete {inviteConfirm::%player%}
  197. set rf max health of player to 20
  198. set health of player to 10
  199. clear the inventory of player
  200. set the level of player to 0
  201. set the level progress of player to 0
  202. if {Start} is true:
  203. delete {leave::%player%}
  204. if {Spec::%player%} is set:
  205. set the gamemode of player to spectator
  206. else:
  207. if {onGround::%player%} is not set:
  208. set the gamemode of player to survival
  209. set the saturation of player to 20
  210. set {nodamage::%player%} to true
  211. set {invinc::%player%} to true
  212. if {invinc} is not true:
  213. set {_timer} to 0
  214. while {_timer} is smaller than 30:
  215. set {_timeleft} to (30 - {_timer})
  216. if {actionbarused::%player%} is not set:
  217. set action bar of player to "&cDamage active in &a%{_timeleft}% &cseconds"
  218. add 1 to {_timer}
  219. wait 1 second
  220. set {onGround::%player%} to true
  221. if {actionbarused::%player%} is not set:
  222. set action bar of player to ""
  223. delete {nodamage::%player%}
  224. delete {invinc::%player%}
  225. if {chatname::%player%} is set:
  226. if player is op:
  227. set join message to "&7[&a+&7] &4Admin&8 | &7%{chatname::%player%}% &r&7joined."
  228. else if {Host::%player%} is set:
  229. set join message to "&7[&a+&7] &cHost&8 | &7%{chatname::%player%}% &r&7joined."
  230. else if {Staff::%player%} is set:
  231. set join message to "&7[&a+&7] &cStaff&8 | &7%{chatname::%player%}% &r&7joined."
  232. else:
  233. set join message to "&7[&a+&7] %{chatname::%player%}% &r&7joined."
  234. else:
  235. if player is op:
  236. set join message to "&7[&a+&7] &4Admin&8 | &7%player% &r&7joined."
  237. else if {Host::%player%} is set:
  238. set join message to "&7[&a+&7] &cHost&8 | &7%player% &r&7joined."
  239. else if {Staff::%player%} is set:
  240. set join message to "&7[&a+&7] &cStaff&8 | &7%player% &r&7joined."
  241. else:
  242. set join message to "&7[&a+&7] %player% &r&7joined."
  243. loop all players:
  244. set tab score of player to 100 for loop-player
  245. set tab score of loop-player to 100 for player
  246. execute command "/updatescoreboard"
  247. if {UHCStart} is not true:
  248. wait 2 ticks
  249. 1.8 spawn 10 of particle explode:0.1 offset by 0, 0, 0 at player with data 0
  250.  
  251. on quit:
  252. if {chatname::%player%} is set:
  253. if player is op:
  254. set quit message to "&7[&c-&7] &4Admin&8 | &7%{chatname::%player%}% &r&7left."
  255. else if {Host::%player%} is set:
  256. set quit message to "&7[&c-&7] &cHost&8 | &7%{chatname::%player%}% &r&7left."
  257. else if {Staff::%player%} is set:
  258. set quit message to "&7[&c-&7] &cStaff&8 | &7%{chatname::%player%}% &r&7left."
  259. else:
  260. set quit message to "&7[&c-&7] %{chatname::%player%}% &7left."
  261. else:
  262. if player is op:
  263. set quit message to "&7[&c-&7] &4Admin&8 | &7%player% &r&7left."
  264. else if {Host::%player%} is set:
  265. set quit message to "&7[&c-&7] &cHost&8 | &7%player% &r&7left."
  266. else if {Staff::%player%} is set:
  267. set quit message to "&7[&c-&7] &cStaff&8 | &7%player% &r&7left."
  268. else:
  269. set quit message to "&7[&c-&7] %player% &7left."
  270. close inventory of player
  271. delete {inviteConfirm::%player%}
  272. if {WH::%player%} is set:
  273. set {leave::%player%} to 0
  274.  
  275. on hunger meter change:
  276. if player is in world "lobby":
  277. set the food level of the player to 20
  278. else if {Start} is not true:
  279. set the food level of the player to 20
  280.  
  281. on damage of player:
  282. if victim is in world "lobby":
  283. if damage cause is fall:
  284. cancel event
  285. else if {Start} is not true:
  286. if damage cause is fall:
  287. cancel event
  288. if {nodamage} is true:
  289. cancel event
  290. else if {nodamage::%victim%} is true:
  291. cancel event
  292. close inventory of victim
  293. if projectile is set:
  294. if projectile is an arrow:
  295. set {actionbarused::%victim%} to true
  296. set {_dist} to the distance between the victim and the attacker
  297. set action bar of attacker to "&a%victim% §7est à &a%(health of victim * 2)%§7%% (%{_dist}% blocs)"
  298. wait 2 seconds
  299. delete {actionbarused::%victim%}
  300.  
  301. on damage:
  302. if victim is in world "lobby":
  303. cancel event
  304. else if {Start} is not true:
  305. if attacker is a player:
  306. cancel event
  307.  
  308. on click holding name tag:
  309. if {invOpen::%player%} is not set:
  310. if player is in world "lobby":
  311. if name of tool of player is "&6&lThe Teams &r&7(Right-Click)":
  312. cancel event
  313. set {invOpen::%player%} to true
  314. play "ORB_PICKUP" to player at volume 0.5
  315. make player execute command "/team list"
  316.  
  317. on click holding paper:
  318. if {invOpen::%player%} is not set:
  319. if player is in world "lobby":
  320. if name of tool of player is "&b&lThe Rules &r&7(Right-Click)":
  321. cancel event
  322. set {invOpen::%player%} to true
  323. play "ORB_PICKUP" to player at volume 0.5
  324. make player execute command "/rules"
  325.  
  326. on inventory click:
  327. if player is in world "lobby":
  328. if clicked item is a name tag:
  329. if the name of clicked item is "&6&lThe Teams &r&7(Right-Click)":
  330. cancel event
  331. play "CLICK" to player at volume 0.5
  332. make player execute command "/team list"
  333. else if clicked item is a paper:
  334. if the name of clicked item is "&b&lThe Rules &r&7(Right-Click)":
  335. cancel event
  336. play "CLICK" to player at volume 0.5
  337. make player execute command "/rules"
  338.  
  339. on player drop:
  340. if player is in world "lobby":
  341. if item is a name tag:
  342. if the name of item is "&6&lThe Teams &r&7(Right-Click)":
  343. cancel event
  344. if item is a paper:
  345. if the name of item is "&b&lThe Rules &r&7(Right-Click)":
  346. cancel event
  347.  
  348. at 7:00 in world "world":
  349. if {Start} is not true:
  350. set the time to 6:00
  351.  
  352. at 1:00 in world "lobby":
  353. set the time to 0:00
  354.  
  355. at 13:00 in world "world":
  356. if {eternalDay} is true:
  357. set time to 12:00
  358.  
  359. on weather change:
  360. if event-world is "world":
  361. if {Start} is not true:
  362. set weather to sunny
  363. else if {weather} is true:
  364. set weather to sunny
  365. else if event-world is "lobby":
  366. set weather to sunny
  367.  
  368. every 10 seconds:
  369. if {UHCStart} is true:
  370. if {nether} is equal to "OFF":
  371. loop all players:
  372. if loop-player is in world "world_nether":
  373. loop all players:
  374. if loop-player-2 is op:
  375. send "&4&l%loop-player-1% &r&cis in the nether !" to loop-player-2
  376.  
  377. every seconds in "world":
  378. if {UHCStart} is not true:
  379. set the level of all players to {players}
  380. set the level progress of all players to 0.99
  381. if {programHour} is set:
  382. if the length of {programHour} is 5:
  383. if {open} is false:
  384. if {TeamsNumbersName} is equal to "FFA":
  385. set {motd} to "{@motd}&d&l⫸ &r§eFFA §6- §cWH Off at §a&l%{programHour}% &r&6- &eFollow &b{@twitter} &d&l⫷"
  386. else:
  387. set {motd} to "{@motd}&d&l⫸ &r§e%{TeamsNumbersName}% §6- §cWH Off at §a%{programHour}% &6- &b{@twitter}&d&l⫷"
  388. else if {open} is true:
  389. if {whCounter} is set:
  390. loop all players:
  391. if {spawnsStart} is not true:
  392. if {actionbarused::%loop-player%} is not set:
  393. set action bar of loop-player to "&cThe UHC start in &a%{untilStart}%:%{secondsTime}%"
  394. set {secondsTime} to ("%{secondsTime}%" parsed as integer)
  395. remove 1 from {secondsTime}
  396. if {secondsTime} is equal to -1:
  397. set {secondsTime} to 59
  398. remove 1 from {untilStart}
  399. if {untilStart} is equal to 0:
  400. if {secondsTime} is smaller than 0:
  401. set {whCounter} to "00:00"
  402. set {secondsTime} to ("%{secondsTime}%" parsed as string)
  403. if the length of {secondsTime} is smaller than 2:
  404. set {secondsTime} to "0%{secondsTime}%"
  405. if {whCounter} is not equal to "00:00":
  406. set {whCounter} to "%{untilStart}%:%{secondsTime}%"
  407. if {TeamsNumbersName} is equal to "FFA":
  408. set {motd} to "{@motd}&d&l⫸ §e§lFFA §6- &cStart in &a§l%{whCounter}% &r&aminutes &6- &b{@twitter} &d&l⫷"
  409. else:
  410. set {motd} to "{@motd}&d&l⫸ &r§e%{TeamsNumbersName}% §6- §cStart in §a%{whCounter}% &r&aminutes &6- &bHurry up !&d&l⫷"
  411. else:
  412. set {motd} to "{@motd}&d&l⫸ §eNo scheduled UHC §6- &aFollow §b§l{@twitter} &d&l⫷"
  413. else:
  414. set {motd} to "{@motd}&d&l⫸ §eNo scheduled UHC §6- &aFollow &b&l{@twitter} &d&l⫷"
  415. set {players} to 0
  416. loop all players:
  417. if {Spec::%loop-player%} is not set:
  418. add 1 to {players}
  419. if {UHCStart} is true:
  420. set {motd} to "{@motd}&d&l⫸ &e%{players}% players &6- &cMeetup in &a&l%{meetupTab}% &r&6- &b{@twitter} &d&l⫷"
  421. if {Start} is not true:
  422. set {players} to 0
  423. loop {WH::*}:
  424. set {_loopPlayers} to ("%loop-index%" parsed as offlineplayer)
  425. if {Spec::%{_loopPlayers}%} is not set:
  426. add 1 to {players}
  427. else:
  428. set {players} to 0
  429. loop {WH::*}:
  430. set {_loopPlayers} to ("%loop-index%" parsed as offlineplayer)
  431. if {_loopPlayers} is not in world "lobby":
  432. if {Spec::%{_loopPlayers}%} is not set:
  433. add 1 to {players}
  434. if {Start} is true:
  435. if PvP is enabled in world "world":
  436. loop {WH::*}:
  437. set {_playerWH} to ("%loop-index%" parsed as offlineplayer)
  438. if {leave::%{_playerWH}%} is set:
  439. if {_playerWH} is online:
  440. delete {leave::%{_playerWH}%}
  441. else:
  442. if {leave::%{_playerWH}%} is greater than 1199:
  443. if {Spec::%{_playerWH}%} is not set:
  444. delete {WH::%{_playerWH}%}
  445. broadcast "&a&lUHC &r&8⫸ &6%{_playerWH}% &7is offline for more than 20 minutes, he is removed from the UHC."
  446. if {Team::%{_playerWH}%} is set:
  447. set {chatname::%{_playerWH}%} to "&7%{_playerWH}%"
  448. execute command "/ne clear %{_playerWH}%"
  449. set {_NotEmpty} to false
  450. loop {WH::*}:
  451. set {_name} to ("%loop-index-2%" parsed as offlineplayer)
  452. if {_name} is not command sender:
  453. if {Team::%{_name}%} is equal to {Team::%{_playerWH}%}:
  454. set {_NotEmpty} to true
  455. stop loop
  456. if {_NotEmpty} is false:
  457. if {Team::%{_playerWH}%} is equal to "UHC1":
  458. set {UHC1} to 0
  459. else if {Team::%{_playerWH}%} is equal to "UHC2":
  460. set {UHC2} to 0
  461. else if {Team::%{_playerWH}%} is equal to "UHC3":
  462. set {UHC3} to 0
  463. else if {Team::%{_playerWH}%} is equal to "UHC4":
  464. set {UHC4} to 0
  465. else if {Team::%{_playerWH}%} is equal to "UHC5":
  466. set {UHC5} to 0
  467. else if {Team::%{_playerWH}%} is equal to "UHC6":
  468. set {UHC6} to 0
  469. else if {Team::%{_playerWH}%} is equal to "UHC7":
  470. set {UHC7} to 0
  471. else if {Team::%{_playerWH}%} is equal to "UHC8":
  472. set {UHC8} to 0
  473. else if {Team::%{_playerWH}%} is equal to "UHC9":
  474. set {UHC9} to 0
  475. else if {Team::%{_playerWH}%} is equal to "UHC10":
  476. set {UHC10} to 0
  477. else if {Team::%{_playerWH}%} is equal to "UHC11":
  478. set {UHC11} to 0
  479. else if {Team::%{_playerWH}%} is equal to "UHC12":
  480. set {UHC12} to 0
  481. else if {Team::%{_playerWH}%} is equal to "UHC13":
  482. set {UHC13} to 0
  483. else if {Team::%{_playerWH}%} is equal to "UHC14":
  484. set {UHC14} to 0
  485. else if {Team::%{_playerWH}%} is equal to "UHC15":
  486. set {UHC15} to 0
  487. delete {Team::%{_playerWH}%}
  488. else:
  489. add 1 to {leave::%{_playerWH}%}
  490. set {secondsTime} to ("%{secondsTime}%" parsed as integer)
  491. remove 1 from {secondsTime}
  492. if {secondsTime} is equal to -1:
  493. set {secondsTime} to 59
  494. remove 1 from {pvpTime}
  495. remove 1 from {meetupTime}
  496. if {pvpTime} is equal to 0:
  497. if {secondsTime} is equal to 0:
  498. enable PvP in all worlds
  499. disable PvP in world "lobby"
  500. execute command "/updatescoreboard"
  501. loop {WH::*}:
  502. set {_whName} to ("%loop-index%" parsed as offlineplayer)
  503. if {onGround::%{_whName}%} is not set:
  504. if {Spec::%{_whName}%} is not set:
  505. delete {WH::%{_whName}%}
  506. if {Team::%{_whName}%} is set:
  507. set {chatname::%{_whName}%} to "&7%{_whName}%"
  508. execute command "/ne clear %{_whName}%"
  509. set {_NotEmpty} to false
  510. loop {WH::*}:
  511. set {_name} to ("%loop-index-2%" parsed as offlineplayer)
  512. if {_name} is not command sender:
  513. if {Team::%{_name}%} is equal to {Team::%{_whName}%}:
  514. set {_NotEmpty} to true
  515. stop loop
  516. if {_NotEmpty} is false:
  517. if {Team::%{_whName}%} is equal to "UHC1":
  518. set {UHC1} to 0
  519. else if {Team::%{_whName}%} is equal to "UHC2":
  520. set {UHC2} to 0
  521. else if {Team::%{_whName}%} is equal to "UHC3":
  522. set {UHC3} to 0
  523. else if {Team::%{_whName}%} is equal to "UHC4":
  524. set {UHC4} to 0
  525. else if {Team::%{_whName}%} is equal to "UHC5":
  526. set {UHC5} to 0
  527. else if {Team::%{_whName}%} is equal to "UHC6":
  528. set {UHC6} to 0
  529. else if {Team::%{_whName}%} is equal to "UHC7":
  530. set {UHC7} to 0
  531. else if {Team::%{_whName}%} is equal to "UHC8":
  532. set {UHC8} to 0
  533. else if {Team::%{_whName}%} is equal to "UHC9":
  534. set {UHC9} to 0
  535. else if {Team::%{_whName}%} is equal to "UHC10":
  536. set {UHC10} to 0
  537. else if {Team::%{_whName}%} is equal to "UHC11":
  538. set {UHC11} to 0
  539. else if {Team::%{_whName}%} is equal to "UHC12":
  540. set {UHC12} to 0
  541. else if {Team::%{_whName}%} is equal to "UHC13":
  542. set {UHC13} to 0
  543. else if {Team::%{_whName}%} is equal to "UHC14":
  544. set {UHC14} to 0
  545. else if {Team::%{_whName}%} is equal to "UHC15":
  546. set {UHC15} to 0
  547. delete {Team::%{_whName}%}
  548. loop all players:
  549. if loop-player is not in world "lobby":
  550. if {Spec::%loop-player%} is not set:
  551. if {actionbarused::%loop-player%} is not set:
  552. set action bar of loop-player to ""
  553. send loop-player title "&4PVP Enabled" with subtitle "&7Get ready to fight!" for 2 seconds with 0.5 second fade in and 0.5 second fade out
  554. broadcast "&a&lUHC &r&8⫸ &7The PVP is now activated."
  555. set {pvpTab} to "ON"
  556. if {meetupTime} is equal to 0:
  557. if {secondsTime} is equal to 0:
  558. loop {Host::*}:
  559. set {_host} to ("%loop-index%" parsed as offlineplayer)
  560. stop loop
  561. if {_host} is not in world "world":
  562. set {_loc} to location of {_host}
  563. teleport {_host} to location (0, 100, 0) in world "world"
  564. make {_host} execute command "/worldborder set 200 %(({border}-200)/2)%"
  565. if {_loc} is set:
  566. teleport {_host} to {_loc}
  567. remove 2 from {border}
  568. loop all players:
  569. if loop-player is not in world "lobby":
  570. if {Spec::%loop-player%} is not set:
  571. if {actionbarused::%loop-player%} is not set:
  572. set action bar of loop-player to ""
  573. send loop-player title "&6Meetup" with subtitle "&7Move closer to the center!" for 2 seconds with 0.5 second fade in and 0.5 second fade out
  574. broadcast "&a&lUHC &r&8⫸ &7Head to the center."
  575. broadcast "&a&lUHC &r&8⫸ &7The border shrinks."
  576. set {meetupTab} to "00:00"
  577. set {secondsTime} to ("%{secondsTime}%" parsed as string)
  578. if the length of {secondsTime} is smaller than 2:
  579. set {secondsTime} to "0%{secondsTime}%"
  580. if {pvpTab} is equal to "ON":
  581. set {pvpTab} to "ON"
  582. else:
  583. set {pvpTab} to "%{pvpTime}%:%{secondsTime}%"
  584. if {meetupTab} is equal to "00:00":
  585. if {border} is greater than 202:
  586. remove 2 from {border}
  587. loop all players:
  588. if {Spec::%loop-player%} is not set:
  589. if loop-player is in world "world":
  590. if ({border}/2) - (x coord of location of loop-player) is smaller than 30:
  591. if ({border}/2) - (z coord of location of loop-player) is greater than 30:
  592. if ({border}/2) - (x coord of location of loop-player) is smaller than 0:
  593. set {actionbarMeetup} to "&cThe border is at &a0 blocks &cof you"
  594. else:
  595. set {actionbarMeetup} to "&cThe border is at &a%round(({border}/2) - (x coord of location of loop-player))% blocks &cof you"
  596. else:
  597. if ({border}/2) - (z coord of location of loop-player) is smaller than ({border}/2) - (x coord of location of loop-player):
  598. if ({border}/2) - (z coord of location of loop-player) is smaller than 0:
  599. set {actionbarMeetup} to "&cThe border is at &a0 blocks &cof you"
  600. else:
  601. set {actionbarMeetup} to "&cThe border is at &a%round(({border}/2) - (z coord of location of loop-player))% blocks &cof you"
  602. else:
  603. if ({border}/2) - (x coord of location of loop-player) is smaller than 0:
  604. set {actionbarMeetup} to "&cThe border is at &a0 blocks &cof you"
  605. else:
  606. set {actionbarMeetup} to "&cThe border is at &a%round(({border}/2) - (x coord of location of loop-player))% blocks &cof you"
  607. else if ({border}/2) - (z coord of location of loop-player) is smaller than 30:
  608. if ({border}/2) - (x coord of location of loop-player) is greater than 30:
  609. if ({border}/2) - (x coord of location of loop-player) is smaller than 0:
  610. set {actionbarMeetup} to "&cThe border is at &a0 blocks &cof you"
  611. else:
  612. set {actionbarMeetup} to "&cThe border is at &a%round(({border}/2) - (x coord of location of loop-player))% blocks &cof you"
  613. else:
  614. set {actionbarMeetup} to ""
  615. if {actionbarused::%loop-player%} is not set:
  616. set action bar of loop-player to "%{actionbarMeetup}%"
  617. delete {actionbarMeetup}
  618. else if {border} is equal to 202:
  619. remove 2 from {border}
  620. broadcast "&a&lUHC &r&8⫸ &7Shrinking completed."
  621. else:
  622. set {meetupTab} to "%{meetupTime}%:%{secondsTime}%"
  623. if {pvpTab} is not equal to "ON":
  624. if {invinc} is not true:
  625. loop all players:
  626. if loop-player is not in world "lobby":
  627. if {invinc::%loop-player%} is not set:
  628. if {Spec::%loop-player%} is not set:
  629. if {actionbarused::%loop-player%} is not set:
  630. set action bar of loop-player to "&cPVP enabled in &a%{pvpTab}%"
  631. else if {pvpTab} is equal to "ON":
  632. if {meetupTab} is not equal to "00:00":
  633. loop all players:
  634. if loop-player is not in world "lobby":
  635. if {Spec::%loop-player%} is not set:
  636. if {actionbarused::%loop-player%} is not set:
  637. set action bar of loop-player to "&cMeetup in &a%{meetuptab}%"
  638. loop all players:
  639. set tab header to "\n&7 Welcome on the UHC, &a%loop-player% &7! \n &b@CommandsPVP &7 ⋯ &aTS: &b{@TS} \n" and footer to "\n &7UHC &a%{TeamsNumbersName}% &7 ⋯ Nether &a%{nether}% &7 ⋯ CutClean &a%{CutClean}% \n\n &7PVP: &a%{pvpTab}% &7⋯ Meetup: &a%{meetupTab}% &7⋯ Map: &a%{border}%x%{border}% \n\n &7Players: &a%{players}% &7⋯ Ping: &a%ping of loop-player%ms &7⋯ TPS: &a%tps% \n" for loop-player
  640. loop {death::*}:
  641. set {_deathPlayer} to ("%loop-index%" parsed as offlineplayer)
  642. hide {_deathPlayer} to loop-player-1
  643.  
  644. every 0.5 seconds:
  645. loop all players in world "lobby":
  646. if loop-player is in world "lobby":
  647. set rf max health of loop-player to {TempHealth}
  648. set health of loop-player to 10
  649. if {TempHealth} is equal to 2:
  650. set {SensHealth} to 1
  651. else if {TempHealth} is equal to 20:
  652. set {SensHealth} to 2
  653. if {SensHealth} is equal to 1:
  654. set {TempHealth} to ({TempHealth} + 2)
  655. else if {SensHealth} is equal to 2:
  656. set {TempHealth} to ({TempHealth} - 2)
  657. if {Start} is true:
  658. loop all players:
  659. loop all players:
  660. if {Spec::%loop-player-1%} is not set:
  661. set {_pHealth} to floor(health of loop-player-1 * 10)
  662. set tab score of loop-player-1 to {_pHealth} for loop-player-2
  663.  
  664. on command:
  665. if player is not an op:
  666. if command is equal to "?", "aliases", "nametagedit", "nte", "pl", "rayfall", "rl", "sk", "skrf", "ver", "bukkit:?", "bukkit:about", "bukkit:help", "bukkit:pl", "bukkit:plugins", "bukkit:reload", "bukkit:rl", "bukkit:timings", "bukkit:ver", "bukkit:version", "plugins", "reload", "timings", "version", "minecraft:help", "ne", "nte", "nametagedit", "nametagedit:nametagedit", "nametagedit:ne", "nametagedit:nte", "skrayfall", "sk", "skRayFall", "skfr", "skript", "skrayfall:rayfall", "skrayfall:skrayfall", "skrayfall:skrf", "skript:sk", "skript:skript", "me", "minecraft:me" or "wb":
  667. cancel event
  668. send "Unknown command." to command sender
  669.  
  670. on command:
  671. if command is equal to "help" or "h":
  672. cancel event
  673. set {_access} to false
  674. if {Host::%player%} is true:
  675. set {_access} to true
  676. else if player is op:
  677. set {_access} to true
  678. if {_access} is true:
  679. send "&a&lUHC &r&8⫸ &7UHC Management:" to command sender
  680. send "&8⫸ &f/config &7- &oConfigure the UHC." to command sender
  681. send "&8⫸ &f/scenarios &7- &oSelect the scénarios." to command sender
  682. send "&8⫸ &f/wh &7- &oWhitelist Management." to command sender
  683. send "&8⫸ &f/spec &7- &oSpectators Management." to command sender
  684. send "&8⫸ &f/program &7- &oSchedule the next UHC." to command sender
  685. send "&a&lUHC &r&8⫸ &7Launch a UHC:" to command sender
  686. send "&8⫸ &f/open &7- &oOpen the whitelist." to command sender
  687. send "&8⫸ &f/spawns &7- &oGenerate the spawns." to command sender
  688. send "&8⫸ &f/teleport &7- &oTeleport players and close whitelist." to command sender
  689. send "&8⫸ &f/start &7- &oStart the UHC." to command sender
  690. send "&a&lUHC &r&8⫸ &7Moderations commands:" to command sender
  691. send "&8⫸ &f/inv <player> &7- &oView the inventory of a player." to command sender
  692. send "&8⫸ &f/mute <player> &7- &oMute a player." to command sender
  693. send "&a&lUHC &r&8⫸ &7Useful commands:" to command sender
  694. send "&8⫸ &f/rules &7- &oCheck the rules." to command sender
  695. send "&8⫸ &f/msg &7- &oSend a private message." to command sender
  696. send "&8⫸ &f/r &7- &oReply to last private message." to command sender
  697. send "&8⫸ &f/team &7- &oManage teams." to command sender
  698. send "&8⫸ &f/about <player> &7- &oSee status of a player." to command sender
  699. else if {Staff::%player%} is set:
  700. send "&a&lUHC &r&8⫸ &7UHC Management:" to command sender
  701. send "&8⫸ &f/wh &7- &oWhitelist Management." to command sender
  702. send "&8⫸ &f/spec &7- &oSpectators Management." to command sender
  703. send "&a&lUHC &r&8⫸ &7Useful commands:" to command sender
  704. send "&8⫸ &f/rules &7- &oCheck the rules." to command sender
  705. send "&8⫸ &f/msg &7- &oSend a private message." to command sender
  706. send "&8⫸ &f/r &7- &oReply to last private message." to command sender
  707. send "&8⫸ &f/team &7- &oManage teams." to command sender
  708. send "&8⫸ &f/about <player> &7- &oSee status of a player." to command sender
  709. else:
  710. send "&a&lUHC &r&8⫸ &7Useful commands:" to command sender
  711. send "&8⫸ &f/rules &7- &oCheck the rules." to command sender
  712. send "&8⫸ &f/msg &7- &oSend a private message." to command sender
  713. send "&8⫸ &f/r &7- &oReply to last private message." to command sender
  714. send "&8⫸ &f/team &7- &oManage teams." to command sender
  715. send "&8⫸ &f/about <player> &7- &oSee status of a player." to command sender
  716.  
  717. command /rules:
  718. trigger:
  719. open chest with 3 row named "&8⫸ &4{@name}" to player
  720. wait 1 tick
  721. format slot 0 of player with shiny book named "&bUHC TheTonyk 1" with lore "&7UHC FFA||&8CutClean||&7Rush||&8Barebones||&7Check tab informations||&c/helpop &8for help" to be unstealable
  722.  
  723. command /config [<text>] [<text>]:
  724. trigger:
  725. set {_access} to false
  726. if {Host::%player%} is true:
  727. set {_access} to true
  728. else if player is op:
  729. set {_access} to true
  730. if {_access} is true:
  731. if {UHCStart} is not true:
  732. if arg 2 is not set:
  733. if arg 1 is not set:
  734. wait 1 tick
  735. open chest with 3 row named "&8⫸ &4Configuration" to player
  736. wait 1 tick
  737. if {TeamsStatus} is true:
  738. format slot 0 of player with shiny name tag named "&8⫸ &7Teams: &a%{TeamsNumbersName}%" to run [make player execute command "/config teams"]
  739. else:
  740. format slot 0 of player with name tag named "&8⫸ &7Teams: &c%{TeamsNumbersName}%" to run [make player execute command "/config teams"]
  741. if {WHOpen} is false:
  742. format slot 1 of player with shiny book and quill named "&8⫸ &7Whitelist: &aON" to run [make player execute command "/config wh"]
  743. else:
  744. format slot 1 of player with book and quill named "&8⫸ &7Whitelist: &cOFF" to run [make player execute command "/config wh"]
  745. if {CutClean} is equal to "ON":
  746. format slot 2 of player with shiny coal item named "&8⫸ &7CutClean: &aON" to run [set {CutClean} to "OFF"]->[make player execute command "/config"]
  747. else:
  748. format slot 2 of player with coal item named "&8⫸ &7CutClean: &cOFF" to run [set {CutClean} to "ON"]->[make player execute command "/config"]
  749. if {chat} is true:
  750. format slot 3 of player with shiny paper named "&8⫸ &7Chat: &aON" to run [make player execute command "/config chat"]
  751. else:
  752. format slot 3 of player with paper named "&8⫸ &7Chat: &cOFF" to run [make player execute command "/config chat"]
  753. if {nether} is equal to "ON":
  754. format slot 4 of player with shiny netherrack named "&8⫸ &7Nether: &aON" to run [set {nether} to "OFF"]->[make player execute command "/config"]
  755. else:
  756. format slot 4 of player with netherrack named "&8⫸ &7Nether: &cOFF" to run [set {nether} to "ON"]->[make player execute command "/config"]
  757. if {potions2} is equal to "ON":
  758. format slot 5 of player with shiny glowstone dust named "&8⫸ &7Potions II: &aON" to run [set {potions2} to "OFF"]->[make player execute command "/config"]
  759. else:
  760. format slot 5 of player with glowstone dust named "&8⫸ &7Potions II: &cOFF" to run [set {potions2} to "ON"]->[make player execute command "/config"]
  761. if {starterFood::*} is set:
  762. format slot 6 of player with shiny cooked beef named "&8⫸ &7Starter Food: &6%{starterfood::name}%" to run [make player execute command "/config starterfood"]
  763. else:
  764. format slot 6 of player with cooked beef named "&8⫸ &7Starter Food: &cOFF" to run [make player execute command "/config starterfood"]
  765. if {msg} is true:
  766. format slot 7 of player with shiny banner:15 named "&8⫸ &7Private messages: &aON" to run [set {msg} to false]->[make player execute command "/config"]
  767. else:
  768. format slot 7 of player with banner:15 named "&8⫸ &7Private messages: &cOFF" to run [set {msg} to true]->[make player execute command "/config"]
  769. if {weather} is true:
  770. format slot 8 of player with shiny daylight sensor named "&8⫸ &7Eternal Sunny: &aON" to run [set {weather} to false]->[make player execute command "/config"]
  771. else:
  772. format slot 8 of player with daylight sensor named "&8⫸ &7Eternal Sunny: &cOFF" to run [set {weather} to true]->[make player execute command "/config"]
  773. if {eternalDay} is true:
  774. format slot 9 of player with shiny torch named "&8⫸ &7Eternal Day: &aON" to run [set {eternalDay} to false]->[make player execute command "/config"]
  775. else:
  776. format slot 9 of player with torch named "&8⫸ &7Eternal Day: &cOFF" to run [set {eternalDay} to true]->[make player execute command "/config"]
  777. format slot 18 of player with map named "&8⫸ &7Map: &6%{border}%x%{border}%" to run [make player execute command "/config border"]
  778. format slot 19 of player with clock named "&8⫸ &7PVP/Meetup Time" with lore "&8⫸ &7PVP: &6%{pvpTab}%||&8⫸ &7Meetup: &6%{meetupTab}%" to run [make player execute command "/config times"]
  779. format slot 26 of player with barrier named "&8⫸ &cClose" to close
  780. else if arg 1 is equal to "teams":
  781. open chest with 5 row named "&8⫸ Configuration: &4Teams" to player
  782. wait 1 tick
  783. format slot 0 of player with shiny name tag named "&8⫸ &7Teams: &a%{TeamsNumbersName}%" to be unstealable
  784. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  785. if {TeamsNumbers} is 1:
  786. format slot 2 of player with light green clay named "&8⫸ &aFFA" to be unstealable
  787. else:
  788. format slot 2 of player with red clay named "&8⫸ &cFFA" to run [make player execute command "/config teams 1"]
  789. if {TeamsNumbers} is 2:
  790. format slot 3 of player with 2 of light green clay named "&8⫸ &aChosen To2" to be unstealable
  791. else:
  792. format slot 3 of player with 2 of red clay named "&8⫸ &cChosen To2" to run [make player execute command "/config teams 2"]
  793. if {TeamsNumbers} is 3:
  794. format slot 4 of player with 3 of light green clay named "&8⫸ &aChosen To3" to be unstealable
  795. else:
  796. format slot 4 of player with 3 of red clay named "&8⫸ &cChosen To3" to run [make player execute command "/config teams 3"]
  797. if {TeamsNumbers} is 4:
  798. format slot 5 of player with 4 of light green clay named "&8⫸ &aChosen To4" to be unstealable
  799. else:
  800. format slot 5 of player with 4 of red clay named "&8⫸ &cChosen To4" to run [make player execute command "/config teams 4"]
  801. if {TeamsNumbers} is 5:
  802. format slot 6 of player with 5 of light green clay named "&8⫸ &aChosen To5" to be unstealable
  803. else:
  804. format slot 6 of player with 5 of red clay named "&8⫸ &cChosen To5" to run [make player execute command "/config teams 5"]
  805. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  806. format slot 8 of player with gray stained glass pane named "&7{@name}" to be unstealable
  807. format slot 9 of player with gray stained glass pane named "&7{@name}" to be unstealable
  808. format slot 10 of player with gray stained glass pane named "&7{@name}" to be unstealable
  809. if {TeamsNumbers} is 6:
  810. format slot 11 of player with 6 of light green clay named "&8⫸ &aChosen To6" to be unstealable
  811. else:
  812. format slot 11 of player with 6 of red clay named "&8⫸ &cChosen To6" to run [make player execute command "/config teams 6"]
  813. if {TeamsNumbers} is 7:
  814. format slot 12 of player with 7 of light green clay named "&8⫸ &aChosen To7" to be unstealable
  815. else:
  816. format slot 12 of player with 7 of red clay named "&8⫸ &cChosen To7" to run [make player execute command "/config teams 7"]
  817. if {TeamsNumbers} is 8:
  818. format slot 13 of player with 8 of light green clay named "&8⫸ &aChosen To8" to be unstealable
  819. else:
  820. format slot 13 of player with 8 of red clay named "&8⫸ &cChosen To8" to run [make player execute command "/config teams 8"]
  821. if {TeamsNumbers} is 9:
  822. format slot 14 of player with 9 of light green clay named "&8⫸ &aChosen To9" to be unstealable
  823. else:
  824. format slot 14 of player with 9 of red clay named "&8⫸ &cChosen To9" to run [make player execute command "/config teams 9"]
  825. if {TeamsNumbers} is 10:
  826. format slot 15 of player with 10 of light green clay named "&8⫸ &aChosen To10" to be unstealable
  827. else:
  828. format slot 15 of player with 10 of red clay named "&8⫸ &cChosen To10" to run [make player execute command "/config teams 10"]
  829. format slot 16 of player with gray stained glass pane named "&7{@name}" to be unstealable
  830. format slot 17 of player with gray stained glass pane named "&7{@name}" to be unstealable
  831. format slot 18 of player with gray stained glass pane named "&7{@name}" to be unstealable
  832. format slot 19 of player with gray stained glass pane named "&7{@name}" to be unstealable
  833. format slot 20 of player with gray stained glass pane named "&7{@name}" to be unstealable
  834. format slot 21 of player with gray stained glass pane named "&7{@name}" to be unstealable
  835. format slot 22 of player with gray stained glass pane named "&7{@name}" to be unstealable
  836. format slot 23 of player with gray stained glass pane named "&7{@name}" to be unstealable
  837. format slot 24 of player with gray stained glass pane named "&7{@name}" to be unstealable
  838. format slot 25 of player with gray stained glass pane named "&7{@name}" to be unstealable
  839. format slot 26 of player with gray stained glass pane named "&7{@name}" to be unstealable
  840. format slot 27 of player with gray stained glass pane named "&7{@name}" to be unstealable
  841. format slot 28 of player with gray stained glass pane named "&7{@name}" to be unstealable
  842. format slot 29 of player with gray stained glass pane named "&7{@name}" to be unstealable
  843. if {TeamsNumbers} is 102:
  844. format slot 30 of player with 2 of light green clay named "&8⫸ &aRandom To2" to be unstealable
  845. else:
  846. format slot 30 of player with 2 of red clay named "&8⫸ &cRandom To2" to run [make player execute command "/config teams 102"]
  847. if {TeamsNumbers} is 103:
  848. format slot 31 of player with 3 of light green clay named "&8⫸ &aRandom To3" to be unstealable
  849. else:
  850. format slot 31 of player with 3 of red clay named "&8⫸ &cRandom To3" to run [make player execute command "/config teams 103"]
  851. if {TeamsNumbers} is 104:
  852. format slot 32 of player with 4 of light green clay named "&8⫸ &aRandom To4" to be unstealable
  853. else:
  854. format slot 32 of player with 4 of red clay named "&8⫸ &cRandom To4" to run [make player execute command "/config teams 104"]
  855. if {TeamsNumbers} is 105:
  856. format slot 33 of player with 5 of light green clay named "&8⫸ &aRandom To5" to be unstealable
  857. else:
  858. format slot 33 of player with 5 of red clay named "&8⫸ &cRandom To5" to run [make player execute command "/config teams 105"]
  859. format slot 34 of player with gray stained glass pane named "&7{@name}" to be unstealable
  860. format slot 35 of player with gray stained glass pane named "&7{@name}" to be unstealable
  861. format slot 36 of player with gray stained glass pane named "&7{@name}" to be unstealable
  862. format slot 37 of player with gray stained glass pane named "&7{@name}" to be unstealable
  863. if {TeamsNumbers} is 106:
  864. format slot 38 of player with 6 of light green clay named "&8⫸ &aRandom To6" to be unstealable
  865. else:
  866. format slot 38 of player with 6 of red clay named "&8⫸ &cRandom To6" to run [make player execute command "/config teams 106"]
  867. if {TeamsNumbers} is 107:
  868. format slot 39 of player with 7 of light green clay named "&8⫸ &aRandom To7" to be unstealable
  869. else:
  870. format slot 39 of player with 7 of red clay named "&8⫸ &cRandom To7" to run [make player execute command "/config teams 107"]
  871. if {TeamsNumbers} is 108:
  872. format slot 40 of player with 8 of light green clay named "&8⫸ &aRandom To8" to be unstealable
  873. else:
  874. format slot 40 of player with 8 of red clay named "&8⫸ &cRandom To8" to run [make player execute command "/config teams 108"]
  875. if {TeamsNumbers} is 109:
  876. format slot 41 of player with 9 of light green clay named "&8⫸ &aRandom To9" to be unstealable
  877. else:
  878. format slot 41 of player with 9 of red clay named "&8⫸ &cRandom To9" to run [make player execute command "/config teams 109"]
  879. if {TeamsNumbers} is 110:
  880. format slot 42 of player with 10 of light green clay named "&8⫸ &aRandom To10" to be unstealable
  881. else:
  882. format slot 42 of player with 10 of red clay named "&8⫸ &cRandom To10" to run [make player execute command "/config teams 110"]
  883. format slot 43 of player with gray stained glass pane named "&7{@name}" to be unstealable
  884. format slot 44 of player with barrier named "&8⫸ &cBack" to run [make player execute command "/config"]
  885. else if arg 1 is equal to "wh":
  886. if {WHOpen} is false:
  887. set {WHOpen} to true
  888. broadcast "&a&lUHC &r&8⫸ &7The whitelist is now open."
  889. else:
  890. set {WHOpen} to false
  891. broadcast "&a&lUHC &r&8⫸ &7The whitelist is now closed."
  892. make player execute command "/config"
  893. else if arg 1 is equal to "chat":
  894. if {chat} is true:
  895. set {chat} to false
  896. broadcast "&a&lUHC &r&8⫸ &7Chat enabled."
  897. else:
  898. set {chat} to true
  899. broadcast "&a&lUHC &r&8⫸ &7Chat disabled."
  900. make player execute command "/config"
  901. else if arg 1 is equal to "border":
  902. open chest with 1 row named "&8⫸ Configuration: &4Map" to player
  903. wait 1 tick
  904. format slot 0 of player with map named "&8⫸ &7Map: &6%{border}%x%{border}%" to be unstealable
  905. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  906. format slot 2 of player with green clay named "&8⫸ &2+500 &7(Current: &6%{border}%x%{border}%&7)" to run [make player execute command "/config border +500"]
  907. format slot 3 of player with light green clay named "&8⫸ &a+100 &7(Current: &6%{border}%x%{border}%&7)" to run [make player execute command "/config border +100"]
  908. format slot 4 of player with yellow clay named "&8⫸ &eReset &7(Current: &6%{border}%x%{border}%&7)" to run [make player execute command "/config border 2000"]
  909. format slot 5 of player with pink clay named "&8⫸ &c-100 &7(Current: &6%{border}%x%{border}%&7)" to run [make player execute command "/config border -100"]
  910. format slot 6 of player with red clay named "&8⫸ &4-500 &7(Current: &6%{border}%x%{border}%&7)" to run [make player execute command "/config border -500"]
  911. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  912. format slot 8 of player with barrier named "&8⫸ &cBack" to run [make player execute command "/config"]
  913. else if arg 1 is equal to "times":
  914. open chest with 2 row named "&8⫸ Configuration: &4PVP/Meetup" to player
  915. wait 1 tick
  916. format slot 0 of player with clock named "&8⫸ &7PVP Time: &6%{pvpTab}%" to be unstealable
  917. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  918. format slot 2 of player with green clay named "&8⫸ &2+10min &7(Current PVP: &6%{pvpTab}%&7)" to run [make player execute command "/config times +10pvp"]
  919. format slot 3 of player with light green clay named "&8⫸ &a+5min &7(Current PVP: &6%{pvpTab}%&7)" to run [make player execute command "/config times +5pvp"]
  920. format slot 4 of player with yellow clay named "&8⫸ &eReset &7(Current PVP: &6%{pvpTab}%&7)" to run [make player execute command "/config times default"]
  921. format slot 5 of player with pink clay named "&8⫸ &c-5min &7(Current PVP: &6%{pvpTab}%&7)" to run [make player execute command "/config times -5pvp"]
  922. format slot 6 of player with red clay named "&8⫸ &4-10min &7(Current PVP: &6%{pvpTab}%&7)" to run [make player execute command "/config times -10pvp"]
  923. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  924. format slot 8 of player with gray stained glass pane named "&7{@name}" to be unstealable
  925. format slot 9 of player with clock named "&8⫸ &7Meetup Time: &6%{meetupTab}%" to be unstealable
  926. format slot 10 of player with gray stained glass pane named "&7{@name}" to be unstealable
  927. format slot 11 of player with green clay named "&8⫸ &2+10min &7(Current Meetup: &6%{meetupTab}%&7)" to run [make player execute command "/config times +10meetup"]
  928. format slot 12 of player with light green clay named "&8⫸ &a+5min &7(Current Meetup: &6%{meetupTab}%&7)" to run [make player execute command "/config times +5meetup"]
  929. format slot 13 of player with yellow clay named "&8⫸ &eReset &7(Current Meetup: &6%{meetupTab}%&7)" to run [make player execute command "/config times default"]
  930. format slot 14 of player with pink clay named "&8⫸ &c-5min &7(Current Meetup: &6%{meetupTab}%&7)" to run [make player execute command "/config times -5meetup"]
  931. format slot 15 of player with red clay named "&8⫸ &4-10min &7(Current Meetup: &6%{meetupTab}%&7)" to run [make player execute command "/config times -10meetup"]
  932. format slot 16 of player with gray stained glass pane named "&7{@name}" to be unstealable
  933. format slot 17 of player with barrier named "&8⫸ &cBack" to run [make player execute command "/config"]
  934. else if arg 1 is equal to "starterfood":
  935. open chest with 2 row named "&8⫸ Configuration: &4StarterFood" to player
  936. wait 1 tick
  937. if {starterfood::name} is set:
  938. format slot 0 of player with shiny cooked beef named "&8⫸ &7Starter Food: &6%{starterfood::name}%" to be unstealable
  939. else:
  940. format slot 0 of player with cooked beef named "&8⫸ &7Starter Food: &cOFF" to be unstealable
  941. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  942. if {starterfood::command} is equal to "cooked beef":
  943. if {starterfood::number} is set:
  944. format slot 2 of player with {starterfood::number} of shiny cooked beef to run [make player execute command "/config starterfood beef"]
  945. else:
  946. format slot 2 of player with shiny cooked beef to run [make player execute command "/config starterfood beef"]
  947. else:
  948. if {starterfood::number} is set:
  949. format slot 2 of player with {starterfood::number} of cooked beef to run [make player execute command "/config starterfood beef"]
  950. else:
  951. format slot 2 of player with cooked beef to run [make player execute command "/config starterfood beef"]
  952. if {starterfood::command} is equal to "cooked porkchop":
  953. if {starterfood::number} is set:
  954. format slot 3 of player with {starterfood::number} of shiny cooked porkchop to run [make player execute command "/config starterfood porkchop"]
  955. else:
  956. format slot 3 of player with shiny cooked porkchop to run [make player execute command "/config starterfood porkchop"]
  957. else:
  958. if {starterfood::number} is set:
  959. format slot 3 of player with {starterfood::number} of cooked porkchop to run [make player execute command "/config starterfood porkchop"]
  960. else:
  961. format slot 3 of player with cooked porkchop to run [make player execute command "/config starterfood porkchop"]
  962. if {starterfood::command} is equal to "cooked chicken":
  963. if {starterfood::number} is set:
  964. format slot 4 of player with {starterfood::number} of shiny cooked chicken to run [make player execute command "/config starterfood chicken"]
  965. else:
  966. format slot 4 of player with shiny cooked chicken to run [make player execute command "/config starterfood chicken"]
  967. else:
  968. if {starterfood::number} is set:
  969. format slot 4 of player with {starterfood::number} of cooked chicken to run [make player execute command "/config starterfood chicken"]
  970. else:
  971. format slot 4 of player with cooked chicken to run [make player execute command "/config starterfood chicken"]
  972. if {starterfood::command} is equal to "cooked rabbit":
  973. if {starterfood::number} is set:
  974. format slot 5 of player with {starterfood::number} of shiny cooked rabbit to run [make player execute command "/config starterfood rabbit"]
  975. else:
  976. format slot 5 of player with shiny cooked rabbit to run [make player execute command "/config starterfood rabbit"]
  977. else:
  978. if {starterfood::number} is set:
  979. format slot 5 of player with {starterfood::number} of cooked rabbit to run [make player execute command "/config starterfood rabbit"]
  980. else:
  981. format slot 5 of player with cooked rabbit to run [make player execute command "/config starterfood rabbit"]
  982. if {starterfood::command} is equal to "cooked mutton":
  983. if {starterfood::number} is set:
  984. format slot 6 of player with {starterfood::number} of shiny cooked mutton to run [make player execute command "/config starterfood mutton"]
  985. else:
  986. format slot 6 of player with shiny cooked mutton to run [make player execute command "/config starterfood mutton"]
  987. else:
  988. if {starterfood::number} is set:
  989. format slot 6 of player with {starterfood::number} of cooked mutton to run [make player execute command "/config starterfood mutton"]
  990. else:
  991. format slot 6 of player with cooked mutton to run [make player execute command "/config starterfood mutton"]
  992. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  993. format slot 8 of player with gray stained glass pane named "&7{@name}" to be unstealable
  994. format slot 9 of player with gray stained glass pane named "&7{@name}" to be unstealable
  995. format slot 10 of player with gray stained glass pane named "&7{@name}" to be unstealable
  996. format slot 11 of player with green clay named "&8⫸ &2+5" to run [make player execute command "/config starterfood +5"]
  997. format slot 12 of player with light green clay named "&8⫸ &a+1" to run [make player execute command "/config starterfood +1"]
  998. format slot 13 of player with yellow clay named "&8⫸ &e0" to run [make player execute command "/config starterfood 0"]
  999. format slot 14 of player with pink clay named "&8⫸ &c-1" to run [make player execute command "/config starterfood -1"]
  1000. format slot 15 of player with red clay named "&8⫸ &4-5" to run [make player execute command "/config starterfood -5"]
  1001. format slot 16 of player with gray stained glass pane named "&7{@name}" to be unstealable
  1002. format slot 17 of player with barrier named "&8⫸ &cBack" to run [make player execute command "/config"]
  1003. else:
  1004. if arg 1 is not set:
  1005. make player execute command "/config"
  1006. else if arg 1 is equal to "teams":
  1007. set {_arg2} to ("%arg 2%" parsed as integer)
  1008. if arg 2 is not set:
  1009. make player execute command "/config teams"
  1010. else if {_arg2} is not between 1 and 110:
  1011. make player execute command "/config teams"
  1012. else if {_arg2} is between 11 and 101:
  1013. make player execute command "/config teams"
  1014. else if {_arg2} is between 1 and 10:
  1015. set {TeamsNumbers} to {_arg2}
  1016. if {TeamsNumbers} is 1:
  1017. make command sender execute command "team reset"
  1018. set {TeamsStatus} to false
  1019. set {TeamsNumbersName} to "FFA"
  1020. loop all players:
  1021. set slot 8 of loop-player to air
  1022. else:
  1023. set {TeamsStatus} to true
  1024. set {TeamsNumbersName} to "Chosen To%{TeamsNumbers}%"
  1025. loop all players:
  1026. set slot 8 of loop-player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  1027. broadcast "&a&lTeam &r&8⫸ &7Number of players per teams: &6%{TeamsNumbers}%"
  1028. execute command "/updatescoreboard"
  1029. make player execute command "/config teams"
  1030. else if {_arg2} is between 101 and 110:
  1031. if {TeamsNumbers} is equal to 1:
  1032. make command sender execute command "team reset"
  1033. set {TeamsNumbers} to {_arg2}
  1034. set {TeamsStatus} to false
  1035. loop all players:
  1036. set slot 8 of loop-player to air
  1037. set {TeamsNumbersName} to "Random To%({TeamsNumbers} - 100)%"
  1038. broadcast "&a&lTeam &r&8⫸ &7Number of players per teams: &6Random %({TeamsNumbers} - 100)%"
  1039. execute command "/updatescoreboard"
  1040. make player execute command "/config teams"
  1041. else:
  1042. make player execute command "/config teams"
  1043. else if arg 1 is equal to "border":
  1044. if arg 2 is equal to "+500":
  1045. if {border} is smaller than 4501:
  1046. set {border} to ({border} + 500)
  1047. if command sender is not in world "world":
  1048. set {_loc} to location of command sender
  1049. teleport command sender to location (0, 100, 0) in world "world"
  1050. make command sender execute command "/worldborder set %{border}%"
  1051. if {_loc} is set:
  1052. teleport command sender to {_loc}
  1053. else if arg 2 is equal to "+100":
  1054. if {border} is smaller than 4901:
  1055. set {border} to ({border} + 100)
  1056. if command sender is not in world "world":
  1057. set {_loc} to location of command sender
  1058. teleport command sender to location (0, 100, 0) in world "world"
  1059. execute command "/worldborder set %{border}%"
  1060. if {_loc} is set:
  1061. teleport command sender to {_loc}
  1062. else if arg 2 is equal to "-100":
  1063. if {border} is greater than 599:
  1064. set {border} to ({border} - 100)
  1065. if command sender is not in world "world":
  1066. set {_loc} to location of command sender
  1067. teleport command sender to location (0, 100, 0) in world "world"
  1068. execute command "/worldborder set %{border}%"
  1069. if {_loc} is set:
  1070. teleport command sender to {_loc}
  1071. else if arg 2 is equal to "-500":
  1072. if {border} is greater than 999:
  1073. set {border} to ({border} - 500)
  1074. if command sender is not in world "world":
  1075. set {_loc} to location of command sender
  1076. teleport command sender to location (0, 100, 0) in world "world"
  1077. execute command "/worldborder set %{border}%"
  1078. if {_loc} is set:
  1079. teleport command sender to {_loc}
  1080. else if arg 2 is equal to "2000":
  1081. set {border} to 2000
  1082. if command sender is not in world "world":
  1083. set {_loc} to location of command sender
  1084. teleport command sender to location (0, 100, 0) in world "world"
  1085. execute command "/worldborder set %{border}%"
  1086. if {_loc} is set:
  1087. teleport command sender to {_loc}
  1088. make player execute command "/config border"
  1089. else if arg 1 is equal to "times":
  1090. if arg 2 is equal to "+10pvp":
  1091. if {pvpTime} is smaller than 191:
  1092. if ({meetupTime} - ({pvpTime} + 10)) is greater than 4:
  1093. set {pvpTime} to ({pvpTime} + 10)
  1094. set {pvpTab} to "%{pvpTime}%:00"
  1095. else if arg 2 is equal to "+5pvp":
  1096. if {pvpTime} is smaller than 196:
  1097. if ({meetupTime} - ({pvpTime} + 5)) is greater than 4:
  1098. set {pvpTime} to ({pvpTime} + 5)
  1099. set {pvpTab} to "%{pvpTime}%:00"
  1100. else if arg 2 is equal to "-5pvp":
  1101. if {pvpTime} is greater than 9:
  1102. if ({meetupTime} - ({pvpTime} - 5)) is greater than 4:
  1103. set {pvpTime} to ({pvpTime} - 5)
  1104. set {pvpTab} to "%{pvpTime}%:00"
  1105. else if arg 2 is equal to "-10pvp":
  1106. if {pvpTime} is greater than 14:
  1107. if ({meetupTime} - ({pvpTime} - 10)) is greater than 4:
  1108. set {pvpTime} to ({pvpTime} - 10)
  1109. set {pvpTab} to "%{pvpTime}%:00"
  1110. else if arg 2 is equal to "+10meetup":
  1111. if {meetupTime} is smaller than 291:
  1112. if (({meetupTime} + 10) - {pvpTime}) is greater than 4:
  1113. set {meetupTime} to ({meetupTime} + 10)
  1114. set {meetupTab} to "%{meetupTime}%:00"
  1115. else if arg 2 is equal to "+5meetup":
  1116. if {meetupTime} is smaller than 296:
  1117. if (({meetupTime} + 5) - {pvpTime}) is greater than 4:
  1118. set {meetupTime} to ({meetupTime} + 5)
  1119. set {meetupTab} to "%{meetupTime}%:00"
  1120. else if arg 2 is equal to "-5meetup":
  1121. if {meetupTime} is greater than 14:
  1122. if (({meetupTime} - 5) - {pvpTime}) is greater than 4:
  1123. set {meetupTime} to ({meetupTime} - 5)
  1124. set {meetupTab} to "%{meetupTime}%:00"
  1125. else if arg 2 is equal to "-10meetup":
  1126. if {meetupTime} is greater than 19:
  1127. if (({meetupTime} - 10) - {pvpTime}) is greater than 4:
  1128. set {meetupTime} to ({meetupTime} - 10)
  1129. set {meetupTab} to "%{meetupTime}%:00"
  1130. else if arg 2 is equal to "default":
  1131. set {pvpTime} to 20
  1132. set {pvpTab} to "%{pvpTime}%:00"
  1133. set {meetupTime} to 80
  1134. set {meetupTab} to "%{meetupTime}%:00"
  1135. make player execute command "/config times"
  1136. else if arg 1 is equal to "starterfood":
  1137. if arg 2 is equal to "beef":
  1138. set {starterfood::command} to "cooked beef"
  1139. if {starterfood::number} is set:
  1140. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1141. else:
  1142. set {starterfood::number} to 1
  1143. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1144. else if arg 2 is equal to "porkchop":
  1145. set {starterfood::command} to "cooked porkchop"
  1146. if {starterfood::number} is set:
  1147. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1148. else:
  1149. set {starterfood::number} to 1
  1150. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1151. else if arg 2 is equal to "chicken":
  1152. set {starterfood::command} to "cooked chicken"
  1153. if {starterfood::number} is set:
  1154. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1155. else:
  1156. set {starterfood::number} to 1
  1157. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1158. else if arg 2 is equal to "rabbit":
  1159. set {starterfood::command} to "cooked rabbit"
  1160. if {starterfood::number} is set:
  1161. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1162. else:
  1163. set {starterfood::number} to 1
  1164. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1165. else if arg 2 is equal to "mutton":
  1166. set {starterfood::command} to "cooked mutton"
  1167. if {starterfood::number} is set:
  1168. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1169. else:
  1170. set {starterfood::number} to 1
  1171. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1172. else if arg 2 is equal to "+5":
  1173. if {starterfood::number} is set:
  1174. if {starterfood::number} is equal to 1:
  1175. set {starterfood::number} to 5
  1176. else:
  1177. if {starterfood::number} is smaller than 60:
  1178. set {starterfood::number} to ({starterfood::number} + 5)
  1179. else:
  1180. set {starterfood::number} to 5
  1181. if {starterfood::command} is not set:
  1182. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1183. else if {starterfood::command} is equal to "cooked beef":
  1184. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1185. else if {starterfood::command} is equal to "cooked porkchop":
  1186. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1187. else if {starterfood::command} is equal to "cooked chicken":
  1188. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1189. else if {starterfood::command} is equal to "cooked rabbit":
  1190. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1191. else if {starterfood::command} is equal to "cooked mutton":
  1192. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1193. else if arg 2 is equal to "+1":
  1194. if {starterfood::number} is set:
  1195. if {starterfood::number} is equal to 1:
  1196. set {starterfood::number} to 1
  1197. else:
  1198. if {starterfood::number} is smaller than 64:
  1199. set {starterfood::number} to ({starterfood::number} + 1)
  1200. else:
  1201. set {starterfood::number} to 1
  1202. if {starterfood::command} is not set:
  1203. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1204. else if {starterfood::command} is equal to "cooked beef":
  1205. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1206. else if {starterfood::command} is equal to "cooked porkchop":
  1207. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1208. else if {starterfood::command} is equal to "cooked chicken":
  1209. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1210. else if {starterfood::command} is equal to "cooked rabbit":
  1211. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1212. else if {starterfood::command} is equal to "cooked mutton":
  1213. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1214. else if arg 2 is equal to "-1":
  1215. if {starterfood::number} is set:
  1216. if {starterfood::number} is greater than 1:
  1217. set {starterfood::number} to ({starterfood::number} - 1)
  1218. if {starterfood::command} is not set:
  1219. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1220. else if {starterfood::command} is equal to "cooked beef":
  1221. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1222. else if {starterfood::command} is equal to "cooked porkchop":
  1223. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1224. else if {starterfood::command} is equal to "cooked chicken":
  1225. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1226. else if {starterfood::command} is equal to "cooked rabbit":
  1227. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1228. else if {starterfood::command} is equal to "cooked mutton":
  1229. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1230. else if arg 2 is equal to "-5":
  1231. if {starterfood::number} is set:
  1232. if {starterfood::number} is greater than 5:
  1233. set {starterfood::number} to ({starterfood::number} - 5)
  1234. if {starterfood::command} is not set:
  1235. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1236. else if {starterfood::command} is equal to "cooked beef":
  1237. set {starterfood::name} to "%{starterfood::number}% Cooked Beef"
  1238. else if {starterfood::command} is equal to "cooked porkchop":
  1239. set {starterfood::name} to "%{starterfood::number}% Cooked Porkchop"
  1240. else if {starterfood::command} is equal to "cooked chicken":
  1241. set {starterfood::name} to "%{starterfood::number}% Cooked Chicken"
  1242. else if {starterfood::command} is equal to "cooked rabbit":
  1243. set {starterfood::name} to "%{starterfood::number}% Cooked Rabbit"
  1244. else if {starterfood::command} is equal to "cooked mutton":
  1245. set {starterfood::name} to "%{starterfood::number}% Cooked Mutton"
  1246. else if arg 2 is equal to "0":
  1247. delete {starterfood::*}
  1248. make player execute command "/config starterfood"
  1249. else:
  1250. if arg 2 is not set:
  1251. if arg 1 is not set:
  1252. open chest with 3 row named "&8⫸ &4Configuration" to player
  1253. wait 1 tick
  1254. if {chat} is true:
  1255. format slot 0 of player with shiny paper named "&8⫸ &7Chat: &aON" to run [make player execute command "/config chat"]
  1256. else:
  1257. format slot 0 of player with paper named "&8⫸ &7Chat: &cOFF" to run [make player execute command "/config chat"]
  1258. if {msg} is true:
  1259. format slot 1 of player with shiny banner:15 named "&8⫸ &7Private messages: &aON" to run [set {msg} to false]->[make player execute command "/config"]
  1260. else:
  1261. format slot 1 of player with banner:15 named "&8⫸ &7Private messages: &cOFF" to run [set {msg} to true]->[make player execute command "/config"]
  1262. if {weather} is true:
  1263. format slot 2 of player with shiny daylight sensor named "&8⫸ &7Eternal Sunny: &aON" to run [set {weather} to false]->[make player execute command "/config"]
  1264. else:
  1265. format slot 2 of player with daylight sensor named "&8⫸ &7Eternal Sunny: &cOFF" to run [set {weather} to true]->[make player execute command "/config"]
  1266. if {eternalDay} is true:
  1267. format slot 3 of player with shiny torch named "&8⫸ &7Eternal Day: &aON" to run [set {eternalDay} to false]->[make player execute command "/config"]
  1268. else:
  1269. format slot 3 of player with torch named "&8⫸ &7Eternal Day: &cOFF" to run [set {eternalDay} to true]->[make player execute command "/config"]
  1270. format slot 26 of player with barrier named "&8⫸ &cClose" to close
  1271. else if arg 1 is equal to "chat":
  1272. if {chat} is true:
  1273. set {chat} to false
  1274. broadcast "&a&lUHC &r&8⫸ &7Chat enabled."
  1275. else:
  1276. set {chat} to true
  1277. broadcast "&a&lUHC &r&8⫸ &7Chat disabled."
  1278. make player execute command "/config"
  1279. else:
  1280. send "Unknown command." to command sender
  1281.  
  1282. command /team [<text>] [<text>]:
  1283. trigger:
  1284. if arg 1 is not set:
  1285. make command sender execute command "/team help"
  1286. else if arg 1 is equal to "help":
  1287. send "&a&lUHC &r&8⫸ &7Manage teams:" to command sender
  1288. send "&8⫸ &f/invite &7- &oInvite a player." to command sender
  1289. send "&8⫸ &f/accept &7- &oAccept an invitation." to command sender
  1290. send "&8⫸ &f/leave &7- &oLeave your team." to command sender
  1291. send "&8⫸ &f/list &7- &oSee the teams." to command sender
  1292. send "&8⫸ &f/t <message> &7- &oSend a message to your team." to command sender
  1293. send "&8⫸ &f/tc &7- &oSend coord to your team." to command sender
  1294. if {TeamsStatus} is true:
  1295. if arg 1 is equal to "invite":
  1296. if {UHCStart} is not true:
  1297. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  1298. if {Team::%command sender%} is set:
  1299. set {_CountMembers} to 1
  1300. if {UHCStart} is true:
  1301. loop {WH::*}:
  1302. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1303. if {_name} is not command sender:
  1304. if {Team::%{_name}%} is equal to {Team::%command sender%}:
  1305. add 1 to {_CountMembers}
  1306. else:
  1307. loop all players:
  1308. if loop-player is not command sender:
  1309. if {Team::%loop-player%} is equal to {Team::%command sender%}:
  1310. add 1 to {_CountMembers}
  1311. if arg 2 is not set:
  1312. send "&a&lTeam &r&8⫸ &7Usage: /invite <player>" to command sender
  1313. stop trigger
  1314. else if arg 2 is equal to command sender:
  1315. send "&a&lTeam &r&8⫸ &7You can not invite yourself." to command sender
  1316. stop trigger
  1317. else if {Spec::%{_arg2}%} is set:
  1318. send "&a&lTeam &r&8⫸ &7This player is a spectator." to command sender
  1319. stop trigger
  1320. else if {Spec::%player%} is set:
  1321. send "&a&lTeam &r&8⫸ &7You are spectator." to command sender
  1322. stop trigger
  1323. else if {_CountMembers} is equal to {TeamsNumbers}:
  1324. send "&a&lTeam &r&8⫸ &7Your team is already full." to command sender
  1325. stop trigger
  1326. else if {invite::%{_arg2}%::%player%} is not false:
  1327. send "&a&lTeam &r&8⫸ &7You have already invite this player." to command sender
  1328. stop trigger
  1329. else:
  1330. if {_arg2} is online:
  1331. if {Team::%player%} is not set:
  1332. if {UHC1} is equal to 0:
  1333. set {UHC1} to 1
  1334. set {chatname::%player%} to "&0%name of player%"
  1335. execute command "/ne prefix %player% &0"
  1336. set {Team::%player%} to "UHC1"
  1337. else if {UHC2} is equal to 0:
  1338. set {UHC2} to 1
  1339. set {chatname::%player%} to "&1%name of player%"
  1340. execute command "/ne prefix %player% &1"
  1341. set {Team::%player%} to "UHC2"
  1342. else if {UHC3} is equal to 0:
  1343. set {UHC3} to 1
  1344. set {chatname::%player%} to "&2%name of player%"
  1345. execute command "/ne prefix %player% &2"
  1346. set {Team::%player%} to "UHC3"
  1347. else if {UHC4} is equal to 0:
  1348. set {UHC4} to 1
  1349. set {chatname::%player%} to "&3%name of player%"
  1350. execute command "/ne prefix %player% &3"
  1351. set {Team::%player%} to "UHC4"
  1352. else if {UHC5} is equal to 0:
  1353. set {UHC5} to 1
  1354. set {chatname::%player%} to "&4%name of player%"
  1355. execute command "/ne prefix %player% &4"
  1356. set {Team::%player%} to "UHC5"
  1357. else if {UHC6} is equal to 0:
  1358. set {UHC6} to 1
  1359. set {chatname::%player%} to "&5%name of player%"
  1360. execute command "/ne prefix %player% &5"
  1361. set {Team::%player%} to "UHC6"
  1362. else if {UHC7} is equal to 0:
  1363. set {UHC7} to 1
  1364. set {chatname::%player%} to "&6%name of player%"
  1365. execute command "/ne prefix %player% &6"
  1366. set {Team::%player%} to "UHC7"
  1367. else if {UHC8} is equal to 0:
  1368. set {UHC8} to 1
  1369. set {chatname::%player%} to "&7%name of player%"
  1370. execute command "/ne prefix %player% &7"
  1371. set {Team::%player%} to "UHC8"
  1372. else if {UHC9} is equal to 0:
  1373. set {UHC9} to 1
  1374. set {chatname::%player%} to "&8%name of player%"
  1375. execute command "/ne prefix %player% &8"
  1376. set {Team::%player%} to "UHC9"
  1377. else if {UHC10} is equal to 0:
  1378. set {UHC10} to 1
  1379. set {chatname::%player%} to "&9%name of player%"
  1380. execute command "/ne prefix %player% &9"
  1381. set {Team::%player%} to "UHC10"
  1382. else if {UHC11} is equal to 0:
  1383. set {UHC11} to 1
  1384. set {chatname::%player%} to "&a%name of player%"
  1385. execute command "/ne prefix %player% &a"
  1386. set {Team::%player%} to "UHC11"
  1387. else if {UHC12} is equal to 0:
  1388. set {UHC12} to 1
  1389. set {chatname::%player%} to "&b%name of player%"
  1390. execute command "/ne prefix %player% &b"
  1391. set {Team::%player%} to "UHC12"
  1392. else if {UHC13} is equal to 0:
  1393. set {UHC13} to 1
  1394. set {chatname::%player%} to "&c%name of player%"
  1395. execute command "/ne prefix %player% &c"
  1396. set {Team::%player%} to "UHC13"
  1397. else if {UHC14} is equal to 0:
  1398. set {UHC14} to 1
  1399. set {chatname::%player%} to "&d%name of player%"
  1400. execute command "/ne prefix %player% &d"
  1401. set {Team::%player%} to "UHC14"
  1402. else if {UHC15} is equal to 0:
  1403. set {UHC15} to 1
  1404. set {chatname::%player%} to "&e%name of player%"
  1405. execute command "/ne prefix %player% &e"
  1406. set {Team::%player%} to "UHC15"
  1407. set {invite::%arg 2%::%player%} to {Team::%player%}
  1408. send "&a&lTeam &r&8⫸ &7You have received an invitation from &6%player%&7." to (arg 2 parsed as offlineplayer)
  1409. execute command "/tellraw %(arg 2 parsed as offlineplayer)% ['',{'text':'Team ','color':'green','bold':true},{'text':'⫸ ','color':'dark_gray','bold':false},{'text':'To accept, ','color':'gray'},{'text':'Click on this message','color':'aqua','bold':false,'italic':true,'clickEvent':{'action':'run_command','value':'/team accept %player%'}},{'text':'.','color':'gray','bold':false,'italic':false}]"
  1410. send "&a&lTeam &r&8⫸ &7Invitation sent to &6%(arg 2 parsed as offlineplayer)%&r&7." to command sender
  1411. else:
  1412. send "&a&lTeam &r&8⫸ &7This player is not connected." to command sender
  1413. stop trigger
  1414. else:
  1415. send "&a&lTeam &r&8⫸ &7The UHC has already begun." to command sender
  1416. else if arg 1 is equal to "accept":
  1417. if {UHCStart} is not true:
  1418. if {invite::%player%::*} is set:
  1419. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  1420. if arg 2 is not set:
  1421. send "&a&lTeam &r&8⫸ &7Usage: /accept <player>" to command sender
  1422. stop trigger
  1423. else if arg 2 is equal to command sender:
  1424. send "&a&lTeam &r&8⫸ &7This player has not invited you." to command sender
  1425. stop trigger
  1426. else if {Spec::%command sender%} is set:
  1427. send "&a&lTeam &r&8⫸ &7You are spectator." to command sender
  1428. stop trigger
  1429. else if {Spec::%{_arg2}%} is set:
  1430. send "&a&lTeam &r&8⫸ &7This invitation has been canceled." to command sender
  1431. stop trigger
  1432. else if {invite::%player%::%arg 2%} is not set:
  1433. send "&a&lTeam &r&8⫸ &7This player has not invited you." to command sender
  1434. stop trigger
  1435. else if {invite::%player%::%arg 2%} is false:
  1436. send "&a&lTeam &r&8⫸ &7This invitation has been canceled." to command sender
  1437. stop trigger
  1438. else:
  1439. if {Team::%player%} is set:
  1440. set {chatname::%player%} to "&7%name of player%"
  1441. execute command "/ne clear %player%"
  1442. set {_NotEmpty} to false
  1443. if {UHCStart} is not true:
  1444. loop all players:
  1445. if loop-player is not command sender:
  1446. if {Team::%loop-player%} is equal to {Team::%player%}:
  1447. set {_NotEmpty} to true
  1448. stop loop
  1449. else:
  1450. loop {WH::*}:
  1451. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1452. if {_name} is not command sender:
  1453. if {Team::%{_name}%} is equal to {Team::%player%}:
  1454. set {_NotEmpty} to true
  1455. stop loop
  1456. if {_NotEmpty} is false:
  1457. if {Team::%player%} is equal to "UHC1":
  1458. set {UHC1} to 0
  1459. else if {Team::%player%} is equal to "UHC2":
  1460. set {UHC2} to 0
  1461. else if {Team::%player%} is equal to "UHC3":
  1462. set {UHC3} to 0
  1463. else if {Team::%player%} is equal to "UHC4":
  1464. set {UHC4} to 0
  1465. else if {Team::%player%} is equal to "UHC5":
  1466. set {UHC5} to 0
  1467. else if {Team::%player%} is equal to "UHC6":
  1468. set {UHC6} to 0
  1469. else if {Team::%player%} is equal to "UHC7":
  1470. set {UHC7} to 0
  1471. else if {Team::%player%} is equal to "UHC8":
  1472. set {UHC8} to 0
  1473. else if {Team::%player%} is equal to "UHC9":
  1474. set {UHC9} to 0
  1475. else if {Team::%player%} is equal to "UHC10":
  1476. set {UHC10} to 0
  1477. else if {Team::%player%} is equal to "UHC11":
  1478. set {UHC11} to 0
  1479. else if {Team::%player%} is equal to "UHC12":
  1480. set {UHC12} to 0
  1481. else if {Team::%player%} is equal to "UHC13":
  1482. set {UHC13} to 0
  1483. else if {Team::%player%} is equal to "UHC14":
  1484. set {UHC14} to 0
  1485. else if {Team::%player%} is equal to "UHC15":
  1486. set {UHC15} to 0
  1487. delete {Team::%player%}
  1488. send "&a&lTeam &r&8⫸ &7You left your team." to command sender
  1489. if {invite::%player%::%arg 2%} is equal to "UHC1":
  1490. set {chatname::%player%} to "&0%name of player%"
  1491. execute command "/ne prefix %player% &0"
  1492. set {Team::%player%} to "UHC1"
  1493. else if {invite::%player%::%arg 2%} is equal to "UHC2":
  1494. set {chatname::%player%} to "&1%name of player%"
  1495. execute command "/ne prefix %player% &1"
  1496. set {Team::%player%} to "UHC2"
  1497. else if {invite::%player%::%arg 2%} is equal to "UHC3":
  1498. set {chatname::%player%} to "&2%name of player%"
  1499. execute command "/ne prefix %player% &2"
  1500. set {Team::%player%} to "UHC3"
  1501. else if {invite::%player%::%arg 2%} is equal to "UHC4":
  1502. set {chatname::%player%} to "&3%name of player%"
  1503. execute command "/ne prefix %player% &3"
  1504. set {Team::%player%} to "UHC4"
  1505. else if {invite::%player%::%arg 2%} is equal to "UHC5":
  1506. set {chatname::%player%} to "&4%name of player%"
  1507. execute command "/ne prefix %player% &4"
  1508. set {Team::%player%} to "UHC5"
  1509. else if {invite::%player%::%arg 2%} is equal to "UHC6":
  1510. set {chatname::%player%} to "&5%name of player%"
  1511. execute command "/ne prefix %player% &5"
  1512. set {Team::%player%} to "UHC6"
  1513. else if {invite::%player%::%arg 2%} is equal to "UHC7":
  1514. set {chatname::%player%} to "&6%name of player%"
  1515. execute command "/ne prefix %player% &6"
  1516. set {Team::%player%} to "UHC7"
  1517. else if {invite::%player%::%arg 2%} is equal to "UHC8":
  1518. set {chatname::%player%} to "&7%name of player%"
  1519. execute command "/ne prefix %player% &7"
  1520. set {Team::%player%} to "UHC8"
  1521. else if {invite::%player%::%arg 2%} is equal to "UHC9":
  1522. set {chatname::%player%} to "&8%name of player%"
  1523. execute command "/ne prefix %player% &8"
  1524. set {Team::%player%} to "UHC9"
  1525. else if {invite::%player%::%arg 2%} is equal to "UHC10":
  1526. set {chatname::%player%} to "&9%name of player%"
  1527. execute command "/ne prefix %player% &9"
  1528. set {Team::%player%} to "UHC10"
  1529. else if {invite::%player%::%arg 2%} is equal to "UHC11":
  1530. set {chatname::%player%} to "&a%name of player%"
  1531. execute command "/ne prefix %player% &a"
  1532. set {Team::%player%} to "UHC11"
  1533. else if {invite::%player%::%arg 2%} is equal to "UHC12":
  1534. set {chatname::%player%} to "&b%name of player%"
  1535. execute command "/ne prefix %player% &b"
  1536. set {Team::%player%} to "UHC12"
  1537. else if {invite::%player%::%arg 2%} is equal to "UHC13":
  1538. set {chatname::%player%} to "&c%name of player%"
  1539. execute command "/ne prefix %player% &c"
  1540. set {Team::%player%} to "UHC13"
  1541. else if {invite::%player%::%arg 2%} is equal to "UHC14":
  1542. set {chatname::%player%} to "&d%name of player%"
  1543. execute command "/ne prefix %player% &d"
  1544. set {Team::%player%} to "UHC14"
  1545. else if {invite::%player%::%arg 2%} is equal to "UHC15":
  1546. set {chatname::%player%} to "&e%name of player%"
  1547. execute command "/ne prefix %player% &e"
  1548. set {Team::%player%} to "UHC15"
  1549. send "&a&lTeam &r&8⫸ &7You joined the team of &6%arg 2%&7." to command sender
  1550. loop all players:
  1551. if loop-player is not command sender:
  1552. if {Team::%loop-player%} is equal to {Team::%player%}:
  1553. send "&a&lTeam &r&8⫸ &7&6%player% &7joined the team." to loop-player
  1554. set {invite::%player%::%arg 2%} to false
  1555. else:
  1556. send "&a&lTeam &r&8⫸ &7You did not receive invitations." to command sender
  1557. stop trigger
  1558. else:
  1559. send "&a&lTeam &r&8⫸ &7The UHC has already begun." to command sender
  1560. else if arg 1 is equal to "leave":
  1561. if {UHCStart} is not true:
  1562. if {Team::%player%} is not set:
  1563. send "&a&lTeam &r&8⫸ &7You are not in a team." to command sender
  1564. stop trigger
  1565. else if {Team::%player%} is set:
  1566. set {chatname::%player%} to "&7%name of player%"
  1567. execute command "/ne clear %player%"
  1568. set {_NotEmpty} to false
  1569. if {UHCStart} is not true:
  1570. loop all players:
  1571. if loop-player is not command sender:
  1572. if {Team::%loop-player%} is equal to {Team::%player%}:
  1573. set {_NotEmpty} to true
  1574. stop loop
  1575. else:
  1576. loop {WH::*}:
  1577. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1578. if {_name} is not command sender:
  1579. if {Team::%{_name}%} is equal to {Team::%player%}:
  1580. set {_NotEmpty} to true
  1581. stop loop
  1582. if {_NotEmpty} is false:
  1583. if {Team::%player%} is equal to "UHC1":
  1584. set {UHC1} to 0
  1585. else if {Team::%player%} is equal to "UHC2":
  1586. set {UHC2} to 0
  1587. else if {Team::%player%} is equal to "UHC3":
  1588. set {UHC3} to 0
  1589. else if {Team::%player%} is equal to "UHC4":
  1590. set {UHC4} to 0
  1591. else if {Team::%player%} is equal to "UHC5":
  1592. set {UHC5} to 0
  1593. else if {Team::%player%} is equal to "UHC6":
  1594. set {UHC6} to 0
  1595. else if {Team::%player%} is equal to "UHC7":
  1596. set {UHC7} to 0
  1597. else if {Team::%player%} is equal to "UHC8":
  1598. set {UHC8} to 0
  1599. else if {Team::%player%} is equal to "UHC9":
  1600. set {UHC9} to 0
  1601. else if {Team::%player%} is equal to "UHC10":
  1602. set {UHC10} to 0
  1603. else if {Team::%player%} is equal to "UHC11":
  1604. set {UHC11} to 0
  1605. else if {Team::%player%} is equal to "UHC12":
  1606. set {UHC12} to 0
  1607. else if {Team::%player%} is equal to "UHC13":
  1608. set {UHC13} to 0
  1609. else if {Team::%player%} is equal to "UHC14":
  1610. set {UHC14} to 0
  1611. else if {Team::%player%} is equal to "UHC15":
  1612. set {UHC15} to 0
  1613. delete {Team::%player%}
  1614. send "&a&lTeam &r&8⫸ &7You left your team."
  1615. else:
  1616. send "&a&lTeam &r&8⫸ &7The UHC has already begun." to command sender
  1617. else:
  1618. if arg 1 is equal to "invite":
  1619. send "&a&lTeam &r&8⫸ &7The teams are not available." to command sender
  1620. else if arg 1 is equal to "accept":
  1621. send "&a&lTeam &r&8⫸ &7The teams are not available." to command sender
  1622. else if arg 1 is equal to "leave":
  1623. send "&a&lTeam &r&8⫸ &7The teams are not available." to command sender
  1624. if arg 1 is equal to "reset":
  1625. set {_access} to false
  1626. if {Host::%player%} is true:
  1627. set {_access} to true
  1628. else if player is op:
  1629. set {_access} to true
  1630. if {_access} is true:
  1631. if {UHCStart} is true:
  1632. loop {WH::*}:
  1633. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1634. set {chatname::%loop-index%} to "&7%{_name}%"
  1635. execute command "/ne clear %{_name}%"
  1636. else:
  1637. loop all players:
  1638. set {chatname::%loop-player%} to "&7%name of loop-player%"
  1639. execute command "/ne clear %loop-player%"
  1640. delete {Team::*}
  1641. delete {invite::*}
  1642. set {UHC1} to 0
  1643. set {UHC2} to 0
  1644. set {UHC3} to 0
  1645. set {UHC4} to 0
  1646. set {UHC5} to 0
  1647. set {UHC6} to 0
  1648. set {UHC7} to 0
  1649. set {UHC8} to 0
  1650. set {UHC9} to 0
  1651. set {UHC10} to 0
  1652. set {UHC11} to 0
  1653. set {UHC12} to 0
  1654. set {UHC13} to 0
  1655. set {UHC14} to 0
  1656. set {UHC15} to 0
  1657. broadcast "&a&lTeam &r&8⫸ &7Teams reset."
  1658. else:
  1659. send "Unknown command." to command sender
  1660. else if arg 1 is equal to "list":
  1661. set {_Slot} to 0
  1662. open chest with 2 row named "&8⫸ &4Teams" to player
  1663. wait 1 tick
  1664. if {UHC1} is equal to 1:
  1665. set {_Members} to ""
  1666. set {_NbMembers} to 0
  1667. if {UHStart} is true:
  1668. loop {WH::*}:
  1669. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1670. if {Team::%{_name}%} is equal to "UHC1":
  1671. if {_NbMembers} is equal to 0:
  1672. set {_Members} to "&6%{_name}%"
  1673. else:
  1674. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1675. add 1 to {_NbMembers}
  1676. else:
  1677. loop all players:
  1678. if {Team::%loop-player%} is equal to "UHC1":
  1679. if {_NbMembers} is equal to 0:
  1680. set {_Members} to "&f%loop-player%"
  1681. else:
  1682. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1683. add 1 to {_NbMembers}
  1684. format slot {_Slot} of player with black stained clay named "&8⫸ &r&0Team Black" with lore "%{_Members}%" to be unstealable
  1685. add 1 to {_Slot}
  1686. if {UHC2} is equal to 1:
  1687. set {_Members} to ""
  1688. set {_NbMembers} to 0
  1689. if {UHStart} is true:
  1690. loop {WH::*}:
  1691. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1692. if {Team::%{_name}%} is equal to "UHC2":
  1693. if {_NbMembers} is equal to 0:
  1694. set {_Members} to "&6%{_name}%"
  1695. else:
  1696. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1697. add 1 to {_NbMembers}
  1698. else:
  1699. loop all players:
  1700. if {Team::%loop-player%} is equal to "UHC2":
  1701. if {_NbMembers} is equal to 0:
  1702. set {_Members} to "&f%loop-player%"
  1703. else:
  1704. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1705. add 1 to {_NbMembers}
  1706. format slot {_Slot} of player with blue stained clay named "&8⫸ &r&1Team Dark Blue" with lore "%{_Members}%" to be unstealable
  1707. add 1 to {_Slot}
  1708. if {UHC3} is equal to 1:
  1709. set {_Members} to ""
  1710. set {_NbMembers} to 0
  1711. if {UHStart} is true:
  1712. loop {WH::*}:
  1713. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1714. if {Team::%{_name}%} is equal to "UHC3":
  1715. if {_NbMembers} is equal to 0:
  1716. set {_Members} to "&6%{_name}%"
  1717. else:
  1718. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1719. add 1 to {_NbMembers}
  1720. else:
  1721. loop all players:
  1722. if {Team::%loop-player%} is equal to "UHC3":
  1723. if {_NbMembers} is equal to 0:
  1724. set {_Members} to "&f%loop-player%"
  1725. else:
  1726. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1727. add 1 to {_NbMembers}
  1728. format slot {_Slot} of player with green stained clay named "&8⫸ &r&2Team Dark Green" with lore "%{_Members}%" to be unstealable
  1729. add 1 to {_Slot}
  1730. if {UHC4} is equal to 1:
  1731. set {_Members} to ""
  1732. set {_NbMembers} to 0
  1733. if {UHStart} is true:
  1734. loop {WH::*}:
  1735. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1736. if {Team::%{_name}%} is equal to "UHC4":
  1737. if {_NbMembers} is equal to 0:
  1738. set {_Members} to "&6%{_name}%"
  1739. else:
  1740. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1741. add 1 to {_NbMembers}
  1742. else:
  1743. loop all players:
  1744. if {Team::%loop-player%} is equal to "UHC4":
  1745. if {_NbMembers} is equal to 0:
  1746. set {_Members} to "&f%loop-player%"
  1747. else:
  1748. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1749. add 1 to {_NbMembers}
  1750. format slot {_Slot} of player with brown stained clay named "&8⫸ &r&3Team Dark Aqua" with lore "%{_Members}%" to be unstealable
  1751. add 1 to {_Slot}
  1752. if {UHC5} is equal to 1:
  1753. set {_Members} to ""
  1754. set {_NbMembers} to 0
  1755. if {UHStart} is true:
  1756. loop {WH::*}:
  1757. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1758. if {Team::%{_name}%} is equal to "UHC5":
  1759. if {_NbMembers} is equal to 0:
  1760. set {_Members} to "&6%{_name}%"
  1761. else:
  1762. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1763. add 1 to {_NbMembers}
  1764. else:
  1765. loop all players:
  1766. if {Team::%loop-player%} is equal to "UHC5":
  1767. if {_NbMembers} is equal to 0:
  1768. set {_Members} to "&f%loop-player%"
  1769. else:
  1770. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1771. add 1 to {_NbMembers}
  1772. format slot {_Slot} of player with red stained clay named "&8⫸ &r&4Team Dark Red" with lore "%{_Members}%" to be unstealable
  1773. add 1 to {_Slot}
  1774. if {UHC6} is equal to 1:
  1775. set {_Members} to ""
  1776. if {UHStart} is true:
  1777. loop {WH::*}:
  1778. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1779. if {Team::%{_name}%} is equal to "UHC6":
  1780. if {_NbMembers} is equal to 0:
  1781. set {_Members} to "&6%{_name}%"
  1782. else:
  1783. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1784. add 1 to {_NbMembers}
  1785. else:
  1786. loop all players:
  1787. if {Team::%loop-player%} is equal to "UHC6":
  1788. if {_NbMembers} is equal to 0:
  1789. set {_Members} to "&f%loop-player%"
  1790. else:
  1791. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1792. add 1 to {_NbMembers}
  1793. format slot {_Slot} of player with purple stained clay named "&8⫸ &r&5Team Dark Purple" with lore "%{_Members}%" to be unstealable
  1794. add 1 to {_Slot}
  1795. if {UHC7} is equal to 1:
  1796. set {_Members} to ""
  1797. set {_NbMembers} to 0
  1798. if {UHStart} is true:
  1799. loop {WH::*}:
  1800. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1801. if {Team::%{_name}%} is equal to "UHC7":
  1802. if {_NbMembers} is equal to 0:
  1803. set {_Members} to "&6%{_name}%"
  1804. else:
  1805. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1806. add 1 to {_NbMembers}
  1807. else:
  1808. loop all players:
  1809. if {Team::%loop-player%} is equal to "UHC7":
  1810. if {_NbMembers} is equal to 0:
  1811. set {_Members} to "&f%loop-player%"
  1812. else:
  1813. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1814. add 1 to {_NbMembers}
  1815. format slot {_Slot} of player with orange stained clay named "&8⫸ &r&6Team Gold" with lore "%{_Members}%" to be unstealable
  1816. add 1 to {_Slot}
  1817. if {UHC8} is equal to 1:
  1818. set {_Members} to ""
  1819. set {_NbMembers} to 0
  1820. if {UHStart} is true:
  1821. loop {WH::*}:
  1822. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1823. if {Team::%{_name}%} is equal to "UHC8":
  1824. if {_NbMembers} is equal to 0:
  1825. set {_Members} to "&6%{_name}%"
  1826. else:
  1827. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1828. add 1 to {_NbMembers}
  1829. else:
  1830. loop all players:
  1831. if {Team::%loop-player%} is equal to "UHC8":
  1832. if {_NbMembers} is equal to 0:
  1833. set {_Members} to "&f%loop-player%"
  1834. else:
  1835. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1836. add 1 to {_NbMembers}
  1837. format slot {_Slot} of player with light gray stained clay named "&8⫸ &r&7Team Gray" with lore "%{_Members}%" to be unstealable
  1838. add 1 to {_Slot}
  1839. if {UHC9} is equal to 1:
  1840. set {_Members} to ""
  1841. set {_NbMembers} to 0
  1842. if {UHStart} is true:
  1843. loop {WH::*}:
  1844. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1845. if {Team::%{_name}%} is equal to "UHC9":
  1846. if {_NbMembers} is equal to 0:
  1847. set {_Members} to "&6%{_name}%"
  1848. else:
  1849. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1850. add 1 to {_NbMembers}
  1851. else:
  1852. loop all players:
  1853. if {Team::%loop-player%} is equal to "UHC9":
  1854. if {_NbMembers} is equal to 0:
  1855. set {_Members} to "&f%loop-player%"
  1856. else:
  1857. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1858. add 1 to {_NbMembers}
  1859. format slot {_Slot} of player with gray stained clay named "&8⫸ &r&8Team Dark Gray" with lore "%{_Members}%" to be unstealable
  1860. add 1 to {_Slot}
  1861. if {UHC10} is equal to 1:
  1862. set {_Members} to ""
  1863. set {_NbMembers} to 0
  1864. if {UHStart} is true:
  1865. loop {WH::*}:
  1866. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1867. if {Team::%{_name}%} is equal to "UHC10":
  1868. if {_NbMembers} is equal to 0:
  1869. set {_Members} to "&6%{_name}%"
  1870. else:
  1871. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1872. add 1 to {_NbMembers}
  1873. else:
  1874. loop all players:
  1875. if {Team::%loop-player%} is equal to "UHC10":
  1876. if {_NbMembers} is equal to 0:
  1877. set {_Members} to "&f%loop-player%"
  1878. else:
  1879. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1880. add 1 to {_NbMembers}
  1881. format slot {_Slot} of player with light blue stained clay named "&8⫸ &r&9Team Blue" with lore "%{_Members}%" to be unstealable
  1882. add 1 to {_Slot}
  1883. if {UHC11} is equal to 1:
  1884. set {_Members} to ""
  1885. set {_NbMembers} to 0
  1886. if {UHStart} is true:
  1887. loop {WH::*}:
  1888. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1889. if {Team::%{_name}%} is equal to "UHC11":
  1890. if {_NbMembers} is equal to 0:
  1891. set {_Members} to "&6%{_name}%"
  1892. else:
  1893. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1894. add 1 to {_NbMembers}
  1895. else:
  1896. loop all players:
  1897. if {Team::%loop-player%} is equal to "UHC11":
  1898. if {_NbMembers} is equal to 0:
  1899. set {_Members} to "&f%loop-player%"
  1900. else:
  1901. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1902. add 1 to {_NbMembers}
  1903. format slot {_Slot} of player with light green stained clay named "&8⫸ &r&aTeam Green" with lore "%{_Members}%" to be unstealable
  1904. add 1 to {_Slot}
  1905. if {UHC12} is equal to 1:
  1906. set {_Members} to ""
  1907. set {_NbMembers} to 0
  1908. if {UHStart} is true:
  1909. loop {WH::*}:
  1910. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1911. if {Team::%{_name}%} is equal to "UHC12":
  1912. if {_NbMembers} is equal to 0:
  1913. set {_Members} to "&6%{_name}%"
  1914. else:
  1915. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1916. add 1 to {_NbMembers}
  1917. else:
  1918. loop all players:
  1919. if {Team::%loop-player%} is equal to "UHC12":
  1920. if {_NbMembers} is equal to 0:
  1921. set {_Members} to "&f%loop-player%"
  1922. else:
  1923. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1924. add 1 to {_NbMembers}
  1925. format slot {_Slot} of player with cyan stained clay named "&8⫸ &r&bTeam Aqua" with lore "%{_Members}%" to be unstealable
  1926. add 1 to {_Slot}
  1927. if {UHC13} is equal to 1:
  1928. set {_Members} to ""
  1929. set {_NbMembers} to 0
  1930. if {UHStart} is true:
  1931. loop {WH::*}:
  1932. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1933. if {Team::%{_name}%} is equal to "UHC13":
  1934. if {_NbMembers} is equal to 0:
  1935. set {_Members} to "&6%{_name}%"
  1936. else:
  1937. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1938. add 1 to {_NbMembers}
  1939. else:
  1940. loop all players:
  1941. if {Team::%loop-player%} is equal to "UHC13":
  1942. if {_NbMembers} is equal to 0:
  1943. set {_Members} to "&f%loop-player%"
  1944. else:
  1945. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1946. add 1 to {_NbMembers}
  1947. format slot {_Slot} of player with magenta stained clay named "&8⫸ &r&cTeam Red" with lore "%{_Members}%" to be unstealable
  1948. add 1 to {_Slot}
  1949. if {UHC14} is equal to 1:
  1950. set {_Members} to ""
  1951. set {_NbMembers} to 0
  1952. if {UHStart} is true:
  1953. loop {WH::*}:
  1954. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1955. if {Team::%{_name}%} is equal to "UHC14":
  1956. if {_NbMembers} is equal to 0:
  1957. set {_Members} to "&6%{_name}%"
  1958. else:
  1959. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1960. add 1 to {_NbMembers}
  1961. else:
  1962. loop all players:
  1963. if {Team::%loop-player%} is equal to "UHC14":
  1964. if {_NbMembers} is equal to 0:
  1965. set {_Members} to "&f%loop-player%"
  1966. else:
  1967. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1968. add 1 to {_NbMembers}
  1969. format slot {_Slot} of player with pink stained clay named "&8⫸ &r&dTeam Pink" with lore "%{_Members}%" to be unstealable
  1970. add 1 to {_Slot}
  1971. if {UHC15} is equal to 1:
  1972. set {_Members} to ""
  1973. set {_NbMembers} to 0
  1974. if {UHStart} is true:
  1975. loop {WH::*}:
  1976. set {_name} to ("%loop-index%" parsed as offlineplayer)
  1977. if {Team::%{_name}%} is equal to "UHC15":
  1978. if {_NbMembers} is equal to 0:
  1979. set {_Members} to "&6%{_name}%"
  1980. else:
  1981. set {_Members} to "%{_Members}% ||&6%{_name}%"
  1982. add 1 to {_NbMembers}
  1983. else:
  1984. loop all players:
  1985. if {Team::%loop-player%} is equal to "UHC15":
  1986. if {_NbMembers} is equal to 0:
  1987. set {_Members} to "&f%loop-player%"
  1988. else:
  1989. set {_Members} to "%{_Members}% ||&f%loop-player%"
  1990. add 1 to {_NbMembers}
  1991. format slot {_Slot} of player with yellow stained clay named "&8⫸ &r&eTeam Yellow" with lore "%{_Members}%" to be unstealable
  1992. add 1 to {_Slot}
  1993. if {_Slot} is equal to 0:
  1994. format slot 0 of player with redstone named "&8⫸ &cNo teams" to be unstealable
  1995. format slot 17 of player with barrier named "&8⫸ &cClose" to close
  1996.  
  1997. command /invite [<text>]:
  1998. trigger:
  1999. if {TeamsStatus} is true:
  2000. if {UHCStart} is not true:
  2001. if arg 1 is not set:
  2002. send "&a&lTeam &r&8⫸ &7Usage: /invite <player>" to command sender
  2003. stop trigger
  2004. else if arg 1 is equal to "help":
  2005. make player execute command "/team help"
  2006. else:
  2007. make player execute command "/team invite %arg 1%"
  2008. else:
  2009. send "&a&lTeam &r&8⫸ &7The UHC has already begun." to command sender
  2010. else:
  2011. send "&a&lTeam &r&8⫸ &7The teams are not available." to command sender
  2012.  
  2013. command /accept [<text>]:
  2014. trigger:
  2015. if {TeamsStatus} is true:
  2016. if {UHCStart} is not true:
  2017. if arg 1 is not set:
  2018. send "&a&lTeam &r&8⫸ &7Usage: /accept <player>" to command sender
  2019. stop trigger
  2020. else if arg 1 is equal to "help":
  2021. make player execute command "/team help"
  2022. else:
  2023. make player execute command "/team accept %arg 1%"
  2024. else:
  2025. send "&a&lTeam &r&8⫸ &7The UHC has already begun." to command sender
  2026. else:
  2027. send "&a&lTeam &r&8⫸ &7The teams are not available." to command sender
  2028.  
  2029. command /t [<text>]:
  2030. trigger:
  2031. if {Start} is true:
  2032. if arg 1 is set:
  2033. if {Team::%player%} is set:
  2034. loop all players:
  2035. if {Team::%loop-player%} is equal to {Team::%player%}:
  2036. send "&6Team Chat&8 | &r%{chatname::%player%}% &r&8⫸ &f%arg 1%" to loop-player
  2037. else:
  2038. send "&a&lTeam &r&8⫸ &7You are not in a team." to command sender
  2039. else:
  2040. send "&a&lTeam &r&8⫸ &7Usage: /t <message>." to command sender
  2041. else:
  2042. send "&a&lTeam &r&8⫸ &7The UHC has not yet started." to command sender
  2043.  
  2044. command /tc:
  2045. trigger:
  2046. if {Start} is true:
  2047. if {Team::%player%} is set:
  2048. if player is in "world":
  2049. set {_world} to "Overworld"
  2050. else if player is in "world_nether":
  2051. set {_world} to "Nether"
  2052. else if player is in "world_the_end":
  2053. set {_world} to "The End"
  2054. else if player is in "lobby":
  2055. set {_world} to "Lobby"
  2056. else:
  2057. set {_world} to "Inconnu"
  2058. loop all players:
  2059. if {Team::%loop-player%} is equal to {Team::%player%}:
  2060. send "&6Team Chat&8 | &r%{chatname::%player%}% &r&8⫸ &6&ox&r&6%floor(x coord of player)% &f- &6&oy&r&6%floor(y coord of player)% &f- &6&oz&r&6%floor(z coord of player)% &f- &r&6%{_world}%" to loop-player
  2061. else:
  2062. send "&a&lTeam &r&8⫸ &7You are not in a team." to command sender
  2063. else:
  2064. send "&a&lTeam &r&8⫸ &7The UHC has not yet started." to command sender
  2065.  
  2066. command /wh [<text>] [<text>]:
  2067. trigger:
  2068. set {_access} to false
  2069. if {Staff::%player%} is true:
  2070. set {_access} to true
  2071. else if player is op:
  2072. set {_access} to true
  2073. if {_access} is true:
  2074. if arg 1 is not set:
  2075. make command sender execute command "/wh help"
  2076. else if arg 1 is equal to "help":
  2077. send "&a&lUHC &r&8⫸ &7Usage of /wh:" to command sender
  2078. send "&8⫸ &f/wh add <player> &7- &oAdd player to whitelist" to command sender
  2079. send "&8⫸ &f/wh remove <player> &7- &oRemove player from whitelist" to command sender
  2080. send "&8⫸ &f/wh list &7- &oSee the whitelist" to command sender
  2081. send "&8⫸ &f/wh clear &7- &oClear the whitelist" to command sender
  2082. send "&8⫸ &f/wh <joueur> &7- &oSee if player is in whitelist" to command sender
  2083. else if arg 1 is equal to "add":
  2084. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2085. if arg 2 is not set:
  2086. send "&a&lWH &r&8⫸ &7Usage: /wh add <player>" to command sender
  2087. stop trigger
  2088. else if {WH::%{_arg2}%} is set:
  2089. send "&a&lWH &r&8⫸ &7This player is already in whitelist." to command sender
  2090. stop trigger
  2091. else:
  2092. set {WH::%{_arg2}%} to {_arg2}
  2093. send "&a&lWH &r&8⫸ &6%{_arg2}% &7was added to whitelist." to command sender
  2094. else if arg 1 is equal to "remove":
  2095. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2096. if arg 2 is not set:
  2097. send "&a&lWH &r&8⫸ &7Usage: /wh remove <player>" to command sender
  2098. stop trigger
  2099. else if {WH::%{_arg2}%} is not set:
  2100. send "&a&lWH &r&8⫸ &7This player is not in whitelist." to command sender
  2101. stop trigger
  2102. else:
  2103. delete {WH::%{_arg2}%}
  2104. send "&a&lWH &r&8⫸ &6%{_arg2}% &7was removed from whitelist." to command sender
  2105. else if arg 1 is equal to "list":
  2106. if {WH::*} is not set:
  2107. send "&a&lWH &r&8⫸ &7Whitelist is empty." to command sender
  2108. stop trigger
  2109. else:
  2110. loop {WH::*}:
  2111. set {_player} to ("%loop-index%" parsed as offlineplayer)
  2112. if {_list} is not set:
  2113. set {_list} to "&6%{_player}%"
  2114. else:
  2115. set {_list} to "%{_list}% &7- &6%{_player}%"
  2116. send "&a&lWH &r&8⫸ &7List: %{_list}%" to command sender
  2117. else if arg 1 is equal to "clear":
  2118. if {WH::*} is not set:
  2119. send "&a&lWH &r&8⫸ &7Whitelist is already empty." to command sender
  2120. stop trigger
  2121. else:
  2122. delete {WH::*}
  2123. send "&a&lWH &r&8⫸ &7Whitelist has been cleared." to command sender
  2124. else:
  2125. set {_arg1} to ("%arg 1%" parsed as offline player)
  2126. if {WH::%{_arg1}%} is set:
  2127. send "&a&lWH &r&8⫸ &6%{_arg1}% &7is in whitelist." to command sender
  2128. else:
  2129. send "&a&lWH &r&8⫸ &6%{_arg1}% &7is not in whitelist." to command sender
  2130. else:
  2131. send "Unknown command." to command sender
  2132.  
  2133. command /staff [<text>] [<text>]:
  2134. trigger:
  2135. if command sender is op:
  2136. if arg 1 is not set:
  2137. make command sender execute command "/staff help"
  2138. else if arg 1 is equal to "help":
  2139. send "&a&lUHC &r&8⫸ &7Usage of /staff:" to command sender
  2140. send "&8⫸ &f/staff add <player> &7- &oAdd staff member." to command sender
  2141. send "&8⫸ &f/staff remove <player> &7- &oRemove staff member." to command sender
  2142. send "&8⫸ &f/staff list &7- &oSee list of staff members." to command sender
  2143. send "&8⫸ &f/staff clear &7- &oRemove all staff members." to command sender
  2144. else if arg 1 is equal to "add":
  2145. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2146. if arg 2 is not set:
  2147. send "&a&lStaff &r&8⫸ &7Usage: /staff add <player>" to command sender
  2148. stop trigger
  2149. else if {Staff::%{_arg2}%} is set:
  2150. send "&a&lStaff &r&8⫸ &7This player is already a staff member." to command sender
  2151. stop trigger
  2152. else:
  2153. set {Staff::%{_arg2}%} to true
  2154. send "&a&lStaff &r&8⫸ &6%{_arg2}% &7is now a staff member." to command sender
  2155. else if arg 1 is equal to "remove":
  2156. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2157. if arg 2 is not set:
  2158. send "&a&lStaff &r&8⫸ &7Usage: /staff remove <player>" to command sender
  2159. stop trigger
  2160. else if {Staff::%{_arg2}%} is not set:
  2161. send "&a&lStaff &r&8⫸ &7This player is not a staff member." to command sender
  2162. stop trigger
  2163. else:
  2164. delete {Staff::%{_arg2}%}
  2165. send "&a&lStaff &r&8⫸ &6%{_arg2}% &7was no longer a staff member." to command sender
  2166. else if arg 1 is equal to "list":
  2167. if {Staff::*} is not set:
  2168. send "&a&lStaff &r&8⫸ &7There are no staff members." to command sender
  2169. stop trigger
  2170. else:
  2171. loop {Staff::*}:
  2172. set {_player} to ("%loop-index%" parsed as offlineplayer)
  2173. if {_staff} is not set:
  2174. set {_staff} to "&6%{_player}%"
  2175. else:
  2176. set {_staff} to "%{_staff}% &7- &6%{_player}%"
  2177. send "&a&lStaff &r&8⫸ &7List: &c%{_staff}%" to command sender
  2178. else if arg 1 is equal to "clear":
  2179. if {Staff::*} is not set:
  2180. send "&a&lStaff &r&8⫸ &7There are no staff members." to command sender
  2181. stop trigger
  2182. else:
  2183. delete {Staff::*}
  2184. send "&a&lStaff &r&8⫸ &7All the staff members was dismissed." to command sender
  2185. else:
  2186. make command sender execute command "/staff help"
  2187. else:
  2188. send "Unknown command." to command sender
  2189.  
  2190. command /spec [<text>] [<text>]:
  2191. trigger:
  2192. set {_access} to false
  2193. if {Staff::%player%} is true:
  2194. set {_access} to true
  2195. else if player is op:
  2196. set {_access} to true
  2197. if {_access} is true:
  2198. if {UHCStart} is not true:
  2199. if arg 1 is not set:
  2200. make command sender execute command "/spec help"
  2201. else if arg 1 is equal to "help":
  2202. send "&a&lUHC &r&8⫸ &7Usage of /spec:" to command sender
  2203. send "&8⫸ &f/spec add <player> &7- &oAdd spectator." to command sender
  2204. send "&8⫸ &f/spec remove <player> &7- &oRemove a spectator." to command sender
  2205. send "&8⫸ &f/spec list &7- &oSee list of spectators." to command sender
  2206. send "&8⫸ &f/spec clear &7- &oRemove all spectators." to command sender
  2207. else if arg 1 is equal to "add":
  2208. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2209. if arg 2 is not set:
  2210. send "&a&lSpec &r&8⫸ &7Usage: /spec add <player>" to command sender
  2211. stop trigger
  2212. else if {Spec::%{_arg2}%} is set:
  2213. send "&a&lSpec &r&8⫸ &7This player is already spectator." to command sender
  2214. stop trigger
  2215. else:
  2216. set {Spec::%{_arg2}%} to {_arg2}
  2217. set {chatname::%{_arg2}%} to "&7%{_arg2}%"
  2218. execute command "/ne clear %{_arg2}%"
  2219. set {_NotEmpty} to false
  2220. loop {WH::*}:
  2221. set {_name} to ("%loop-index%" parsed as offlineplayer)
  2222. if {_name} is not equal to {_arg2}:
  2223. if {Team::%{_name}%} is equal to {Team::%{_arg2}%}:
  2224. set {_NotEmpty} to true
  2225. stop loop
  2226. if {_NotEmpty} is false:
  2227. loop all players:
  2228. if loop-player is not {_arg2}:
  2229. if {Team::%loop-player%} is equal to {Team::%{_arg2}%}:
  2230. set {_NotEmpty} to true
  2231. stop loop
  2232. if {_NotEmpty} is false:
  2233. if {Team::%player%} is equal to "UHC1":
  2234. set {UHC1} to 0
  2235. else if {Team::%player%} is equal to "UHC2":
  2236. set {UHC2} to 0
  2237. else if {Team::%player%} is equal to "UHC3":
  2238. set {UHC3} to 0
  2239. else if {Team::%player%} is equal to "UHC4":
  2240. set {UHC4} to 0
  2241. else if {Team::%player%} is equal to "UHC5":
  2242. set {UHC5} to 0
  2243. else if {Team::%player%} is equal to "UHC6":
  2244. set {UHC6} to 0
  2245. else if {Team::%player%} is equal to "UHC7":
  2246. set {UHC7} to 0
  2247. else if {Team::%player%} is equal to "UHC8":
  2248. set {UHC8} to 0
  2249. else if {Team::%player%} is equal to "UHC9":
  2250. set {UHC9} to 0
  2251. else if {Team::%player%} is equal to "UHC10":
  2252. set {UHC10} to 0
  2253. else if {Team::%player%} is equal to "UHC11":
  2254. set {UHC11} to 0
  2255. else if {Team::%player%} is equal to "UHC12":
  2256. set {UHC12} to 0
  2257. else if {Team::%player%} is equal to "UHC13":
  2258. set {UHC13} to 0
  2259. else if {Team::%player%} is equal to "UHC14":
  2260. set {UHC14} to 0
  2261. else if {Team::%player%} is equal to "UHC15":
  2262. set {UHC15} to 0
  2263. delete {Team::%{_arg2}%}
  2264. send "&a&lSpec &r&8⫸ &6%{_arg2}% &7was now a spectator." to command sender
  2265. else if arg 1 is equal to "remove":
  2266. set {_arg2} to ("%arg 2%" parsed as offlineplayer)
  2267. if arg 2 is not set:
  2268. send "&a&lSpec &r&8⫸ &7Usage: /spec remove <player>" to command sender
  2269. stop trigger
  2270. else if {Spec::%{_arg2}%} is not set:
  2271. send "&a&lSpec &r&8⫸ &7This player is not a spectator." to command sender
  2272. stop trigger
  2273. else:
  2274. delete {Spec::%{_arg2}%}
  2275. send "&a&lSpec &r&8⫸ &6%{_arg2}% &7was removed from spectators." to command sender
  2276. else if arg 1 is equal to "list":
  2277. if {Spec::*} is not set:
  2278. send "&a&lSpec &r&8⫸ &7There are no spectators." to command sender
  2279. stop trigger
  2280. else:
  2281. loop {Spec::*}:
  2282. set {_player} to ("%loop-index%" parsed as offlineplayer)
  2283. if {_spec} is not set:
  2284. set {_spec} to "&6%{_player}%"
  2285. else:
  2286. set {_spec} to "%{_spec}% &7- &6%{_player}%"
  2287. send "&a&lSpec &r&8⫸ &7List: &c%{_spec}%" to command sender
  2288. else if arg 1 is equal to "clear":
  2289. if {Spec::*} is not set:
  2290. send "&a&lSpec &r&8⫸ &7There are no spectators." to command sender
  2291. stop trigger
  2292. else:
  2293. delete {Spec::*}
  2294. send "&a&lSpec &r&8⫸ &7All the spectators was removed." to command sender
  2295. else:
  2296. send "&a&lUHC &r&8⫸ &7The UHC has already begun" to command sender
  2297. else:
  2298. send "Unknown command." to command sender
  2299.  
  2300. on server ping:
  2301. set motd to {motd}
  2302. set max player count to 70
  2303.  
  2304. on connect:
  2305. if {WHOpen} is false:
  2306. if player is not an op:
  2307. if {Staff::%player%} is not set:
  2308. if {WH::%player%} is not set:
  2309. if {UHCStart} is not true:
  2310. if {programHour} is set:
  2311. kick the player due to "&8⫸ &7You are not whitelisted &8⫷%nl% %nl%&cWhitelist OFF at %{programHour}%."
  2312. else:
  2313. kick the player due to "&8⫸ &7You are not whitelisted &8⫷%nl% %nl%&cNo scheduled UHC."
  2314. else:
  2315. kick the player due to "&8⫸ &7You are not whitelisted &8⫷%nl% %nl%&cThe UHC has already begun."
  2316.  
  2317. command /open:
  2318. trigger:
  2319. set {_access} to false
  2320. if {Host::%player%} is true:
  2321. set {_access} to true
  2322. else if player is op:
  2323. set {_access} to true
  2324. if {_access} is true:
  2325. if {spawnsReady} is false:
  2326. if {open} is false:
  2327. if {programHour} is set:
  2328. set {open} to true
  2329. set {untilStart} to 10
  2330. set {WHOpen} to true
  2331. broadcast "&a&lUHC &r&8⫸ &7Whitelist is now open, the UHC start in 10 minutes."
  2332. else:
  2333. send "&a&lUHC &r&8⫸ &7There is no scheduled UHC, use /program." to command sender
  2334. else:
  2335. send "&a&lUHC &r&8⫸ &7The whitelist is already open"
  2336. else:
  2337. send "&a&lUHC &r&8⫸ &7The UHC has already begun" to command sender
  2338. else:
  2339. send "Unknown command." to command sender
  2340.  
  2341. command /spawns [<text>]:
  2342. trigger:
  2343. set {_access} to false
  2344. if {Host::%player%} is true:
  2345. set {_access} to true
  2346. else if player is op:
  2347. set {_access} to true
  2348. if {_access} is true:
  2349. if {open} is true:
  2350. if arg 1 is not set:
  2351. set {spawnsStart} to true
  2352. if {TeamsNumbers} is between 102 and 110:
  2353. loop all players:
  2354. if {Spec::%loop-player%} is not set:
  2355. set {_RandEnd} to false
  2356. while {_RandEnd} is false:
  2357. set {_rand} to a random integer between 1 and {players}
  2358. if {Rand::%{_rand}%} is not set:
  2359. set {Rand::%{_rand}%} to "%loop-player%"
  2360. set {_RandEnd} to true
  2361. set {_TeamCount} to ({TeamsNumbers} - 100)
  2362. loop {Rand::*}:
  2363. set {_player} to ("%loop-value%" parsed as offlineplayer)
  2364. if {Spec::%{_player}%} is not set:
  2365. if {Team::%{_player}%} is not set:
  2366. if {_TeamCount} is equal to ({TeamsNumbers} - 100):
  2367. set {_TeamCount} to 1
  2368. if {UHC1} is equal to 0:
  2369. broadcast "New team UHC1"
  2370. set {UHC1} to 1
  2371. set {chatname::%{_player}%} to "&0%{_player}%"
  2372. execute command "/ne prefix %{_player}% &0"
  2373. set {Team::%{_player}%} to "UHC1"
  2374. set {_Team} to "UHC1"
  2375. else if {UHC2} is equal to 0:
  2376. set {UHC2} to 1
  2377. set {chatname::%{_player}%} to "&1%{_player}%"
  2378. execute command "/ne prefix %{_player}% &1"
  2379. set {Team::%{_player}%} to "UHC2"
  2380. set {_Team} to "UHC2"
  2381. else if {UHC3} is equal to 0:
  2382. set {UHC3} to 1
  2383. set {chatname::%{_player}%} to "&2%{_player}%"
  2384. execute command "/ne prefix %{_player}% &2"
  2385. set {Team::%{_player}%} to "UHC3"
  2386. set {_Team} to "UHC3"
  2387. else if {UHC4} is equal to 0:
  2388. set {UHC4} to 1
  2389. set {chatname::%{_player}%} to "&3%{_player}%"
  2390. execute command "/ne prefix %{_player}% &3"
  2391. set {Team::%{_player}%} to "UHC4"
  2392. set {_Team} to "UHC4"
  2393. else if {UHC5} is equal to 0:
  2394. set {UHC5} to 1
  2395. set {chatname::%{_player}%} to "&4%{_player}%"
  2396. execute command "/ne prefix %{_player}% &4"
  2397. set {Team::%{_player}%} to "UHC5"
  2398. set {_Team} to "UHC5"
  2399. else if {UHC6} is equal to 0:
  2400. set {UHC6} to 1
  2401. set {chatname::%{_player}%} to "&5%{_player}%"
  2402. execute command "/ne prefix %{_player}% &5"
  2403. set {Team::%{_player}%} to "UHC6"
  2404. set {_Team} to "UHC6"
  2405. else if {UHC7} is equal to 0:
  2406. set {UHC7} to 1
  2407. set {chatname::%{_player}%} to "&6%{_player}%"
  2408. execute command "/ne prefix %{_player}% &6"
  2409. set {Team::%{_player}%} to "UHC7"
  2410. set {_Team} to "UHC7"
  2411. else if {UHC8} is equal to 0:
  2412. set {UHC8} to 1
  2413. set {chatname::%{_player}%} to "&7%{_player}%"
  2414. execute command "/ne prefix %{_player}% &7"
  2415. set {Team::%{_player}%} to "UHC8"
  2416. set {_Team} to "UHC8"
  2417. else if {UHC9} is equal to 0:
  2418. set {UHC9} to 1
  2419. set {chatname::%{_player}%} to "&8%{_player}%"
  2420. execute command "/ne prefix %{_player}% &8"
  2421. set {Team::%{_player}%} to "UHC9"
  2422. set {_Team} to "UHC9"
  2423. else if {UHC10} is equal to 0:
  2424. set {UHC10} to 1
  2425. set {chatname::%{_player}%} to "&9%{_player}%"
  2426. execute command "/ne prefix %{_player}% &9"
  2427. set {Team::%{_player}%} to "UHC10"
  2428. set {_Team} to "UHC10"
  2429. else if {UHC11} is equal to 0:
  2430. set {UHC11} to 1
  2431. set {chatname::%{_player}%} to "&a%{_player}%"
  2432. execute command "/ne prefix %{_player}% &a"
  2433. set {Team::%{_player}%} to "UHC11"
  2434. set {_Team} to "UHC11"
  2435. else if {UHC12} is equal to 0:
  2436. set {UHC12} to 1
  2437. set {chatname::%{_player}%} to "&b%{_player}%"
  2438. execute command "/ne prefix %{_player}% &b"
  2439. set {Team::%{_player}%} to "UHC12"
  2440. set {_Team} to "UHC12"
  2441. else if {UHC13} is equal to 0:
  2442. set {UHC13} to 1
  2443. set {chatname::%{_player}%} to "&c%{_player}%"
  2444. execute command "/ne prefix %{_player}% &c"
  2445. set {Team::%{_player}%} to "UHC13"
  2446. set {_Team} to "UHC13"
  2447. else if {UHC14} is equal to 0:
  2448. set {UHC14} to 1
  2449. set {chatname::%{_player}%} to "&d%{_player}%"
  2450. execute command "/ne prefix %{_player}% &d"
  2451. set {Team::%{_player}%} to "UHC14"
  2452. set {_Team} to "UHC14"
  2453. else if {UHC15} is equal to 0:
  2454. set {UHC15} to 1
  2455. set {chatname::%{_player}%} to "&e%{_player}%"
  2456. execute command "/ne prefix %{_player}% &e"
  2457. set {Team::%{_player}%} to "UHC15"
  2458. set {_Team} to "UHC15"
  2459. else:
  2460. if {_Team} is equal to "UHC1":
  2461. broadcast "Join UHC1"
  2462. set {chatname::%{_player}%} to "&0%{_player}%"
  2463. execute command "/ne prefix %{_player}% &0"
  2464. set {Team::%{_player}%} to "UHC1"
  2465. else if {_Team} is equal to "UHC2":
  2466. set {chatname::%{_player}%} to "&1%{_player}%"
  2467. execute command "/ne prefix %{_player}% &1"
  2468. set {Team::%{_player}%} to "UHC2"
  2469. else if {_Team} is equal to "UHC3":
  2470. set {chatname::%{_player}%} to "&2%{_player}%"
  2471. execute command "/ne prefix %{_player}% &2"
  2472. set {Team::%{_player}%} to "UHC3"
  2473. else if {_Team} is equal to "UHC4":
  2474. set {chatname::%{_player}%} to "&3%{_player}%"
  2475. execute command "/ne prefix %{_player}% &3"
  2476. set {Team::%{_player}%} to "UHC4"
  2477. else if {_Team} is equal to "UHC5":
  2478. set {chatname::%{_player}%} to "&4%{_player}%"
  2479. execute command "/ne prefix %{_player}% &4"
  2480. set {Team::%{_player}%} to "UHC5"
  2481. else if {_Team} is equal to "UHC6":
  2482. set {chatname::%{_player}%} to "&5%{_player}%"
  2483. execute command "/ne prefix %{_player}% &5"
  2484. set {Team::%{_player}%} to "UHC6"
  2485. else if {_Team} is equal to "UHC7":
  2486. set {chatname::%{_player}%} to "&6%{_player}%"
  2487. execute command "/ne prefix %{_player}% &6"
  2488. set {Team::%{_player}%} to "UHC7"
  2489. else if {_Team} is equal to "UHC8":
  2490. set {chatname::%{_player}%} to "&7%{_player}%"
  2491. execute command "/ne prefix %{_player}% &7"
  2492. set {Team::%{_player}%} to "UHC8"
  2493. else if {_Team} is equal to "UHC9":
  2494. set {chatname::%{_player}%} to "&8%{_player}%"
  2495. execute command "/ne prefix %{_player}% &8"
  2496. set {Team::%{_player}%} to "UHC9"
  2497. else if {_Team} is equal to "UHC10":
  2498. set {chatname::%{_player}%} to "&9%{_player}%"
  2499. execute command "/ne prefix %{_player}% &9"
  2500. set {Team::%{_player}%} to "UHC10"
  2501. else if {_Team} is equal to "UHC11":
  2502. set {chatname::%{_player}%} to "&a%{_player}%"
  2503. execute command "/ne prefix %{_player}% &a"
  2504. set {Team::%{_player}%} to "UHC11"
  2505. else if {_Team} is equal to "UHC12":
  2506. set {chatname::%{_player}%} to "&b%{_player}%"
  2507. execute command "/ne prefix %{_player}% &b"
  2508. set {Team::%{_player}%} to "UHC12"
  2509. else if {_Team} is equal to "UHC13":
  2510. set {chatname::%{_player}%} to "&c%{_player}%"
  2511. execute command "/ne prefix %{_player}% &c"
  2512. set {Team::%{_player}%} to "UHC13"
  2513. else if {_Team} is equal to "UHC14":
  2514. set {chatname::%{_player}%} to "&d%{_player}%"
  2515. execute command "/ne prefix %{_player}% &d"
  2516. set {Team::%{_player}%} to "UHC14"
  2517. else if {_Team} is equal to "UHC15":
  2518. set {chatname::%{_player}%} to "&e%{_player}%"
  2519. execute command "/ne prefix %{_player}% &e"
  2520. set {Team::%{_player}%} to "UHC15"
  2521. add 1 to {_TeamCount}
  2522. broadcast "&a&lTeam &r&8⫸ &7The teams was randomed."
  2523. set {_border} to (({border} - ({border}/10))/2)
  2524. set {_negBorder} to ({_border} - ({_border}*2))
  2525. set {_minDistance} to 200
  2526. set {_spawnpoints} to (((({_border}*2)/{_minDistance})*(({border}*2)/{_minDistance}))-3)
  2527. set {_spawnpoints} to ("%{_spawnpoints}%" parsed as integer)
  2528. set {_Count} to 0
  2529. if {_spawnpoints} is smaller than {players}:
  2530. send "&a&lUHC &r&8⫸ &7There are not enough spawn points." to command sender
  2531. send "&a&lUHC &r&8⫸ &6%{_spawnpoints}%&7 spawn points available, &6%{players}% &7players connected." to command sender
  2532. else:
  2533. set {_players} to 0
  2534. loop all players:
  2535. set {_loopPlayers} to ("%loop-player%" parsed as offline player)
  2536. if {Spec::%{_loopPlayers}%} is not set:
  2537. add 1 to {_players}
  2538. loop all players:
  2539. set {_loopPlayers} to ("%loop-player%" parsed as offline player)
  2540. if {Spec::%{_loopPlayers}%} is not set:
  2541. set {_existSpawn} to false
  2542. if {TeamsNumbers} is greater than 1:
  2543. if {Team::%loop-player%} is set:
  2544. loop all players:
  2545. if {Spec::%loop-player-2%} is not set:
  2546. if loop-player-2 is not equal to loop-player-1:
  2547. if {Team::%loop-player-2%} is set:
  2548. if {Team::%loop-player-2%} is equal to {Team::%loop-player-1%}:
  2549. if {tplocation::%loop-player-2%} is set:
  2550. set {tplocation::%loop-player-1%} to {tplocation::%loop-player-2%}
  2551. set {_existSpawn} to true
  2552. if {_existSpawn} is false:
  2553. while {_location} is not set:
  2554. set {_randomX} to a random integer between {_border} and {_negBorder}
  2555. set {_randomZ} to a random integer between {_border} and {_negBorder}
  2556. add 0.5 to {_randomX}
  2557. add 0.5 to {_randomZ}
  2558. set {_locationTop} to location ({_randomX}, 200, {_randomZ}) in world "world"
  2559. set {_locationBottom} to location ({_randomX}, 0, {_randomZ}) in world "world"
  2560. loop all blocks within {_locationBottom} to {_locationTop}:
  2561. if loop-block is not air:
  2562. set {_location} to location of loop-block
  2563. if block at {_location} is water block:
  2564. delete {_location}
  2565. else if block at {_location} is lava block:
  2566. delete {_location}
  2567. else if the id of block at {_location} is 18:
  2568. delete {_location}
  2569. else if the id of block at {_location} is 161:
  2570. delete {_location}
  2571. loop {tplocation::*}:
  2572. if distance between {_location} and {tplocation::%loop-index%} is smaller than {_minDistance}:
  2573. delete {_location}
  2574. if distance between {_location} and location (0, 200, 0) in the world "world" is smaller than 25:
  2575. delete {_location}
  2576. if {_location} is set:
  2577. set {_location} to location (x coord of {_location}, 200, z coord of {_location}) in world "world"
  2578. set {_location1} to location 2 meter north east of {_location}
  2579. set {_location1} to location 1 meter down {_location1}
  2580. set {_location2} to location 2 meter south west of {_location}
  2581. set {_location2} to location 3 meter up {_location2}
  2582. loop all blocks within {_location1} to {_location2}:
  2583. set loop-block to barrier
  2584. set {_location1} to location 1 meter north east of {_location}
  2585. set {_location1} to location 1 meter down {_location1}
  2586. set {_location2} to location 1 meter south west of {_location}
  2587. set {_location2} to location 1 meter down {_location2}
  2588. loop all blocks within {_location1} to {_location2}:
  2589. set loop-block to dark green glass block
  2590. set {_location1} to location 1 meter north east of {_location}
  2591. set {_location2} to location 1 meter south west of {_location}
  2592. set {_location2} to location 2 meter up {_location2}
  2593. loop all blocks within {_location1} to {_location2}:
  2594. set loop-block to air
  2595. set {tplocation::%loop-player%} to {_location}
  2596. delete {_location}
  2597. add 1 to {_Count}
  2598. set {_loopPlayer} to ("%loop-player%" parsed as offlineplayer)
  2599. set {WH::%{_loopPlayer}%} to "%{_loopPlayer}%"
  2600. loop all players:
  2601. if {actionbarused::%loop-player-2%} is not set:
  2602. set action bar of loop-player-2 to "&a%{_loopPlayer}% &cadded to whitelist &c(&a%{_Count}%&c/&a%{players}%&c)"
  2603. wait 0.1 seconds
  2604. set {spawnsReady} to true
  2605. set {open} to false
  2606. set {WHOpen} to false
  2607. broadcast "&a&lUHC &r&8⫸ &7The whitelist is now closed."
  2608. else if arg 1 is equal to "reset":
  2609. delete {tplocation::*}
  2610. broadcast "&a&lUHC &r&8⫸ &7All spawn points have been removed."
  2611. else:
  2612. send "&a&lUHC &r&8⫸ &7The whitelist is not open, use first /open." to command sender
  2613. else:
  2614. send "Unknown command." to command sender
  2615.  
  2616. command /teleport:
  2617. trigger:
  2618. set {_access} to false
  2619. if {Host::%player%} is true:
  2620. set {_access} to true
  2621. else if player is op:
  2622. set {_access} to true
  2623. if {_access} is true:
  2624. if {spawnsReady} is set:
  2625. if {spawnsReady} is true:
  2626. set {UHCStart} to true
  2627. wait 1 second
  2628. set {_Count} to 0
  2629. loop all players:
  2630. if {Spec::%loop-player%} is not set:
  2631. 1.8 spawn 10 of particle explode:0.1 offset by 0, 0, 0 at loop-player with data 0
  2632. wait 1 tick
  2633. teleport loop-player to {tplocation::%loop-player%}
  2634. set {teleported::%loop-player%} to true
  2635. add 1 to {_Count}
  2636. loop all players:
  2637. if {actionbarused::%loop-player-2%} is not set:
  2638. set action bar of loop-player-2 to "&a%loop-player-1% &cwas teleported (&a%{_Count}%&c/&a%{players}%&c)"
  2639. close inventory of loop-player
  2640. delete {inviteConfirm::%loop-player%}
  2641. set rf max health of loop-player to 20
  2642. set health of loop-player to 10
  2643. clear the inventory of loop-player
  2644. set the level of loop-player to 0
  2645. set the level progress of loop-player to 0
  2646. wait 0.1 seconds
  2647. broadcast "&a&lUHC &r&8⫸ &7All players was teleported."
  2648. wait 1 tick
  2649. set {allTeleported} to true
  2650. else:
  2651. send "&a&lUHC &r&8⫸ &7Spawn points were not generated, use &6/spawns&7." to command sender
  2652. else:
  2653. send "&a&lUHC &r&8⫸ &7Spawn points were not generated, use &6/spawns&7." to command sender
  2654. else:
  2655. send "Unknown command." to command sender
  2656.  
  2657. command /start:
  2658. trigger:
  2659. set {_access} to false
  2660. if {Host::%player%} is true:
  2661. set {_access} to true
  2662. else if player is op:
  2663. set {_access} to true
  2664. if {_access} is true:
  2665. if {Start} is not true:
  2666. if {allTeleported} is set:
  2667. if {allTeleported} is true:
  2668. loop all players in world "world":
  2669. if {Spec::%loop-player%} is not set:
  2670. send loop-player title "&45" with subtitle "&7Launching the UHC" for 1 seconds with 0 second fade in and 0 second fade out
  2671. broadcast "&a&lUHC &r&8⫸ &7Launching the UHC in &45&7."
  2672. wait 1 second
  2673. loop all players in world "world":
  2674. if {Spec::%loop-player%} is not set:
  2675. send loop-player title "&c4" with subtitle "&7Launching the UHC" for 1 seconds with 0 second fade in and 0 second fade out
  2676. broadcast "&a&lUHC &r&8⫸ &7Launching the UHC in &c4&7."
  2677. wait 1 second
  2678. loop all players in world "world":
  2679. if {Spec::%loop-player%} is not set:
  2680. send loop-player title "&63" with subtitle "&7Launching the UHC" for 1 seconds with 0 second fade in and 0 second fade out
  2681. broadcast "&a&lUHC &r&8⫸ &7Launching the UHC in &63&7."
  2682. wait 1 second
  2683. loop all players in world "world":
  2684. if {Spec::%loop-player%} is not set:
  2685. send loop-player title "&e2" with subtitle "&7Launching the UHC" for 1 seconds with 0 second fade in and 0 second fade out
  2686. broadcast "&a&lUHC &r&8⫸ &7Launching the UHC in &e2&7."
  2687. wait 1 second
  2688. loop all players in world "world":
  2689. if {Spec::%loop-player%} is not set:
  2690. send loop-player title "&a1" with subtitle "&7Launching the UHC" for 1 seconds with 0 second fade in and 0 second fade out
  2691. broadcast "&a&lUHC &r&8⫸ &7Launching the UHC in &a1&7."
  2692. wait 1 second
  2693. loop all players in world "world":
  2694. if {Spec::%loop-player%} is not set:
  2695. send loop-player title "&aGo" with subtitle "&7Good luck!" for 1 seconds with 0 second fade in and 0 second fade out
  2696. set the level of loop-player to 0
  2697. set the level progress of loop-player to 0
  2698. loop 100 times:
  2699. broadcast " "
  2700. broadcast "&8⫸ &l&m &r &8⫷"
  2701. broadcast "&a&lUHC &r&8⫸ &7UHC was started !"
  2702. broadcast "&a&lUHC &r&8⫸ &7PVP will be activated in: &a%{pvpTime}% minutes&7."
  2703. broadcast "&a&lUHC &r&8⫸ &7Meetup is in: &a%{meetupTime}% minutes&7."
  2704. broadcast "&8⫸ &l&m &r &8⫷"
  2705. loop all players in world "world":
  2706. set the saturation of loop-player to 20
  2707. if {Spec::%loop-player%} is not set:
  2708. if {starterfood::command} is set:
  2709. if {starterfood::command} is equal to "cooked beef":
  2710. set slot 8 of loop-player to {starterfood::number} of cooked beef
  2711. else if {starterfood::command} is equal to "cooked porkchop":
  2712. set slot 8 of loop-player to {starterfood::number} of cooked porkchop
  2713. else if {starterfood::command} is equal to "cooked chicken":
  2714. set slot 8 of loop-player to {starterfood::number} of cooked chicken
  2715. else if {starterfood::command} is equal to "cooked rabbit":
  2716. set slot 8 of loop-player to {starterfood::number} of cooked rabbit
  2717. else if {starterfood::command} is equal to "cooked mutton":
  2718. set slot 8 of loop-player to {starterfood::number} of cooked mutton
  2719. set {invinc} to true
  2720. if command sender is in world "lobby":
  2721. set {_loc} to location of command sender
  2722. teleport command sender to location (0, 100, 0) in world "world"
  2723. if {eternalDay} is true:
  2724. set the time to 12:00
  2725. else:
  2726. set the time to 6:00
  2727. teleport command sender to {_loc}
  2728. else:
  2729. if {eternalDay} is true:
  2730. set the time to 12:00
  2731. else:
  2732. set the time to 6:00
  2733. loop {Spec::*}:
  2734. set {_loopPlayers} to ("%loop-index%" parsed as offline player)
  2735. set the gamemode of {_loopPlayers} to spectator
  2736. set {secondsTime} to 0
  2737. set {Start} to true
  2738. execute command "/updatescoreboard"
  2739. loop all blocks within location (10, 198, 10) in the world "world" to location (-10, 230, -10) in the world "world":
  2740. set loop-block to air
  2741. loop {tplocation::*}:
  2742. set {_location1} to location 2 meter north east of {tplocation::%loop-index%}
  2743. set {_location1} to location 1 meter down {_location1}
  2744. set {_location2} to location 2 meter south west of {tplocation::%loop-index%}
  2745. set {_location2} to location 3 meter up {_location2}
  2746. loop all blocks within {_location1} to {_location2}:
  2747. set loop-block to air
  2748. set {_playerName} to ("%loop-index%" parsed as offlineplayer)
  2749. set {_playerLocation} to location of {_playerName}
  2750. set {_playerLocation} to location ({_playerLocation}, 200, {_playerLocation})
  2751. 1.8 spawn 5 of particle HUGE_EXPLOSION:1 offset by 0, 0, 0 at {tplocation::%loop-index%} with data 0
  2752. set {_timer} to 0
  2753. loop all players:
  2754. if {Spec::%loop-player%} is not set:
  2755. set {onGround::%loop-player%} to true
  2756. set {invinc} to true
  2757. set {nodamage} to true
  2758. set the gamemode of all players to survival
  2759. while {_timer} is smaller than 30:
  2760. set {_timeleft} to (30 - {_timer})
  2761. loop all players:
  2762. if loop-player is not in world "lobby":
  2763. if {Spec::%loop-player%} is not set:
  2764. if {actionbarused::%loop-player%} is not set:
  2765. set action bar of loop-player to "&cDamage active in &a%{_timeleft}% &cseconds"
  2766. add 1 to {_timer}
  2767. wait 1 second
  2768. loop all players:
  2769. if {actionbarused::%loop-player%} is not set:
  2770. set action bar of loop-player to ""
  2771. if command sender is in world "lobby":
  2772. set {_loc} to location of command sender
  2773. teleport command sender to location (0, 100, 0) in world "world"
  2774. make player execute command "/difficulty 3"
  2775. teleport command sender to {_loc}
  2776. else:
  2777. make player execute command "/difficulty 3"
  2778. set {nodamage} to false
  2779. set {invinc} to false
  2780. else:
  2781. send "&a&lUHC &r&8⫸ &7Players was not teleported, use &6/teleport&7." to command sender
  2782. else:
  2783. send "&a&lUHC &r&8⫸ &7Players was not teleported, use &6/teleport&7.." to command sender
  2784. else:
  2785. send "&a&lUHC &r&8⫸ &7The UHC has already begun." to command sender
  2786. else:
  2787. send "Unknown command." to command sender
  2788.  
  2789. command /about [<text>]:
  2790. trigger:
  2791. set {_player} to ("%arg 1%" parsed as offlineplayer)
  2792. if {_player} is online:
  2793. if {Spec::%{_player}%} is not set:
  2794. if {TeamsNumbers} is greater than 1:
  2795. set {_fourRows} to false
  2796. if {TeamsNumbers} is between 2 and 10:
  2797. if {TeamsNumbers} is between 2 and 6:
  2798. open chest with 3 row named "&8⫸ About: &4%{_player}%" to player
  2799. else if {TeamsNumbers} is between 7 and 10:
  2800. open chest with 4 row named "&8⫸ About: &4%{_player}%" to player
  2801. set {_fourRows} to true
  2802. else:
  2803. open chest with 3 row named "&8⫸ About: &4%{_player}%" to player
  2804. else if {TeamsNumbers} is between 102 and 110:
  2805. if {TeamsNumbers} is between 102 and 106:
  2806. open chest with 3 row named "&8⫸ About: &4%{_player}%" to player
  2807. else if {TeamsNumbers} is between 107 and 110:
  2808. open chest with 4 row named "&8⫸ About: &4%{_player}%" to player
  2809. set {_fourRows} to true
  2810. else:
  2811. open chest with 3 row named "&8⫸ About: &4%{_player}%" to player
  2812. else:
  2813. open chest with 3 row named "&8⫸ About: &4%{_player}%" to player
  2814. else:
  2815. open chest with 1 row named "&8⫸ About: &4%{_player}%" to player
  2816. else:
  2817. open chest with 1 row named "&8⫸ About: &4%{_player}%" to player
  2818. wait 1 tick
  2819. format slot 0 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2820. format slot 1 of player with skull of "%{_player}%" parsed as offlineplayer named "&8⫸ &6%{_player}% &8⫷" to be unstealable
  2821. format slot 2 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2822. if {Spec::%{_player}%} is set:
  2823. format slot 3 of player with compass named "&8⫸ &6%{_player}% &7was a spectator." to be unstealable
  2824. format slot 4 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2825. format slot 5 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2826. if {Host::%{_player}%} is true:
  2827. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is the Host." to be unstealable
  2828. else if {_player} is op:
  2829. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is the Admin." to be unstealable
  2830. else if {Staff::%{_player}%} is true:
  2831. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is a Staff member." to be unstealable
  2832. else:
  2833. format slot 6 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2834. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2835. format slot 8 of player with barrier named "&8⫸ &cClose" to close
  2836. else:
  2837. format slot 3 of player with golden apple item named "&8⫸ &7Health: &6%(health of {_player}) * 10%%%&7." to be unstealable
  2838. format slot 4 of player with cooked beef named "&8⫸ &7Food: &6%food level of {_player}%&7." to be unstealable
  2839. if {kills::%{_player}%} is set:
  2840. format slot 5 of player with diamond sword named "&8⫸ &7Kills: &6%{kills::%{_player}%}%&7." to be unstealable
  2841. else:
  2842. format slot 5 of player with diamond sword named "&8⫸ &7Kills: &60&7." to be unstealable
  2843. if {Host::%{_player}%} is true:
  2844. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is the Host." to be unstealable
  2845. else if {_player} is op:
  2846. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is the Admin." to be unstealable
  2847. else if {Staff::%{_player}%} is true:
  2848. format slot 6 of player with shiny banner:1 named "&8⫸ &c%{_player}% &7is a Staff member." to be unstealable
  2849. else:
  2850. format slot 6 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2851. if {TeamsNumbers} is greater than 1:
  2852. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2853. format slot 8 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2854. format slot 9 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2855. format slot 10 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2856. format slot 11 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2857. format slot 12 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2858. format slot 13 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2859. format slot 14 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2860. format slot 15 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2861. format slot 16 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2862. format slot 17 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2863. format slot 18 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2864. format slot 19 of player with shiny name tag named "&8⫸ &7Teammates &6»" to be unstealable
  2865. format slot 20 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2866. set {_NbMembers} to 21
  2867. if {UHCStart} is true:
  2868. loop {WH::*}:
  2869. if {Team::%loop-index%} is equal to {Team::%{_player}%}:
  2870. set {_teammate} to ("%loop-index%" parsed as offlineplayer)
  2871. if {_teammate} is not equal to {_player}:
  2872. format slot {_NbMembers} of player with skull of "%{_teammate}%" parsed as offlineplayer named "&8⫸ &6%{_teammate}% &8⫷" to be unstealable
  2873. add 1 to {_NbMembers}
  2874. if {_fourRows} is true:
  2875. if {_NbMembers} is equal to 26:
  2876. format slot 26 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2877. format slot 27 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2878. format slot 28 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2879. format slot 29 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2880. set {_NbMembers} to 30
  2881. else if {_NbMembers} is equal to 35:
  2882. stop loop
  2883. else:
  2884. if {_NbMembers} is equal to 26:
  2885. stop loop
  2886. else:
  2887. loop all players:
  2888. if {Team::%loop-player%} is equal to {Team::%{_player}%}:
  2889. set {_teammate} to loop-player
  2890. if {_teammate} is not equal to {_player}:
  2891. format slot {_NbMembers} of player with skull of "%{_teammate}%" parsed as offlineplayer named "&8⫸ &6%{_teammate}% &8⫷" to be unstealable
  2892. add 1 to {_NbMembers}
  2893. if {_fourRows} is true:
  2894. if {_NbMembers} is equal to 26:
  2895. format slot 26 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2896. format slot 27 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2897. format slot 28 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2898. format slot 29 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2899. set {_NbMembers} to 30
  2900. else if {_NbMembers} is equal to 35:
  2901. stop loop
  2902. else:
  2903. if {_NbMembers} is equal to 26:
  2904. stop loop
  2905. if {_fourRows} is true:
  2906. if {_NbMembers} is equal to 21:
  2907. format slot 21 of player with redstone dust named "&8⫸ &7No teammates." to be unstealable
  2908. format slot 22 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2909. format slot 23 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2910. format slot 24 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2911. format slot 25 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2912. format slot 26 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2913. format slot 27 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2914. format slot 28 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2915. format slot 29 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2916. format slot 30 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2917. format slot 31 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2918. format slot 32 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2919. format slot 33 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2920. format slot 34 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2921. format slot 35 of player with barrier named "&8⫸ &cClose" to close
  2922. else if {_NbMembers} is between 22 and 34:
  2923. while {_NbMembers} is smaller than 35:
  2924. format slot {_NbMembers} of player with gray stained glass pane named "&7{@name}" to be unstealable
  2925. add 1 to {_NbMembers}
  2926. format slot 35 of player with barrier named "&8⫸ &cClose" to close
  2927. else:
  2928. format slot 35 of player with barrier named "&8⫸ &cClose" to close
  2929. else:
  2930. if {_NbMembers} is equal to 21:
  2931. format slot 21 of player with redstone dust named "&8⫸ &7No teammates." to be unstealable
  2932. format slot 22 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2933. format slot 23 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2934. format slot 24 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2935. format slot 25 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2936. format slot 26 of player with barrier named "&8⫸ &cClose" to close
  2937. else if {_NbMembers} is between 22 and 25:
  2938. while {_NbMembers} is smaller than 26:
  2939. format slot {_NbMembers} of player with gray stained glass pane named "&7{@name}" to be unstealable
  2940. add 1 to {_NbMembers}
  2941. format slot 26 of player with barrier named "&8⫸ &cClose" to close
  2942. else:
  2943. format slot 26 of player with barrier named "&8⫸ &cClose" to close
  2944. else:
  2945. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  2946. format slot 8 of player with barrier named "&8⫸ &cClose" to close
  2947. else:
  2948. send "&a&lUHC &8⫸ &7This player is not online."
  2949.  
  2950. on any move:
  2951. if {UHCStart} is true:
  2952. if {Start} is not true:
  2953. if {teleported::%player%} is true:
  2954. if distance between player and {tplocation::%player%} is more than 2.5:
  2955. if {Spec::%player%} is not set:
  2956. teleport player to {tplocation::%player%}
  2957.  
  2958. on block damage:
  2959. if player is in world "lobby":
  2960. #if {Staff::%player%} is not set:
  2961. cancel event
  2962. else if {Start} is not true:
  2963. set {_access} to false
  2964. if {Host::%player%} is true:
  2965. set {_access} to true
  2966. else if player is op:
  2967. set {_access} to true
  2968. if {_access} is false:
  2969. cancel event
  2970.  
  2971. on block mine:
  2972. if player is in world "lobby":
  2973. #if {Staff::%player%} is not set:
  2974. cancel event
  2975. else if {Start} is not true:
  2976. set {_access} to false
  2977. if {Host::%player%} is true:
  2978. set {_access} to true
  2979. else if player is op:
  2980. set {_access} to true
  2981. if {_access} is false:
  2982. cancel event
  2983.  
  2984. on health regen:
  2985. if {Start} is true:
  2986. if event-entity is a player:
  2987. if player is not in world "lobby":
  2988. if regen reason is SATIATED:
  2989. cancel event
  2990.  
  2991. on chat:
  2992. cancel event
  2993. if {mute::%player%} is not set:
  2994. if {Host::%player%} is true:
  2995. if {chatname::%player%} is set:
  2996. broadcast "&cHost&8 | &r%{chatname::%player%}% &r&8⫸ &f%message%"
  2997. else:
  2998. broadcast "&cHost&8 | &r&7%player% &r&8⫸ &f%message%"
  2999. else if player is op:
  3000. if {chatname::%player%} is set:
  3001. broadcast "&4Admin&8 | &r%{chatname::%player%}% &r&8⫸ &f%message%"
  3002. else:
  3003. broadcast "&4Admin&8 | &r&7%player% &r&8⫸ &f%message%"
  3004. else if {Staff::%player%} is true:
  3005. if {chatname::%player%} is set:
  3006. broadcast "&cStaff&8 | &r%{chatname::%player%}% &r&8⫸ &f%message%"
  3007. else:
  3008. broadcast "&cStaff&8 | &r&7%player% &r&8⫸ &f%message%"
  3009. else:
  3010. if {chat} is true:
  3011. if {chatname::%player%} is set:
  3012. broadcast "%{chatname::%player%}% &r&8⫸ &f%message%"
  3013. else:
  3014. broadcast "&7%player% &r&8⫸ &f%message%"
  3015.  
  3016. on portal create:
  3017. if {nether} is equal to "OFF":
  3018. cancel event
  3019.  
  3020. on death of player:
  3021. if {Start} is true:
  3022. if {Spec::%player%} is not set:
  3023. if victim is not in world "lobby":
  3024. if the gamemode of player is survival:
  3025. set {_deathmessage} to death message
  3026. set death message to ""
  3027. set the block at location of victim to chest
  3028. set {_chest} to block at location of victim
  3029. set {_chestloc} to location of victim
  3030. add 1 human head to {_chest}
  3031. if {Sc::goldenretriever} is true:
  3032. add 1 golden apple item to {_chest}
  3033. if {Sc::barebones} is true:
  3034. add 1 golden apple item to {_chest}
  3035. add 1 diamond to {_chest}
  3036. add 32 arrow to {_chest}
  3037. add 2 string to {_chest}
  3038. set block at {_chestloc} to air
  3039. wait 1 second
  3040. force respawn victim
  3041. broadcast "&a&lUHC &r&8⫸ &c%{_deathmessage}% !"
  3042. broadcast "&a&lUHC &r&8⫸ &6%({players} - 1)% players alive."
  3043. if attacker is set:
  3044. if attacker is a offlineplayer:
  3045. if {kills::%attacker%} is not set:
  3046. set {kills::%attacker%} to 1
  3047. else:
  3048. add 1 to {kills::%attacker%}
  3049. else:
  3050. add 1 to {pve}
  3051. else:
  3052. add 1 to {pve}
  3053. execute command "/updatescoreboard"
  3054. if player is op:
  3055. set the gamemode of player to spectator
  3056. set {Spec::%player%} to "%player%"
  3057. teleport player to location (0, 100, 0) in world "world"
  3058. else if {Host::%player%} is set:
  3059. set the gamemode of player to spectator
  3060. set {Spec::%player%} to "%player%"
  3061. teleport player to location (0, 100, 0) in world "world"
  3062. else if {Staff::%player%} is set:
  3063. set the gamemode of player to spectator
  3064. set {Spec::%player%} to "%player%"
  3065. teleport player to location (0, 100, 0) in world "world"
  3066. else:
  3067. set {death::%player%} to true
  3068. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3069. if {TeamsStatus} is true:
  3070. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3071. else:
  3072. set slot 8 of player to air
  3073. set the player's gamemode to adventure
  3074. set the saturation of player to 20
  3075. set the food level of player to 20
  3076. teleport player to location (0.5, 102.5, 0.5) in the world "lobby"
  3077. delete {leave::%player%}
  3078. if {Team::%player%} is set:
  3079. set {chatname::%player%} to "&7%name of player%"
  3080. execute command "/ne clear %player%"
  3081. set {_NotEmpty} to false
  3082. loop {WH::*}:
  3083. set {_name} to ("%loop-index%" parsed as offlineplayer)
  3084. if {_name} is not command sender:
  3085. if {Team::%{_name}%} is equal to {Team::%player%}:
  3086. set {_NotEmpty} to true
  3087. stop loop
  3088. if {_NotEmpty} is false:
  3089. if {Team::%player%} is equal to "UHC1":
  3090. set {UHC1} to 0
  3091. else if {Team::%player%} is equal to "UHC2":
  3092. set {UHC2} to 0
  3093. else if {Team::%player%} is equal to "UHC3":
  3094. set {UHC3} to 0
  3095. else if {Team::%player%} is equal to "UHC4":
  3096. set {UHC4} to 0
  3097. else if {Team::%player%} is equal to "UHC5":
  3098. set {UHC5} to 0
  3099. else if {Team::%player%} is equal to "UHC6":
  3100. set {UHC6} to 0
  3101. else if {Team::%player%} is equal to "UHC7":
  3102. set {UHC7} to 0
  3103. else if {Team::%player%} is equal to "UHC8":
  3104. set {UHC8} to 0
  3105. else if {Team::%player%} is equal to "UHC9":
  3106. set {UHC9} to 0
  3107. else if {Team::%player%} is equal to "UHC10":
  3108. set {UHC10} to 0
  3109. else if {Team::%player%} is equal to "UHC11":
  3110. set {UHC11} to 0
  3111. else if {Team::%player%} is equal to "UHC12":
  3112. set {UHC12} to 0
  3113. else if {Team::%player%} is equal to "UHC13":
  3114. set {UHC13} to 0
  3115. else if {Team::%player%} is equal to "UHC14":
  3116. set {UHC14} to 0
  3117. else if {Team::%player%} is equal to "UHC15":
  3118. set {UHC15} to 0
  3119. delete {Team::%player%}
  3120. else:
  3121. force respawn victim
  3122. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3123. if {TeamsStatus} is true:
  3124. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3125. else:
  3126. set slot 8 of player to air
  3127. set the player's gamemode to adventure
  3128. set the saturation of player to 20
  3129. set the food level of player to 20
  3130. teleport player to location (0.5, 102.5, 0.5) in the world "lobby"
  3131.  
  3132. else:
  3133. force respawn victim
  3134. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3135. if {TeamsStatus} is true:
  3136. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3137. else:
  3138. set slot 8 of player to air
  3139. set the player's gamemode to adventure
  3140. set the saturation of player to 20
  3141. set the food level of player to 20
  3142. teleport player to location (0.5, 102.5, 0.5) in the world "lobby"
  3143.  
  3144. on inventory close:
  3145. if {invOpen::%player%} is set:
  3146. delete {invOpen::%player%}
  3147. if player is in world "lobby":
  3148. if {TeamsStatus} is true:
  3149. if {inviteConfirm::%player%} is true:
  3150. delete {inviteConfirm::%player%}
  3151. if the gamemode of player is adventure:
  3152. if {UHCStart} is true:
  3153. if {Start} is true:
  3154. wait 1 ticks
  3155. set slot 0 of player to air
  3156. set slot 1 of player to air
  3157. set slot 2 of player to air
  3158. set slot 3 of player to air
  3159. if slot 4 of player is not equal to 1 of paper:
  3160. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3161. set slot 5 of player to air
  3162. set slot 6 of player to air
  3163. set slot 7 of player to air
  3164. if {TeamsStatus} is true:
  3165. if slot 8 of player is not equal to 1 of name tag:
  3166. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3167. else:
  3168. wait 1 ticks
  3169. set slot 0 of player to air
  3170. set slot 1 of player to air
  3171. set slot 2 of player to air
  3172. set slot 3 of player to air
  3173. if slot 4 of player is not equal to 1 of paper:
  3174. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3175. set slot 5 of player to air
  3176. set slot 6 of player to air
  3177. set slot 7 of player to air
  3178. if {TeamsStatus} is true:
  3179. if slot 8 of player is not equal to 1 of name tag:
  3180. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3181.  
  3182. on prepare item craft:
  3183. if player is in world "lobby":
  3184. set slot 0 of player to air
  3185. set slot 1 of player to air
  3186. set slot 2 of player to air
  3187. set slot 3 of player to air
  3188. if slot 4 of player is equal to air:
  3189. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3190. set slot 5 of player to air
  3191. set slot 6 of player to air
  3192. set slot 7 of player to air
  3193. if {TeamsStatus} is true:
  3194. if slot 8 of player is equal to air:
  3195. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3196.  
  3197. on mine of gravel:
  3198. if {cutclean} is equal to "ON":
  3199. set the block at the block to chest
  3200. set {_chest} to block
  3201. set {_chestloc} to location of block
  3202. add 1 flint to {_chest}
  3203. set block at {_chestloc} to air
  3204.  
  3205. on mine of iron ore:
  3206. if {cutclean} is equal to "ON":
  3207. set the block at the block to chest
  3208. set {_chest} to block
  3209. set {_chestloc} to location of block
  3210. add 1 iron ingot to {_chest}
  3211. set block at {_chestloc} to air
  3212. spawn 1 experience orb at the block
  3213.  
  3214. on mine of gold ore:
  3215. if {Sc::barebones} is true:
  3216. set the block at the block to chest
  3217. set {_chest} to block
  3218. set {_chestloc} to location of block
  3219. add 1 iron ingot to {_chest}
  3220. set block at {_chestloc} to air
  3221. spawn 1 experience orb at the block
  3222. else if {cutclean} is equal to "ON":
  3223. set the block at the block to chest
  3224. set {_chest} to block
  3225. set {_chestloc} to location of block
  3226. add 1 gold ingot to {_chest}
  3227. set block at {_chestloc} to air
  3228. spawn 1 experience orb at the block
  3229.  
  3230. on mine of lapis ore:
  3231. if {Sc::barebones} is true:
  3232. set the block at the block to chest
  3233. set {_chest} to block
  3234. set {_chestloc} to location of block
  3235. add 1 iron ingot to {_chest}
  3236. set block at {_chestloc} to air
  3237. spawn 1 experience orb at the block
  3238.  
  3239. on mine of diamond ore:
  3240. if {Sc::barebones} is true:
  3241. set the block at the block to chest
  3242. set {_chest} to block
  3243. set {_chestloc} to location of block
  3244. add 1 iron ingot to {_chest}
  3245. set block at {_chestloc} to air
  3246. spawn 1 experience orb at the block
  3247.  
  3248. on mine of redstone ore:
  3249. if {Sc::barebones} is true:
  3250. set the block at the block to chest
  3251. set {_chest} to block
  3252. set {_chestloc} to location of block
  3253. add 1 iron ingot to {_chest}
  3254. set block at {_chestloc} to air
  3255. spawn 1 experience orb at the block
  3256.  
  3257. on mine of emerald ore:
  3258. if {Sc::barebones} is true:
  3259. set the block at the block to chest
  3260. set {_chest} to block
  3261. set {_chestloc} to location of block
  3262. add 1 iron ingot to {_chest}
  3263. set block at {_chestloc} to air
  3264. spawn 1 experience orb at the block
  3265.  
  3266. on break of sand:
  3267. if {cutclean} is equal to "ON":
  3268. set the block at the block to chest
  3269. set {_chest} to block
  3270. set {_chestloc} to location of block
  3271. add 1 plain glass block to {_chest}
  3272. set block at {_chestloc} to air
  3273.  
  3274. on item spawn of raw rabbit:
  3275. if {cutclean} is equal to "ON":
  3276. cancel event
  3277. set {_location} to the location 1 meter up event-location
  3278. drop cooked rabbit at {_location}
  3279.  
  3280. on item spawn of raw porkchop:
  3281. if {cutclean} is equal to "ON":
  3282. cancel event
  3283. set {_location} to the location 1 meter up event-location
  3284. drop cooked porkchop at {_location}
  3285.  
  3286. on item spawn of raw beef:
  3287. if {cutclean} is equal to "ON":
  3288. cancel event
  3289. set {_location} to the location 1 meter up event-location
  3290. drop cooked beef at {_location}
  3291.  
  3292. on item spawn of raw chicken:
  3293. if {cutclean} is equal to "ON":
  3294. cancel event
  3295. set {_location} to the location 1 meter up event-location
  3296. drop cooked chicken at {_location}
  3297.  
  3298. on item spawn of raw mutton:
  3299. if {cutclean} is equal to "ON":
  3300. cancel event
  3301. set {_location} to the location 1 meter up event-location
  3302. drop cooked mutton at {_location}
  3303.  
  3304. on eat of golden apple:
  3305. if name of tool is "&6Golden Head":
  3306. cancel the event
  3307. remove 1 golden apple from the player's tool
  3308. apply regeneration 2 to the player for 10 seconds
  3309. apply absorption 1 to the player for 2 minutes
  3310.  
  3311. on craft glistering melon:
  3312. if the name of item is equal to "&6Glistering Melon":
  3313. if {potions2} is "OFF":
  3314. send "&a&lUHC &r&8⫸ &7Rappel: Les Potions II sont désactivées."
  3315. else:
  3316. cancel event
  3317. send "&&a&lUHC &r&8⫸ &7Craftez le melon scintillant avec des lingots." to player
  3318.  
  3319. on craft enchantment table:
  3320. if {Sc::barebones} is true:
  3321. cancel event
  3322. send "&a&lUHC &r&8⫸ &7The barebones scenarios is enable, you cannot craft enchanting table." to player
  3323.  
  3324. on craft anvil:
  3325. if {Sc::barebones} is true:
  3326. cancel event
  3327. send "&a&lUHC &r&8⫸ &7The barebones scenarios is enable, you cannot craft anvil." to player
  3328.  
  3329. on craft golden apple item:
  3330. if {Sc::barebones} is true:
  3331. cancel event
  3332. send "&a&lUHC &r&8⫸ &7The barebones scenarios is enable, you cannot craft golden applr." to player
  3333.  
  3334. on mine glowstone block:
  3335. if {potions2} is "OFF":
  3336. cancel event
  3337. set the block at the block to chest
  3338. set {_chest} to block
  3339. set {_chestloc} to location of block
  3340. add 1 glowstone block to {_chest}
  3341. set block at {_chestloc} to air
  3342.  
  3343. on death of a witch:
  3344. if {potions2} is "OFF":
  3345. remove all glowstone from the drops
  3346.  
  3347. command /program [<text>]:
  3348. trigger:
  3349. set {_access} to false
  3350. if {Staff::%player%} is true:
  3351. set {_access} to true
  3352. else if player is op:
  3353. set {_access} to true
  3354. if {_access} is true:
  3355. if arg 1 is not set:
  3356. send "&a&lUHC &8⫸ &7Please indicate the time in the format &r&600h00&7." to command sender
  3357. else if arg 1 is equal to "reset":
  3358. delete {programHour}
  3359. send "&a&lUHC &8⫸ &7The scheduled UHC was canceled." to command sender
  3360. else if the length of arg 1 is equal to 5:
  3361. set {programHour} to arg 1
  3362. send "&a&lUHC &8⫸ &7The time of the next UHC is &6%{programHour}%&7." to command sender
  3363. else:
  3364. send "&a&lUHC &8⫸ &7Please indicate the time in the format &r&600h00&7." to command sender
  3365. else:
  3366. send "Unknown command." to command sender
  3367.  
  3368. command /updatescoreboard:
  3369. executable by: console
  3370. trigger:
  3371. loop all players:
  3372. delete loop-player's sidebar
  3373. if {Host} is set:
  3374. set name of sidebar of loop-player to "&a&oUHC &r&8⫸ &7&o%{Host}%"
  3375. else:
  3376. set name of sidebar of loop-player to "&a&oUHC &r&8⫸ &7&o{@serverName}"
  3377. if {Start} is true:
  3378. if PvP is enabled in world "world":
  3379. loop {kills::*}:
  3380. set {_player} to ("%loop-index%" parsed as offlineplayer)
  3381. if {kills-name::%{_player}%} is not set:
  3382. if {chatname::%{_player}%} is set:
  3383. set {kills-name::%{_player}%} to "%{chatname::%{_player}%}%"
  3384. else:
  3385. set {kills-name::%{_player}%} to "&7%{_player}%"
  3386. set score " &8⫸ %{kills-name::%{_player}%}%" in sidebar of loop-player to loop-value-2
  3387. set score " " in sidebar of loop-player to 99
  3388. set score " &8⫸ &6&lPVE" in sidebar of loop-player to {pve}
  3389. else:
  3390. set score " " in sidebar of loop-player to ({pve} + 1)
  3391. set score " &6PVE &r&8⫸ &a&l%{pve}%" in sidebar of loop-player to {pve}
  3392. set score " " in sidebar of loop-player to -1
  3393. set score " &6Teams &8⫸ &7%{TeamsNumbersName}%" in sidebar of loop-player to -2
  3394. set score " " in sidebar of loop-player to -3
  3395. set score " &6Scenarios" in sidebar of loop-player to -4
  3396. set {_Score} to -5
  3397. loop {Sc::*}:
  3398. if {Sc::%loop-index%} is true:
  3399. set score " &8⫸ &7%{Sc::%loop-index%::name}%" in sidebar of loop-player to {_Score}
  3400. subtract 1 from {_Score}
  3401. if {_Score} is equal to -5:
  3402. set score " &8⫸ &7Vanilla+" in sidebar of loop-player to {_Score}
  3403. subtract 1 from {_Score}
  3404. set score " " in sidebar of loop-player to {_Score}
  3405. subtract 1 from {_Score}
  3406. set score "&b{@twitter}" in sidebar of loop-player to {_Score}
  3407. subtract 1 from {_Score}
  3408. else:
  3409. set score "&b{@twitter}" in sidebar of loop-player to 0
  3410. set score " " in sidebar of loop-player to 1
  3411. set score " &8⫸ &7/helpop" in sidebar of loop-player to 2
  3412. set score " &8⫸ &7/rules" in sidebar of loop-player to 2
  3413. set score " &6Help" in sidebar of loop-player to 3
  3414. set score " " in sidebar of loop-player to 4
  3415. set {_Score} to 5
  3416. loop {Sc::*}:
  3417. if {Sc::%loop-index%} is true:
  3418. set score " &8⫸ &7%{Sc::%loop-index%::name}%" in sidebar of loop-player to {_Score}
  3419. add 1 to {_Score}
  3420. if {_Score} is equal to 5:
  3421. set score " &8⫸ &7Vanilla+" in sidebar of loop-player to {_Score}
  3422. add 1 to {_Score}
  3423. set score " &6Scenarios" in sidebar of loop-player to {_Score}
  3424. add 1 to {_Score}
  3425. set score " " in sidebar of loop-player to {_Score}
  3426. add 1 to {_Score}
  3427. set score " &6Teams &8⫸ &7%{TeamsNumbersName}%" in sidebar of loop-player to {_Score}
  3428. add 1 to {_Score}
  3429. set score " " in sidebar of loop-player to {_Score}
  3430. add 1 to {_Score}
  3431.  
  3432.  
  3433. command /scenarios [<text>]:
  3434. aliases: sc, scenario, scen
  3435. trigger:
  3436. set {_access} to false
  3437. if {Host::%player%} is true:
  3438. set {_access} to true
  3439. else if player is op:
  3440. set {_access} to true
  3441. if {_access} is true:
  3442. if {UHCStart} is not true:
  3443. if arg 1 is not set:
  3444. open chest with 3 row named "&8⫸ &4Scénarios" to player
  3445. wait 1 tick
  3446. if {Sc::goldenretriever} is true:
  3447. format slot 0 of player with enchanted golden apple named "&8⫸ &7Golden Retriever: &aON" with lore "&6Leave a golden apple to the ground||&6when a player dies." to run [make player execute command "/scenarios goldenretriever"]
  3448. else:
  3449. format slot 0 of player with golden apple item named "&8⫸ &7Golden Retriever: &cOFF" with lore "&6Leave a golden apple to the ground||&6when a player dies." to run [make player execute command "/scenarios goldenretriever"]
  3450. if {Sc::barebones} is true:
  3451. format slot 1 of player with shiny iron block named "&8⫸ &7Barebones: &aON" with lore "&6The Nether is disabled, and iron is the highest tier||&6you can obtain through gearing up. When a player||&6dies, they will drop 1 diamond, 1 golden apple,||&632 arrows, and 2 string.You cannot craft an enchantment||&6table, anvil, or golden apple. Mining any ore except coal||&6or iron will drop an iron ingot." to run [make player execute command "/scenarios barebones"]
  3452. else:
  3453. format slot 1 of player with iron block named "&8⫸ &7Barebones: &cOFF" with lore "&6The Nether is disabled, and iron is the highest tier||&6you can obtain through gearing up. When a player||&6dies, they will drop 1 diamond, 1 golden apple,||&632 arrows, and 2 string.You cannot craft an enchantment||&6table, anvil, or golden apple. Mining any ore except coal||&6or iron will drop an iron ingot." to run [make player execute command "/scenarios barebones"]
  3454. if {Sc::rush} is true:
  3455. format slot 2 of player with shiny clock named "&8⫸ &7Rush: &aON" with lore "&6Only for appearance." to run [make player execute command "/scenarios rush"]
  3456. else:
  3457. format slot 2 of player with clock named "&8⫸ &7Rush: &cOFF" with lore "&6Only for appearance." to run [make player execute command "/scenarios rush"]
  3458. else:
  3459. if arg 1 is equal to "goldenretriever":
  3460. if {Sc::goldenretriever} is true:
  3461. set {Sc::goldenretriever} to false
  3462. execute command "/updatescoreboard"
  3463. make player execute command "/scenarios"
  3464. else:
  3465. set {Sc::goldenretriever} to true
  3466. execute command "/updatescoreboard"
  3467. make player execute command "/scenarios"
  3468. else if arg 1 is equal to "barebones":
  3469. if {Sc::barebones} is true:
  3470. set {Sc::barebones} to false
  3471. execute command "/updatescoreboard"
  3472. make player execute command "/scenarios"
  3473. else:
  3474. set {Sc::barebones} to true
  3475. execute command "/updatescoreboard"
  3476. make player execute command "/scenarios"
  3477. else if arg 1 is equal to "rush":
  3478. if {Sc::rush} is true:
  3479. set {Sc::rush} to false
  3480. execute command "/updatescoreboard"
  3481. make player execute command "/scenarios"
  3482. else:
  3483. set {Sc::rush} to true
  3484. execute command "/updatescoreboard"
  3485. make player execute command "/scenarios"
  3486. else:
  3487. open chest with 1 row named "&8⫸ &4Scénarios" to player
  3488. wait 1 tick
  3489.  
  3490. command /tell [<text>] [<text>]:
  3491. aliases: msg, w
  3492. trigger:
  3493. if {msg} is true:
  3494. if arg 1 is not set:
  3495. send "&a&lUHC &8⫸ &7Usage: /msg <player> <message>"
  3496. else if arg 2 is not set:
  3497. make command sender execute command "/msg"
  3498. else:
  3499. set {_player} to ("%arg 1%" parsed as offlineplayer)
  3500. if {_player} is online:
  3501. if {_player} is command sender:
  3502. send "&a&lUHC &8⫸ &7You can not send messages to yourself." to command sender
  3503. else:
  3504. send "&6Private&8 | &r%{chatname::%{_player}%}% &r&c⫷ &7%arg 2%" to command sender
  3505. send "&6Private&8 | &r%{chatname::%player%}% &r&a⫸ &7%arg 2%" to {_player}
  3506. set {lastmsg::%{_player}%} to "%command sender%"
  3507. else:
  3508. send "&a&lUHC &8⫸ &7That player is not online." to command sender
  3509. else:
  3510. send "&a&lUHC &8⫸ &7Private messages are disabled."
  3511.  
  3512. command /r [<text>]:
  3513. trigger:
  3514. if {msg} is true:
  3515. if arg 1 is set:
  3516. if {lastmsg::%command sender%} is set:
  3517. set {_player} to ("%{lastmsg::%command sender%}%" parsed as offlineplayer)
  3518. send "&6Private&8 | &r%{chatname::%{_player}%}% &r&c⫷ &7%arg 1%" to command sender
  3519. send "&6Private&8 | &r%{chatname::%player%}% &r&a⫸ &7%arg 1%" to {_player}
  3520. set {lastmsg::%{_player}%} to "%command sender%"
  3521. else:
  3522. send "&a&lUHC &8⫸ &7You do not receive any message you can answer."
  3523. else:
  3524. send "&a&lUHC &8⫸ &7Usage: /r <message>"
  3525. else:
  3526. send "&a&lUHC &8⫸ &7Private messages are disabled."
  3527.  
  3528. command /lobby:
  3529. trigger:
  3530. set {_access} to false
  3531. if {Staff::%player%} is true:
  3532. set {_access} to true
  3533. else if player is op:
  3534. set {_access} to true
  3535. if {_access} is true:
  3536. if player is not in "lobby":
  3537. set slot 4 of player to shiny paper named "&b&lThe Rules &r&7(Right-Click)" with lore "&fClick to see the rules."
  3538. if {TeamsStatus} is true:
  3539. set slot 8 of player to 1 of shiny name tag named "&6&lThe Teams &r&7(Right-Click)" with lore "&fClick to see the teams."
  3540. else:
  3541. set slot 8 of player to air
  3542. set the player's gamemode to adventure
  3543. set the saturation of player to 20
  3544. set the food level of player to 20
  3545. teleport player to location (0.5, 102.5, 0.5) in the world "lobby"
  3546. else:
  3547. if {Spec::%player%} is set:
  3548. set the gamemode of player to spectator
  3549. set {Spec::%player%} to "%player%"
  3550. teleport player to location (0, 100, 0) in world "world"
  3551. else:
  3552. send "&a&lUHC &8⫸ &7You are playing."
  3553. else:
  3554. send "Unknown command." to command sender
  3555.  
  3556. command /jump [<text>]:
  3557. trigger:
  3558. set {_access} to false
  3559. if {Staff::%player%} is true:
  3560. set {_access} to true
  3561. else if player is op:
  3562. set {_access} to true
  3563. if {_access} is true:
  3564. if arg 1 is not set:
  3565. if player is in "lobby":
  3566. open chest with 1 rows named "&8⫸ &4Jump" to player
  3567. wait 1 tick
  3568. format slot 0 of player with shiny golden pressure plate named "&6Start" with lore "&fReceive a pressure plate||&fof start of jump." to run [give a golden pressure plate named "&6Start" to player]
  3569. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3570. format slot 2 of player with shiny golden pressure plate named "&6Checkpoint" with lore "&fReceive a pressure plate||&fof checkpoint of jump." to run [give a golden pressure plate named "&6Checkpoint" to player]
  3571. format slot 3 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3572. format slot 4 of player with shiny golden pressure plate named "&6End" with lore "&fReceive a pressure plate||&fof end of jump." to run [give a golden pressure plate named "&6End" to player]
  3573. format slot 5 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3574. format slot 6 of player with redstone dust named "&cReset" to close then run [make player execute command "/jump reset"]
  3575. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3576. format slot 8 of player with barrier named "&8⫸ &cClose" to close
  3577. else:
  3578. send "&a&lJump &r&8⫸ &7You can only place jump in the lobby." to command sender
  3579. else if arg 1 is equal to "reset":
  3580. set block at {jump::start} to air
  3581. delete holo object "start"
  3582. delete {jump::start}
  3583. set block at {jump::end} to air
  3584. delete holo object "end"
  3585. delete {jump::end}
  3586. loop {jump.cp::*}:
  3587. set block at {jump.cp::%loop-index%} to air
  3588. delete holo object "cp%loop-index%"
  3589. delete {jump.cp::*}
  3590. delete {cp}
  3591.  
  3592. else:
  3593. send "Commande inconnue." to command sender
  3594.  
  3595. on place of golden pressure plate:
  3596. if name of the tool of player is "&6Start":
  3597. set {_access} to false
  3598. if {Staff::%player%} is true:
  3599. set {_access} to true
  3600. else if player is op:
  3601. set {_access} to true
  3602. if {_access} is true:
  3603. if {jump::start} is set:
  3604. set block at {jump::start} to air
  3605. delete holo object "start"
  3606. set {jump::start} to location of event-block
  3607. create holo object "&6Start" with id "start" at location 0.5 meter over event-block
  3608. else:
  3609. cancel event
  3610. else if name of the tool of player is "&6End":
  3611. set {_access} to false
  3612. if {Staff::%player%} is true:
  3613. set {_access} to true
  3614. else if player is op:
  3615. set {_access} to true
  3616. if {_access} is true:
  3617. if {jump::end} is set:
  3618. set block at {jump::end} to air
  3619. delete holo object "end"
  3620. set {jump::end} to location of event-block
  3621. create holo object "&6End" with id "end" at location 0.5 meter over event-block
  3622. else:
  3623. cancel event
  3624. else if name of the tool of player is "&6Checkpoint":
  3625. set {_access} to false
  3626. if {Staff::%player%} is true:
  3627. set {_access} to true
  3628. else if player is op:
  3629. set {_access} to true
  3630. if {_access} is true:
  3631. if {cp} is not set:
  3632. set {jump.cp::1} to location of event-block
  3633. create holo object "&6Checkpoint 1" with id "cp1" at location 0.5 meter over event-block
  3634. set {cp} to 2
  3635. else:
  3636. set {jump.cp::%{cp}%} to location of event-block
  3637. create holo object "&6Checkpoint %{cp}%" with id "cp%{cp}%" at location 0.5 meter over event-block
  3638. add 1 to {cp}
  3639. else:
  3640. cancel event
  3641.  
  3642. on break of golden pressure plate:
  3643. if {jump::start} is equal to location of event-block:
  3644. set {_access} to false
  3645. if {Staff::%player%} is true:
  3646. set {_access} to true
  3647. else if player is op:
  3648. set {_access} to true
  3649. if {_access} is true:
  3650. if {jump::start} is set:
  3651. delete holo object "start"
  3652. delete {jump::start}
  3653. else:
  3654. cancel event
  3655. if {jump::end} is equal to location of event-block:
  3656. set {_access} to false
  3657. if {Staff::%player%} is true:
  3658. set {_access} to true
  3659. else if player is op:
  3660. set {_access} to true
  3661. if {_access} is true:
  3662. if {jump::end} is set:
  3663. delete {jump::end}
  3664. delete holo object "end"
  3665. else:
  3666. cancel event
  3667. else:
  3668. loop {jump.cp::*}:
  3669. if {jump.cp::%loop-index%} is equal to location of event-block:
  3670. set {_cp} to loop-index
  3671. stop loop
  3672. if {_cp} is set:
  3673. set {_access} to false
  3674. if {Staff::%player%} is true:
  3675. set {_access} to true
  3676. else if player is op:
  3677. set {_access} to true
  3678. if {_access} is true:
  3679. loop {jump.cp::*}:
  3680. set {_1} to ("%loop-index%" parsed as integer)
  3681. set {_2} to (("%{_cp}%" parsed as integer) - 1)
  3682. if ("%loop-index%" parsed as integer) is greater than (("%{_cp}%" parsed as integer) - 1):
  3683. set block at {jump.cp::%loop-index%} to air
  3684. delete holo object "cp%loop-index%"
  3685. delete {jump.cp::%loop-index%}
  3686. set {cp} to ("%{_cp}%" parsed as integer)
  3687. else:
  3688. cancel event
  3689.  
  3690. on stepping on a pressure plate:
  3691. if player is in world "lobby":
  3692. if event-location is equal to {jump::start}:
  3693. if {jump-user::%player%} is not set:
  3694. set {jump-user::%player%} to 0
  3695. send "&a&lJump &r&8⫸ &7You begin the jump." to player
  3696. send "&a&lJump &r&8⫸ &7You can use &6/leave &7to leave the jump." to player
  3697. else if event-location is equal to {jump::end}:
  3698. teleport player to location (0, 102, 0) in world "lobby"
  3699. delete {jump-user::%player%}
  3700. send "&a&lJump &r&8⫸ &7Congratulations you have finished the jump !" to player
  3701. else:
  3702. loop {jump.cp::*}:
  3703. if {jump.cp::%loop-index%} is equal to event-location:
  3704. if {jump-user::%player%} is set:
  3705. if ("%loop-index%" parsed as integer) is equal to ({jump-user::%player%} + 1):
  3706. set {jump-user::%player%} to ("%loop-index%" parsed as integer)
  3707. send "&a&lJump &r&8⫸ &7You have activated the &6Checkpoint %loop-index%&7." to player
  3708. stop loop
  3709.  
  3710.  
  3711. command /leave:
  3712. trigger:
  3713. if player is in world "lobby":
  3714. if {jump-user::%player%} is set:
  3715. teleport player to location (0, 102, 0) in world "lobby"
  3716. delete {jump-user::%player%}
  3717. send "&a&lJump &r&8⫸ &7You have left the jump." to player
  3718. else:
  3719. send "&a&lJump &r&8⫸ &7You did not start the jump." to player
  3720. else:
  3721. send "Unknown command." to command sender
  3722.  
  3723. command /inv [<text>]:
  3724. trigger:
  3725. set {_access} to false
  3726. if {Staff::%player%} is true:
  3727. set {_access} to true
  3728. else if player is op:
  3729. set {_access} to true
  3730. if {_access} is true:
  3731. if {Spec::%player%} is set:
  3732. send "&a&lUHC &r&8⫸ &7La triche, c'est mal." to player
  3733. else:
  3734. if arg 1 is not set:
  3735. send "&a&lUHC &r&8⫸ &7Usage: /inv <player>." to player
  3736. else:
  3737. set {_player} to ("%arg 1%" parsed as offlineplayer)
  3738. if {_player} is online:
  3739. if command sender is op:
  3740. open the inventory of {_player} to the player
  3741. else:
  3742. close inventory of {_player}
  3743. open chest with 5 rows named "&8⫸ Inv: &4%{_player}%" to player
  3744. wait 1 tick
  3745. format slot 0 of player with slot 9 of {_player} to be unstealable
  3746. format slot 1 of player with slot 10 of {_player} to be unstealable
  3747. format slot 2 of player with slot 11 of {_player} to be unstealable
  3748. format slot 3 of player with slot 12 of {_player} to be unstealable
  3749. format slot 4 of player with slot 13 of {_player} to be unstealable
  3750. format slot 5 of player with slot 14 of {_player} to be unstealable
  3751. format slot 6 of player with slot 15 of {_player} to be unstealable
  3752. format slot 7 of player with slot 16 of {_player} to be unstealable
  3753. format slot 8 of player with slot 17 of {_player} to be unstealable
  3754. format slot 9 of player with slot 18 of {_player} to be unstealable
  3755. format slot 10 of player with slot 19 of {_player} to be unstealable
  3756. format slot 11 of player with slot 20 of {_player} to be unstealable
  3757. format slot 12 of player with slot 21 of {_player} to be unstealable
  3758. format slot 13 of player with slot 22 of {_player} to be unstealable
  3759. format slot 14 of player with slot 23 of {_player} to be unstealable
  3760. format slot 15 of player with slot 24 of {_player} to be unstealable
  3761. format slot 16 of player with slot 25 of {_player} to be unstealable
  3762. format slot 17 of player with slot 26 of {_player} to be unstealable
  3763. format slot 18 of player with slot 27 of {_player} to be unstealable
  3764. format slot 19 of player with slot 28 of {_player} to be unstealable
  3765. format slot 20 of player with slot 29 of {_player} to be unstealable
  3766. format slot 21 of player with slot 30 of {_player} to be unstealable
  3767. format slot 22 of player with slot 31 of {_player} to be unstealable
  3768. format slot 23 of player with slot 32 of {_player} to be unstealable
  3769. format slot 24 of player with slot 33 of {_player} to be unstealable
  3770. format slot 25 of player with slot 34 of {_player} to be unstealable
  3771. format slot 26 of player with slot 35 of {_player} to be unstealable
  3772. format slot 27 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3773. format slot 28 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3774. if slot 39 of {_player} is equal to air:
  3775. format slot 29 of player with redstone dust named "&8⫸ &cNo Helmet" to be unstealable
  3776. else:
  3777. format slot 29 of player with slot 39 of {_player} to be unstealable
  3778. if slot 38 of {_player} is equal to air:
  3779. format slot 30 of player with redstone dust named "&8⫸ &cNo Chestplate" to be unstealable
  3780. else:
  3781. format slot 30 of player with slot 38 of {_player} to be unstealable
  3782. if slot 37 of {_player} is equal to air:
  3783. format slot 31 of player with redstone dust named "&8⫸ &cNo Leggings" to be unstealable
  3784. else:
  3785. format slot 31 of player with slot 37 of {_player} to be unstealable
  3786. if slot 36 of {_player} is equal to air:
  3787. format slot 32 of player with redstone dust named "&8⫸ &cNo Boots" to be unstealable
  3788. else:
  3789. format slot 32 of player with slot 36 of {_player} to be unstealable
  3790. format slot 33 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3791. format slot 34 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3792. format slot 35 of player with barrier named "&8⫸ &cClose" to close
  3793. format slot 36 of player with slot 0 of {_player} to be unstealable
  3794. format slot 37 of player with slot 1 of {_player} to be unstealable
  3795. format slot 38 of player with slot 2 of {_player} to be unstealable
  3796. format slot 39 of player with slot 3 of {_player} to be unstealable
  3797. format slot 40 of player with slot 4 of {_player} to be unstealable
  3798. format slot 41 of player with slot 5 of {_player} to be unstealable
  3799. format slot 42 of player with slot 6 of {_player} to be unstealable
  3800. format slot 43 of player with slot 7 of {_player} to be unstealable
  3801. format slot 44 of player with slot 8 of {_player} to be unstealable
  3802. else:
  3803. send "&a&lUHC &r&8⫸ &7This player is not online." to player
  3804. else:
  3805. send "Unknown command." to command sender
  3806.  
  3807. on any move:
  3808. if player is in world "lobby":
  3809. if {jump-user::%player%} is set:
  3810. if (y coord of player) is smaller than 80:
  3811. if {jump-user::%player%} is equal to 0:
  3812. teleport player to location (-24, 101, 0) in world "lobby"
  3813. else if {jump.cp::%{jump-user::%player%}%} is set:
  3814. teleport player to {jump.cp::%{jump-user::%player%}%}
  3815. else:
  3816. teleport player to location (0, 102, 0) in world "lobby"
  3817. else:
  3818. if (y coord of player) is smaller than 100:
  3819. teleport player to location (0, 102, 0) in world "lobby"
  3820.  
  3821. on rightclick on a player:
  3822. if {invOpen::%player%} is not set:
  3823. if {UHCStart} is not true:
  3824. if {TeamsStatus} is true:
  3825. set {inviteConfirm::%player%} to true
  3826. set {invOpen::%player%} to true
  3827. open chest with 1 row named "&8⫸ Invite &4%clicked player%" to player
  3828. wait 1 tick
  3829. format slot 0 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3830. format slot 1 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3831. format slot 2 of player with light green stained clay named "&8⫸ &7Invite &6%clicked player%" to close then run [make player execute command "/team invite %clicked player%"]->[delete {inviteConfirm::%player%}]
  3832. format slot 3 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3833. format slot 4 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3834. format slot 5 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3835. format slot 6 of player with red stained clay named "&8⫸ &cCancel" to close then run [delete {inviteConfirm::%player%}]
  3836. format slot 7 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3837. format slot 8 of player with gray stained glass pane named "&7{@name}" to be unstealable
  3838. loop 20 times:
  3839. if {inviteConfirm::%player%} is true:
  3840. set {_clickedPlayer} to ("%clicked player%" parsed as offlineplayer)
  3841. if {_clickedPlayer} is offline:
  3842. close inventory of player
  3843. delete {inviteConfirm::%player%}
  3844. wait 1 second
  3845. if {inviteConfirm::%player%} is true:
  3846. close inventory of player
  3847. delete {inviteConfirm::%player%}
  3848.  
  3849. command /host [<text>]:
  3850. trigger:
  3851. if player is op:
  3852. if arg 1 is not set:
  3853. send "&a&lUHC &r&8⫸ &7Usage of /host:" to command sender
  3854. send "&8⫸ &f/host <player> &7- &oAdd staff member." to command sender
  3855. send "&8⫸ &f/host reset &7- &oRemove all staff members." to command sender
  3856. else if arg 1 is equal to "reset":
  3857. if {Host} is not set:
  3858. send "&a&lHost &r&8⫸ &7There are no hosts." to command sender
  3859. else:
  3860. delete {Host::*}
  3861. delete {Host}
  3862. send "&a&lHost &r&8⫸ &7The host as been removed." to command sender
  3863. execute command "/updatescoreboard"
  3864. else:
  3865. set {_player} to ("%arg 1%" parsed as offlineplayer)
  3866. if {Host} is set:
  3867. send "&a&lHost &r&8⫸ &6%{Host}% &7is already the host, please use &6/host reset&7." to command sender
  3868. else:
  3869. if {_player} is online:
  3870. set {Host::%{_player}%} to true
  3871. set {Host} to {_player}
  3872. send "&a&lHost &r&8⫸ &6%{_player}% &7is the host for the next UHC." to command sender
  3873. execute command "/updatescoreboard"
  3874. else:
  3875. send "&a&lHost &r&8⫸ &6%{_player}% &7is not online." to command sender
  3876. else:
  3877. send "Unknown command." to command sender
  3878.  
  3879. command /helpop [<text>]:
  3880. trigger:
  3881. if arg 1 is not set:
  3882. send "&a&lUHC &r&8⫸ &7Usage: /helpop <message>" to command sender
  3883. else:
  3884. set {_host} to ("%{Host}%" parsed as offlineplayer)
  3885. send "&a&lHelp &r&8⫸ &7From: &6%command sender%" to {_host}
  3886. send "&a&lHelp &r&8⫸ &7%arg 1%" to {_host}
  3887.  
  3888. command /mute [<text>]:
  3889. trigger:
  3890. set {_access} to false
  3891. if {Staff::%player%} is true:
  3892. set {_access} to true
  3893. else if player is op:
  3894. set {_access} to true
  3895. if {_access} is true:
  3896. if arg 1 is not set:
  3897. send "&a&lUHC &r&8⫸ &7Usage: /mute <player>" to command sender
  3898. else if arg 1 is equal to "reset":
  3899. delete {mute::*}
  3900. send "&a&lUHC &r&8⫸ &7All players unmuted." to command sender
  3901. else:
  3902. set {_arg1} to ("%arg 1%" parsed as offlineplayer)
  3903. if {_arg1} is online:
  3904. if {mute::%{_arg1}%} is set:
  3905. delete {mute::%{_arg1}%}
  3906. send "&a&lUHC &r&8⫸ &6%{_arg1}% &7is unmuted." to command sender
  3907. else:
  3908. set {mute::%{_arg1}%} to true
  3909. send "&a&lUHC &r&8⫸ &6%{_arg1}% &7is muted." to command sender
  3910. else:
  3911. send "&a&lUHC &r&8⫸ &6%{_arg1}% &7is not online." to command sender
  3912. else:
  3913. send "Unknown command." to command sender
  3914.  
  3915. command /pregen <number>:
  3916. trigger:
  3917. if player is op:
  3918. execute player command "/tp %player% 0 100 0"
  3919. wait 1 second
  3920. execute player command "/wb shape square"
  3921. wait 1 second
  3922. execute player command "/wb set <arg-1>"
  3923. wait 1 second
  3924. execute player command "/wb fill 60"
  3925. wait 1 second
  3926. execute player command "/wb fill confirm"
  3927. else:
  3928. send "Unknown command." to command sender
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement