DariusMihai Posted January 8 Share Posted January 8 on load: set {item} to green candle of unbreaking named "&a&lᴀꜰᴋ ᴛᴏᴋᴇɴ" every 5 minutes: loop all players: if "%region at loop-player%" contains "afk": give green candle of unbreaking named "&a&lᴀꜰᴋ ᴛᴏᴋᴇɴ" to player send "&dYou got a &b AFK TOKEN &dfor being AFK!" to loop-player broadcast "" broadcast "&5All players in the AFK pit just got &5a&b AFK TOKEN!" broadcast "" on leave of region "afk": send "&7&oYou left the AFK Area." to player send "&7&oYou will no longer receive rewards every 10 minutes." to player set {afk::%player's uuid%} to false on enter of region "afk": push player forward at speed 1 send "&7&oYou entered the AFK Area." to player send "&7&oYou will receive &a&onice&7&o rewards every 10 minutes!" to player set {afk::%player's uuid%} to true if you guys can please help me fix the error Link to comment Share on other sites More sharing options...
Spookyyy Posted January 8 Share Posted January 8 change it to loop-player instead of player in line 8 Link to comment Share on other sites More sharing options...
LunarBurn1 Posted January 8 Share Posted January 8 As the person before me said, you need to use 'loop-player' instead of 'player', because there is no player in a periodical, or timed, event. Your fixed section of code should look like this: every 5 minutes: loop all players: if "%region at loop-player%" contains "afk": give green candle of unbreaking named "&a&lᴀꜰᴋ ᴛᴏᴋᴇɴ" to loop-player send "&dYou got a &b AFK TOKEN &dfor being AFK!" to loop-player broadcast "" broadcast "&5All players in the AFK pit just got &5a&b AFK TOKEN!" broadcast "" Link to comment Share on other sites More sharing options...
DariusMihai Posted January 17 Author Share Posted January 17 thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now