can anyone help me on how to make an anti afk function to my bot?
ive tried writing current tickcount to lastHardwareAction address in my main loop
and tried spamming a "/afk" macro
but they didnt work
please help
can anyone help me on how to make an anti afk function to my bot?
ive tried writing current tickcount to lastHardwareAction address in my main loop
and tried spamming a "/afk" macro
but they didnt work
please help
Did it ever happened to you, when you're smoking a cigarette and you try to get it out from your mouth but your lips are so dry that your fingers go to the fire instead because the cigarette is stuck on your lips?
Code:main() { Loop { cont := true Sleep 100 om.update() om.player.setpos() antiAfk() gosub fight if cont gosub loot if cont gosub walk } ...... antiAfk() { mem.write(mLastHardware,A_TickCount) } ....... global mLastHardware := mem.baseaddress + 0xBB2C74
ahk code, and thx for helping
mem.write is UInt by default
Last edited by seasick; 09-04-2014 at 07:50 PM.
Make sure you use the Tickcount used by WoW and not the tickcount from your system. Using Enviroment.TickCount always caused problems for me
|Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|
For anti-AFK, or for other things, like movement? For anti-AFK it really shouldn't matter since the code that reads that variable compares for a difference of like five minutes. The problem with Environment.TickCount for movement or other things where more closely matching WoW's values is important, you don't get to specify whether to use GetTickCount() or QueryPerformanceCounter(). I am not sure what WoW does currently, but there used to be a console var to specify which one WoW should use. If you knew which it used, and it used a particular one always by default (which one depends on the WoW version), you could make the corresponding system call to get the value, and it would work fine.
I just used this one:
Environment.TickCount Property (System)
and I never had a problem with anything except going AFK randomly
|Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|
Windows post msg with VK_RIGHT start and stop.
Most useful and easy way.
IIRC the /afk command is different to actually becoming inactive, and won't be removed by hardware updates. It's been a long while since I touched anti-AFK stuff, so don't quote me on it. I just seem to remember it this way.