Jump to content

Game Automation Skript not working.

Recommended Posts

Posted (edited)

OK so, I'm making a minigame, And of course I'd want to make an automation for the game to keep repeating. I made an on and off command for this but for some strange reason it doesn't run at all.
Doing /startmaze - It should appear with either the action bar notifying the player if its been turned on. Or if its been turned off. But for some reason neither of them are sending a message.

I'm not sure if its the whole skripts fault (The order it is in) Or just something clear that I cant see since not errors are shown

I also have a queue skript in place, along with a "/gamestart" which is just a separate skript to start the game to make it easier to look at. If anyone needs/wants anymore information on this as they might know why, feel free to ask.

(I also know there is way better ways to do this skript but I just do it the way I know)

Thank you - VXR/notshaye


#game automation
command /startmaze:
        if {_MazeStart} is false:
            set {_MazeStart} to true
            set {game.start} to false
            set {button.found} to false
            remove all players from {Queue::*}
            loop all players:
                send action bar "Server skript has been turned &a&lON" to player
                wait 2 minutes
                send "&c&l! &fFirst game commencing in &c1 &9Minute" to player
                wait 30 seconds
                if {Queue::*} does not contain player:
                    stop loop
                    teleport player to location(634.5, 129, -108.5, world "world")
                    send subtitle "&c&l30 Seconds &funtil Start" to player
                    wait 15 seconds
                    send subtitle "&c&l15 Seconds &funtil Start" to player
                    wait 5 seconds
                    execute console command "gamestart"
            if {_MazeStart} is true:
                set {_MazeStart} to false
                loop all players:
                    send action bar "&cServer skript is now &c&lOFF" to player


Edited by notshaye
Link to comment
Share on other sites

Hey there!

It seems like in the loop, you are using the value 'player', instead of 'loop-player'.
You have also used local variables in order for your skript to run -- It looks like they should be global ones.

Go ahead and fix this, and let me know if it works!


Good luck ;3

Minehut Volunteer Moderator: June 26 2024



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...