ID:1685027
 
Problem description: It doesnt seem to boot the people who haven't typed in OOC, nor does it seem it even checks, any suggestions ? :s


Code:
mob

var
isafk = 2
varify = 0



mob/var/AFK = 0//The AFK var.
mob/var/afk = ""//The afk message var.
mob/var/tmp/alreadyedclicked=0

client/Move()//If you move.
..()
mob.afkback()//Makes you come back from afk.


mob/proc
autoafk()//Makes you go AFK automaticly.
while(!src.AFK)
sleep(1)
//if((client.inactivity/500)>=10)//
if((client.inactivity/120)>=120)//If you are inactive you go AFK.
world <<"<b><font color=[usr.namecolor]>[usr]</font> has gone AFK."
usr.afkingstat="(Afk)"
usr.overlays += 'afk.dmi' // overlays the AFK image on player
src.AFK=1
afkback()//Makes you come back from afk.
if(src.AFK)
src.AFK=0//Makes you come back from afk when you do something.
world<<"<b><font color=[usr.namecolor]>[usr]</font> has came back from AFK."
usr.afkingstat=""
usr.overlays -= 'afk.dmi' // overlays the AFK image on player
src.autoafk()//Makes sure you are afk.
return
mob
verb
AFK()//A verb to make you go AFK.
if(src.alreadyedclicked==1)
usr<<"<b><font color=#FF4F00>You have to wait 4 seconds before using this verb"
return
if(src.AFK)//If you are afk.
world << "<b><font color=[usr.namecolor]>[usr]</font> has returned."
usr.overlays -= 'afk.dmi' // removes the AFK image.
src.AFK = 0
usr.afkingstat=""
src.alreadyedclicked=1
sleep(40)
src.alreadyedclicked=0

else//If you arent afk.
usr.overlays += 'afk.dmi' // overlays the AFK image on player
world << "<b><font color=[usr.namecolor]>[usr]</font> has gone AFK."
src.AFK = 1
usr.afkingstat="(Afk)"
src.alreadyedclicked=1
sleep(40)
src.alreadyedclicked=0


mob/Admin/verb
AFKCheck()
for(var/mob/M in world)
M.AFK=1
world<<"<b><font size=5><font color=red>AFK Check Initiated, \
please say something into OOC to avoid being booted!"

sleep(500)
world<<"<b><font size=5><font color=red>10 seconds until you're kicked if you haven't talked!"
sleep(100)
for(var/mob/M in world)
if(M.AFK)
world<<"<b>[M] was booted with [round(M.client.inactivity/10)] seconds since last command!"//if the time is 0-3 seconds they are afk training
del(M)//




One would think you're missing a client/New().