Code:
/*
Project : Public HACK Tutorial
Author : KVDIRECT AKA:Sniper8ce
*/
#include <stdio.h>
#include <windows.h>
//Address go Here
#define Player 0xCCB670 //these are current
#define Server 0xBD4B38 // as of 8-11-09
#define OFS_X 0x0000023C // on Warrock int
#define OFS_Y 0x00000244 // change them when needed
#define OFS_Z 0x00000240
#define ADR_HEALTH 0xB0A9B4
#define ADR_AMMO 0xB0A9B8
#define ADR_FLAG 0xB0A9BC
#define ADR_REPAIR 0xB0A9B0
#define ADR_SPEED 0x0099ADA8
#define ADR_SPAWN_1 0x00C48320
#define ADR_SPAWN_2 0x00CACF2C
#define ADR_BOUNDS_1 0x00C5DF9C
#define ADR_BOUNDS_2 0x00C5DFA0
#define ADR_SCOPE 0x00AF53F6
#define ADR_NO_SPREAD 0xB0AA0C
HANDLE Warrock;
DWORD *client= (DWORD*)Player;
DWORD *server= (DWORD*)Server;
//Hack Codes Go Here
//Fast All
void Fastall()
{
*(float*) ADR_HEALTH = 5000000;
*(float*) ADR_AMMO = 5000000;
*(float*) ADR_FLAG = 50000;
*(float*) ADR_REPAIR = 5000000;
}
//Speed
void speed() // insert key, speed on
{
if(GetAsyncKeyState(VK_INSERT) &1)
{
*(float*) ADR_SPEED = 1500;
}
}
void speedoff() // delete key, speed normal
{
if(GetAsyncKeyState(VK_DELETE) &1)
{
*(float*) ADR_SPEED = 100;
}
}
//No Spawn Wait
void nowait()
{
*(float*) ADR_SPAWN_1 = 0;
*(float*) ADR_SPAWN_2 = 0;
}
//No Boundries
void nobound()
{
if (nobound)
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_1, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_BOUNDS_2, &t , sizeof(t));
VirtualProtect((void*)ADR_BOUNDS_2, sizeof(t), Protection, 0);
}
}
//Scope
void scope()
{
if(GetAsyncKeyState(VK_RBUTTON))
{
int t=1;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
else
{
int t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_SCOPE, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_SCOPE, &t , sizeof(t));
VirtualProtect((void*)ADR_SCOPE, sizeof(t), Protection, 0);
}
}
//No Spread
void Spread()
{
*(float*) ADR_NO_SPREAD = 0;
}
*/
//Any other hacks you decide to add go above here
//Hack are put into the game here
void snip()
{
for(;; )
{
if(*client) //check if we are client.. prevent crashs
{
Fastall();
speed(); // player hacks go here
speedoff();
scope();
}
if(*server)
{
Spread();
nowait(); //server hacks go here
}
Sleep(200); //prevent for overloading the cpu
}
}
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
{
if(dwReason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)snip, 0, 0, 0); //creates the HackTread
}
return TRUE;
}