Well, I don't know if I'll write if for you, but I can tell you what you need, if you know how to script you could do it yourself(It's always good to know how something works in case you need to mod/fix it), otherwise maybe somebody else here would have the time to help you with it.
OK, the things you'd need are as follows:
* A reply trigger to reply to the tells. Initially disabled, it would be activated/deactivated by a script.
* An 'afk' alias to do all the script stuff required to enable the reply trigger, both by a timer, and if you type afk manually. This would also disable the timer if it wasn't already so(In case you typed afk manually).
* A one-shot timer(Meaning 'only fire once' not 'temporary', it needs to be reused but it only needs to send AFK once until you send another command.) set to whatever duration you want it to wait before sending the AFK, with the Send To box set to Execute so it'll run the afk alias.
* A script in the OnPluginCommandEntered/OnPluginSent callback to reset the timer so that it won't run for another <duration>, reenable it if it's already run, and disable the reply trigger. Hmm... this /might/ conflict with the AFK alias, so be careful.
* Optionally a script variable(Not world variable since you don't need to save across sessions) to record whether you are in AFK "mode" or not for use in the various script routines, this /should/ be identical to whether the reply trigger is enabled though, so you could just check the trigger's enabled status instead, although the variable would probably be easier to check.
I /think/ that is it, I could be wrong though.
Whew, that took me half-an-hour, maybe I should've just wrote the darn thing instead, it probably would've been faster, but then again, then you wouldn't learn anything. |