Afk check issue. in Developer Help
|
|
Code:
proc afkCheck() afkCounter++ if(afkCounter == 1) mob.warnAFK() if(afkCounter == 10) mob.bootIfAFK() afkCounter = 0 spawn(15000) afkCheck()
|
Problem description:
This is an edited part of a demo squeakyreaper made to help me figure out a CAPTCHA afk check. The issue I'm having is, they don't get booted when afkCounter = 10 they get booted at the spawn time. Oh and for those people who say "Why not work on your games design instead of making an AFK check" It's because....I don't want to. EDIT: below are the warnAFK and bootifAFK
proc generateCaptcha() var/random = rand(65,90) captcha += ascii2text(random)
random = rand(65,91) captcha += ascii2text(random)
random = rand(65,91) captcha += ascii2text(random)
random = rand(65,91) captcha += ascii2text(random)
warnAFK() generateCaptcha() src << "<font color=#DD0000>USE THE NOT AFK VERB IN COMMANDS\nAND SAY \"[captcha]\"!</font>"
bootIfAFK() if(afkApproved == 0) src << "Logged out for inactivity." Logout() else afkApproved = 0 captcha = ""
|
|