Hi
I'm programming my own bot like a bunch of people here and my codecave code isnīt working, I suspect after read some posts about it that is because my RemoteThread it is not syncronized but I think that the address of attackCreature Tibia's function is wrong on my code too....
Code:
DWORD function = 0x19BF0 + baseAddress; // = 0x419BF0
DWORD creatureId = 0x400027; // wolf ID
BYTE codeCave[] = { 0xB9, 0x00, 0x00, 0x00, 0x00, // MOV ECX, creatureId
0xB8, 0x00, 0x00, 0x00, 0x00, // MOV EAX, function
0xFF, 0xD0, // CALL EAX
0xC3, // RETN
};
memcpy(&codeCave[1], &creatureId, 4);
memcpy(&codeCave[6], &function, 4);
LPVOID codeCaveAddress = VirtualAllocEx(gHandle, 0, sizeof(codeCave), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(gHandle, codeCaveAddress, &codeCave, sizeof(codeCave), 0);
HANDLE remoteThread = CreateRemoteThread(gHandle, 0, 0, (LPTHREAD_START_ROUTINE)codeCaveAddress, 0, 0, 0);
WaitForSingleObject(remoteThread, INFINITE);
VirtualFreeEx(gHandle, codeCaveAddress, sizeof(codeCave), MEM_RELEASE);
So How can I find or test the attackCreature address?? I am with problems to find the creatureId too....
And the last question, What you bot programmers use to move your character in your bot?(Right now I'm using mouse clicks with SendMessage but it's impossible to maintain this)