Page 1 of 6 123 ... LastLast
Results 1 to 15 of 90
  1. #1
    dragonattak's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Italy,Rome.. Post:141732
    Posts
    704
    Reputation
    -19
    Thanks
    411
    My Mood
    Devilish

    How to create a D3D Hack

    I didnt know to post here on in tutorial just move it if i missed

    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:
    #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 dragonattak; 05-21-2011 at 03:56 AM.

  2. The Following 13 Users Say Thank You to dragonattak For This Useful Post:

    CheatCreatorzz (05-21-2011),Ever4Ever (07-16-2011),frenci8 (08-01-2011),Lyoto Machida (05-26-2011),MasterXxX (07-31-2011),menewill (08-07-2011),NoizzTaiDenovo (06-01-2020),royku1 (05-20-2011),Sapere (08-07-2011),smonist (05-20-2011),SteamAss (05-20-2011),willcpc2 (07-29-2011),[G]a[M]e[R] (06-16-2011)

  3. #2
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    Good Job ^^

  4. #3
    [A]bbest's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    In My PC...
    Posts
    3,131
    Reputation
    18
    Thanks
    426
    My Mood
    Breezy
    Nice Tut Bro

  5. #4
    StayAlive's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    UAE
    Posts
    72
    Reputation
    10
    Thanks
    3
    My Mood
    In Love
    looks Great , but i didn't know anything about codding C++ or make hacks , but i wanna ask u to make one for CF NA

    i will learn codding Next 2 month and i will do my best to make a Awesome Hacks

  6. #5
    dragonattak's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Italy,Rome.. Post:141732
    Posts
    704
    Reputation
    -19
    Thanks
    411
    My Mood
    Devilish
    Quote Originally Posted by StayAlive View Post
    looks Great , but i didn't know anything about codding C++ or make hacks , but i wanna ask u to make one for CF NA

    i will learn codding Next 2 month and i will do my best to make a Awesome Hacks
    just follow the tutorial, it's like the example but you must get the andress....

    Thanks to all for the comments

  7. #6
    nagif123's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    United state CA
    Posts
    197
    Reputation
    11
    Thanks
    60
    My Mood
    Yeehaw
    wow nice
    msgtoshort

  8. #7
    dragonattak's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Italy,Rome.. Post:141732
    Posts
    704
    Reputation
    -19
    Thanks
    411
    My Mood
    Devilish
    Thanks...
    I must adjust the Visual C++ download just uploading on *********** because mega... is blocked here... just 70 mb of file ^^

  9. #8
    nagif123's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    United state CA
    Posts
    197
    Reputation
    11
    Thanks
    60
    My Mood
    Yeehaw
    u need - VC++ 6.0: for crossfire hacks too?

  10. #9
    dragonattak's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Italy,Rome.. Post:141732
    Posts
    704
    Reputation
    -19
    Thanks
    411
    My Mood
    Devilish
    Quote Originally Posted by nagif123 View Post
    u need - VC++ 6.0: for crossfire hacks too?
    sure c++ is for all hacks (only hacks on injector and others, only dll)

  11. #10
    nagif123's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    United state CA
    Posts
    197
    Reputation
    11
    Thanks
    60
    My Mood
    Yeehaw
    this deserve a sticky

  12. #11
    royku1's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive
    Quote Originally Posted by nagif123 View Post
    this deserve a sticky
    i agree @Swiftdude
    BTW
    is CF D3D8 or D3D9 i think D3D9?
    Last edited by royku1; 05-20-2011 at 03:23 PM.

  13. #12
    FileCorrupt's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Posts
    658
    Reputation
    -2
    Thanks
    30
    My Mood
    Amazed
    Nice Tutorial.
    Keep Up The Good Work.
    By The Way, Are You Royku From POQ?

  14. #13
    royku1's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive
    Quote Originally Posted by FileCorrupt View Post
    Nice Tutorial.
    Keep Up The Good Work.
    By The Way, Are You Royku From POQ?
    what is POQ? @FileCorrupt
    Last edited by royku1; 05-20-2011 at 03:27 PM.

  15. #14
    nagif123's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    United state CA
    Posts
    197
    Reputation
    11
    Thanks
    60
    My Mood
    Yeehaw
    can someone help me on something im stuck -_-

  16. #15
    royku1's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    40
    Reputation
    10
    Thanks
    2
    My Mood
    Aggressive
    Quote Originally Posted by nagif123 View Post
    can someone help me on something im stuck -_-
    YEs i Can @nagif123
    Last edited by royku1; 05-20-2011 at 03:26 PM.

Page 1 of 6 123 ... LastLast