Why doesnt this work?
Code:
Code:
code_language.skript:
command /setminigamelobby:
description: Sets the minigame specified lobby
permission: lobbyminigame.setlobby
permission message: &c&l(!) You do not have permission to do this (!)
trigger:
if {_lobby} is set:
delete {_lobby}
set {_lobby} to player's location
send "&8[&bMinigame&8] &7You have set the location of the lobby"
else:
set {_lobby} to player's location
send "&8[&bMinigame&8] &7You have set the location of the lobby"
command /setminigamemap:
description: Sets the minigame specified map
permission: lobbyminigame.setmap
permission message: &c&l(!) You do not have permission to do this (!)
trigger:
if {_map} is set:
delete {_map}
set {_map} to player's location
send "&8[&bMinigame&8] &7You have set the location of the map"
else:
set {_map} to player's location
send "&8[&bMinigame&8] &7You have set the location of the map"
on load:
if {_ingame} is not set:
set {_ingame} to false
if {_ingame} is true:
set {_ingame} to false
command /startminigame [<text>]:
description: Activate a Lobby Minigame
permission: minigame.start
permission message: &c&l(!) You do not have permission to do this (!)
trigger:
if arg-1 is not set:
send "&8[&bMinigame&8] &7You must specify a minigame"
send "&bMinigames: &fTag"
else:
if arg-1 is "Tag":
if amount of all players = 1:
send "&8[&bMinigame&8] &7There are not enough players online to do that"
stop
else:
if amount of all players = 2:
teleport players to {_lobby}
set {_time} to 30
while {_time} is more than 0:
set player's level to {_time}
if {_time} is 30 or 10:
play raw sound "random.orb" at player with pitch 1 volume 1
broadcast "&8[&bMinigame&8] &7The game will start in &b%{_time}% seconds"
if {_time} is 9 or 8 or 7 or 6 or 4 or 3 or 2 or 1:
play raw sound "random.orb" at player with pitch 1 volume 1
broadcast "&e%{_time}% Seconds Left"
remove 1 from {_time}
wait 1 second
set player's level to 0
add amount of all players to {players}
loop all players:
add loop-player to {players::*}
teleport loop-player to {_map}
if {_It} is not set:
set {_It} to a random element out of {players::*}
broadcast "&8[&bMinigame&8] &b%{_It}% &7is the tagger"
wait 5 seconds
set {_ingame} to true
command /stopminigame [<text>]:
description: Deactivate a Lobby Minigame
permission: minigame.stop
permission message: &c&l(!) You do not have permission to do this (!)
trigger:
if arg-1 is not set:
send "&8[&bMinigame&8] &7You must specify a minigame"
send "&bMinigames: &fTag"
else:
if arg-1 is "Tag":
if {_ingame} is true:
set {_ingame} to false
loop all players:
add loop-player to {players::*}
teleport loop-player to {_lobby}
broadcast "&8[&bMinigame&8] &b%player% &7has stopped the current minigame"