[Tutorial] Complete source for warrock hack!

Posts 16–26 of 26 · Page 2 of 2
Quote Originally Posted by zeco View Post
I hate to sound mean, but i have to admit, that was a pretty damn big fail.
Yeh damn. I don't have to read German to tell you all those errors mean that none of those variables were declared properly D:!
Quote Originally Posted by why06 View Post
Yeh damn. I don't have to read German to tell you all those errors mean that none of those variables were declared properly D:!
I build it perfectly. Prob he did somethign wrong.
Quote Originally Posted by Noxit View Post
I build it perfectly. Prob he did somethign wrong.
Yeah we know. >_<
I get annoyed when I see simple memory writing made this complex... You can easily change the value of a pointer without defining any variables but the base addy and the offset. It is a waste of time to declare other ints and floats when you can write to a value with a single line of code. I'll just use stamina as an example and make up random addresses. Here is an example of how to do this the efficient way. I will also add the hotkeys and show how to make an efficient loop to keep the hack running:
Code:
#define Playerpointer 0x12345678
#define StaminaOffset 0x284

bool staminaon = false;

void Stamina()
{
    while(1)
    {
        if(staminaon == true)
        {
            *(float*)(*(*DWORD*)Playerpointer + StaminaOffset) = 100;
            Sleep(100); //Avoid lag
        }
    }
}

void Hotkeys()
{
    while(1)
    {
        if(GetAsyncKeyState(VK_NUMPAD1))
        {
            if(staminaon == false)
            {
                staminaon = true;
                MessageBox(0, "Stamina Activated", "DLL Hack", MB_OK);
            }
            else
            {
                staminaon = false;
                MessageBox(0, "Stamina Deactivated", "DLL Hack", MB_OK);
            }
        }
        Sleep(100); //Avoid lag
    }
}

BOOL APIENTRY DllMain(HINSTANCE hDll, DWORD callReason, LPVOID lpReserved) 
{
	DisableThreadLibraryCalls(hDll);
	switch(callReason)
	{
	case(DLL_PROCESS_ATTACH): 
		{
				   CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&Stamina, 0, 0, 0);
				   CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&Hotkeys, 0, 0, 0);
		}
	case(DLL_PROCESS_DETACH):
		{
			FreeLibrary(hDll);
			break;
		}
     }
    
     return 1;
}
Please excuse any errors, I just wrote this from memory. The basic idea is actually this line:

Code:
*(float*)(*(DWORD*)Playerpointer + StaminaOffset) = 100;
The float at the beginning is showing that the type of the value is float, the DWORD is just showing that it is 4 byte (which an offset always is) and the 100 is just the value to set it to.
ok lets get started:

Quote Originally Posted by Destrod16
I get annoyed when I see simple memory writing made this complex...
Quote Originally Posted by Destrod16
#define EnemyXCoord1 0x37E8C
#define EnemyXCoord2 0xAFAC
#define EnemyXCoord3 0x38BDC
#define EnemyXCoord4 0x3B3CC
#define EnemyXCoord5 0x3992C
#define EnemyXCoord6 0x3494C
#define EnemyXCoord7 0x3569C
#define EnemyXCoord8 0x452C
#define EnemyXCoord9 0x2B6DC
#define EnemyXCoord10 0x19F4C
...
efficient? no...
complex? yes...
so you do the exact same thing ^^

Quote Originally Posted by Destrod16
You can easily change the value of a pointer without defining any variables but the base addy and the offset. It is a waste of time to declare other ints and floats when you can write to a value with a single line of code.
You could write a whole program in 1 line. as long as you dont use newlines and make sure the brackets are ok.
so 1 line doesnt say anything about the efficienty of the code. but then again, you would use defines to make a struct, so what do you know about efficienty ^^

Quote Originally Posted by Destrod16
The basic idea is actually this line:

Code:
*(float*)(*(DWORD*)Playerpointer + StaminaOffset) = 100;
The float at the beginning is showing that the type of the value is float
FYI 100 is an int
100.0f is a float if you wish to do it correctly.

Quote Originally Posted by Destrod16
the DWORD is just showing that it is 4 byte (which an offset always is)
Hmm... thats new to me, could someone explain since when offsets are 4 bytes?
Oh wait...
Offsets are not always 4 bytes ever heard of unsigned char? thats right, 1 whole byte and you can even use it in structs and classes(OH NO A 1 BYTE OFFSET)

Thanks for making my day
@hell_demon: Wouldn't the #define be more efficient? Because instead of allocating tons of memory to variables you are just saying the address manually each time. If you have tons of addresses to work with, allocating that many would be quite problamatic, and define doesn't take any resources from the compiled program, unlike having tons of variables. Though i may be wrong, since i'm pretty much a beginner.

And everything you said besides that is just nit-picking :/
Using 100 instead of 100.0f doesn't really matter that much, it was a quick example.
Quote Originally Posted by zeco View Post
@hell_demon: Wouldn't the #define be more efficient? Because instead of allocating tons of memory to variables you are just saying the address manually each time. If you have tons of addresses to work with, allocating that many would be quite problamatic, and define doesn't take any resources from the compiled program, unlike having tons of variables. Though i may be wrong, since i'm pretty much a beginner.

And everything you said besides that is just nit-picking :/
Using 100 instead of 100.0f doesn't really matter that much, it was a quick example.

compiler takes care of converting 100 to 100.0f, but its still cleaner to write 100.0f

Him saying he hates it when people do easy memory editing so complex while he himself uses 150 defines for something which can be done in a small loop pisses me off :P

you could have 1 byte(using unsigned chars) or 8 bytes(using double) which according to him would not excist because all offsets must be 4 bytes.

/agree that i was nitpicking, but he was trying to be a mr. know-it-all while there can only be one! ME!
Quote Originally Posted by Hell_Demon View Post
compiler takes care of converting 100 to 100.0f, but its still cleaner to write 100.0f

Him saying he hates it when people do easy memory editing so complex while he himself uses 150 defines for something which can be done in a small loop pisses me off :P

you could have 1 byte(using unsigned chars) or 8 bytes(using double) which according to him would not excist because all offsets must be 4 bytes.

/agree that i was nitpicking, but he was trying to be a mr. know-it-all while there can only be one! ME!
You guys talking complicated shit here, jsut tried to help people.
whats the addrese of today?
Quote Originally Posted by Vannillia View Post
whats the addrese of today?
Look in warrock section
posting your source isnt a tutorial at all, nice youre banned (sorry:P)
Posts 16–26 of 26 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?