Help with Lobby-system with variables.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

owwowwowo

New Member
Jan 20, 2021
5
0
1
Skript Version (do not put latest): Skript latest
Skript Author: Bensku
Minecraft Version: 1.8.8

Hi, I'm trying to make a MLG-Rush style gamemode, with a GUI, but I can't seem to get the joining system of it right.

Code:
command /mlgrushcheck:
    trigger:
        loop all players in "world":
            if "%region at player%" contains "mlg":
                message "test"

on load:
    set {lobbyA.red} to false
    set {lobbyA.blue} to false
    
command /mlgrush:
    trigger:
        open chest with 1 row named "&bLobbies" to player
        format slot 2 of player with gold block named "&fLobby 1" to close then run [execute player command "汉字join1"]
        format slot 4 of player with redstone block named "&fLobby 2" to close then run [execute player command "汉字join2"]
        format slot 6 of player with redstone block named "&fLobby 3" to close then run [execute player command "汉字join3"]

command /汉字join2:
    trigger:
        message "&cThis lobby is unavailable at the moment."
        
command /汉字join3:
    trigger:
        message "&cThis lobby is unavailable at the moment."

on join:
    set {freeze.%player%} to false
    wait 1 seconds
    execute console command "effect %player% clear"
    set player's walk speed to .2

command /汉字join1:
    trigger:
        If {teamA.red} is false:
            set {teamA.red} to true
            execute console command "ci %player%"
            teleport player to location at -681.5, 75, 966.5 in world "world"
            set player's walk speed to 0
            apply jump boost 250 to player for 999 days
            set {freeze.%player%} to true
        If {teamA.blue} is false:
            set {teamA.blue} to true
            execute console command "ci %player%"
            teleport player to location at -652.5, 75, 966.5 in world "world"
            set player's walk speed to 0
            apply jump boost 250 to player for 999 days
            set {freeze.%player%} to true
        else:
            message "&eThis lobby is currently &l&bFull. &eJoin another lobby or wait for an available one."

On any movement:
    if {teamA.red} is true:
        loop all players:
            if "%region at loop-player%" contains "mlg":
                stop
            else:
                set {teamA.red} to false
                
On any movement:
    if {teamA.blue} is true:
        loop all players:
            if "%region at loop-player%" contains "mlg":
                stop
            else:
                set {teamA.blue} to false


On any movement:
    if {freeze.%player%} is true:
        if {teamA.red} is true:
            teleport player to location at -681.5, 75, 966.5 in world "world"
        if {teamA.blue} is true:
            teleport player to location at -652.5, 75, 966.5 in world "world"
        else:
            stop

On break:
    if event-block's location is at -681, 64, 966 in world "world":
        cancel event
        message "test"

With errors:
Code:
[09:49:55 ERROR]: 'block's location is at -681, 64, 966 in world "world"' is not a type (mlg.sk, line 80: if event-block's location is at -681, 64, 966 in world "world":')

Every time I try and join Lobby1 from the GUI it sends "This lobby is currently Full. join another lobby or wait for an available one" when the lobby isn't full. I'm not sure what to do here, any help?
 
Skript Version (do not put latest): Skript latest
Skript Author: Bensku
Minecraft Version: 1.8.8

Hi, I'm trying to make a MLG-Rush style gamemode, with a GUI, but I can't seem to get the joining system of it right.

Code:
command /mlgrushcheck:
    trigger:
        loop all players in "world":
            if "%region at player%" contains "mlg":
                message "test"

on load:
    set {lobbyA.red} to false
    set {lobbyA.blue} to false
   
command /mlgrush:
    trigger:
        open chest with 1 row named "&bLobbies" to player
        format slot 2 of player with gold block named "&fLobby 1" to close then run [execute player command "汉字join1"]
        format slot 4 of player with redstone block named "&fLobby 2" to close then run [execute player command "汉字join2"]
        format slot 6 of player with redstone block named "&fLobby 3" to close then run [execute player command "汉字join3"]

command /汉字join2:
    trigger:
        message "&cThis lobby is unavailable at the moment."
       
command /汉字join3:
    trigger:
        message "&cThis lobby is unavailable at the moment."

on join:
    set {freeze.%player%} to false
    wait 1 seconds
    execute console command "effect %player% clear"
    set player's walk speed to .2

command /汉字join1:
    trigger:
        If {teamA.red} is false:
            set {teamA.red} to true
            execute console command "ci %player%"
            teleport player to location at -681.5, 75, 966.5 in world "world"
            set player's walk speed to 0
            apply jump boost 250 to player for 999 days
            set {freeze.%player%} to true
        If {teamA.blue} is false:
            set {teamA.blue} to true
            execute console command "ci %player%"
            teleport player to location at -652.5, 75, 966.5 in world "world"
            set player's walk speed to 0
            apply jump boost 250 to player for 999 days
            set {freeze.%player%} to true
        else:
            message "&eThis lobby is currently &l&bFull. &eJoin another lobby or wait for an available one."

On any movement:
    if {teamA.red} is true:
        loop all players:
            if "%region at loop-player%" contains "mlg":
                stop
            else:
                set {teamA.red} to false
               
On any movement:
    if {teamA.blue} is true:
        loop all players:
            if "%region at loop-player%" contains "mlg":
                stop
            else:
                set {teamA.blue} to false


On any movement:
    if {freeze.%player%} is true:
        if {teamA.red} is true:
            teleport player to location at -681.5, 75, 966.5 in world "world"
        if {teamA.blue} is true:
            teleport player to location at -652.5, 75, 966.5 in world "world"
        else:
            stop

On break:
    if event-block's location is at -681, 64, 966 in world "world":
        cancel event
        message "test"

With errors:
Code:
[09:49:55 ERROR]: 'block's location is at -681, 64, 966 in world "world"' is not a type (mlg.sk, line 80: if event-block's location is at -681, 64, 966 in world "world":')

Every time I try and join Lobby1 from the GUI it sends "This lobby is currently Full. join another lobby or wait for an available one" when the lobby isn't full. I'm not sure what to do here, any help?
Did you tried this?

code_language.skript:
if event-block's location is location(-681, 64, 966, world "world")
 
Did you tried this?

code_language.skript:
if event-block's location is location(-681, 64, 966, world "world")
I

This did not work. This is my new error:

Code:
[19:31:02 ERROR]: 'block's location is location(-681, 64, 966, world "world")' is not a type (mlg.sk, line 80: if event-block's location is location(-681, 64, 966, world "world"):')
[doublepost=1615930645,1615851100][/doublepost]Bump
[doublepost=1615998961][/doublepost]bro bump
 
I

This did not work. This is my new error:

Code:
[19:31:02 ERROR]: 'block's location is location(-681, 64, 966, world "world")' is not a type (mlg.sk, line 80: if event-block's location is location(-681, 64, 966, world "world"):')
[doublepost=1615930645,1615851100][/doublepost]Bump
[doublepost=1615998961][/doublepost]bro bump
This work to me too:

code_language.skript:
set {_coords} to location(-681, 64, 966)
if location of event-block is {_coords}:
    if player's world is "world":
        #do stuff
 
This work to me too:

code_language.skript:
set {_coords} to location(-681, 64, 966)
if location of event-block is {_coords}:
    if player's world is "world":
        #do stuff
Hey, I got this
Code:
________________$$$$
______________$$____$$
______________$$____$$
______________$$____$$
______________$$____$$
______________$$____$$
__________$$$$$$____$$$$$$
________$$____$$____$$____$$$$
________$$____$$____$$____$$__$$
$$$$$$__$$____$$____$$____$$____$$
$$____$$$$________________$$____$$
$$______$$______________________$$
__$$____$$______________________$$
___$$$__$$______________________$$
____$$__________________________$$
_____$$$________________________$$
______$$______________________$$$
_______$$$____________________$$
________$$____________________$$
_________$$$________________$$$
__________$$________________$$
__________$$$$$$$$$$$$$$$$
 
Hey, I got this
Code:
________________$$$$
______________$$____$$
______________$$____$$
______________$$____$$
______________$$____$$
______________$$____$$
__________$$$$$$____$$$$$$
________$$____$$____$$____$$$$
________$$____$$____$$____$$__$$
$$$$$$__$$____$$____$$____$$____$$
$$____$$$$________________$$____$$
$$______$$______________________$$
__$$____$$______________________$$
___$$$__$$______________________$$
____$$__________________________$$
_____$$$________________________$$
______$$______________________$$$
_______$$$____________________$$
________$$____________________$$
_________$$$________________$$$
__________$$________________$$
__________$$$$$$$$$$$$$$$$
? Are you ok?
 
Status
Not open for further replies.