Hey!
I am currently trying to implement some anti afk for my bot as it always went afk.
After some reversing I stumbled accross CSimpleTop::m_eventTime, which is increased after every hardware event, realtime like I thought.
Freezing it kept me staying afk/logging out, so it seems to be the right value.
I wrote this code:
It keeps the value synchronised to the 'real' time.std::uintptr_t const LAST_HARDWARE_EVENT = 0xD92B90;
static inline std::uint32_t getLocalTimeMs()
{
return (std::clock() / (CLOCKS_PER_SEC / 1000));
}
static inline std::uint32_t& getLastHardwareEvent()
{
return *reinterpret_cast<std::uint32_t*>(LAST_HARDWARE_EVENT);
}
void WoW:ulseAntiAfk()
{
static std::uint32_t difference =
std::abs(getLocalTimeMs() - getLastHardwareEvent());
std::uint32_t curDifference =
std::abs(getLocalTimeMs() - getLastHardwareEvent());
if(curDifference > difference)
getLastHardwareEvent() += curDifference - difference;
}
But after some time it stops working.
I investigated it a bit and found out that the value is increased kinda similar to real time but after a while there's a huge gap.
Wtf ist WoW doing there? And is it an option to simply set it to 0xFFFFFFFF every frame?
Thank you.
Regards,
Flo![]()