Advertisement
Guest User

Untitled

a guest
Sep 14th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.98 KB | None | 0 0
  1.  
  2. options:
  3. plugin-version: 2.6.6
  4.  
  5.  
  6.  
  7. # This Skript currently supports Minecraft versions 1.12 and 1.11 (1.8 is currently not supported but the Skript might support it in the future)
  8. # ● SETTINGS ●
  9. #
  10.  
  11. prefix: &a&lLeaf &6&lSKYWARS &e&l» &7
  12. ingamecommands: "leave" or "lobby" or "hub" or "msg" or "tell" or "w" or "sw" or "helpop" or "server"
  13. glassid: stained_glass:13
  14. winnerhologram: true
  15. explosioneffect: false
  16. usebowdamagemsg: true
  17.  
  18. #Timers
  19. waitingtime: 30 #cage time (In seconds)
  20. gameminutes: 10 #in game max time (In minutes)
  21. refillminute: 3 # will refill chests after 3 minutes from game start. (In minutes)
  22. fullarenacooldown: 5 #seconds before arena starts when is full (minimum "5") (In seconds)
  23.  
  24. #Points
  25. pointsperkill: 5
  26. pointsperwin: 20
  27. losepoints: 0
  28. allownegativepoints: false
  29.  
  30. #Chat
  31. specchat: "&c&lSPEC &c&l» &8&l[&e%{sw.stats.points.%uuid of player%}%&8&l] %colored player's prefix% &7%player% &8&l» &7 %message%"
  32. normalchat: "&8&l[&e%{sw.stats.points.%uuid of player%}%&8&l] %colored player's prefix% &7%player% &8&l» &7 %message%"
  33.  
  34.  
  35.  
  36.  
  37.  
  38. #
  39. # ● SCOREBOARD ●
  40. #
  41.  
  42. websitename: &b&lEXAMPLE.COM
  43.  
  44.  
  45.  
  46. #
  47. # ● GAME STAGE NAMES ●
  48. #
  49.  
  50. waiting: &7&lWaiting
  51. ingame: &cIn-Game
  52. starting: &7&lStarting
  53. refill: &aRefill
  54. restarting: &c&lEnding
  55. full: &c&lFULL
  56.  
  57.  
  58. #
  59. # ● TITLES ●
  60. #
  61.  
  62. winnertitle: &6&lVICTORY!
  63. winnersubtitle: &7You are the last man standing!
  64. deathtitle: &c&lYOU ARE DEAD
  65. deathsubtitle: &7You are now a spectator
  66. chestrefilltile: &6&lChests have been refilled
  67. dragonspawntitle: &5&lDRAGON SPAWNED!
  68. startingsubtitle: &ePrepare for fight
  69.  
  70.  
  71.  
  72. # ● MESSAGES ●
  73.  
  74. startmessage: &a&lGAME STARTED, GOOD LUCK!
  75.  
  76. joinmessage: &6&l» &5%colored player's prefix% &7%player% &7has joined the game
  77.  
  78. leavemessage: &3&l» %colored player's prefix% &7%player% &7has left the game
  79.  
  80. hasbeenkilled: &6&l» %colored {_victim}'s prefix% &7%{_victim}% &chas been killed by %colored {_attacker}'s prefix% &7%{_attacker}%
  81.  
  82. unknownkilled: &6&l» %colored {_victim}'s prefix% &7%{_victim}% &7died we don't know why.
  83.  
  84. suicide: &6&l» %colored victim's prefix% &7%victim% &ccommitted suicide.
  85.  
  86. playersleft: &7players remaining!
  87.  
  88. chestrefill: &7&lChests have been refilled!
  89.  
  90. minutesremain: &5&lMinutes remaining until game ends.
  91.  
  92. notinarenaregion: &7You are not in arena region, you will start to get &c&ldamage&7!
  93.  
  94. bowdamage: &7%victim% is now &c%health of victim% ♥
  95.  
  96. lobbylocation: &c&lSETUP &e&l» &7Lobby location successfully set!
  97.  
  98. dragonspawnmessage: &5&lDRAGON SPAWNED!
  99.  
  100. dragonname: &5RUNNNN!
  101.  
  102. winnerhologramtext: &7&lAND THE WINNER IS %colored {_p}'s prefix% &7%{_p}% &c&l!
  103.  
  104. errormessage: &8&l● &3Error 5.0.2
  105.  
  106. noarenasavailable: &7No arenas available for now!
  107.  
  108. cannotchangelobbylocation: &cYou can't change the Lobby location while playing!
  109.  
  110. errorfound: {@prefix} Error found!
  111.  
  112. arenafull: &cThis arena is full of players!
  113.  
  114. arenaingame: &cThis arena is currently in progress!
  115.  
  116. arenarestarting: &cThis arena is currently being restarted!
  117.  
  118. arenanotsaved: &cThis arena hasn't been saved!
  119.  
  120. arenadoesntexist: &cThis arena doesn't exist!
  121.  
  122. cannotdowhileplaying: &cYou can't do this while playing!
  123.  
  124. missingadminpermission: &cYou don't have enough permissions to execute this command! Permission: &asw.admin
  125.  
  126.  
  127. #
  128. # ● ITEM NAMES ●
  129. #
  130.  
  131. teleporteritem: compass
  132. teleporteritemname: &a&lTeleporter
  133.  
  134. leaveitem: magma_cream
  135. leaveitemname: &6&lLeave The Game
  136.  
  137. playagainitem: paper
  138. playagainitemname: &6&lPlay Again
  139.  
  140. addspawnitem: green clay
  141. addspawnitemname: &aADD SPAWN
  142.  
  143. #
  144. # ● SIGNS ●
  145. #
  146.  
  147. signline1: &6&lSKYWARS
  148.  
  149. autojoinline: &c&lPlay
  150.  
  151. menuline: &3&lArenas
  152.  
  153. #
  154. # ● GUIS ●
  155. #
  156.  
  157. arenasguiname: SKYWARS ARENAS
  158.  
  159. specgui: TELEPORT TO
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169. on skript load:
  170. clear {SW.OP::*}
  171. clear {SW.NORMAL::*}
  172. wait 1 seconds
  173.  
  174.  
  175. #
  176. # ● CHEST ITEMS » NORMAL ●
  177. #
  178. add 1 iron_sword, lava_bucket, water_bucket, stone_sword, stone_pickaxe, iron_pickaxe, iron_axe, 16 dark oak planks, 24 dark oak planks, 32 dark oak planks, 16 stone, 24 stone, 32 stone, 1 golden_apple, 1 golden_apple,1 fishing_rod, 16 snowball, 16 egg, 1 bow, 16 exp_bottle, 6 cooked_beef, 16 arrows , 1 iron_helmet, 1 iron_chestplate , 1 iron_leggings, 1 iron_boots, 1 diamond_helmet, 1 diamond_chestplate, 1 diamond_leggings and 1 diamond_sword to {SW.NORMAL::*}
  179.  
  180.  
  181. #
  182. # ● CHEST ITEMS » OP ●
  183. #
  184. add 16 stone, bow of power 1, 16 arrows, 1 golden_apple, 16 snowball, 1 ender_pearl, 16 stone, diamond_sword of sharpness, diamond_helmet of protection 1, diamond_boots of protection 1, diamond_leggings of protection 1 and diamond_chestplate of protection 1 to {SW.OP::*}
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. #
  220. # \\ CODE // Don't change anything unless you know what you're doing!!!
  221. #
  222.  
  223.  
  224.  
  225. on load:
  226. send "&7&l--------------------------------------------" to console
  227. send " " to console
  228. send "{@prefix} &aLoading &ev.{@plugin-version}&a..." to console
  229. wait 1 tick
  230. send "{@prefix} &e%size of {sw.arenas::*}% &agames loaded!" to console
  231. wait 1 tick
  232. send "{@prefix} &a&lSkript successfully loaded!" to console
  233. send " " to console
  234. send "&7&l--------------------------------------------" to console
  235.  
  236. on unload:
  237. send "&7&l--------------------------------------------" to console
  238. send " " to console
  239. send "{@prefix} &aDisabling &ev.{@plugin-version}&a..." to console
  240. send "{@prefix} &ev.{@plugin-version} &adisabled!" to console
  241. send " " to console
  242. send "&7&l--------------------------------------------" to console
  243. stop
  244.  
  245.  
  246.  
  247. #
  248. # \\ VARIABLES MANAGER //
  249. #
  250. on join:
  251. set {sw.player.%uuid of player%.playing} to false
  252. if {sw.stats.kills.%uuid of player%} is not set:
  253. set {sw.stats.kills.%uuid of player%} to 0
  254. if {sw.stats.deaths.%uuid of player%} is not set:
  255. set {sw.stats.deaths.%uuid of player%} to 0
  256. if {sw.stats.wins.%uuid of player%} is not set:
  257. set {sw.stats.wins.%uuid of player%} to 0
  258. if {sw.stats.points.%uuid of player%} is not set:
  259. set {sw.stats.points.%uuid of player%} to 0
  260. loop all players:
  261. if loop-player has 1 {@teleporteritem} named "{@teleporteritemname}":
  262. hide loop-player from player
  263.  
  264. #
  265. # \\ CODE // Don't change anything unless you know what you're doing!!
  266. #
  267. command /sw [<text>] [<text>] [<integer>] [<player>]:
  268. executable by: players
  269. trigger:
  270. if text arg 1 is not set:
  271. if text arg 2 is not set:
  272. if integer arg 1 is not set:
  273. if player arg 1 is not set:
  274. if player have permission "sw.player":
  275. make player execute the command "sw help"
  276. else:
  277. send "&cYou don't have enough permissions to execute this command!"
  278. stop
  279. else:
  280. make player execute the command "sw"
  281. stop
  282. else:
  283. make player execute the command "sw"
  284. stop
  285. else:
  286. make player execute the command "sw"
  287. stop
  288. if text arg 1 is "help":
  289. if player have permission "sw.player":
  290. if text arg 2 is not set:
  291. send "&7&l----------------&8[ {@prefix} &8]&7&l----------------"
  292. send "&8&l● &7/sw list "
  293. send "&8&l● &7/sw join &8(&7arena_name&8) "
  294. send "&8&l● &7/sw stats "
  295. send "&8&l● &7/sw autojoin "
  296. send "&8&l● &7/sw leave "
  297. if player have permission "sw.admin":
  298. if text arg 2 is not set:
  299. send "&8&l● &7/sw setlobby "
  300. send "&8&l● &7/sw createArena &8(&7arena_name&8) "
  301. send "&8&l● &7/sw deleteArena &8(&7arena_name&8) "
  302. send "&8&l● &7/sw addSpawn &8(&7arena_name&8) "
  303. send "&8&l● &7/sw removeSpawn &8(&7arena_name&8) "
  304. send "&8&l● &7/sw center &8(&7arena_name&8) "
  305. send "&8&l● &7/sw setHighBound &8(&7arena_name&8) "
  306. send "&8&l● &7/sw setLowBound &8(&7arena_name&8) "
  307. send "&8&l● &7/sw saveArena &8(&7arena_name&8) "
  308. send "&8&l● &7/sw Max &8(&7arena_name&8) &8(&7number&8) "
  309. send "&8&l● &7/sw Min &8(&7arena_name&8) &8(&7number&8) "
  310. send "&8&l● &7/sw resetstats &8(&7player&8) "
  311. send "&7&l---------------------------------------------"
  312. stop
  313. if text arg 2 is "1":
  314. make player execute the command "sw help"
  315. stop
  316. if text arg 1 is "autojoin":
  317. if player have permission "sw.player":
  318. if size of {sw.arenas::*} is not 0:
  319. send "&7Searching for available arenas..."
  320. loop {sw.arenas::*}:
  321. if {sw.arena.%loop-value%.status} is "{@waiting}" or "{@starting}":
  322. send "&7Arena found!"
  323. if {sw.player.%uuid of player%.playing} is true:
  324. if {sw.arena.%{sw.player.%uuid of player%.arena}%.status} is "{@ingame}" or "{@restarting}":
  325. if player has 1 {@playagainitem} named "{@playagainitemname}":
  326. make player execute command "sw leave"
  327. wait 0.1 seconds
  328. make player execute the command "/sw join %loop-value%"
  329. stop loop
  330. stop
  331. else:
  332. send "{@errormessage}"
  333. stop
  334. else:
  335. send "{@errormessage}"
  336. stop
  337. else:
  338. make player execute the command "/sw join %loop-value%"
  339. stop loop
  340. stop
  341.  
  342. else:
  343. send "{@noarenasavailable}"
  344. stop
  345. else:
  346. send "&cYou don't have enough permissions to execute this command! Permission: &asw.player"
  347. stop
  348. if text arg 1 is not "autojoin" or "list" or "setLobby" or "join" or "createArena" or "deleteArena" or "addSpawn" or "removeSpawn" or "center" or "setHighBound" or "setLowBound" or "saveArena" or "max" or "min" or "resetstats" or "stats" or "leave":
  349. make player execute the command "sw"
  350. stop
  351. if text arg 1 is "setlobby":
  352. if player have permission "sw.admin":
  353. if {sw.player.%uuid of player%.playing} is false:
  354. set {sw.lobby} to the player's location
  355. send "{@lobbylocation}"
  356. stop
  357. else:
  358. send "{@cannotchangelobbylocation}"
  359. stop
  360. else:
  361. send "{@missingadminpermission}"
  362. stop
  363. if text arg 1 is "join":
  364. if {sw.player.%uuid of player%.playing} is false:
  365. if text arg 2 is set:
  366. if {sw.arena.%text arg 2%.created} is true:
  367. if {sw.arena.%text arg 2%.saved} is true:
  368. if {sw.arena.%text arg 2%.status} is "{@waiting}" or "{@starting}":
  369. invoke "sw.clearplayer" from player
  370. add 1 to {sw.arena.%text arg 2%.playing}
  371. add player to {sw.arena.%text arg 2%.players.alive::*}
  372. set {sw.player.%uuid of player%.playing} to true
  373. set {sw.player.%uuid of player%.arena} to text arg 2
  374. set {sw.gamekills.%{sw.player.%uuid of player%.arena}%::%player%} to 0
  375. invoke "sw.refreshmenu"
  376. invoke "sw.spawncage" from {sw.arena.%text arg 2%.spawn.%{sw.arena.%text arg 2%.playing}%} and player
  377. set player's slot 8 to {@leaveitem} named "{@leaveitemname}"
  378. send "{@joinmessage} %{sw.arena.%text arg 2%.playing}%&7/%{sw.arena.%text arg 2%.max}%" to {sw.arena.%text arg 2%.players.alive::*}
  379. if {sw.arena.%text arg 2%.playing} = {sw.arena.%text arg 2%.max}:
  380. set {sw.arena.%text arg 2%.status} to "{@full}"
  381. if {sw.arena.%text arg 2%.run} is false:
  382. if {sw.arena.%text arg 2%.playing} = {sw.arena.%text arg 2%.min}:
  383. set {sw.arena.%text arg 2%.run} to true
  384. set {sw.arena.%text arg 2%.status} to "{@starting}"
  385. if {sw.arena.%text arg 2%.playing} = {sw.arena.%text arg 2%.max}:
  386. set {sw.arena.%text arg 2%.status} to "{@full}"
  387. set {sw.arena.%text arg 2%.seconds} to {@fullarenacooldown}
  388. send "{@prefix} Starting in %{sw.arena.%text arg 2%.seconds}% &7seconds!" to {sw.arena.%text arg 2%.players.alive::*}
  389. loop {sw.arena.%text arg 2%.seconds} times:
  390. if {sw.arena.%text arg 2%.playing} is not 0:
  391. remove 1 from {sw.arena.%text arg 2%.seconds}
  392. wait 1 second
  393. if {sw.arena.%text arg 2%.seconds} is 4:
  394. send {sw.arena.%text arg 2%.players.alive::*} title "&c&l3" with subtitle "{@startingsubtitle}" for 0.5 seconds
  395. if {sw.arena.%text arg 2%.seconds} is 3:
  396. send {sw.arena.%text arg 2%.players.alive::*} title "&c&l2" with subtitle "{@startingsubtitle}" for 0.5 seconds
  397. send "{@prefix} Starting 3 seconds!" to {sw.arena.%text arg 2%.players.alive::*}
  398. if {sw.arena.%text arg 2%.seconds} is 2:
  399. send {sw.arena.%text arg 2%.players.alive::*} title "&c&l1" with subtitle "{@startingsubtitle}" for 0.5 seconds
  400. send "{@prefix} Starting 2 seconds!" to {sw.arena.%text arg 2%.players.alive::*}
  401. if {sw.arena.%text arg 2%.seconds} is 1:
  402. send "{@prefix} Starting 1 second!" to {sw.arena.%text arg 2%.players.alive::*}
  403. else:
  404. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  405. set {sw.arena.%text arg 2%.status} to "{@waiting}"
  406. stop loop
  407. if {sw.arena.%text arg 2%.playing} is not 0:
  408. if {sw.arena.%text arg 2%.playing} >= {sw.arena.%text arg 2%.min}:
  409. if {sw.arena.%text arg 2%.playing} is 0:
  410. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  411. set {sw.arena.%text arg 2%.run} to false
  412. set {sw.arena.%text arg 2%.status} to "{@waiting}"
  413. if {sw.arena.%text arg 2%.playing} >= {sw.arena.%text arg 2%.min}:
  414. send "{@startmessage}" to {sw.arena.%text arg 2%.players.alive::*}
  415. loop {sw.arena.%text arg 2%.players.alive::*}:
  416. invoke "sw.clearplayer" from loop-value
  417. invoke "sw.clearcage" from loop-value
  418. wait 1 tick
  419. set {sw.arena.%text arg 2%.run} to false
  420. invoke "sw.gametime" from {sw.player.%uuid of player%.arena}
  421. invoke "sw.refreshmenu"
  422. wait 1 seconds
  423. set {sw.arena.%text arg 2%.status} to "{@ingame}"
  424. else:
  425. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  426. set {sw.arena.%text arg 2%.run} to false
  427. set {sw.arena.%text arg 2%.status} to "{@waiting}"
  428. send "&7There are &c&lnot &7enough players to start!" to {sw.arena.%text arg 2%.players.alive::*}
  429. stop
  430. else:
  431. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  432. set {sw.arena.%text arg 2%.run} to false
  433. set {sw.arena.%text arg 2%.status} to "{@waiting}"
  434. send "&7There are &c&lnot &7enough players to start!" to {sw.arena.%text arg 2%.players.alive::*}
  435. stop
  436. else:
  437. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  438. set {sw.arena.%text arg 2%.run} to false
  439. set {sw.arena.%text arg 2%.status} to "{@waiting}"
  440. stop
  441. stop
  442. if {sw.arena.%text arg 2%.status} is "{@full}":
  443. send "{@arenafull}"
  444. stop
  445. if {sw.arena.%text arg 2%.status} is "{@ingame}":
  446. send "{@arenaingame}"
  447. stop
  448. if {sw.arena.%text arg 2%.status} is "{@restarting}":
  449. send "{@arenarestarting"
  450. stop
  451. else:
  452. send "{@errorfound}"
  453. send "{@errormessage}"
  454. stop
  455. else:
  456. send "{@arenanotsaved}"
  457. stop
  458. else:
  459. send "{@arenadoesntexist}"
  460. stop
  461. else:
  462. send "&cYou must specify an arena name!"
  463. stop
  464. else:
  465. send "&cYou can't execute this command while playing!"
  466. stop
  467. if text arg 1 is "list":
  468. if player have permission "sw.player":
  469. if size of {sw.arenas::*} is not 0:
  470. send "&7Loading arenas..."
  471. set {_sw.list} to 0
  472. if size of {sw.arenas::*} <= 9:
  473. set {_list.size} to 1
  474. if size of {sw.arenas::*} is greater or equal to 9:
  475. set {_list.size} to 2
  476. if size of {sw.arenas::*} is greater or equal to 18:
  477. set {_list.size} to 3
  478. if size of {sw.arenas::*} is greater or equal to 27:
  479. set {_list.size} to 4
  480. if size of {sw.arenas::*} is greater or equal to 36:
  481. set {_list.size} to 5
  482. open virtual chest inventory with size {_list.size} named "{@arenasguiname}" to player
  483. wait 1 tick
  484. loop {sw.arenas::*}:
  485. if {sw.arena.%loop-value%.status} is "{@ingame}" or "{@full}" or "{@restarting}":
  486. make a gui slot {_sw.list} of player with red clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value%||||&8&l» &7Status&8: %{sw.arena.%loop-value%.status}%||||&8&l» &7Players&8: &7%{sw.arena.%loop-value%.playing}%/%{sw.arena.%loop-value%.max}%||||&8&l● &7&lClick to join!" to run player command "sw join %loop-value%"
  487. add 1 to {_sw.list}
  488. else:
  489. make a gui slot {_sw.list} of player with green clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value%||||&8&l» &7Status&8: %{sw.arena.%loop-value%.status}%||||&8&l» &7Players&8: &7%{sw.arena.%loop-value%.playing}%/%{sw.arena.%loop-value%.max}%||||&8&l● &7&lClick to join!" to run player command "sw join %loop-value%"
  490. add 1 to {_sw.list}
  491. stop
  492. else:
  493. send "&cYou haven't created or saved any arenas so there are not any arenas to display!"
  494. stop
  495. if arg-1 is "resetstats":
  496. if player have permission "sw.admin":
  497. if arg-2 is set:
  498. set {_player} to arg-2 parsed as offline player
  499. invoke "sw.resetstats" from {_player}
  500. send "&3&l» &c&lYou reset &c&l%arg-2%&c&l's stats"
  501. else:
  502. send "&3&l» &c&l/sw resetstats <player>"
  503. if text arg 1 is "createArena":
  504. if player have permission "sw.admin":
  505. if text arg 2 is set:
  506. if {sw.player.%uuid of player%.playing} is false:
  507. if {sw.arena.%text arg 2%.created} is not set:
  508. set {sw.arena.%text arg 2%.created} to true
  509. set {sw.arena.%text arg 2%.saved} to false
  510. set {sw.arena.%text arg 2%.spawn.id} to 0
  511. set {sw.arena.%text arg 2%.saving} to false
  512. set {sw.arena.%uuid of player%.creating} to text arg-2
  513. clear player's inventory
  514. send "&c&lSETUP &e&l» &7The arena &a%text arg 2% &7has successfully been created!"
  515. set slot 0 of player to yellow clay named "&cSET HIGHBOUND"
  516. set slot 1 of player to yellow clay named "&cSET LOWBOUND"
  517. set slot 2 of player to {@addspawnitem} named "{@addspawnitemname}"
  518. set slot 3 of player to red clay named "&cREMOVE SPAWN"
  519. set slot 4 of player to clay ball named "&cSET CENTER"
  520. set slot 5 of player to yellow clay named "&cSET MIN PLAYERS"
  521. set slot 6 of player to yellow clay named "&cSET MAX PLAYERS"
  522. set slot 7 of player to green clay named "&7ARENA &c%{sw.arena.%uuid of player%.creating}%"
  523. set slot 8 of player to red clay named "&a&lSAVE ARENA"
  524. stop
  525. else:
  526. send "&cThis arena has already been created!"
  527. stop
  528. else:
  529. send "{@cannotdowhileplaying}"
  530. stop
  531. else:
  532. send "&cYou must specify an arena name!"
  533. stop
  534. else:
  535. send "{@missingadminpermission}"
  536. stop
  537. if text arg 1 is "deleteArena":
  538. if player have permission "sw.admin":
  539. if text arg 2 is set:
  540. if {sw.player.%uuid of player%.playing} is false:
  541. if {sw.arena.%text arg 2%.created} is true:
  542. if {sw.arena.%text arg 2%.playing} is 0:
  543. delete {sw.arena.%text arg 2%.created}
  544. delete {sw.arena.%text arg 2%.saved}
  545. delete {sw.arena.%text arg 2%.status}
  546. delete {sw.arena.%text arg 2%.max}
  547. delete {sw.arena.%text arg 2%.min}
  548. delete {sw.arena.%text arg 2%.spawn.id}
  549. delete {sw.arena.%text arg 2%.playing}
  550. delete {sw.arena.%text arg 2%.players.alive::*}
  551. delete {sw.arena.%text arg 2%.players.death::*}
  552. delete {sw.arena.%text arg 2%.created}
  553. delete {sw.arena.%text arg 2%.saved}
  554. delete {sw.arena.%text arg 2%.spawn.id}
  555. delete {sw.arena.%text arg 2%.center}
  556. delete {sw.arena.%text arg 2%.gametime::*}
  557. delete {sw.gamekills.%text arg 2%::*}
  558. remove text arg 2 from {sw.arenas::*}
  559. send "&c&lSETUP &e&l» &7The arena &c%text arg 2% &7has been successfully deleted!"
  560. stop
  561. else:
  562. send "&cThere are still players playing in the arena!"
  563. stop
  564. else:
  565. send "{arenadoesntexist}"
  566. stop
  567. else:
  568. send "{@cannotdowhileplaying}"
  569. stop
  570. else:
  571. send "&cYou must specify an arena name!"
  572. stop
  573. else:
  574. send "{@missingadminpermission}"
  575. stop
  576. if text arg 1 is "stats":
  577. if player have permission "sw.player":
  578. if arg-2 is not set:
  579. invoke "sw.showstats" from player
  580. else:
  581. invoke "sw.showstats" from player and arg-2
  582. else:
  583. send "&cYou don't have enough permissions to execute this command!"
  584. stop
  585. if text arg 1 is "addSpawn":
  586. if player have permission "sw.admin":
  587. if text arg 2 is set:
  588. if integer arg 1 is not set:
  589. if {sw.player.%uuid of player%.playing} is false:
  590. if {sw.arena.%text arg 2%.created} is true:
  591. add 1 to {sw.arena.%text arg 2%.spawn.id}
  592. set {sw.arena.%text arg 2%.spawn.%{sw.arena.%text arg 2%.spawn.id}%} to location of player
  593. send "&c&lSETUP &e&l» &7Spawn &anº%{sw.arena.%text arg 2%.spawn.id}% &7has been set!"
  594. stop
  595. else:
  596. send "{@arenadoesntexist}"
  597. stop
  598. else:
  599. send "{@cannotdowhileplaying}"
  600. stop
  601. else:
  602. send "&cYou don't need to specify a number!"
  603. stop
  604. else:
  605. send "&cYou must specify an arena name!"
  606. stop
  607. else:
  608. send "{@missingadminpermission}"
  609. stop
  610. if text arg 1 is "removeSpawn":
  611. if player have permission "sw.admin":
  612. if text arg 2 is set:
  613. if integer arg 1 is not set:
  614. if {sw.player.%uuid of player%.playing} is false:
  615. if {sw.arena.%text arg 2%.created} is true:
  616. if {sw.arena.%text arg 2%.spawn.id} is not 0:
  617. send "&c&lSETUP &e&l» &7Spawn &anº%{sw.arena.%text arg 2%.spawn.id}% &7has been deleted!"
  618. delete {sw.arena.%text arg 2%.spawn.%{sw.arena.%text arg 2%.spawn.id}%}
  619. remove 1 from {sw.arena.%text arg 2%.spawn.id}
  620. stop
  621. else:
  622. send "&cThere are no more spawns to remove!"
  623. stop
  624. else:
  625. send "{@arenadoesntexist}"
  626. stop
  627. else:
  628. send "{@cannotdowhileplaying}"
  629. stop
  630. else:
  631. send "&cYou don't need to specify a number!"
  632. stop
  633. else:
  634. send "&cYou must specify an arena name!"
  635. stop
  636. else:
  637. send "{@missingadminpermission}"
  638. stop
  639. if text arg 1 is "center":
  640. if player have permission "sw.admin":
  641. if text arg 2 is set:
  642. if integer arg 1 is not set:
  643. if {sw.player.%uuid of player%.playing} is false:
  644. if {sw.arena.%text arg 2%.created} is true:
  645. set {sw.arena.%text arg 2%.center} to location of player
  646. send "&c&lSETUP &e&l» &7Setted the &aArena Center &7to your current location!"
  647. stop
  648. else:
  649. send "{@arenadoesntexist}"
  650. stop
  651. else:
  652. send "{@cannotdowhileplaying}"
  653. stop
  654. else:
  655. send "&cYou don't need to specify a number!"
  656. stop
  657. else:
  658. send "&cYou must specify an arena name!"
  659. stop
  660. else:
  661. send "{@missingadminpermission}"
  662. stop
  663. if text arg 1 is "setHighBound":
  664. if player have permission "sw.admin":
  665. if text arg 2 is set:
  666. if integer arg 1 is not set:
  667. if {sw.player.%uuid of player%.playing} is false:
  668. if {sw.arena.%text arg 2%.created} is true:
  669. set {sw.arena.%text arg 2%.pos.1} to location of player
  670. make player execute command "//pos2"
  671. send "&c&lSETUP &e&l» &7Setted the &aHigh bound &7to your current location!"
  672. stop
  673. else:
  674. send "{@arenadoesntexist}"
  675. stop
  676. else:
  677. send "{@cannotdowhileplaying}"
  678. stop
  679. else:
  680. send "&cYou don't need to specify a number!"
  681. stop
  682. else:
  683. send "&cYou must specify an arena name!"
  684. stop
  685. else:
  686. send "{@missingadminpermission}"
  687. stop
  688. if text arg 1 is "setLowBound":
  689. if player have permission "sw.admin":
  690. if text arg 2 is set:
  691. if integer arg 1 is not set:
  692. if {sw.player.%uuid of player%.playing} is false:
  693. if {sw.arena.%text arg 2%.created} is true:
  694. set {sw.arena.%text arg 2%.pos.2} to location of player
  695. make player execute command "//pos1"
  696. send "&c&lSETUP &e&l» &7Setted the &aLow bound &7to your current location!"
  697. stop
  698. else:
  699. send "{@arenadoesntexist}"
  700. stop
  701. else:
  702. send "{@cannotdowhileplaying}"
  703. stop
  704. else:
  705. send "&cYou don't need to specify a number!"
  706. stop
  707. else:
  708. send "&cYou must specify an arena name!"
  709. stop
  710. else:
  711. send "{@missingadminpermission}"
  712. stop
  713. if text arg 1 is "saveArena":
  714. if player have permission "sw.admin":
  715. if text arg 2 is set:
  716. if integer arg 1 is not set:
  717. if {sw.player.%uuid of player%.playing} is false:
  718. if {sw.arena.%text arg 2%.created} is true:
  719. if {sw.arena.%text arg 2%.saved} is false:
  720. if {sw.arena.%text arg 2%.pos.1} is set:
  721. if {sw.arena.%text arg 2%.pos.2} is set:
  722. if {sw.arena.%text arg 2%.max} is set:
  723. if {sw.arena.%text arg 2%.min} is set:
  724. if {sw.arena.%text arg 2%.saving} is false:
  725. if {sw.arena.%text arg 2%.spawn.id} = {sw.arena.%text arg 2%.max}:
  726. set {sw.arena.%text arg 2%.saving} to true
  727. send "&7Saving the arena please wait..."
  728. wait 10 ticks
  729. loop blocks within {sw.arena.%text arg 2%.pos.1} to {sw.arena.%text arg 2%.pos.2}:
  730. if loop-block is a chest:
  731. add location of loop-block to {sw.arena.%text arg 2%.SW.NORMAL::*}
  732. wait 7 ticks
  733. if loop-block is a trapped_chest:
  734. add location of loop-block to {sw.arena.%text arg 2%.SW.OP::*}
  735. wait 7 ticks
  736. make player execute command "rb addregion %text arg 2%"
  737. send "&c&lSETUP &e&l» &7The arena &a%text arg 2%&7 has been saved!"
  738. add text arg 2 to {sw.arenas::*}
  739. set {sw.arena.%text arg 2%.saved} to true
  740. set {sw.arena.%text arg 2%.status} to "{@restarting}"
  741. set {sw.arena.%text arg 2%.playing} to 0
  742. set {sw.arena.%text arg 2%.run} to false
  743. set {sw.arena.%text arg 2%.seconds} to {@waitingtime}
  744. set {sw.arena.%text arg 2%.saving} to false
  745. set {sw.arena.%text arg 2%.gametime::minutes} to {@gameminutes} -1
  746. clear player's inventory
  747. clear {sw.arena.%uuid of player%.creating}
  748. wait 1 second
  749. invoke "sw.API.arenaReset" from arg-2
  750. stop
  751. else:
  752. send "&cYou did not set the spawns correctly!"
  753. stop
  754. else:
  755. send "&cThis arena is currently saving!"
  756. stop
  757. else:
  758. send "&cYou need to set the minimum players!"
  759. stop
  760. else:
  761. send "&cYou need to set the maximum players!"
  762. stop
  763. else:
  764. send "&cYou need to set the bounds for the arena!"
  765. stop
  766. else:
  767. send "&cYou need to set the bounds for the arena!"
  768. stop
  769. else:
  770. send "&cYou have already saved this arena!"
  771. stop
  772. else:
  773. send "{@arenadoesntexist}"
  774. stop
  775. else:
  776. send "{@cannotdowhileplaying}"
  777. stop
  778. else:
  779. send "&cYou don't need to specify a number!"
  780. stop
  781. else:
  782. send "&cYou must specify an arena name!"
  783. stop
  784. else:
  785. send "{@missingadminpermission}"
  786. stop
  787. if text arg 1 is "max":
  788. if player have permission "sw.admin":
  789. if text arg 2 is set:
  790. if integer arg 1 is set:
  791. if {sw.player.%uuid of player%.playing} is false:
  792. if {sw.arena.%text arg 2%.created} is true:
  793. if {sw.arena.%text arg 2%.saved} is false:
  794. if integer arg 1 > 0:
  795. set {sw.arena.%text arg 2%.max} to integer arg 1
  796. send "&c&lSETUP &e&l» &7Setted the &amaximum players &7to &a%integer arg 1%&7!"
  797. stop
  798. else:
  799. send "&cYou can't use negative number!"
  800. stop
  801. else:
  802. send "&cThis arena is saved! That means that it is not open to any kind of modifications."
  803. stop
  804. else:
  805. send "{@arenadoesntexist}"
  806. stop
  807. else:
  808. send "{@cannotdowhileplaying}"
  809. stop
  810. else:
  811. send "&cYou must specify a number!"
  812. stop
  813. else:
  814. send "&cYou must specify an arena name!"
  815. stop
  816. else:
  817. send "{@missingadminpermission}"
  818. stop
  819. if text arg 1 is "min":
  820. if player have permission "sw.admin":
  821. if text arg 2 is set:
  822. if integer arg 1 is set:
  823. if {sw.player.%uuid of player%.playing} is false:
  824. if {sw.arena.%text arg 2%.created} is true:
  825. if {sw.arena.%text arg 2%.saved} is false:
  826. if integer arg 1 > 0:
  827. set {sw.arena.%text arg 2%.min} to integer arg 1
  828. send "&c&lSETUP &e&l» &7Setted the &aminimum players &7to &a%integer arg 1%&7!"
  829. stop
  830. else:
  831. send "&cYou can't use negative number!"
  832. stop
  833. else:
  834. send "&cThis arena is saved! That means that it is not open to any kind of modifications."
  835. stop
  836. else:
  837. send "{@arenadoesntexist}"
  838. stop
  839. else:
  840. send "{@cannotdowhileplaying}"
  841. stop
  842. else:
  843. send "&cYou must specify a number!"
  844. stop
  845. else:
  846. send "&cYou must specify an arena name!"
  847. stop
  848. else:
  849. send "{@missingadminpermission}"
  850. stop
  851. if text arg 1 is "leave":
  852. if {sw.player.%uuid of player%.playing} is true:
  853. if {sw.player.%uuid of player%.arena} is set:
  854. invoke "sw.clearplayer" from player
  855. teleport player to {sw.lobby}
  856. remove player from {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*}
  857. remove player from {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  858. remove 1 from {sw.arena.%{sw.player.%uuid of player%.arena}%.playing}
  859. set {sw.player.%uuid of player%.playing} to false
  860. reveal player from all players
  861. reveal all players to player
  862. if {sw.arena.%{sw.player.%uuid of player%.arena}%.status} is not "{@starting}" or "{@full}":
  863. if {sw.arena.%{sw.player.%uuid of player%.arena}%.playing} is 1:
  864. loop {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*}:
  865. invoke "sw.winner" from loop-value
  866. else:
  867. remove player from {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  868. send "{@leavemessage} &7(%{sw.arena.%{sw.player.%uuid of player%.arena}%.playing}%&7/%{sw.arena.%{sw.player.%uuid of player%.arena}%.max}%&7)" to {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  869. invoke "sw.clearplayer" from player
  870. teleport {_p} to {sw.lobby}
  871. reveal player to all players
  872. stop
  873. if {sw.arena.%{sw.player.%uuid of player%.arena}%.status} is "{@starting}" or "{@full}":
  874. set {sw.arena.%{sw.player.%uuid of player%.arena}%.status} to "{@starting}"
  875. if {sw.arena.%{sw.player.%uuid of player%.arena}%.playing} = 0:
  876. set {sw.arena.%{sw.player.%uuid of player%.arena}%.status} to "{@waiting}"
  877.  
  878. else:
  879. if player has 1 {@teleporteritem} named "{@teleporteritemname}":
  880. stop
  881. else:
  882. send "{@leavemessage} &7(%{sw.arena.%{sw.player.%uuid of player%.arena}%.playing}%&7/%{sw.arena.%{sw.player.%uuid of player%.arena}%.max}%&7)" to {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  883. else:
  884. send "{@errorfound}"
  885. send "{@errormessage}"
  886. stop
  887. else:
  888. send "&cYou are not playing in any arenas!"
  889. stop
  890.  
  891.  
  892.  
  893. #
  894. # \\ CHAT //
  895. #
  896.  
  897. on chat:
  898. if {sw.player.%uuid of player%.playing} is true:
  899. cancel event
  900. if player has 1 {@teleporteritem} named "{@teleporteritemname}":
  901. send {@specchat} to {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  902. else:
  903. send {@normalchat} to {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%uuid of player%.arena}%.players.death::*}
  904.  
  905.  
  906. #
  907. # \\ IN-GAME COMMANDS //
  908. #
  909.  
  910. on command:
  911. if {sw.player.%uuid of player%.playing} is true:
  912. if command is {@ingamecommands}:
  913. stop
  914. if player is op:
  915. stop
  916. if player has permission "sw.admin":
  917. stop
  918. if command is "sw autojoin" or "sw":
  919. stop
  920. else:
  921. cancel event
  922. send "{@prefix} You can't use commands in game!"
  923.  
  924.  
  925. #
  926. # \\ SIGNS //
  927. #
  928. on sign change:
  929. if line 1 is "[SW]" or "[SKYWARS]":
  930. if line 2 is set:
  931. if line 2 is "autojoin":
  932. set line 1 to "{@signline1}"
  933. set line 2 to "{@autojoinline}"
  934. send "{@prefix} &7Sign Added"
  935. stop
  936. if line 2 is "arenas":
  937. set line 1 to "{@signline1}"
  938. set line 2 to "{@menuline}"
  939. send "{@prefix} &7Sign Added"
  940. stop
  941.  
  942.  
  943.  
  944.  
  945. on right-click on sign:
  946. if line 1 is "{@signline1}":
  947. if line 2 is "{@autojoinline}":
  948. make player execute the command "/sw autojoin"
  949. stop
  950. if line 2 is "{@menuline}":
  951. make player execute the command "/sw list"
  952. stop
  953. else:
  954. stop
  955.  
  956. #
  957. # \\ OTHER //
  958. #
  959.  
  960.  
  961. on break:
  962. if {sw.player.%uuid of player%.playing} is true:
  963. if {sw.arena.%{sw.player.%uuid of player%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@restarting}" or "{@full}":
  964. cancel event
  965. else:
  966. show mob spawner flames at the location
  967.  
  968.  
  969.  
  970. function spec(s: player,p: player):
  971. set {_suuid} to uuid of {_s}
  972. set {_puuid} to uuid of {_p}
  973. if {sw.player.%{_puuid}%.arena} is {sw.player.%{_suuid}%.arena}:
  974. teleport {_s} to {_p}
  975.  
  976.  
  977. on pickup:
  978. if player has 1 {@teleporteritem} named "{@teleporteritemname}":
  979. cancel event
  980.  
  981.  
  982. on drop:
  983. if {sw.player.%uuid of player%.playing} is true:
  984. if {sw.arena.%{sw.player.%uuid of player%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@full}":
  985. cancel event
  986. else:
  987. if player has 1 {@teleporteritem} named "{@teleporteritemname}":
  988. cancel event
  989.  
  990.  
  991.  
  992. on right click:
  993. if {sw.player.%uuid of player%.playing} is true:
  994. if name of item is "{@teleporteritemname}":
  995. set {_sw.spec} to 0
  996. open virtual chest inventory with size 6 named "{@specgui}" to player
  997. loop {sw.arena.%{sw.player.%uuid of player%.arena}%.players.alive::*}:
  998. wait 1 tick
  999. make a gui slot {_sw.spec} of player with loop-value's skull named "&8&l● %colored loop-value's prefix% %loop-value%" with lore "||&3&l» &e&l● &7&lClick To Teleport||" to run function spec(player,loop-value)
  1000. add 1 to {_sw.spec}
  1001. set {_sw.spec} to 0
  1002. stop
  1003. if name of item is "{@leaveitemname}":
  1004. make player execute command "sw leave"
  1005. stop
  1006. if name of item is "{@playagainitemname}":
  1007. make player execute command "sw autojoin"
  1008. stop
  1009. if {sw.arena.%uuid of player%.creating} is set:
  1010. if name of item is "&cSET HIGHBOUND":
  1011. cancel event
  1012. make player execute command "sw sethighbound %{sw.arena.%uuid of player%.creating}%"
  1013. if name of item is "&cSET LOWBOUND":
  1014. cancel event
  1015. make player execute command "sw setlowbound %{sw.arena.%uuid of player%.creating}%"
  1016. if name of item is "&cSET CENTER":
  1017. cancel event
  1018. make player execute command "sw center %{sw.arena.%uuid of player%.creating}%"
  1019. if name of item is "{@addspawnitemname}":
  1020. cancel event
  1021. make player execute command "sw addspawn %{sw.arena.%uuid of player%.creating}%"
  1022. if name of item is "&cREMOVE SPAWN":
  1023. cancel event
  1024. make player execute command "sw removespawn %{sw.arena.%uuid of player%.creating}%"
  1025. if name of item is "&cSET MIN PLAYERS":
  1026. open virtual chest inventory with size 6 named "SET MIN" to player
  1027. wait 3 ticks
  1028. set {_sw.setplayers} to -1
  1029. loop 55 times:
  1030. make a gui slot {_sw.setplayers} of player with clay ball named "&7&l%loop-value%" with lore "||&8&l● &7&lClick to Set!||" to run player command "sw min %{sw.arena.%uuid of player%.creating}% %loop-value%"
  1031. add 1 to {_sw.setplayers}
  1032. set {_sw.setplayers} to 0
  1033. stop
  1034. if name of item is "&cSET MAX PLAYERS":
  1035. open virtual chest inventory with size 6 named "SET MAX" to player
  1036. wait 3 ticks
  1037. set {_sw.setplayers} to -1
  1038. loop 55 times:
  1039. make a gui slot {_sw.setplayers} of player with clay ball named "&7&l%loop-value%" with lore "||&8&l● &7&lClick to Set!||" to run player command "sw max %{sw.arena.%uuid of player%.creating}% %loop-value%"
  1040. add 1 to {_sw.setplayers}
  1041. set {_sw.setplayers} to 0
  1042. stop
  1043. if name of item is "&a&lSAVE ARENA":
  1044. cancel event
  1045. make player execute command "sw saveArena %{sw.arena.%uuid of player%.creating}%"
  1046. if name of item is "&c&l» &7&lARENA &c&l%{sw.arena.%uuid of player%.creating}%":
  1047. cancel event
  1048.  
  1049.  
  1050.  
  1051.  
  1052. #
  1053. # \\ DEATH EVENT //
  1054. #
  1055.  
  1056. on damage of player:
  1057. if {sw.player.%uuid of victim%.playing} is true:
  1058. if {sw.arena.%{sw.player.%uuid of victim%.arena}%.status} is "{@restarting}" or "{@starting}" or "{@waiting}" or "{@full}":
  1059. cancel event
  1060. else:
  1061. if {sw.player.%uuid of victim%.playing} is set:
  1062. set {_victim} to victim
  1063. set {_attacker} to attacker
  1064. set {lasthit.%{_victim}%} to {_attacker}
  1065. if attacker is a player:
  1066. if {@usebowdamagemsg} is true:
  1067. if projectile exists:
  1068. if projectile is arrow:
  1069. if victim is not dead:
  1070. message "{@prefix} {@bowdamage}" to the attacker
  1071. if damage is greater than or equal to health of victim:
  1072. cancel event
  1073. drop all items in victim's inventory at victim
  1074. remove {_victim} from {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.alive::*}
  1075. remove 1 from {sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}
  1076. add {_victim} to {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.death::*}
  1077. invoke "sw.spec" from {_victim} and attacker
  1078. if {@explosioneffect} is true:
  1079. create a fake explosion at the victim
  1080. send victim title "{@deathtitle}" with subtitle "{@deathsubtitle}" for 4 seconds
  1081. set {_players.total::*} to {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.death::*}
  1082. if attacker is set:
  1083. if attacker is player:
  1084. invoke "sw.deathpoints" from attacker and victim
  1085. send "{@hasbeenkilled}" to {_players.total::*}
  1086. send "&3&l» &c%{sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}% {@playersleft}" to {_players.total::*}
  1087. else:
  1088. send "{@unknownkilled}" to {_players.total::*}
  1089. send "&3&l» &c%{sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}% {@playersleft}" to {_players.total::*}
  1090. else:
  1091. if {lasthit.%victim%} is set:
  1092. if {lasthit.%victim%} is victim:
  1093. send "{@suicide}" to {_players.total::*}
  1094. send "&3&l» &c%{sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}% {@playersleft}" to {_players.total::*}
  1095. else:
  1096. set {_attacker} to {lasthit.%victim%}
  1097. invoke "sw.deathpoints" from {lasthit.%victim%} and victim
  1098. send "{@hasbeenkilled}" to {_players.total::*}
  1099. send "&3&l» &c%{sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}% {@playersleft}" to {_players.total::*}
  1100. else:
  1101. send "{@unknownkilled}" to {_players.total::*}
  1102. send "&3&l» &c%{sw.arena.%{sw.player.%uuid of victim%.arena}%.playing}% {@playersleft}" to {_players.total::*}
  1103.  
  1104. if {sw.arena.%{sw.player.%uuid of victim%.arena}%.playing} is 1:
  1105. if attacker is set:
  1106. if attacker is player:
  1107. invoke "sw.winner" from attacker
  1108. else:
  1109. loop {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.alive::*}:
  1110. invoke "sw.winner" from loop-value-1
  1111. else:
  1112. loop {sw.arena.%{sw.player.%uuid of victim%.arena}%.players.alive::*}:
  1113. invoke "sw.winner" from loop-value-1
  1114.  
  1115.  
  1116. wait 8 seconds
  1117. delete {lasthit.%victim%}
  1118.  
  1119. else:
  1120. stop
  1121.  
  1122.  
  1123.  
  1124.  
  1125. on quit:
  1126. make player execute command "sw leave"
  1127. clear {sw.gamekills.%{sw.player.%uuid of player%.arena}%::%player%}
  1128. if {sw.arena.%uuid of player%.creating} is set:
  1129. clear {sw.arena.%uuid of player%.creating}
  1130. stop
  1131.  
  1132.  
  1133. on load:
  1134. loop {sw.arenas::*}:
  1135. set {sw.arena.%loop-value%.status} to "{@restarting}"
  1136. wait 1 second
  1137. loop {sw.arenas::*}:
  1138. invoke "sw.API.arenaReset" from loop-value
  1139. wait 1 tick
  1140.  
  1141. every 1 seconds:
  1142. loop all players:
  1143. if {sw.player.%uuid of loop-player%.playing} is true:
  1144. if {sw.arena.%{sw.player.%uuid of loop-player%.arena}%.status} is "{@ingame}" or "{@restarting}":
  1145. invoke "sw.checklocation" from loop-player
  1146. if stylish scoreboard "SWGAME-%loop-player%" does not exist:
  1147. create new stylish scoreboard named "SWGAME-%loop-player%"
  1148. loop 14 times:
  1149. create a new id based score "SWGAME-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "SWGAME-%loop-player%"
  1150. wait 3 ticks
  1151. set title of stylish scoreboard "SWGAME-%loop-player%" to "&6&lSKYWARS"
  1152. set stylish scoreboard of loop-player to "SWGAME-%loop-player%"
  1153. set the text of id "SWGAME-%loop-player%Slot14" to "&7&l%now%"
  1154. set the text of id "SWGAME-%loop-player%Slot13" to "&f&l» &fStatus"
  1155. set the text of id "SWGAME-%loop-player%Slot12" to "&6&l• &c&l%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.status}%"
  1156. set the text of id "SWGAME-%loop-player%Slot11" to "&5"
  1157. set the text of id "SWGAME-%loop-player%Slot10" to "&f&l» &fNext Event:"
  1158. set the text of id "SWGAME-%loop-player%Slot9" to "&6&l• %{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.gametime::event.sb}% &c&l%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.gametime::event}%:%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.gametime::seconds}%"
  1159. set the text of id "SWGAME-%loop-player%Slot8" to "&1"
  1160. set the text of id "SWGAME-%loop-player%Slot7" to "&f&l» &fPlayers left: &c&l%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.playing}%"
  1161. set the text of id "SWGAME-%loop-player%Slot6" to "&4"
  1162. set the text of id "SWGAME-%loop-player%Slot5" to "&f&l» &fKills: &c&l%{sw.gamekills.%{sw.player.%uuid of loop-player%.arena}%::%loop-player%}%"
  1163. set the text of id "SWGAME-%loop-player%Slot4" to "&6"
  1164. set the text of id "SWGAME-%loop-player%Slot3" to "&f&l» &fMap: &c&l%{sw.player.%uuid of loop-player%.arena}%"
  1165. set the text of id "SWGAME-%loop-player%Slot2" to "&8"
  1166. set the text of id "SWGAME-%loop-player%Slot1" to "{@websitename}"
  1167. if {sw.arena.%{sw.player.%uuid of loop-player%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@full}":
  1168. if stylish scoreboard "SWLOBBY-%loop-player%" does not exist:
  1169. create new stylish scoreboard named "SWLOBBY-%loop-player%"
  1170. loop 14 times:
  1171. create a new id based score "SWLOBBY-%loop-player%Slot%loop-number%" with text "&%loop-number%" slot loop-number for stylish scoreboard "SWLOBBY-%loop-player%"
  1172. wait 3 ticks
  1173. set title of stylish scoreboard "SWLOBBY-%loop-player%" to "&6&lSKYWARS"
  1174. set stylish scoreboard of loop-player to "SWLOBBY-%loop-player%"
  1175. set the text of id "SWLOBBY-%loop-player%Slot14" to "&5"
  1176. set the text of id "SWLOBBY-%loop-player%Slot13" to "&f&l» &7Status"
  1177. set the text of id "SWLOBBY-%loop-player%Slot12" to "&6&l• %{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.status}%"
  1178. set the text of id "SWLOBBY-%loop-player%Slot11" to "&8&1"
  1179. set the text of id "SWLOBBY-%loop-player%Slot10" to "&f&l» &7Map"
  1180. set the text of id "SWLOBBY-%loop-player%Slot9" to "&6&l• &e%{sw.player.%uuid of loop-player%.arena}%"
  1181. set the text of id "SWLOBBY-%loop-player%Slot8" to "&4&1"
  1182. set the text of id "SWLOBBY-%loop-player%Slot7" to "&f&l» &7Starting in"
  1183. set the text of id "SWLOBBY-%loop-player%Slot6" to "&6&l• &e%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.seconds}%"
  1184. set the text of id "SWLOBBY-%loop-player%Slot5" to "&2"
  1185. set the text of id "SWLOBBY-%loop-player%Slot4" to "&f&l» &7Players"
  1186. set the text of id "SWLOBBY-%loop-player%Slot3" to "&6&l• &e%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.playing}%/%{sw.arena.%{sw.player.%uuid of loop-player%.arena}%.max}%"
  1187. set the text of id "SWLOBBY-%loop-player%Slot2" to "&1"
  1188. set the text of id "SWLOBBY-%loop-player%Slot1" to "{@websitename}"
  1189. else:
  1190. delete stylish scoreboard "SWLOBBY-%loop-player%"
  1191. delete stylish scoreboard "SWGAME-%loop-player%"
  1192.  
  1193.  
  1194.  
  1195.  
  1196. sub "sw.showstats":
  1197. set {_p} to parameter 1
  1198. set {_uuid} to uuid of {_p}
  1199. if parameter 2 is not set:
  1200. send "&8&l●&7&l&m----------------------&8&l●" to {_p}
  1201. send "" to {_p}
  1202. send "&3&l» &7&lKILLS &c%{sw.stats.kills.%{_uuid}%}%" to {_p}
  1203. send "&3&l» &7&lDEATHS &c%{sw.stats.deaths.%{_uuid}%}%" to {_p}
  1204. send "&3&l» &7&lWINS &c%{sw.stats.wins.%{_uuid}%}%" to {_p}
  1205. send "&3&l» &7&lPOINTS &c%{sw.stats.points.%{_uuid}%}%" to {_p}
  1206. send "" to {_p}
  1207. send "&8&l●&7&l&m----------------------&8&l●" to {_p}
  1208. if parameter 2 is set:
  1209. set {_p2} to parameter 2
  1210. set {_p2} to {_p2} parsed as offline player
  1211. set {_uuid2} to uuid of {_p2}
  1212. send "&8&l●&7&l&m----------------------&8&l●" to {_p}
  1213. send "" to {_p}
  1214. send "&3&l» &7&lKILLS &c%{sw.stats.kills.%{_uuid2}%}%" to {_p}
  1215. send "&3&l» &7&lDEATHS &c%{sw.stats.deaths.%{_uuid2}%}%" to {_p}
  1216. send "&3&l» &7&lWINS &c%{sw.stats.wins.%{_uuid2}%}%" to {_p}
  1217. send "&3&l» &7&lPOINTS &c%{sw.stats.points.%{_uuid2}%}%" to {_p}
  1218. send "" to {_p}
  1219. send "&8&l●&7&l&m----------------------&8&l●" to {_p}
  1220.  
  1221.  
  1222. sub "sw.chestfill.normal":
  1223. set {_arena} to parameter 1
  1224. loop {sw.arena.%{_arena}%.SW.NORMAL::*}:
  1225. clear inventory of block at loop-value-1
  1226. loop 15 times:
  1227. set {_random} to random element out of {SW.NORMAL::*}
  1228. set {_slot} to a random integer between 0 and 26
  1229. add {_random} to slot {_slot} of block at loop-value-1
  1230. wait 1 tick
  1231. stop
  1232.  
  1233. sub "sw.chestfill.op":
  1234. set {_arena} to parameter 1
  1235. loop {sw.arena.%{_arena}%.SW.OP::*}:
  1236. clear inventory of block at loop-value-1
  1237. loop 15 times:
  1238. set {_random} to random element out of {SW.OP::*}
  1239. set {_slot} to a random integer between 0 and 26
  1240. add {_random} to slot {_slot} of block at loop-value-1
  1241. wait 1 tick
  1242. stop
  1243.  
  1244. sub "sw.deathpoints":
  1245. set {_p} to parameter 1
  1246. set {_p2} to parameter 2
  1247. set {_uuid} to uuid of {_p}
  1248. set {_uuid2} to uuid of {_p2}
  1249.  
  1250. add 1 to {sw.gamekills.%{sw.player.%{_uuid}%.arena}%::%{_p}%}
  1251. add 1 to {sw.stats.kills.%{_uuid}%}
  1252. add 1 to {sw.stats.deaths.%{_uuid2}%}
  1253. add {@pointsperkill} to {sw.stats.points.%{_uuid}%}
  1254. remove {@losepoints} from {sw.stats.points.%{_uuid2}%}
  1255. if {sw.stats.points.%{_uuid2}%} <= 0:
  1256. if {@allownegativepoints} is false:
  1257. set {sw.stats.points.%{_uuid2}%} to 0
  1258.  
  1259.  
  1260. sub "sw.gametime":
  1261. set {_arena} to parameter 1
  1262. set {sw.arena.%{_arena}%.gametime::minutes} to {@gameminutes} -1
  1263. set {sw.arena.%{_arena}%.gametime::seconds} to 60
  1264.  
  1265. set {sw.arena.%{_arena}%.gametime::event} to {@refillminute} -1
  1266. set {sw.arena.%{_arena}%.gametime::event.sb} to "{@refill}"
  1267. loop {@gameminutes}*60+150 times:
  1268. wait 1 seconds
  1269. if {sw.arena.%{_arena}%.status} is "{@ingame}" or "{@starting}" or "{@full}":
  1270. remove 1 from {sw.arena.%{_arena}%.gametime::seconds}
  1271.  
  1272. if {sw.arena.%{_arena}%.gametime::seconds} is 0:
  1273. set {sw.arena.%{_arena}%.gametime::seconds} to 59
  1274. remove 1 from {sw.arena.%{_arena}%.gametime::event}
  1275. subtract 1 from {sw.arena.%{_arena}%.gametime::minutes}
  1276.  
  1277. if {sw.arena.%{_arena}%.gametime::event} = 0:
  1278. if {sw.arena.%{_arena}%.gametime::seconds} <= 1:
  1279. set {sw.arena.%{_arena}%.gametime::event.sb} to "{@restarting}"
  1280. set {sw.arena.%{_arena}%.gametime::event} to {sw.arena.%{_arena}%.gametime::minutes}
  1281. invoke "sw.refill" from parameter 1
  1282.  
  1283.  
  1284. if {sw.arena.%{_arena}%.gametime::minutes} = 0:
  1285. if {sw.arena.%{_arena}%.gametime::seconds} <= 1:
  1286. if {sw.arena.%{_arena}%.gametime::event.sb} is "{@restarting}":
  1287. set {sw.arena.%{_arena}%.gametime::seconds} to 0
  1288. set {sw.arena.%{_arena}%.gametime::minutes} to 0
  1289. set {sw.arena.%{_arena}%.gametime::event} to 0
  1290. spawn 1 enderdragon at {sw.arena.%{_arena}%.center}
  1291. set name of spawned enderdragon to "{@dragonname}"
  1292. set {_dragon} to spawned enderdragon
  1293. add {_dragon} to {sw.arena.%{_arena}%.dragons::*}
  1294. send {sw.arena.%{_arena}%.players.alive::*} title "{@dragonspawntitle}" for 4 seconds
  1295. send "{@prefix} {@dragonspawnmessage}" to {sw.arena.%{_arena}%.players.alive::*}
  1296. stop loop
  1297. stop
  1298. else:
  1299. stop loop
  1300. stop
  1301.  
  1302.  
  1303.  
  1304. sub "sw.refill":
  1305. set {_arena} to parameter 1
  1306. send {sw.arena.%{_arena}%.players.alive::*} title "{@chestrefilltile}" for 4 seconds
  1307. send "{@prefix} {@chestrefill}" to {sw.arena.%{_arena}%.players.alive::*}
  1308. loop {sw.arena.%{_arena}%.SW.NORMAL::*}:
  1309. clear inventory of block at loop-value-1
  1310. loop 15 times:
  1311. set {_random} to random element out of {SW.OP::*}
  1312. set {_slot} to a random integer between 0 and 26
  1313. add {_random} to slot {_slot} of block at loop-value-1
  1314. wait 1 tick
  1315. stop
  1316.  
  1317.  
  1318.  
  1319.  
  1320. sub "sw.resetstats":
  1321. set {_p} to parameter 1
  1322. set {_uuid} to uuid of {_p}
  1323. set {sw.stats.kills.%{_uuid}%} to 0
  1324. set {sw.stats.deaths.%{_uuid}%} to 0
  1325. set {sw.stats.wins.%{_uuid}%} to 0
  1326. set {sw.stats.points.%{_uuid}%} to 0
  1327.  
  1328. sub "sw.spec":
  1329. set {_p} to parameter 1
  1330. set {_p2} to parameter 2
  1331. set {_uuid} to uuid of {_p}
  1332. set {_uuid2} to uuid of {_p2}
  1333. invoke "sw.clearplayer" from {_p}
  1334. hide {_p} from all players
  1335. set {_p}'s slot 0 to {@teleporteritem} named "{@teleporteritemname}"
  1336. set {_p}'s slot 7 to {@playagainitem} named "{@playagainitemname}"
  1337. set {_p}'s slot 8 to {@leaveitem} named "{@leaveitemname}"
  1338. set {_p}'s flight mode to true
  1339. if {sw.player.%{_uuid2}%.playing} is true:
  1340. teleport {_p} to {_p2}
  1341. else:
  1342. teleport {_p} to random element out of {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.alive::*}
  1343.  
  1344.  
  1345. sub "sw.refreshmenu":
  1346. loop all players:
  1347. if inventory name of loop-player-1's current inventory is "{@arenasguiname}":
  1348. set {_sw.list} to 0
  1349. loop {sw.arenas::*}:
  1350. if {sw.arena.%loop-value-2%.status} is "{@ingame}" or "{@full}" or "{@restarting}":
  1351. make a gui slot {_sw.list} of loop-player-1 with red clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value-2%||||&8&l» &7Status&8: %{sw.arena.%loop-value-2%.status}%||||&8&l» &7Players&8: &7%{sw.arena.%loop-value-2%.playing}%/%{sw.arena.%loop-value-2%.max}%||||&8&l● &7&lClick to join!" to run loop-player-1 command "sw join %loop-value-2%"
  1352. add 1 to {_sw.list}
  1353. else:
  1354. make a gui slot {_sw.list} of loop-player-1 with green clay named "&8 " with lore "&8&l» &7Name&8: &e&l%loop-value-2%||||&8&l» &7Status&8: %{sw.arena.%loop-value-2%.status}%||||&8&l» &7Players&8: &7%{sw.arena.%loop-value-2%.playing}%/%{sw.arena.%loop-value-2%.max}%||||&8&l● &7&lClick to join!" to run loop-player-1 command "sw join %loop-value-2%"
  1355. add 1 to {_sw.list}
  1356. stop
  1357.  
  1358.  
  1359. sub "sw.clearplayer":
  1360. set {_p} to parameter 1
  1361. remove REGENERATION, SPEED, FIRE RESISTANCE, POISON, WEAKNESS, INCREASE DAMAGE, SLOW, WATER BREATHING, INVISIBILITY, DAMAGE RESISTANCE and ABSORPTION from {_p}
  1362. heal {_p}
  1363. extinguish {_p}
  1364. set {_p}'s food to 20
  1365. clear {_p}'s level
  1366. clear {_p}'s inventory
  1367. close {_p}'s inventory
  1368. set {_p}'s gamemode to survival
  1369. set {_p}'s flight mode to false
  1370.  
  1371. sub "sw.winner":
  1372. set {_p} to parameter 1
  1373. set {_uuid} to uuid of {_p}
  1374. invoke "sw.summary" from {_p} and {sw.player.%{_uuid}%.arena}
  1375. invoke "sw.clearplayer" from {_p}
  1376. send {_p} title "{@winnertitle}" with subtitle "{@winnersubtitle}" for 7 seconds
  1377. add 1 to {sw.stats.wins.%{_uuid}%}
  1378. add {@pointsperwin} to {sw.stats.points.%{_uuid}%}
  1379. set {sw.arena.%{sw.player.%{_uuid}%.arena}%.status} to "{@restarting}"
  1380. if {@winnerhologram} is true:
  1381. bind hologram ";ItemStack:diamond_sword;{@winnerhologramtext}" to {_p} for 10 seconds offset by 0.0, 4.0, 0.0
  1382. loop 10 times:
  1383. if {sw.player.%{_uuid}%.playing} is true:
  1384. launch trailing flickering star coloured purple and red fading to yellow at {_p}'s location timed 1
  1385. wait 10 ticks
  1386. wait 5 seconds
  1387. set {_players.total::*} to {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.death::*}
  1388. loop {_players.total::*}:
  1389. invoke "sw.clearplayer" from loop-value
  1390. apply potion of resistance 10 to loop-value for 2 seconds
  1391. teleport loop-value to {sw.lobby}
  1392. set {sw.player.%uuid of loop-value%.playing} to false
  1393. reveal loop-value from all players
  1394. set {sw.arena.%{sw.player.%{_uuid}%.arena}%.status} to "{@restarting}"
  1395. wait 5 ticks
  1396. invoke "sw.API.arenaReset" from {sw.player.%{_uuid}%.arena}
  1397. stop
  1398.  
  1399. sub "sw.summary":
  1400. set {_p} to parameter 1
  1401. set {_arena} to parameter 2
  1402. set {_uuid} to uuid of {_p}
  1403. loop {sw.gamekills.%{_arena}%::*}:
  1404. set {_backup::%loop-index%} to loop-value
  1405. loop 3 times:
  1406. delete {_first.player}
  1407. delete {_first.number}
  1408. loop {_backup::*}:
  1409. if {_first.player} is not set:
  1410. set {_first.number} to loop-value-2
  1411. set {_first.player} to loop-index
  1412. else:
  1413. if loop-value-2 > {_first.number}:
  1414. set {_first.number} to loop-value-2
  1415. set {_first.player} to loop-index
  1416. add {_first.number} to {_list::*}
  1417. add {_first.player} to {_list2::*}
  1418. delete {_backup::%{_first.player}%}
  1419. if {_list::1} is not set:
  1420. set {_list::1} to 0
  1421. if {_list::2} is not set:
  1422. set {_list::2} to 0
  1423. if {_list::3} is not set:
  1424. set {_list::3} to 0
  1425. if {_list2::1} is not set:
  1426. set {_list2::1} to "Nobody"
  1427. if {_list2::2} is not set:
  1428. set {_list2::2} to "Nobody"
  1429. if {_list2::3} is not set:
  1430. set {_list2::3} to "Nobody"
  1431. set {_players.total::*} to {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.alive::*} and {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.death::*}
  1432. wait 0.1 seconds
  1433. send "&a&l■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ " to {_players.total::*}
  1434. send " " to {_players.total::*}
  1435. send " &8&l● &f&lSkyWars &8&l● " to {_players.total::*}
  1436. send " " to {_players.total::*}
  1437. send " &eWinner &f- %colored {_p}'s prefix% &3%{_p}% " to {_players.total::*}
  1438. send " " to {_players.total::*}
  1439. send " &e&l1st Killer &3%{_list2::1}% &7- %{_list::1}% " to {_players.total::*}
  1440. send " &6&l2nd Killer &7%{_list2::2}% &7- %{_list::2}% " to {_players.total::*}
  1441. send " &c&l3rd Killer &7%{_list2::3}% &7- %{_list::3}% " to {_players.total::*}
  1442. send " " to {_players.total::*}
  1443. send "&a&l■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ " to {_players.total::*}
  1444.  
  1445.  
  1446.  
  1447. sub "sw.checklocation":
  1448. set {_p} to parameter 1
  1449. set {_uuid} to uuid of {_p}
  1450. if {sw.player.%{_uuid}%.playing} is true:
  1451. if location of {_p} is within {sw.arena.%{sw.player.%{_uuid}%.arena}%.pos.1} to {sw.arena.%{sw.player.%{_uuid}%.arena}%.pos.2}:
  1452. stop
  1453. else:
  1454. if {sw.arena.%{sw.player.%{_uuid}%.arena}%.players.death::*} contains {_p}:
  1455. teleport {_p} to {sw.arena.%{sw.player.%{_uuid}%.arena}%.center}
  1456. else:
  1457. apply potion of instant damage to {_p} for 0.5 seconds
  1458. if y-coords of {_p} < 50:
  1459. stop
  1460. else:
  1461. message "{@prefix} {@notinarenaregion}" to {_p}
  1462.  
  1463.  
  1464.  
  1465. sub "sw.spawncage":
  1466. set {_loc} to parameter 1
  1467. set {_p} to parameter 2
  1468. set {_b} to "{@glassid}" parsed as material
  1469. loop all blocks in radius 5 around {_loc}:
  1470. if loop-block is {_b}:
  1471. set loop-block to air
  1472. teleport {_p} to {_loc}
  1473. set block at block under {_loc} to {_b}
  1474. set block at block 1 north {_loc} to {_b}
  1475. set block at block 1 south {_loc} to {_b}
  1476. set block at block 1 east {_loc} to {_b}
  1477. set block at block 1 west {_loc} to {_b}
  1478. set block at block above block 1 north {_loc} to {_b}
  1479. set block at block above block 1 south {_loc} to {_b}
  1480. set block at block above block 1 east {_loc} to {_b}
  1481. set block at block above block 1 west {_loc} to {_b}
  1482. set block at block 2 above {_loc} to {_b}
  1483. teleport {_p} at block 1 above {_p}
  1484. teleport {_p} at block 1 under {_p}
  1485. wait 10 ticks
  1486. if block at block 2 above {_b} is air:
  1487. teleport {_p} at block 1 under {_p}
  1488. wait 10 ticks
  1489. teleport {_p} to {_p}
  1490.  
  1491. sub "sw.clearcage":
  1492. set {_p} to parameter 1
  1493. set {_uuid} to uuid of {_p}
  1494. set {_loc} to location of {_p}
  1495. set {_b} to "{@glassid}" parsed as material
  1496. if {sw.arena.%{sw.player.%{_uuid}%.arena}%.status} is "{@waiting}" or "{@starting}" or "{@full}" or "{@ingame}":
  1497. loop all blocks in radius 5 around {_loc}:
  1498. if loop-block is {_b}:
  1499. set loop-block to air
  1500.  
  1501. sub "sw.API.arenaReset":
  1502. send "{@prefix} &aReseting &e%parameter 1%" to console
  1503. set {_arena} to parameter 1
  1504. clear {sw.arena.%{_arena}%.players.death::*}
  1505. clear {sw.arena.%{_arena}%.players.alive::*}
  1506. clear {sw.arena.%{_arena}%.gametime::*}
  1507. clear {sw.gamekills.%{_arena}%::*}
  1508. make console execute command "rb rollbackregion %{_arena}% -clearEntities"
  1509. wait 10 seconds
  1510. invoke "sw.chestfill.normal" from parameter 1
  1511. wait 1 second
  1512. invoke "sw.chestfill.op" from parameter 1
  1513. wait 2 seconds
  1514. set {sw.arena.%{_arena}%.gametime::minutes} to {@gameminutes}
  1515. set {sw.arena.%{_arena}%.gametime::seconds} to 60
  1516. set {sw.arena.%{_arena}%.playing} to 0
  1517. set {sw.arena.%{_arena}%.seconds} to {@waitingtime}
  1518. set {sw.arena.%{_arena}%.status} to "{@waiting}"
  1519. invoke "sw.refreshmenu"
  1520. send "{@prefix} &e%parameter 1% &areseted!" to console
  1521. loop {sw.arena.%{_arena}%.dragons::*}:
  1522. kill loop-value
  1523. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement