I don;t understand, The boolean 'Working' is set to true when warrock opens,and when its closed its set to false. The most fucked up part is when I press a key(a) to activate the hack, 'Working' is set to false. And I don't understand why the fuck it is. I programmed this by-myself and I am 100% sure there are only like no spots in which it turns false because a hotkey is pressed. Here. Ignore the comments, there there to keep me on track, Its not my first time programming C++, just my first time making a hack with it.
Code:
#define ProcessName
#include <cstdlib>
#include <iostream>
#include <string>
#include <windows.h>
#include <conio.h>
#include <dos.h>
#include <tlhelp32.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
bool WarrockFound = false;
HANDLE WarRockProcess = NULL;
bool Working = false;
bool InfStem = false;
bool ScopeOn = false;
long Temp;
char ReturnKey = '0';
long StemWrite = 1120403456;
LPVOID ScopeAddress = (void*) 0x00AB7E22;
LPVOID StemAddress = (void*) 0x008B9B04;
HANDLE GetProcess(void){
bool TempBool = false;
HANDLE ProcessSnap;
PROCESSENTRY32 ProcessInformation;
//Process Handle in Gen Declaration section
ProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
Process32First(ProcessSnap, &ProcessInformation);
//Start Find Process
TempBool = false;
do
{
if(strcmp(ProcessInformation.szExeFile,"WarRock.exe") == 0)
{
TempBool = true;
Working = true;
return OpenProcess(PROCESS_ALL_ACCESS, false, ProcessInformation.th32ProcessID);
break;
}
}while(Process32Next(ProcessSnap, &ProcessInformation));
if(TempBool == true)
{
Working = true;
}else{
Working = false;
}
//End Find Process
}
void Screen(void)
{
system("cls");
cout<<"_______________[Hacks Status]____________\n"<<endl;
if(Working == false ){cout<<"Status : Cannot Find Warrocks Process"<<endl;}else{cout<<"Status : Warrock Found"<<endl;}
cout<<"\n\nHacks:"<<endl;
if(ScopeOn){cout<<"Scope [Activated]\n";}else{cout<<"Scope [Unactivated]\n";}
if(InfStem){cout<<"InfStem [Activated]\n";}else{cout<<"InfStem [Unactivated]\n";}
}
int main(int argc, char *argv[])
{
cout<<"Waiting For Okay.."<<endl;
MessageBox(NULL,"Notes:\n The twitching in the console is normal.\nIf you want to get rid of it you can increase your FrameRates.\nAnyways this hack was made with Dev-C++.\nIts better then all the VB\nHacks in the world put to gether, and you can't make fun of it! \nNor can you make fun of pokopeople Okay -_-\n\nPlease Note The Following Changes Have Taken Place: \n-No Commands\n-Uses 'Hot Keys'\n-Includes Scope\n-Includes Light Map\n-Includes InfStem\n\nINFOMRATION :\n Hot Keys:\n C - Scope On\n Shift + C - Scope Off\n P - InfStemOn\n Shift + P - InfStem Off\n Shift + Q - Quite","Notice!",MB_OK);
while(true)
{
Screen();
GetProcess();
//Check For Local Key Presses
if(kbhit()){ReturnKey = getch();}
if(ReturnKey == 'Q'){return 0;}
WarRockProcess = GetProcess();
//Check Find Status
if(Working == true)
{
GetProcess();
Screen();
//Write Process Memory Start Below
if(InfStem){WriteProcessMemory(WarRockProcess,StemAddress,&StemWrite,4,NULL);}
//True\False KeyPress Start Below
if(kbhit()){
ReturnKey = getch();
switch(ReturnKey){
case 'a':
Temp = 1;
ScopeOn = true;
WriteProcessMemory(WarRockProcess,ScopeAddress,&Temp,4,NULL);
//OnScope
break;
case 'b':
Temp = 0;
ScopeOn = false;
WriteProcessMemory(WarRockProcess,ScopeAddress,&Temp,4,NULL);
//OffScope
break;
case 'c':
InfStem = false;
break;
case 'd':
InfStem = true;
break;
}
}
}//End If Working..
}
}