Alright So im Trying to make an Auto AFK Proc, i've got the proc itself for that set up but how would i set up the proc that checks if they havent Moved or Said Anything in say 10 minutes or Sleep(600)?
Please help, Its Greatly appreciated.
ID:158150
![]() Oct 20 2009, 6:40 pm
|
|
![]() Oct 20 2009, 7:05 pm
|
|
I don't want to kick them i want them to be unable to Train until they move around for abit. because for instance i Code. and if i get busy or have to go afk i don't wanna have to re log on its just a hassle.
|
I have thats the thing i've read it but i want them completly frozen until they click a verb to unfreeze themselves.
|
You might find this useful.
|
mob Whenever they do A Thing, set activity to world.time. Have your proc loop infinitely, and sleep for (AFKTIME - (world.time - activity)), or basically until the first moment at which they could possibly have been AFK for the amount of time (IE: if you want them to go AFK after 10 minutes, and they last took an action 7 minutes ago, you'll want to sleep for 3 minutes). At that point, if world.time >= (activity + AFKTIME), then do whatever you want to make them AFK. Ideally, you then break out of the loop and end the proc at that point, and then have your Things call the proc again when a player returns from being AFK. |
The Great Sabin wrote:
If you want it to sleep() for 10 minuets, Then do sleep(1000) //Ex, 600 is 1 minuet, 1000 is ten minuets I don't mean to be degrading, but I thought it might brighten some peoples' day if I pointed this out. 600*10 = 1000? QED |
Rikvdv2 wrote:
I don't want to kick them i want them to be unable to Train until they move around for abit. because for instance i Code. and if i get busy or have to go afk i don't wanna have to re log on its just a hassle. You could, for example, block every training-related verb or proc when the player is AFK, and having them unblock it by using a verb which will ask the player to type a randomly generated word/number displayed on their screen, so that they can't just make their autoclicker or whatever do the unblocking thing. client/var/isAFK |
There're a few methods, so I'll give you a bad one.
Make all player mobs be born with the procedure. |
Loduwijk wrote:
Don't forget about client.inactivity Presumably this is to prevent unattended macroing, so inactivity is useless. Of course, then again, so is my solution. The only good solution is to make unattended macroing itself useless, which is a design problem rather than a programming problem. |