-
Notifications
You must be signed in to change notification settings - Fork 0
/
tlomn_igt.cpp
60 lines (57 loc) · 1.55 KB
/
tlomn_igt.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <iostream>
#include <Windows.h>
#include <winuser.h>
#include <conio.h>
DWORD pID;
DWORD adress = 0x0083Af50;
DWORD time = 0x03186DBC;
DWORD wfrAdd = 0x00705CA8;
DWORD cBAdd = 0x00705CAC;
float ngl_org;
int wframe = 0;
int cBoxes = 0;
int main()
{
HWND hwnd = FindWindowA (0, ("Bionicle"));
if (!hwnd) std::cerr << "TLoMN not found" << std::endl;
GetWindowThreadProcessId(hwnd, &pID);
HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);
if (!pHandle) std::cerr << "ERROR" << std::endl;
while(true) {
ReadProcessMemory(pHandle, (LPVOID)wfrAdd, &wframe, (DWORD)sizeof(wframe), 0);
ReadProcessMemory(pHandle, (LPVOID)cBAdd, &cBoxes, (DWORD)sizeof(cBoxes), 0);
if(GetAsyncKeyState('G')) {
switch(wframe) {
case 0: {
wframe = 1;
std::cout << "Wireframe: ON\n";
WriteProcessMemory(pHandle, (LPVOID)wfrAdd, &wframe, (DWORD)sizeof(wframe), 0);
break;
}
case 1: {
wframe = 0;
std::cout << "Wireframe: OFF\n";
WriteProcessMemory(pHandle, (LPVOID)wfrAdd, &wframe, (DWORD)sizeof(wframe), 0);
break;
}
}
}
if(GetAsyncKeyState('B')) {
switch(cBoxes) {
case 0: {
cBoxes = 1;
std::cout << "Collision Boxes: ON\n";
WriteProcessMemory(pHandle, (LPVOID)cBAdd, &cBoxes, (DWORD)sizeof(cBoxes), 0);
break;
}
case 1: {
cBoxes = 0;
std::cout << "Collision Boxes: OFF\n";
WriteProcessMemory(pHandle, (LPVOID)cBAdd, &cBoxes, (DWORD)sizeof(cBoxes), 0);
break;
}
}
}
}
return 1;
}