Hey,
I finnaly pulled it off to make a working hack. First i had SJ, Stamina and NFD. It worked perfectly, but then i start adding more hacks and now when i go into a game after a few seconds, WarRock shuts down :s.
Can anyone help me? Heres my source:
/*
Project : GBN Public Hack
Author : Naeron
Date : 22.08.2008
Updated: 02.06.2009 (2 July 2009)
*/
#include <stdio.h>
#include <windows.h>
// Adress List //
#define Playerpointer 0x00CC4778
#define Serverpointer 0x00BCE110
#define OFF_NFD 0x00000308
#define OFS_STAMINA 0x00000010
#define OFS_X 0x0000023C
#define OFS_Y 0x00000244
#define OFS_Z 0x00000240
#define OFS_NORECOIL1 0x00000000
#define OFS_NORECOIL2 0x00000004
#define OFS_NORECOIL3 0x00000008
#define ADR_NOSPREAD 0x00B042B0
#define ADR_SCOPE 0x00B04246
#define ADR_SPEED 0x009A7E04
#define ADR_FASTPLANT 0x00695E7A
#define ADR_FASTFLAG 0x00B0425C
#define ADR_FASTAMMO 0x00B04250
#define ADR_FASTHEALTH 0x00B04254
#define ADR_FULLBRIGHT1 0x00B0E1D4
#define ADR_FULLBRIGHT2 0x00B0E1D8
#define ADR_FULLBRIGHT3 0x00B0E1DC
#define ADR_NOBOUNDS1 0x00B351F4
#define ADR_NOBOUNDS2 0x00B351F8
#define ADR_NOWATER 0x00A26F14
#define ADR_SPUP10 0x00B04288
#define ADR_EXTRAAMMO1 0x00B04290
#define ADR_EXTRAAMMO2 0x00B04291
#define OFS_PREMIUM 0x00000374
#define OFS_5_SLOT 0x000E0ABC
#define ADR_ANTIKICK 0x004C16DF
#define ADR_NOSPAWNWAIT1 0x00B227F8
#define ADR_NOSPAWNWAIT2 0x00B839C4
// end adress list //
/////////////////
DWORD *ingame= (DWORD*)Playerpointer;
DWORD *megame= (DWORD*)Serverpointer;
////////////////
// HACK CODES //
void Stamina()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_STAMINA) = 100;
}
}
void Jump()
{
if(GetAsyncKeyState(VK_CONTROL) &1)
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = 2500;
}
}
}
void NFD()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFF_NFD) = -20000;
}
}
void NoRecoil()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_NORECOIL1) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL2) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL3) = 0;
}
}
void NoSpread()
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_NOSPREAD, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPREAD, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPREAD, sizeof(t), Protection, 0);
}
void Scope()
{
if(GetAsyncKeyState(VK_RBUTTON)&1)
{
long t=2;
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);
}
}
void speedon1()
{
if(GetAsyncKeyState(VK_F2) &1)
{
*(float*)(ADR_SPEED) = 200.0f;
}
}
void speedon2()
{
if(GetAsyncKeyState(VK_F3) &1)
{
*(float*)(ADR_SPEED) = 300.0f;
}
}
void speedon3()
{
if(GetAsyncKeyState(VK_F4) &1)
{
*(float*)(ADR_SPEED) = 500.0f;
}
}
void speedoff()
{
if(GetAsyncKeyState(VK_F1) &1)
{
*(float*)(ADR_SPEED) = 100.0f;
}
}
void FastAll ()
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(ADR_FASTPLANT) = 10.0f;
*(float*)(ADR_FASTHEALTH) = 5.0f;
*(float*)(ADR_FASTFLAG) = 10.0f;
*(float*)(ADR_FASTAMMO) = 5.0f;
}}
void fullbright () //fullbright
{
*(int*)(ADR_FULLBRIGHT1) = 1092779973;
*(int*)(ADR_FULLBRIGHT2) = 1092779973;
*(int*)(ADR_FULLBRIGHT3) = 1092779973;
}
void nobounds () //nobounds
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)(ADR_NOBOUNDS1), sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)(ADR_NOBOUNDS1), &t , sizeof(t));
VirtualProtect((void*)(ADR_NOBOUNDS1), sizeof(t), Protection, 0);
VirtualProtect((void*)(ADR_NOBOUNDS2), sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)(ADR_NOBOUNDS2), &t , sizeof(t));
VirtualProtect((void*)(ADR_NOBOUNDS2), sizeof(t), Protection, 0);
}
void nowater () //no water
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)(ADR_NOWATER), sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)(ADR_NOWATER), &t , sizeof(t));
VirtualProtect((void*)(ADR_NOWATER), sizeof(t), Protection, 0);
}
void PXItemSP2 ()
{
*(int*)(ADR_SPUP10) = 1;
}//+ 5% hp
void Dig()
{
if(GetAsyncKeyState(VK_F6) &1)
{
DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = -2000;
}
}
}
void ExtraAmmo () //we want extrea clip allways =)
{
*(int*)(ADR_EXTRAAMMO1) = 1;
}
void ExtraAmmo2 () //we want extrea clip allways =)
{
*(int*)(ADR_EXTRAAMMO2) = 1;
}
void premium () //Gold Premium
{
DWORD dwPlayerPtr = *(DWORD*)Serverpointer;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr+OFS_PREMIUM) = 3, 10; // 1 = bronze 2 = silver 3 = gold
}
}
void Slots5 ()
{
DWORD dwPlayerPtr = *(DWORD*)Serverpointer;
if(dwPlayerPtr != 0)
{
*(long*)(dwPlayerPtr+OFS_5_SLOT) = 1;
}
}
void AntiKick ()
{
const BYTE KICKON [] = {0xEB, 0x0D};
{
DWORD dwProtect;
VirtualProtect((void*)(ADR_ANTIKICK), 1, PAGE_EXECUTE_READWRITE, &dwProtect);
memcpy((void*)(ADR_ANTIKICK), &KICKON, 1);
VirtualProtect((void*)(ADR_ANTIKICK), 1, dwProtect, NULL);}}
void HackThread()
{
for(;

{
if(*ingame) //check if we are ingame.. prevent crashs
{
NFD();
Jump();
Stamina();
FastAll();
fullbright();
speedon1();
speedon2();
speedon3();
speedoff();
NoRecoil();
nobounds();
nowater();
Dig();
NoSpread();
}
if(*megame)
{
PXItemSP2();
ExtraAmmo();
ExtraAmmo2();
premium();
Slots5();
AntiKick();
}
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)HackThread, 0, 0, 0); //create the hackthread
}
return TRUE;
}