diff --git a/plugins/scripts/scripts/skybattle.sk b/plugins/scripts/scripts/skybattle.sk index fb6a26a..a59952c 100644 --- a/plugins/scripts/scripts/skybattle.sk +++ b/plugins/scripts/scripts/skybattle.sk @@ -1,14 +1,22 @@ # border, spawny pro 3 různé lokace map, inventář + # skybattle::gaming_players::* - players in IDList1-10 [list of all players] # skybattle::game_status - identifies game status [init, next, playing, end] # skybattle::game_on - identifies if the game is playing [True, False] # skybattle::intro - identifies if intro is playing rn [True, False] # skybattle::stop_players - triggers a function that stops players from moving [True, False] -# skybattle::borders::border[1-3] - stores center of borders 1-3 [coords] # skybattle::deadplayers::* - stores all dead players in current round [list of players] -# skybattle::current_arena - stores current round/arena [1-3] # skybattle::introlocation - stores intro location [coords] ! must have barrier to stand on ! -# skybattle::spectatorlocation[1-3] - stores location for spectators to spawn on [coords] +# skybattle::lobbylocation - stores location of lobby [coords] + +# skybattle::current_arena - stores current round/arena [1-3] + +# ---------------- Variables specific for each arena ---------------- + +# skybattle::arena:: - folder for all variables specific to each arena (border center, etc...) +# skybattle::arena[1-3]::spectatorlocation - stores location of spectator spawn [coords] +# skybattle::arena[1-3]::border - stores center location of border [coords] +# skybattle::arena[1-3]::spawn_location::* [1-10] - stores spawner locations [coords] command /minigame_skybattle_start: description: Zapni celou minihru skybattle @@ -39,17 +47,78 @@ command /skybattle_setborder : permission: skript.op trigger: if arg-1 is 1: - set {skybattle::borders::border1} to player's location + set {skybattle::arena1::border} to player's location send "Border 1 set to your location" to player else if arg-1 is 2: - set {skybattle::borders::border2} to player's location + set {skybattle::arena2::border} to player's location send "Border 2 set to your location" to player else if arg-1 is 3: - set {skybattle::borders::border3} to player's location + set {skybattle::arena3::border} to player's location send "Border 3 set to your location" to player else: send "The only valid options for id of border are 1, 2, 3" to player + +command /skybattle_setintroloc: + description: Set Intro location + permission: skript.op + trigger: + set {skybattle::introlocation} to player's location + send "Lokace Intra pro Sky Battle nastavena" + +command /skybattle_setlobbyloc: + description: Set Lobby location + permission: skript.op + trigger: + set {skybattle::lobbylocation} to player's location + send "Lokace Lobby pro Sky Battle nastavena" + +command /skybattle_setspectatorspawn : + permission: skript.op + trigger: + if arg-1 is 1: + set {skybattle::arena1::spectatorlocation} to player's location + send "Spectator pro arenu 1 nastaven" + if arg-1 is 2: + set {skybattle::arena2::spectatorlocation} to player's location + send "Spectator pro arenu 2 nastaven" + if arg-1 is 3: + set {skybattle::arena3::spectatorlocation} to player's location + send "Spectator pro arenu 3 nastaven" + if arg-1 is not 1 or arg-1 is not 2 or arg-1 is not 3: + send "You need to specify arena 1-3" + +command /skybattle_setspawner : + description: Set one of the spawn positions + usage: /skybattle_setspawner + permission: skript.op + trigger: + if arg-2 < 11: + if arg-1 is 1: + set {skybattle::arena1::spawn_location::%arg-2%} to player's location + send "Set spawn location %arg-1%" to player + if arg-1 is 2: + set {skybattle::arena2::spawn_location::%arg-2%} to player's location + send "Set spawn location %arg-1%" to player + if arg-1 is 3: + set {skybattle::arena3::spawn_location::%arg-2%} to player's location + send "Set spawn location %arg-2% for Sky Battle" to player + if arg-1 is not 1 or arg-1 is not 2 or arg-1 is not 3: + send "You must specify arena 1-3" + if arg-2 < 0: + send "You must specify a number from 1-10" + if arg-2 > 10: + send "You can only set 10 spawn positions" + +command /skybattle_listspawners : + description: List all spawn positions for arena + permission: skript.op + trigger: + loop 10 times: + send "Spawn points for arena %arg-1%" + send "Spawn point %loop-number%:" to player + send {skybattle::arena%arg-1%::spawn_location::%loop-number%} to player + on death of player: add victim's uuid to {skybattle::deadplayers::*} launch ball large coloured yellow fading to light green and black at victim's location with duration 0 @@ -58,7 +127,7 @@ on respawn: if {skybattle::deadplayers::*} contains player's uuid: clear player's inventory set player's gamemode to spectator - teleport player to {skybattle::spectatorlocation%{skybattle::current_arena}%} + teleport player to {skybattle::arena%{skybattle::current_arena}%::spectatorlocation} wait 20 ticks set player's gamemode to adventure set player's gamemode to spectator