Results 1 to 1 of 1

Thread: D3D Hack

  1. #1
    Inactive khuletz09 is on a distinguished road khuletz09's Avatar
    Join Date
    2011 Jul
    Location
    cavite city
    Posts
    19
    Thanks
    0
    Thanked 10 Times in 5 Posts
    Rep Power
    0

    Thumbs up D3D Hack

    How to create a D3D Hack



    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: Download
    - MS DirectX SDK 9.0 (Summer 2004):Download
    - D3D framework per D3D8 e D3D9 (Hans' s base):Download

    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"



    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"



    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:

    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!



    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!



    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
    Last edited by khuletz09; 2011-07-31 at 07:12 AM.

  2. The Following User Says Thank You to khuletz09 For This Useful Post:


Visitors found this page by searching for:

directx crossfire example

how to make crossfire hack

hans d3d menu

how to make hack in crossfire

how to make crossfire hacks

hack cf base

d3d hack tutorial

crossfire d3d menu base

how to create crossfire hack

D3D menu tutorial

crossfire hack tutorial

how to make a crossfire hack

d3d hackcrossfire menu based3d hack crossfirehow to make a hack in crossfired3dbase.cpptutorial d3d hackhow to make D3D hackhow to make a hack for crossfired3d hack cfbase d3d menu crossfirehow to make hack for crossfirehow to make a crossfire d3d hackhow to make hacks for crossfire

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts