Tate Admin
Posts : 208 Reputation : 17 Join date : 2009-09-19 Age : 27
| Subject: Creating a Basic trainer for .exe files Sat Nov 28, 2009 6:48 am | |
| Things youll need: Cheat Engine Dev C++ or Code::Blocks (idk about MSC++, I never liked it) Open up cheat engine and open the tutorial. Find the addie for health (should be easy, it tells you how on the tutorial) Your addie SHOULD look something like this: - Code:
-
00A63FC4 Well, that's not a pointer. Just add 0x to it, to make it cpp usable.: - Code:
-
0x00A63FC4 Save this to use for later Ok. Include windows.h and iostream, use namespace std, and define own as "Success": - Code:
-
#include <windows.h> #include <iostream> using namespace std; #define own "Success" Read my comments: - Code:
-
int main() { HWND cheat = FindWindow(0, "Cheat Engine Tutorial"); // determines 'cheat' as the desired window to modify if(cheat == 0) { Beep(1000,1000); cout << "Failed" << endl; // if you failed, this shows up } else { DWORD ID; GetWindowThreadProcessId(cheat, &ID); HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ID); if(!hProcess) { Beep(1000,1000); } else { int v1 = 600; DWORD new_v1 = sizeof(v1); if(WriteProcessMemory(hProcess, (LPVOID)0x00A63FC4, &v1, new_v1, NULL)) //adds 600 health to your c urrent health { MessageBox(0, own, own, MB_OK); } else{ Beep(1000,1000); } }CloseHandle(hProcess); }system("PAUSE"); return 0; } Full source: - Code:
-
#include <windows.h> #include <iostream> using namespace std; #define own "Success"
int main() { HWND cheat = FindWindow(0, "Cheat Engine Tutorial"); // determines 'cheat' as the desired window to modify if(cheat == 0) { Beep(1000,1000); cout << "Failed" << endl; // if you failed, this shows up } else { DWORD ID; GetWindowThreadProcessId(cheat, &ID); HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ID); if(!hProcess) { Beep(1000,1000); } else { int v1 = 600; DWORD new_v1 = sizeof(v1); if(WriteProcessMemory(hProcess, (LPVOID)0x00A63FC4, &v1, new_v1, NULL)) //adds 600 health to your c urrent health { MessageBox(0, own, own, MB_OK); } else{ Beep(1000,1000); } }CloseHandle(hProcess); }system("PAUSE"); return 0; } Basicly that's it. Just post if you have any questions. | |
|