Originally Posted by
kingviper
after a week of trying to figure out how to reverse engineer the afk, I have had no luck.
Reversing CGGameUI::UpdatePlayerAFK has nothing to do with luck. Try to answer these questions:
a) What have you tried / where are you stuck exactly?
b) What have you learned of the function so far?
I'm assuming you're out of process (you're trying to read the address where CGGameUI__UpdatePlayerAFK is located at in reply #6, that's a function...)
The skeletton of that function's basically:
Code:
if (curTime - LastHardwareAction >= 300000)
{
// Last Hardware Action >= 5mins ago.
if (curTime - LastHardwareAction < 1800000)
{
// Last Hardware Action >=5mins but < 30mins, sit and afk.
} else {
// Last Hardware Action >= 30mins ago, logout
}
}
To avoid all that stuff you just have to set LastHardwareAction so that he if is never true.
So, either 0x7FFFFFFF once or to GetTime()*1000 (current time in ms) when you cast your fishing spell.
I'll leave getting the address of LastHardwareAction as an exercise, it's really simple if you're reading this section of the forum.