Results 1 to 6 of 6
  1. #1
    SeptFicelle's Avatar
    Join Date
    Nov 2010
    Gender
    female
    Location
    In your backyard.
    Posts
    75
    Reputation
    10
    Thanks
    16
    My Mood
    Amused

    How to add your cheats/hacks to sources.

    Don't forget to press thanks if this helps you out.

    Code:
    This tutorial is expecting you to have a pre-made source from the site to study off of and add your own hacks to.
    Now before we get started you will want to know a few things.

    Addresses are the places where your codes/hacks are kept in the memory of your project. (Be it a game, program, or some other kind of file it's the same story when dissasembling.)

    Pointers are specific addresses that point to an address in sections of dynamic memory, often in what we call "High Memory" or "DMA" areas. These are the best places for finding new hacks/codes.

    Offsets are the ammount of lines in hex the final dynamic address is from wherever the pointer is pointing to. So if you have a pointer address of 0x00709d98 and it points to 010a9980 and the code you want is at say 010a998c then your offset is going to be 0c.


    An easier way to describe this is by demonstrating with an actual War Rock cheat. I will be using No Recoil.

    No Recoil is a dynamic cheat that has to be made with offsets, witch is why you'll see in the code we add the offsets to the pointer. We will get more into the demonstration as this tutorial continues.

    Defining your objects is essential in code/hack making because without knowing where anything is youre game would crash. Like being in a dark building with no light at all and not knowing your surroundings. You're eventually going to trip on something and fall down.

    We define our objects using 2 methods. The one you will end up using most is the #define method because it's required for all addresses, pointers, and offsets. So let's define our Player pointer, and our offsets for no recoil.

    Code:
    // Pointers
    #define Playerpointer 0xC62388
    
    // Offsets
    #define OFS_NORECOIL1 0x1C
    #define OFS_NORECOIL2 0x20
    #define OFS_NORECOIL3 0x24
    So now that we have them declared successfully at the top of our source code we need to start setting up our code.

    There are many ways to make codes, you can use integers, booleans, floats and more. Booleans for those who don't know are simple true and false statements. With hex it would be 00000001 for true and 00000000 for false.

    You have to determine witch method to use for writing your code. Do you want a float, integer, or boolean? Well this is usually easier to determine with experience, so we will use proccess of elimination. No this method is not the best way to go because it takes a lot longer. Even the pros guess sometimes though. /

    So I will give this one to you because it's already released. It's a float. =P

    So first we have to set up our function so we can start writing our code. We do this with the "void" statement.

    Code:
    void NoRecoil()
    {
    }
    Never forget your brackets they are essential in defining a function.

    Next thing we have to do is set up our pointer so the game will know where to go. We do this with the *(DWORD*) method.

    Code:
    void NoRecoil()
    {
    DWORD Player = *(DWORD*)Playerpointer;
    }
    Now that we have our pointer declared we can start our if statement for in activation. With offsets it's usually a greater than 0 statement, or "!= 0".

    Code:
    void NoRecoil()
    {
    DWORD Player = *(DWORD*)Playerpointer;
    if ( Player != 0 )
    {
    
    }
    }
    Always remember that when putting more than one action or constant into the if statement you need the opening and closing brackets to define it. Now we can start writing our code. Since it's a float it's pretty simple. Floats go by decimal and whole values declared by an "f" like 0.0f is a float value of 0.

    So we want a float value of 0 since our code after all is called No Recoil. We have 3 offsets to write this to so we will be writing the same thing for all three offsets. (This isn't always true with offsets, sometimes you have multiple values to write. It all depends on what you want your code to do.)

    Code:
    void NoRecoil()
    {
    DWORD Player = *(DWORD*)Playerpointer;
    if ( Player != 0 )
    {
    *(float*)( Player + OFS_NORECOIL1 ) = 0.0f;
    *(float*)( Player + OFS_NORECOIL2 ) = 0.0f;
    *(float*)( Player + OFS_NORECOIL3 ) = 0.0f;
    }
    }

    Now that we have our pointer and offsets declared, our function written we need to tell the game when to activate it. So I will give you all a function that does this. It's a basic if statement.

    Code:
    void snip()
    {
    for(;; ) 
    {
    if(*ingame) // Player hacks go here.
    {
    NoRecoil();
    }
    if(*outgame) // Server hacks all go in this section.
    {
    
    }
    Sleep(200); // Prevent overload.
    }
    }
    As you can see by reading the code snippet above I have already placed the function into the ingame section. You must put in game codes into the ingame section and server codes into the outgame section. (A few hint: No Spawn Wait is a server code!) Not all are obvious. Most player pointer codes are in game codes though.

    Also, don't forget you need the attatchment proccess and the correctly included sections. Most of the codes/hacks on this site are fairly simple and easy to add. I hope this helps out. Below is the final source!


    Code:
    #include <stdio.h>
    #include <windows.h>
    
    // Pointers
    #define Playerpointer 0xC62388
    
    // Offsets
    #define OFS_NORECOIL1 0x1C
    #define OFS_NORECOIL2 0x20
    #define OFS_NORECOIL3 0x24
    
    HANDLE Warrock;
    DWORD *ingame= (DWORD*)Playerpointer;
    DWORD *outgame= (DWORD*)Serverpointer;
    
    // No Recoil
    void NoRecoil()
    {
    DWORD dwPlayerPtr = *(DWORD*)Playerpointer;
    if(dwPlayerPtr != 0)
    {
    *(float*)(dwPlayerPtr+OFS_NORECOIL1) = 0;
    *(float*)(dwPlayerPtr+OFS_NORECOIL2) = 0;
    *(float*)(dwPlayerPtr+OFS_NORECOIL3) = 0;
    }
    }
    
    //Any other hacks you decide to add go above here
    //Hack are put into the game here
    void snip()
    {
    for(;; ) 
    {
    if(*ingame) // Player hacks go here.
    {
    NoRecoil();
    }
    if(*outgame) // Server hacks all go in this section.
    {
    
    }
    Sleep(200); // Prevent overload.
    }
    }
    BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
    {
    if(dwReason == DLL_PROCESS_ATTACH)
    {
    MessageBoxA(NULL, "DLL was injected successfully.", "SeptFicelle", MB_OK); // Success message.
    MessageBoxA(NULL, "Thanks for using my source code. =)", "SeptFicelle", MB_OK); // Thanks message.
    CreateThread(0, 0, (LPTHREAD_START_ROUTINE)snip, 0, 0, 0); // Initiate the hack thread.
    }
    return TRUE;
    }

    More to be added later. - SeptFicelle
    You see, maddness, as we know, is like gravity, all it takes is a little push.



    -------------------------------------
    Current Focus: C#
    Languages Known: C++, C#, F#, .NET
    Specialty: Inspection Of Algorithms
    Schooling Focus: Astrobiology
    -------------------------------------

    [IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/overallsig.png[/IMG]
    [IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/userbar97571.gif[/IMG]
    [IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/skypeuser5gu.png[/IMG]
    [IMG]https://i276.photobucke*****m/albums/kk13/Teddynezz/3dsmax9userot0.gif[/IMG]

  2. The Following 6 Users Say Thank You to SeptFicelle For This Useful Post:

    karam98 (01-21-2011),machuhoya (12-17-2010),rodolfgonzales4 (11-05-2010),Sc0rch (01-15-2011),umbraga01 (01-23-2011),warname (11-22-2011)

  3. #2
    jajarem64's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    Sarasota, FL - USA
    Posts
    318
    Reputation
    -13
    Thanks
    17
    My Mood
    Relaxed
    Very nice Tut for ppl

  4. #3
    Zithium's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    UK
    Posts
    2,996
    Reputation
    103
    Thanks
    438
    My Mood
    Psychedelic
    Good tutorial, cheers.
    "Depending on the context, I may or may not enjoy getting stoned to death" - zιтнιυм™

    Ex WarRock Minion Force



  5. #4
    TheCamels8's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Israel :D
    Posts
    2,945
    Reputation
    174
    Thanks
    1,376
    My Mood
    Cheeky
    Great tutorial!
    Good job!

  6. #5
    gamernuub's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    Norway
    Posts
    801
    Reputation
    9
    Thanks
    69
    OMFG !!!!!


    So awesome !!

    This is the only tut who actually explain

    Please sticky this!
    ATTENTION WR PLAYERS !

    I AM SELLLING ALL MY WR RETAIL ACCOUNTS ! CHEAP!

    https://www.mpgh.net/forum/124-sellin...ml#post4862046

    11 succesfull trades



    [IMG]https://i843.photobucke*****m/albums/zz356/white_tiger0226/uamfmmbygmfs-1.gif[/IMG]

  7. #6
    AeroMan's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Hell
    Posts
    3,294
    Reputation
    189
    Thanks
    3,049
    My Mood
    Busy
    Nice, but i found some UnNessecary Stuff:


    Code:
    #include <stdio.h>
    Code:
    DWORD Player = *(DWORD*)Playerpointer;
    Better make it this:
    Code:
    void NoRecoil()
    {
    if (Playerpointer != 0) //Safe yourself Space
    {
    *(float*)( Player + OFS_NORECOIL1 ) = 0.0f;
    *(float*)( Player + OFS_NORECOIL2 ) = 0.0f;
    *(float*)( Player + OFS_NORECOIL3 ) = 0.0f;
    }
    }

    NOT to critisize, but space is importand you dont want to search a pointer/ Adress into 1K lines of addies or something

    Nice tutorial

Similar Threads

  1. How Hacksheild Detects your Speed Hacks.
    By User1 in forum Combat Arms Hacks & Cheats
    Replies: 11
    Last Post: 08-19-2009, 08:18 PM
  2. I GOT ERROR WIT "HOW TO MAKE YOUR OWNS HACKS"
    By LiL-kILLER in forum Combat Arms Hacks & Cheats
    Replies: 47
    Last Post: 07-17-2009, 01:25 PM
  3. How to make your own hacks?
    By BladeZ in forum General Game Hacking
    Replies: 1
    Last Post: 07-02-2009, 04:27 AM
  4. how to make your own hacks
    By julius026 in forum Combat Arms Hacks & Cheats
    Replies: 11
    Last Post: 05-03-2009, 10:50 PM
  5. how to make your own hack!
    By blue213321 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 04-25-2009, 04:38 PM