Code a Minecraft Skript that when player enter the region named "afk" and they stay in…
- User
Code a Minecraft Skript that when player enter the region named "afk" and they stay in their without moving for every 5 minutes make the console execute the command "crate key give %player% afk 1" and make an option to also set the time and /afk will teleport the player to the afk region
- Assistant
Here's an example of a Minecraft Skript that meets your requirements:
command /afk: trigger: teleport player to location "afk" send "You are now in the AFK region." set {_afkTimer.%player%} to 0 wait 1 second execute console command "crate key give %player% afk 1" wait 1 second {_afkTimer.%player%} = 0 wait 5 minutes add 1 to {_afkTimer.%player%} if {_afkTimer.%player%} is 1: send "You have been AFK for 5 minutes." else if {_afkTimer.%player%} is 2: send "You have been AFK for 10 minutes." else if {_afkTimer.%player%} is 3: send "You have been AFK for 15 minutes." else if {_afkTimer.%player%} is 4: send "You have been AFK for 20 minutes." else if {_afkTimer.%player%} is 5: send "You have been AFK for 25 minutes." execute console command "crate key give %player% afk 1" set {_afkTimer.%player%} to 0 region "afk": enter: if player is not op: command /afk