var/const
afk = FLOAT_LAYER-1
obj/overlay
afk
icon = 'AFK!.dmi'
layer = afk
mob
verb
AFK()
if(afk == 0)
overlays += /obj/overlay/afk
world<<"[usr] has gone afk"
usr.afk = 1
usr.gamestatus = "Afk"
else
if(usr.afk == 1)
overlays -= /obj/overlay/afk
world<<"[usr] has come back from afk"
afk = 0
usr.gamestatus = "Available"
I want to make it to were if someone is idle for more than 5 minutes (doesnt' move/talk) it sets them auto afk.
Any suggestions.