ID:174258
 
I have an AFK verb for my game, but since it's become a problem with spammers because it plays a sound (-.-') I wanna have it mute them if they use it five times in one minute. My AFK code follows:

AFK()
set desc = "Go or come back from AFK (Away From Keyboard)."
if(usr.mute == 1)
usr << "You are muted."
if(AFKness == 6)
world << "[src] was auto-muted for abuse of the AFK verb."
usr.mute = 1
else
if(src.AFK)
world << "[src] Is Back"
src.AFK = 0
src.overlays -= 'AFK.dmi'
else
world << "[src] Is Now AFK"
world << sound('back.wav',0)
src.AFK = 1
src.AFKness += 1
src.overlays += 'AFK.dmi'

What would I put in there so that the AFKness var is reset to zero every 600 ticks?
AFK()
set desc = "Go or come back from AFK (Away From Keyboard)."
if(usr.mute == 1)
usr << "You are muted."
if(AFKness == 6)
world << "[src] was auto-muted for abuse of the AFK verb."
usr.mute = 1
else
if(src.AFK)
world << "[src] Is Back"
src.AFK = 0
src.overlays -= 'AFK.dmi'
else
world << "[src] Is Now AFK"
world << sound('back.wav',0)
src.AFK = 1
src.AFKness += 1
src.overlays += 'AFK.dmi'
sleep(600)
src.AFK --