[Tutorial]How To Create a D3D Base Hack *Very Good! ;)*

05/20/2011 23:37 DODO-CRO#1
Quote:
Originally Posted by dragonattak(DODO-CRO) View Post
How to create a D3D Hack

[Only registered and activated users can see links. Click Here To Register...]

Hello everyone, this guide I will explain how to create a D3D hack, I will do for Metin2, but you can do it with anything you want.

Materials needed:

- VC++ 6.0: [Only registered and activated users can see links. Click Here To Register...]
- MS DirectX SDK 9.0 (Summer 2004): [Only registered and activated users can see links. Click Here To Register...]
- D3D framework per D3D8 e D3D9 (Hans' s base): [Only registered and activated users can see links. Click Here To Register...]

Now we prepare the project:
First of all, for those who had not already done so, you need to install VC + + 6.0 and the SDK that you downloaded.
Open VC + + 6.0 and then create a new project for a DLL by going to "File> New> Data Projects> Win32 Dynamic-Link Library> Ok." Project Name is precisely the name of the project, for example, I'll call M2 D3D Hack. There you will open a new window where you choose "An empty DLL project" and press Finish.

Now we import the files into the project by going to the Hans' base "Project> Add to Project> Files ", find the folder of the base of Hans and set the following files one by one:
- D3dbase.h
- D3dbase.cpp
- D3dmenu.h
- D3dmenu.cpp
- Hackbase.cpp
Important: Do not import the files "d3dfont .*"

We prepare the import of the SDK:
Now we turn to import the files and libraries we need to work in D3D. Go to "Tools> Options> Directories tab" us ensure that the parameter "Show directories for" there is "Include Files" and add a new line in the folder "includes" contained in scrtella where you installed the SDK, in my case is: "E:\PROGRAMMI\MICROSOFT DIRECTX 9.0 SDK (SUMMER 2004)\INCLUDE"
[Only registered and activated users can see links. Click Here To Register...]
Now in "Show directories for" choose "Library Files" and instead of the folder "includes" add the folder "LIB" that in my case here: "E:\PROGRAMMI\MICROSOFT DIRECTX 9.0 SDK (SUMMER 2004)\LIB"
[Only registered and activated users can see links. Click Here To Register...]

Configure the base for D3D8/D3D9:

Now depending on the game choose between D3D9 or D3D8, in my case I use the D3D8 and then go to edit the file d3dbase.h:
Code:
//#define FOR_D3D8
#define FOR_D3D9
And replace it with:
Code:
#define FOR_D3D8
//#define FOR_D3D9
Now everything is ready and you can test that there are no errors by pressing F7, if built correctly means that we can continue and enter the number of hacks! ;)
[Only registered and activated users can see links. Click Here To Register...]

We create the functions for the hack:

We must now create the functions for the various hacks that call again.
As an example I will create a function that changes the speed of movement (Metin2). The base pointer is 0x5F29BC (old) while the two are respectively offset 0x10 and 0x5B6 in hex of course.
The first step is to define the various Address / Offsets (do this in just under the include "hackbase.cpp"):
Code:
#define Base_Pointer     0x5F29BC
#define Ofs_MovSpeed_1   0x10
#define Ofs_MovSpeed_2   0x5B6
And this is how we can simply create a function that changes the speed of movement (still in "hackbase.cpp"):
Code:
void MovSpeed(speedVal)
{
    DWORD Addy1 = *(DWORD*)Base_Pointer;  //I read the value of the base pointer
    DWORD Addy1 = *(DWORD*)(addy1+Ofs_MovSpeed_1) + Ofs_MovSpeed_2;  //I read the value of the value of base pointer + the first offset addy + the second offset
    *(DWORD*)Addy1 = speedVal;  //Change the address of the speed with the value "speedVal" which will be defined by using the function
}
We need to create the various options to select multiple speeds, for example, we do so that you can choose the speed from 1 to 4 with a range of "0.5". Then also add a variable that allows us to choose the 'hack must be enabled by default or not.
Code:
char    *opt_MovSpeed[]    = { "Off", "0,0", "1,0", "1,5", "2,0", "2,5", "3,0", "3,5", "4,0" };

int        CH_MovSpeed       = 0;
In this case, I place "CH_Movspeed = 0" so that when you inject the hack is the speed of movement will be set to OFF. If I wanted to set it up as 2.5 I have declared: "CH_Movspeed = 5" because if "Off" is in position 0 of the list, 2.5 is in fifth place.

Add hacks into d3d menu:
Let us then adding the hack menu, to do so you add a new line between existing as:
Code:
pMenu->AddItem("Mov Speed"       , &CH_MovSpeed   , opt_MovSpeed, 9);
Where "Mov Speed" is the text that appears in the menu, CH_MovSpeed is the variable declared previously that contains the state of the hack (enabled, disabled, etc.), opt_MovSpeed are available and the number 9 instead of options.

Now we adapt the function created above to our options:
Code:
void MovSpeed(speedVal)
{
    DWORD Addy1 = *(DWORD*)Base_Pointer;
    DWORD Addy1 = *(DWORD*)(addy1+Ofs_MovSpeed_1) + Ofs_MovSpeed_2;
    *(long*)Addy1 = (16226 + (speedVal * 0,5 * 60));
}
Doing it this way, if we set up the hack for example "0.0" which is the number one option we have: 15256 + (1 x 0.5 x 60) = 16,256 which is the default speed of Metin2.
If, however, will be set to "2.5" is the fifth option we have: 15256 + (5 x 0.5 x 60) = 16,406 and so on ...

We implement the functions in the menu:

Now we're almost done, we just attach our function with the menu. To do this we always go in "hackbase.cpp" and see:
Code:
// Seperate thread for making hacks
DWORD WINAPI HACKthread( LPVOID param )
{
    // --- hack loop
	while (1) {
 
		// ..if (CH_stamina)   ....
		// ..
 
		Sleep(50);
    }
	return 0;
}
Change this function:
Code:
// Seperate thread for making hacks
DWORD WINAPI HACKthread( LPVOID param )
{
    // --- hack loop
	while (1) {
 
		if (CH_MovSpeed != 0)
                {
                    MovSpeed(CH_MovSpeed);
                }
 
		Sleep(50);
    }
	return 0;
}
We've finished! To release the hack going on "Build> Set Active Project Configuraton" and choose "Win32-Release". Finally, press F7 and find our DLL into the folder of our project!
[Only registered and activated users can see links. Click Here To Register...]

Now it's up to you to try to understand everything and how to create something more advanced. For the functions of the methods I used some 'orthodox hurry but you can use the method that will seem more appropriate.
PS, I did this on Metin2, because it's easier, but you can do this on all games. Enjoy and feel free to press Thanks! ;)
05/20/2011 23:39 *Sn@k3>?#2
cOPY FROM **** That#s esy to copy i don't give a thx for copy
05/20/2011 23:41 DODO-CRO#3
Quote:
Originally Posted by Jonas^ View Post
cOPY FROM **** That#s esy to copy i don't give a thx for copy
Huh? Maybe I posted this here, because I posted this on MP**? -.-'
05/20/2011 23:41 KingLiri#4
hmm....

nice work but i dont know of it have somethink doing with Crossfire ;)

PS: i know my english is bed ^^
-----------------

ist ja ein Tut wie man eine Hack macht, aber das muss ja nicht in der Crossfire section stehen o.O ist ja was Allgemeines
05/20/2011 23:46 DODO-CRO#5
Quote:
Originally Posted by KingLiri View Post
hmm....

nice work but i dont know of it have somethink doing with Crossfire ;)

PS: i know my english is bed ^^
-----------------

ist ja ein Tut wie man eine Hack macht, aber das muss ja nicht in der Crossfire section stehen o.O ist ja was Allgemeines
Thanks, and it have something with Crossfire. You can make D3D hacks (Like VIP hack maybe? :p I have my private VIP hack - made by me with D3D Base. ;)) for Crossfire.

PS; Your English isn't so bad. :)
05/21/2011 00:17 sick0ry#6
I'll try it, but what is the first DL Link?
05/21/2011 00:25 DODO-CRO#7
Quote:
Originally Posted by sicK- View Post
I'll try it, but what is the first DL Link?
Try it. ;)
EDIT: Fixed it. :)

PS: I go finish my private VIP hack and then I go to bed, so I will not be able to help you until tomorrow. Good luck!
05/21/2011 00:29 KingLiri#8
i dont know

but is this the same just like your first DL?
[Only registered and activated users can see links. Click Here To Register...]
05/21/2011 00:34 DODO-CRO#9
Quote:
Originally Posted by KingLiri View Post
i dont know

but is this the same just like your first DL?
[Only registered and activated users can see links. Click Here To Register...]
No it's not, download link that you have is C++ 2010 Express. My is C++ v6 Standard Edition, :p
05/21/2011 00:40 KingLiri#10
Is there ever ben a freewai version for VC++ 6?
05/21/2011 06:59 BestOfElite#11
Wow nice thank you ill try it
05/21/2011 09:24 eph0x#12
This is WarRock you know?!
05/21/2011 10:22 ѕωαg#13
Looks good ;) Niice work
05/21/2011 10:41 DODO-CRO#14
Quote:
Originally Posted by BestOfElite View Post
Wow nice thank you ill try it
Your welcome, good luck! ;)

Quote:
Originally Posted by NewYorkReload View Post
Looks good ;) Niice work
Thanks! ;)
05/21/2011 10:48 BestOfElite#15
Quote:
Originally Posted by DODO-CRO View Post
Your welcome, good luck! ;)


Thanks! ;)
cant download VC++ 6.0
and the other must i register me?