Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <Windows.h>
- #include <string>
- using namespace std;
- /*================|MAPY|================*/
- /*======================================*/
- int main() {
- HWND hWnd = FindWindowA(0, ("Transformice"));
- DWORD procID;
- if (hWnd)
- {
- SetWindowPos(HWND(hWnd), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
- SetFocus(HWND(hWnd));
- SetForegroundWindow(HWND(hWnd));
- cout << "okno wykryte" << endl;
- GetWindowThreadProcessId(hWnd, &procID);
- HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
- if (procID = NULL)
- {
- cout << "nie znaleziono adresu" << endl;
- }
- else
- {
- cout << "wszystko gra" << endl;
- poczatek:
- while (1) {
- int idmapy = 0x95D9194;
- ReadProcessMemory(handle, (LPCVOID)idmapy, &idmapy, sizeof(long), 0);
- cout << idmapy << endl;
- if (idmapy == 50)
- {
- cout << "map50" << endl;
- }
- else if (idmapy == 10)
- {
- //while (idmapy == 10)
- //{
- cout << "map10" << endl;
- Sleep(3000);
- keybd_event(0x44, 0, 0, 0);
- cout << "prawo 7" << endl;
- Sleep(7000);
- keybd_event(0x44, 0, KEYEVENTF_KEYUP, 0);
- keybd_event(0x41, 0, 0, 0);
- cout << "lewo 7,5" << endl;
- Sleep(7500);
- keybd_event(0x41, 0, KEYEVENTF_KEYUP, 0);
- while(idmapy == 10) {
- Sleep(1000);
- cout << "czekam" << endl;
- int idmapy = 0x95D9194;
- ReadProcessMemory(handle, (LPCVOID)idmapy, &idmapy, sizeof(long), 0);
- cout << idmapy << endl;
- if (idmapy != 10) { goto poczatek; }
- //}
- //else { cout << " pizda " << endl; }
- }
- /*{
- Sleep(1000);
- cout << "Czekam" << endl;
- ReadProcessMemory(handle, (LPCVOID)idmapy, &idmapy, sizeof(long), 0);
- goto poczatek;
- }*/
- }
- }
- }
- }
- else
- {
- cout << "nie znaleziono okna" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment