Jump to content

AFK rewards


ugnasijus1

Recommended Posts

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

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

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

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 by DanRub
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...