Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main() {
int newValue = 2000;
HWND hwnd = FindWindowA(NULL, "Terraria: So then I said 'Something about a pc update....'"); // Find window
if (hwnd == NULL) {
cout << "Cannot find window name" << endl;
Sleep(3000);
exit(-1);
}
else {
DWORD procID;
GetWindowThreadProcessId(hwnd, &procID);
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
if (procID == NULL){
cout << "Cannot find process ID" << endl;
Sleep(3000);
exit(-1);
}
else {
WriteProcessMemory(handle, (LPVOID)0x40B01D0C, &newValue, sizeof(newValue), 0);
}
}
return 0;
}
I need help with getting a static address, and with the name change on the window.. I am new to game hackign and is wondering how to do it..
My ******* Aiden#6538
Thank you!