PDA

View Full Version : Auto Offset



x3
8th January 2008, 13:42
static bool NotPatched = true;
if (NotPatched)
{
int a,b,c;
for(a=0x01D10000;a<0x01D8FFFF;a++)
if(*(PBYTE)(a) == 0x68 && *(PBYTE)(a + 0x05) == 0xE8 && *(PBYTE)(a + 0x0A) == 0x6A && *(PBYTE)(a + 0x0B) == 0x07 && *(PBYTE)(a + 0x0C) == 0x68 && *(PBYTE)(a + 0x11) == 0xFF && *(PBYTE)(a + 0x12) == 0x15 && *(PBYTE)(a + 0x17) == 0x68)
{
pEngfuncs = (cl_enginefunc_t*)*(DWORD*)(a+0x0D);
ppmove = (playermove_s*)*(DWORD*)(a+0x18);
}

for(b=0x01D10000;b<0x01D8FFFF;b++)
if(*(PBYTE)(b) == 0x68 && *(PBYTE)(b + 0x05) == 0x68 && *(PBYTE)(b + 0x0A) == 0x6A && *(PBYTE)(b + 0x0B) == 0x01 && *(PBYTE)(b + 0x0C) == 0xFF && *(PBYTE)(b + 0x0D) == 0xD0 && *(PBYTE)(b + 0x0E) == 0x83 && *(PBYTE)(b + 0x27) == 0xC3)
{
pstudio = (engine_studio_api_s*)*(DWORD*)(b+0x01);
ppinterface = (r_studio_interface_s**)*(DWORD*)(b+0x06);
}

for(c=0x01D60000;c<0x01D8FFFF;c++)
if(*(PBYTE)(c) == 0x68 && *(PBYTE)(c + 0x05) == 0xFF && *(PBYTE)(c + 0x06) == 0x15 && *(PBYTE)(c + 0x0B) == 0x68 && *(PBYTE)(c + 0x10) == 0xFF && *(PBYTE)(c + 0x11) == 0x15 && *(PBYTE)(c + 0x16) == 0xA1 && *(PBYTE)(c + 0x1B) == 0x83)
slots = (DWORD*)(*(DWORD*)(c+0x01));

NotPatched = false;
}

Shard
8th January 2008, 19:11
Messy stuff. You're essentially doing the same thing 3 times and it's bad practice to hardcode it each time. You could merge those first 2 loops together since they are exactly the same, use the same variable for all the for loops, and there's no need for all that typecasting.
[/constructive_criticism]

I would recommend this (http://forum.gamedeception.net/showthread.php?t=5484).

Jimster480
15th January 2008, 07:20
not only that. This is mine. Its in my randomcodes.rar, ive been using it back since i used to work on OGC based cheatserver hacks. That is why its written poorly, since i wasn't so good of a coder back then :P. Still works tho XD

x3
16th January 2008, 11:01
Everything is yours isn't it Jimster... Lets goto GD and copy something to notepad and save it in a .rar archive and call it MINE!!!!!!!!!!!!!!!!!! :D

Retard ftw.

Jimster480
17th January 2008, 01:41
wow ****tard. Ive been using it forever, its not yours it was done by me and my friend david almost a year ago now. So credits should be me david and Anthrax or someone else who helped us find the offsets... thats all as far as i know. But dont you go taking credit for shit that isnt yours at all.

x3
17th January 2008, 12:37
This is the one site I respect enough not to start a flame war with you.

I did not credit myself, there was no credits where it came from but I seriously doubt you dreamed it up all by yourself one day. GD I presume is where you found the idea.