Source:TyranoMapHack123/D3Scene.cpp2
Main Source - Part 2: Cdkey grabbing and hotkeys
Parent Directory: Source:TyranoMapHack123
Plain Code: edit
switch (message)
{ case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
if ( (HIWORD(wParam) == BN_CLICKED) && (LOWORD(wParam) == IDC_MINIMIZE) )
{if (minimized) restore(hwnd);
else minimize(hwnd);
}switch (wmId)
{case IDB_BOUT0:
SetWindowText(hwnd, titlesafe);
for(;;)
{ReadProcessMemory(hOpen, (LPCVOID)Address, &Buffer, 4, &BytesRead);
if(Buffer == 1463898675)
{ // ROC (3RAW).Address -= 32;
break;
}else if
(Buffer == 1462982736)
{ // TFT (PX3W).Address-= 32;
break;
} else {Address += 65536;
} }char Name[16];
Name[15] = 0;
for( unsigned int i = 0; i < 15; i++ )
{ReadProcessMemory( hOpen, (LPVOID)( Address + i ), &Buffer, 1, &BytesRead );
Name[i] = Buffer;
} SendMessage(stat2, WM_SETTEXT, 16, (LPARAM)Name);
Sleep(1500);
//InvalidateRect(hwnd, NULL, TRUE);GetWindowText(hwndEdit, szText, 16);
for( unsigned int j = 0; j < 15; j++ )
{WriteProcessMemory( hOpen, (LPVOID)(Address + j), (LPCVOID)(szText+ j), 1, &BytesWritten );
} SendMessage(stat2, WM_SETTEXT, 16, (LPARAM)szText);
case IDB_BOUT1:
rad = SendMessage(boutc1,BM_GETCHECK,0,0);
if(rad == 1)
{SetWindowText(hwnd, titlesafe);
CIniReader iniReader(".\\config.ini");
bool revealmap = iniReader.ReadBoolean("Settings", "revealmap", false);
bool revealminimap = iniReader.ReadBoolean("Settings", "revealminimap", false);
bool nofogmap = iniReader.ReadBoolean("Settings", "nofogmap", false);
bool nofogminimap = iniReader.ReadBoolean("Settings", "nofogminimap", false);
bool clickunits = iniReader.ReadBoolean("Settings", "clickunits", false);
bool showresources = iniReader.ReadBoolean("Settings", "showresources", false);
bool showinvisible = iniReader.ReadBoolean("Settings", "showinvisible", false);
bool clickinvisible = iniReader.ReadBoolean("Settings", "clickinvisible", false);
bool redinvisible = iniReader.ReadBoolean("Settings", "redinvisible", false);
bool showitems = iniReader.ReadBoolean("Settings", "showitems", false);
bool showillusions = iniReader.ReadBoolean("Settings", "showillusions", false);
bool showskills = iniReader.ReadBoolean("Settings", "showskills", false);
bool showcooldowns = iniReader.ReadBoolean("Settings", "showcooldowns", false);
bool tradehack = iniReader.ReadBoolean("Settings", "tradehack", false);
bool allheroicons = iniReader.ReadBoolean("Settings", "allheroicons", false);
bool enemyheroicons = iniReader.ReadBoolean("Settings", "enemyheroicons", false);
bool allyheroicons = iniReader.ReadBoolean("Settings", "allyheroicons", false);
bool allhpbars = iniReader.ReadBoolean("Settings", "allhpbars", false);
bool enemyhpbars = iniReader.ReadBoolean("Settings", "enemyhpbars", false);
bool allyhpbars = iniReader.ReadBoolean("Settings", "allyhpbars", false);
bool bypassah = iniReader.ReadBoolean("Settings", "bypassah", false);
bool enemypings = iniReader.ReadBoolean("Settings", "enemypings", false);
bool hotkeysoff = iniReader.ReadBoolean("Settings", "hotkeysoff", false);
bool customcamera = iniReader.ReadBoolean("Settings", "customcamera", false);
bool customamounts = iniReader.ReadBoolean("Settings", "customamounts", false);
bool removezoomangles = iniReader.ReadBoolean("Settings", "removezoomangles", false);
bool topview = iniReader.ReadBoolean("Settings", "topview", false);
bool spin = iniReader.ReadBoolean("Settings", "spin", false);
bool smoothcamera = iniReader.ReadBoolean("Settings", "smoothcamera", false);
char* cameradistance = iniReader.ReadString("Settings", "cameradistance", "1650");
char* minamount = iniReader.ReadString("Settings", "minamount", "100");
char* maxamount = iniReader.ReadString("Settings", "maxamount", "200");
char* smoothdistance = iniReader.ReadString("Settings", "smoothdistance", "1650");
if ((smoothcamera==customcamera)){
MessageBox(NULL, "Customcamera and smoothcamera cannot be both true or both false, else camera hack won't work. One must be true and the other false.", "Warning!", MB_ICONWARNING);
}else{}
if ((smoothcamera==true) && (customcamera==false)){
SetWindowText(hwndEdit7, smoothdistance);
Sleep(200);
SendMessage(bout7, BM_CLICK,1,0);
}else{}
if ((customcamera==true) && (smoothcamera==false)) {
SetWindowText(hwndEdit2, cameradistance);
Sleep(200);
SendMessage(bout2, BM_CLICK,1,0);
}else{}
if (customamounts==true){
SetWindowText(hwndEdit3, minamount);
SetWindowText(hwndEdit4, maxamount);
Sleep(200);
SendMessage(bout3, BM_CLICK,1,0);
SendMessage(bout4, BM_CLICK,1,0);
} else{}
if (revealmap==true){
SendMessage(boutc2, BM_CLICK,revealmap,0);
}else{}
if (revealminimap==true){
SendMessage(boutc3, BM_CLICK,revealminimap,0);
}else{}
if (nofogmap==true){
SendMessage(boutc4, BM_CLICK,nofogmap,0);
}else{}
if (nofogminimap==true){
SendMessage(boutc5, BM_CLICK,nofogminimap,0);
}else{}
if (clickunits==true){
SendMessage(boutc6, BM_CLICK,clickunits,0);
}else{}
if (showresources==true){
SendMessage(boutc9, BM_CLICK,showresources,0);
}else{}
if (showinvisible==true){
SendMessage(boutc10, BM_CLICK,showinvisible,0);
}else{}
if (clickinvisible==true){
SendMessage(boutc18, BM_CLICK,clickinvisible,0);
}else{}
if (redinvisible==true){
SendMessage(boutc19, BM_CLICK,redinvisible,0);
}else{}
if (showitems==true){
SendMessage(boutc11, BM_CLICK,showitems,0);
}else{}
if (showillusions==true){
SendMessage(boutc8, BM_CLICK,showillusions,0);
}else{}
if (showskills==true){
SendMessage(boutc20, BM_CLICK,showskills,0);
}else{}
if (showcooldowns==true){
SendMessage(boutc21, BM_CLICK,showcooldowns,0);
}else{}
if (tradehack==true){
SendMessage(boutc23, BM_CLICK,tradehack,0);
}else{}
if (allheroicons==true){
SendMessage(boutc22, BM_CLICK,allheroicons,0);
}else{}
if (enemyheroicons==true){
SendMessage(boutc24, BM_CLICK,enemyheroicons,0);
}else{}
if (allyheroicons==true){
SendMessage(boutc25, BM_CLICK,allyheroicons,0);
}else{}
if (allhpbars==true){
SendMessage(boutc12, BM_CLICK,allhpbars,0);
}else{}
if (enemyhpbars==true){
SendMessage(boutc13, BM_CLICK,enemyhpbars,0);
}else{}
if (allyhpbars==true){
SendMessage(boutc14, BM_CLICK,allyhpbars,0);
}else{}
if (bypassah==true){
SendMessage(boutc17, BM_CLICK,bypassah,0);
}else{}
if (enemypings==true){
SendMessage(boutc16, BM_CLICK,enemypings,0);
}else{}
if (hotkeysoff==true){
SendMessage(boutc41, BM_CLICK,hotkeysoff,0);
}else{}
if (removezoomangles==true){
SendMessage(boutc53, BM_CLICK,removezoomangles,0);
}else{}
if (topview==true){
SendMessage(boutc54, BM_CLICK,topview,0);
}else{}
if (spin==true){
SendMessage(boutc57, BM_CLICK,spin,0);
}else{}
SendMessage(boutc2, BM_SETCHECK,revealmap,0);
SendMessage(boutc3, BM_SETCHECK,revealminimap,0);
SendMessage(boutc4, BM_SETCHECK,nofogmap,0);
SendMessage(boutc5, BM_SETCHECK,nofogminimap,0);
SendMessage(boutc6, BM_SETCHECK,clickunits,0);
SendMessage(boutc9, BM_SETCHECK,showresources,0);
SendMessage(boutc10, BM_SETCHECK,showinvisible,0);
SendMessage(boutc18, BM_SETCHECK,clickinvisible,0);
SendMessage(boutc19, BM_SETCHECK,redinvisible,0);
SendMessage(boutc11, BM_SETCHECK,showitems,0);
SendMessage(boutc8, BM_SETCHECK,showillusions,0);
SendMessage(boutc20, BM_SETCHECK,showskills,0);
SendMessage(boutc21, BM_SETCHECK,showcooldowns,0);
SendMessage(boutc23, BM_SETCHECK,tradehack,0);
SendMessage(boutc22, BM_SETCHECK,allheroicons,0);
SendMessage(boutc24, BM_SETCHECK,enemyheroicons,0);
SendMessage(boutc25, BM_SETCHECK,allyheroicons,0);
SendMessage(boutc12, BM_SETCHECK,allhpbars,0);
SendMessage(boutc13, BM_SETCHECK,enemyhpbars,0);
SendMessage(boutc14, BM_SETCHECK,allyhpbars,0);
SendMessage(boutc17, BM_SETCHECK,bypassah,0);
SendMessage(boutc16, BM_SETCHECK,enemypings,0);
SendMessage(boutc41, BM_SETCHECK,hotkeysoff,0);
SendMessage(boutc53, BM_SETCHECK,removezoomangles,0);
SendMessage(boutc54, BM_SETCHECK,topview,0);
SendMessage(boutc57, BM_SETCHECK,spin,0);
PlaySound("activate.wav",NULL,SND_FILENAME|SND_ASYNC);
SendMessage(stat2, WM_SETTEXT, 16, (LPARAM)"All features enabled.");
} else {SetWindowText(hwnd, titlesafe);
CIniReader iniReader(".\\config.ini");
bool revealmap = iniReader.ReadBoolean("Settings", "revealmap", false);
bool revealminimap = iniReader.ReadBoolean("Settings", "revealminimap", false);
bool nofogmap = iniReader.ReadBoolean("Settings", "nofogmap", false);
bool nofogminimap = iniReader.ReadBoolean("Settings", "nofogminimap", false);
bool clickunits = iniReader.ReadBoolean("Settings", "clickunits", false);
bool showresources = iniReader.ReadBoolean("Settings", "showresources", false);
bool showinvisible = iniReader.ReadBoolean("Settings", "showinvisible", false);
bool clickinvisible = iniReader.ReadBoolean("Settings", "clickinvisible", false);
bool redinvisible = iniReader.ReadBoolean("Settings", "redinvisible", false);
bool showitems = iniReader.ReadBoolean("Settings", "showitems", false);
bool showillusions = iniReader.ReadBoolean("Settings", "showillusions", false);
bool showskills = iniReader.ReadBoolean("Settings", "showskills", false);
bool showcooldowns = iniReader.ReadBoolean("Settings", "showcooldowns", false);
bool tradehack = iniReader.ReadBoolean("Settings", "tradehack", false);
bool allheroicons = iniReader.ReadBoolean("Settings", "allheroicons", false);
bool enemyheroicons = iniReader.ReadBoolean("Settings", "enemyheroicons", false);
bool allyheroicons = iniReader.ReadBoolean("Settings", "allyheroicons", false);
bool allhpbars = iniReader.ReadBoolean("Settings", "allhpbars", false);
bool enemyhpbars = iniReader.ReadBoolean("Settings", "enemyhpbars", false);
bool allyhpbars = iniReader.ReadBoolean("Settings", "allyhpbars", false);
bool bypassah = iniReader.ReadBoolean("Settings", "bypassah", false);
bool enemypings = iniReader.ReadBoolean("Settings", "enemypings", false);
bool hotkeysoff = iniReader.ReadBoolean("Settings", "hotkeysoff", false);
bool removezoomangles = iniReader.ReadBoolean("Settings", "removezoomangles", false);
bool topview = iniReader.ReadBoolean("Settings", "topview", false);
bool spin = iniReader.ReadBoolean("Settings", "spin", false);
bool customcamera = iniReader.ReadBoolean("Settings", "customcamera", false);
bool smoothcamera = iniReader.ReadBoolean("Settings", "smoothcamera", false);
char* smoothdistance = iniReader.ReadString("Settings", "smoothdistance", "1650");
if ((smoothcamera==true)&&(customcamera==false)){
SetWindowText(hwndEdit7, "1650");
Sleep(200);
SendMessage(bout7, BM_CLICK,1,0);
}else{}
if ((customcamera==true) && (smoothcamera==false)){
SetWindowText(hwndEdit2, "1650");
Sleep(200);
SendMessage(bout2, BM_CLICK,1,0);
}else{}
if (revealmap==true){
SendMessage(boutc2, BM_CLICK,revealmap,0);
}else{}
if (revealminimap==true){
SendMessage(boutc3, BM_CLICK,revealminimap,0);
}else{}
if (nofogmap==true){
SendMessage(boutc4, BM_CLICK,nofogmap,0);
}else{}
if (nofogminimap==true){
SendMessage(boutc5, BM_CLICK,nofogminimap,0);
}else{}
if (clickunits==true){
SendMessage(boutc6, BM_CLICK,clickunits,0);
}else{}
if (showresources==true){
SendMessage(boutc9, BM_CLICK,showresources,0);
}else{}
if (showinvisible==true){
SendMessage(boutc10, BM_CLICK,showinvisible,0);
}else{}
if (clickinvisible==true){
SendMessage(boutc18, BM_CLICK,clickinvisible,0);
}else{}
if (redinvisible==true){
SendMessage(boutc19, BM_CLICK,redinvisible,0);
}else{}
if (showitems==true){
SendMessage(boutc11, BM_CLICK,showitems,0);
}else{}
if (showillusions==true){
SendMessage(boutc8, BM_CLICK,showillusions,0);
}else{}
if (showskills==true){
SendMessage(boutc20, BM_CLICK,showskills,0);
}else{}
if (showcooldowns==true){
SendMessage(boutc21, BM_CLICK,showcooldowns,0);
}else{}
if (tradehack==true){
SendMessage(boutc23, BM_CLICK,tradehack,0);
}else{}
if (allheroicons==true){
SendMessage(boutc22, BM_CLICK,allheroicons,0);
}else{}
if (enemyheroicons==true){
SendMessage(boutc24, BM_CLICK,enemyheroicons,0);
}else{}
if (allyheroicons==true){
SendMessage(boutc25, BM_CLICK,allyheroicons,0);
}else{}
if (allhpbars==true){
SendMessage(boutc12, BM_CLICK,allhpbars,0);
}else{}
if (enemyhpbars==true){
SendMessage(boutc13, BM_CLICK,enemyhpbars,0);
}else{}
if (allyhpbars==true){
SendMessage(boutc14, BM_CLICK,allyhpbars,0);
}else{}
if (bypassah==true){
SendMessage(boutc17, BM_CLICK,bypassah,0);
}else{}
if (enemypings==true){
SendMessage(boutc16, BM_CLICK,enemypings,0);
}else{}
if (hotkeysoff==true){
SendMessage(boutc41, BM_CLICK,hotkeysoff,0);
}else{}
if (removezoomangles==true){
SendMessage(boutc53, BM_CLICK,removezoomangles,0);
}else{}
if (topview==true){
SendMessage(boutc54, BM_CLICK,topview,0);
}else{}
if (spin==true){
SendMessage(boutc57, BM_CLICK,spin,0);
}else{}
SendMessage(boutc2, BM_SETCHECK,0,0);
SendMessage(boutc3, BM_SETCHECK,0,0);
SendMessage(boutc4, BM_SETCHECK,0,0);
SendMessage(boutc5, BM_SETCHECK,0,0);
SendMessage(boutc6, BM_SETCHECK,0,0);
SendMessage(boutc9, BM_SETCHECK,0,0);
SendMessage(boutc10, BM_SETCHECK,0,0);
SendMessage(boutc18, BM_SETCHECK,0,0);
SendMessage(boutc19, BM_SETCHECK,0,0);
SendMessage(boutc11, BM_SETCHECK,0,0);
SendMessage(boutc8, BM_SETCHECK,0,0);
SendMessage(boutc20, BM_SETCHECK,0,0);
SendMessage(boutc21, BM_SETCHECK,0,0);
SendMessage(boutc23, BM_SETCHECK,0,0);
SendMessage(boutc22, BM_SETCHECK,0,0);
SendMessage(boutc24, BM_SETCHECK,0,0);
SendMessage(boutc25, BM_SETCHECK,0,0);
SendMessage(boutc12, BM_SETCHECK,0,0);
SendMessage(boutc13, BM_SETCHECK,0,0);
SendMessage(boutc14, BM_SETCHECK,0,0);
SendMessage(boutc17, BM_SETCHECK,0,0);
SendMessage(boutc16, BM_SETCHECK,0,0);
SendMessage(boutc41, BM_SETCHECK,0,0);
SendMessage(boutc53, BM_SETCHECK,0,0);
SendMessage(boutc54, BM_SETCHECK,0,0);
SendMessage(boutc57, BM_SETCHECK,0,0);
SendMessage(stat2, WM_SETTEXT, 16, (LPARAM)"All features disabled.");
}break;