
Originally Posted by
Tightmarrow
You don't need offsets to read from an address, you can just do a:
Code:
int ValueToRead; // Considering it's a normal integer you want to read
ReadProcessMemory(Handle, reinterpret_cast<void*>(0x1434156D0), &ValueToRead, sizeof(ValueToRead), nullptr);
std::cout << "Value read: " << ValueToRead << std::endl;
And to write those 2 you can just do
Code:
for(;;){ // Infinite loop so that the values remain the same, else it will only change once
if(GetAsyncKeyState(VK_F6)){ // If the key F6 is pressed the hack is activated
float ValueToWrite = 100.0;
float ValueToWrite2 = 0;
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03C8), ValueToWrite, sizeof(ValueToWrite), nullptr);
WriteProcessMemory(Handle, reinterpret_cast<void*>(0x03D4), ValueToWrite2, sizeof(ValueToWrite2), nullptr);
}
}
That depends on how the value is read. Do the Cheat Engine thing and tell me what the normal value you get is. Then I'll tell you more. I can't really do anything + understand everything :/
Yes, let me explain how Cheat Engine works:
You input a value, let's say
12.
Cheat Engine searches for the value with 12 in it. Wow, it found the value! The problem is, there's probably a few hundred values that are 12. So we run it again after we changed the value of HP or something, to, let's say...
13.
Cheat Engine searches for which values out of the values that were 12 before have changed and are
now 13. It gives you the location that value to edit; usually, at this time, that's the value you're looking for. If not, you just change it again and again; sometimes a packet might have duplicates (Why even!?!?).
Once you're done, Cheat Engine saves the location of that value to a name or a file so you can change it whenever you want (aka if I want 1 million money at this game, I can just change that value to 1 million, or whatever number I want, whenever I want..
For a game such as CSGO or RotMG, it works the same way: you analyze a packet, look for which value is the value you want, and you either edit the packet and send it back (hacks to try and fool the server) or change your game (ESP or X-Ray).