ugnasijus1 Posted October 21, 2023 Share Posted October 21, 2023 This script has probably been asked for a million times but i haven't found one that works the way I want. If anyone has a script they could share which basically lets me enter 2 locations and if a player is standing in between them every 5 minutes a command gets executed and it gives them a reward etc. Link to comment Share on other sites More sharing options...
DanRub Posted October 21, 2023 Share Posted October 21, 2023 Hey, if you have world guard, simply create region "afk" or something like that in different world where will be only afk players (for less lags) and then the world and region use in that skript: (also change the reward in the execute command) every 1 second in "afk": loop all players: if "%region at loop-player%" contains "afk": add 1 to {afktime::%loop-player%} if {afktime::%loop-player%} is 300: execute console command "give %loop-player% 1 diamond" clear {afktime::%loop-player%} Link to comment Share on other sites More sharing options...
ugnasijus1 Posted October 22, 2023 Author Share Posted October 22, 2023 19 hours ago, DanRub said: Hey, if you have world guard, simply create region "afk" or something like that in different world where will be only afk players (for less lags) and then the world and region use in that skript: (also change the reward in the execute command) every 1 second in "afk": loop all players: if "%region at loop-player%" contains "afk": add 1 to {afktime::%loop-player%} if {afktime::%loop-player%} is 300: execute console command "give %loop-player% 1 diamond" clear {afktime::%loop-player%} I just tried the script and skript doesn't understand the line "every 1 second in "afk":" Link to comment Share on other sites More sharing options...
DanRub Posted October 22, 2023 Share Posted October 22, 2023 Make sure you have the world "afk" created. Link to comment Share on other sites More sharing options...
ugnasijus1 Posted October 22, 2023 Author Share Posted October 22, 2023 No I don't would it be possible in the same world? I really don't care for the lag as my server is small atm Link to comment Share on other sites More sharing options...
DanRub Posted October 22, 2023 Share Posted October 22, 2023 (edited) well, then make this: every 1 second: loop all players: if "%region at loop-player%" contains "afk": add 1 to {afktime::%loop-player%} if {afktime::%loop-player%} is 300: execute console command "give %loop-player% 1 diamond" clear {afktime::%loop-player%} And make sure you have the region "afk" or create some other and place your region instead of "afk" Edited October 22, 2023 by DanRub 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