LINE 24 - 26
It doesn't loop all players yet in another skript that works
It doesn't loop all players yet in another skript that works
Code:
command /play [<text>]:
trigger:
if {games::*} doesn't contain arg 1:
send "&cThat game does not exist."
else:
set {num.toggle.%uuid of player%} to true
if {lobby::%arg 1%::*} exists:
set {_num} to 1
set {_num2} to 0
loop {lobby::%arg 1%::*}:
set {lob.%{_num}%} to loop-value
add 1 to {_num}
add 1 to {_num2}
send "%{_num}%"
send "%{_num2}% I"
loop {_num2} times:
send "X"
if {_num2} is greater than 0:
send "A"
if {num.toggle.%uuid of player%} is false:
send "B"
if {_num2} is 1:
send "C"
loop all players in {lob.%{_num2}%}:
add 1 to {lob.worldpl} #even if i'm in the world it says 0
send "J"
send "%{lob.%{_num2}%}%"
send "%{lob.worldpl}%"
add 1 to {lob.worldpl}
send "%{lob.worldpl}%"
if {lob.worldpl} is 1:
send "H"
set {lob.worldpl} to amount of all players in world {lob.%{_num}%}
if {lob.worldpl} is {max.%arg 1%}:
add 1 to {_num}
add 1 to {_num2}
send "%{_num}%"
send "%{_num2}% I"
else:
teleport player to world {lob.%{_num}%}
stop
else:
send "Error 03B"
else:
send "Y"
if {_num2} is less than {_num}:
send "M"
send "%{_num}%"
send "%{_num2}%"
if {num.toggle.%uuid of player%} is true:
set {_num} to 2
set {_num2} to 1
send "%{_num}%"
send "%{_num2}%"
set {num.toggle.%uuid of player%} to false
else:
send "L"
set {lob.worldpl} to amount of all players in world {lob.%{_num2}%}
if {lob.worldpl} is 1:
set {lob.worldpl} to amount of all players in world {lob.%{_num2}%}
if {lob.worldpl} is {max.%arg 1%}:
add 1 to {_num}
add 1 to {_num2}
send "%{_num}%"
send "%{_num2}% I"
else:
teleport player to world {lob.%{_num}%}
stop
else:
teleport player to world {lob.%{_num2}%}
stop
else:
send "&cNo lobbies exist for that game"
command /addgame [<text>] [<number>]:
trigger:
add arg 1 to {games::*}
set {max.%arg 1%} to arg 2
send "&7Added &6%arg 1%&7 with max &6%arg 2%&7 to game list."
send "&7Make sure to add lobbies to your games."
command /addlobby [<text>] [<text>] [<number>]:
trigger:
set {lob.%arg 3%} to arg 2
add {lob.%arg 3%} to {lobby::%arg 1%::*}
send "&7Added &6%arg 2%&7 to &6%arg 1%&7's lobbies."
command /delgame [<text>] [<number>]:
trigger:
remove arg 1 from {games::*}
delete {max.%arg 1%}
delete {lobby::%arg 1%::*}
send "&7Removed &6%arg 1%&7 from game list."
send "&7Lobbies for &6%arg 1%&6 auto deleted."
command /dellobby [<text>] [<number>]:
trigger:
remove {lob.%arg 2%} from {lobby::%arg 1%::*}
send "&7Removed &6%arg 2%&7 from &6%arg 1%&7's lobbies."
command /lobbylist [<text>]:
trigger:
send "&fLobby List:"
loop {lobby::%arg 1%::*}:
send "&7%loop-value%"
send " "
command /gamelist:
trigger:
send "&fGame List:"
loop {games::*}:
send "&7%loop-value%"
send " "