#afk/active skript not working correctly

1 messages · Page 1 of 1 (latest)

fallen token
#

I'm trying to add a code that gives 3 coins while in afk pool and 5 coins when outside (actively playing) the afk code worked perfectly before I added the active part of the code and it just only gives 5 coins for being active no matter if you're in the afk pool or not, it doesn't even give afk coins anymore.

`command /afk:
trigger:
make player execute command "/warp afk"

every 15 minutes:
loop all players:

    if "%region at loop-player%" contains "afk":
        console command "points give %loop-player% 5"
        send "&8[<##57FF6B>&l!&8] <##57FF6B>You have been given &f5x Coins <##57FF6B>for being AFK!" to loop-player

    else:
        console command "points give %loop-player% 5"
        send "&8[<##57FF6B>&l!&8] <##57FF6B>You have been given &f5x Coins <##57FF6B>for being Active!" to loop-player

on region enter:
wait 2 ticks
if "%region at player%" contains "afk":
send "&8[<##57FF6B>&l!&8] <##57FF6B>You will now recive afk rewards!"

on region exit:
if "%region at player%" contains "afk":
send "&8[&c&l!&8] &cYou will no longer recive afk rewards!"`

lunar cosmos
#

Please read your code.

#

You are giving 5 both when active AND AFK. Change the number to 3 in the AFK section.

In the future try to debug and fix your code before asking others for help

covert flint
#
        else:
            console command "points give %loop-player% 5"``` Remove this