[Tutorial] RT3ME Your first XRPC tool - Part 3

begallegal1 Nov 30, 2013

  1. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    Joined:
    Oct 31, 2011
    Messages:
    3,694
    Likes Received:
    3,124
    Trophy Points:
    0
    Gender:
    Male
    Location:
    In a Field of Green
    Console:
    Xbox
    Hello again all, welcome to part 3 of my tutorial series. First off I'd like to say that yes I know TU5 is out,
    however for the remainder of this series I will most likely stick to TU4 since these mods are not made for online modes specifically anyway, then users can update the offsets as they wish ;)

    Here's what our tool will look like after we finish here today after we add
    "Full Auto All Weapons", "Client Index", "UFO&NoClip Modes", "Screenshot", and "Freeze-UnFreeze Console"
    [​IMG]

    pretty scenery we never get to see in these maps in normal play :LOL:
    [​IMG]

    We are going to add a simple cheat first, lets start with full auto all weapons

    add a couple buttons for on and off and then add the "setmemory" functions to enable/disable the cheat
    should look something like this (this could be shortened to a singe byte 0x00 since you are only changing the last byte to 0x01
    , but I prefer to stick with 4 byte unless needed to shorten, and yes 0 is on ,,1 is off on this one)

    Code:
    private void fAutoOn_Click(object sender, EventArgs e)
            {
                x.SetMemory(0x82231614, new byte[] { 0x3b, 0x40, 0x00, 0x00 });
            }
     
            private void fAutoOff_Click(object sender, EventArgs e)
            {
                x.SetMemory(0x82231614, new byte[] { 0x3b, 0x40, 0x00, 0x01 });
            }      
    

    Next we are going to add some methods which we will use for the client index to allow use of cheats for all players in game not just your player.
    For this you will need to add 3 things , a numericUpDown box, a text box (any type), and a button.
    We will also need to add 3 methods to make this process work. Lets get these out of the way first.

    First we need to get our "player state" so we can create the index of players

    Code:
    public static uint PlayerState(uint cli)
            {
                //this is our location of each player starting with 0 (host) + 0x3600 for each one after 
                return (0x8328A880 + (cli * 0x3600));
            }
    

    Next we will need to get our gamertag in text so we use the above method + 0x2f1c to get our gamertag data for each client


    Code:
    public string GetGamertag(uint cli)
            {  //variables
                uint num;
                string str;
                //array to collect gamertag data
                byte[] d = new byte[20];
                //get the 20 bytes of data at the client data location for conversion to string for our listbox 
                x.xbCon.DebugTarget.GetMemory(PlayerState(cli) + 0x2f1c, 20, d, out num);  
                //convert GT bytes to a string 
                str = ByteToString(d);
                //return string made above
                return str;
            }
    

    At this point you will have an error @ str = ByteToString(d); this is because we do not have a method to convert byte to string yet, lets add that now


    Code:
    public string ByteToString(byte[] input)
            {
    //create a new instance of the encoding class used 
                UTF8Encoding enc = new UTF8Encoding();
    //return the string we convert from bytes
                return enc.GetString(input);
            }
    

    The above 3 methods are shortened and/or altered versions of what is commonly used and can be found in other open source tools
    like CIA's MW2 ,,so creds to him and everyone else who has made those functions and shared them with the world

    Ok so now that all of that is done we can add our method for when we click the button to add clients to our box,
    this I slimmed down a bit from the usual you'll find instead of adding each gamertag with 18 lines of code I use a "for" loop to do the work for me



    Code:
    private void showCli_Click(object sender, EventArgs e)
            {
                //create an array for our 18 clients (change if more are needed)
                string[] gamerT = new string[18];
                //clear our client list box so we can refresh it if already full
                cliListBox.Clear();
                //add a line to the box to show the start of the list (optional of course)
                cliListBox.AppendText("Gamers In Game");
                //we will use a "for" loop to count through the array we made above this will add our clients until it reaches 18
                for (int x = 0; x < gamerT.Length; x++)
                {                    //skip line   add client number          add gamertag of client 
                    cliListBox.AppendText("\n" + Convert.ToString(x) + " " + GetGamertag(Convert.ToUInt32(x)));
                }
            }
    

    So there we have it , our working client list , now lets add something fun we can use with all clients :D

    UFO and No-Clip modes


    Code:
            private void ufoOn_Click(object sender, EventArgs e)
            {
                // set memory@            our current client number                                                 ufo on
                x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x3218, new byte[] { 0x00, 0x00, 0x00, 0x02 });
            }
     
            private void noClip_Click(object sender, EventArgs e)
            {
                // set memory@            our current client number                                                 nc on
                x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x3218, new byte[] { 0x00, 0x00, 0x00, 0x01 });
            }
     
            private void ufoOff_Click(object sender, EventArgs e)
            {
                // set memory@            our current client number                                                 off
                x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x3218, new byte[] { 0x00, 0x00, 0x00, 0x00 });
            }
    

    Now just for fun a little something from me that has nothing to do with the game, but can be a couple great tools to have setup to use if needed.
    Screenshot, and Freeze/Unfreeze console , for this we need three buttons (I stack my freeze/unfreze and hide/unhide the one currently not in use)


    Code:
    private void freezeCon_Click(object sender, EventArgs e)
            {
                //freeze console
                x.xbCon.DebugTarget.Stop(out oI);
                //hide freeze button
                freezeCon.Visible = false;
                //show unfreeze button
                unFreezeCon.Visible = true;
            }
     
            private void unFreezeCon_Click(object sender, EventArgs e)
            {
                //unfreeze console
                x.xbCon.DebugTarget.Go(out oI);
                //hide un freeze button
                unFreezeCon.Visible = false;
                //show freeze button
                freezeCon.Visible = true;
            }
     
            private void screenShot_Click(object sender, EventArgs e)
            {
                //create a string
                string a;
                //our string equals where our app stats at + the file name
                a = Application.StartupPath + "\\XboxScreenShot.bmp";
                //make console take screenshot and store as our string
                x.xbCon.ScreenShot(a);
                //open screenshot in windows 
                System.Diagnostics.Process.Start(Application.StartupPath + "\\XboxScreenShot.bmp");
            }
    


    That's it for this part, see you all in Part 4 where we dig a little deeper into the client index use ,
    and add some cool stuff like laser,third person camera, field of view, show enemies on compass, spectate, send text, set gamertag and more!!!

    enjoy :begal:

    NOTE* full src will no longer be included, at this point anyone following these tut's should be able to build off part 1 and 2

    For part 1 & 2 of this series go here
    http://www.xpgamesaves.com/topic/91452-tutorial-rt3me-your-first-xrpc-tool-part-1/
    http://www.xpgamesaves.com/topic/92165-tutorial-rt3me-your-first-xrpc-tool-part-2/
     
    • Like Like x 4
  2. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,277
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    Nice man :D Iv now got a massive tool Haha

    [​IMG]
    My v4 :p
     
    • Like Like x 2
  3. Bu

    Bullet Guest

    Very nice Begal, a fully comprehensive guide there.

    @ KV = having a massive tool is nothing to brag about !
     
    • Like Like x 3
  4. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,277
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    Haha ;) I agree and Agree again :p

    Message me on Skype if you want v4 and ill give you the source code No one has v4 But me at the moment ;)
     
  5. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    Joined:
    Oct 31, 2011
    Messages:
    3,694
    Likes Received:
    3,124
    Trophy Points:
    0
    Gender:
    Male
    Location:
    In a Field of Green
    Console:
    Xbox
    :lol: he said "tool" :D

    nice work Killer!! looks great ;)
     
    • Like Like x 1
  6. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,277
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    :lol: And cheers man ;) I've had to make a separate tool now due to TU5. They've patched *jump height* * unlimited ammo* and feed spammer from what iv seen my TU5 *tool*[and i say it again lol] as i was saying my TU5 tool lets you access prestige, modded xp, force host, and random tu5 offsets like red box and coloured hub. Ill send u a bunch tomorrow man
    And visions are patched

    Sent from my iPhone using Tapatalk
     
  7. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    Joined:
    Oct 31, 2011
    Messages:
    3,694
    Likes Received:
    3,124
    Trophy Points:
    0
    Gender:
    Male
    Location:
    In a Field of Green
    Console:
    Xbox
    I highly doubt any of that is patched , it has just moved as most offsets do when adding a new TU
     
    • Like Like x 1
  8. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,277
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    I highly doubt any of that is patched , it has just moved as most offsets do when adding a new TU


    Oh ill have to wait for more to get released , how do you find the offsets . I dont have a Jtah or a rgh just and retail xbox one and 360S


    Sent from my iPhone using Tapatalk
     
  9. begallegal1

    begallegal1 Medicine Man Lifetime Gold TeamXPG
    0/47

    Joined:
    Oct 31, 2011
    Messages:
    3,694
    Likes Received:
    3,124
    Trophy Points:
    0
    Gender:
    Male
    Location:
    In a Field of Green
    Console:
    Xbox
    I may make a tut for that type of thing, but as for now this is a tutorial to learn how to make xrpc tools not a tut about reversing code on the game, the game really is just being used as an example in this series, also part of the reason I am sticking on TU4, so that others will be forced to take the initiative to learn how to find and update to offsets as they need to keep their tool working on the latest TU (so far everything on this tool has been ported from TU2-up so that's why I say I doubt patched,,just moved as it does every new TU ) ;)
     
    • Like Like x 1
  10. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,277
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    I may make a tut for that type of thing, but as for now this is a tutorial to learn how to make xrpc tools not a tut about reversing code on the game, the game really is just being used as an example in this series, also part of the reason I am sticking on TU4, so that others will be forced to take the initiative to learn how to find and update to offsets as they need to keep their tool working on the latest TU (so far everything on this tool has been ported from TU2-up so that's why I say I doubt patched,,just moved as it does every new TU ) ;)


    Ahh ;)

    Looking forward to tutorial 4 :D


    Sent from my iPhone using Tapatalk
     
    • Like Like x 1
  11. pedro210

    pedro210 Newbie
    0/47

    Joined:
    Sep 21, 2012
    Messages:
    311
    Likes Received:
    27
    Trophy Points:
    0
    Console:
    Xbox
    awesome work ;) no i can make some tools and sell em lol jk. great series of tutorials
     
  12. Sensational

    Sensational RIP TheAye.
    45/47

    Joined:
    Jun 17, 2013
    Messages:
    723
    Likes Received:
    256
    Trophy Points:
    45
    Gender:
    Male
    Location:
    Dallas, Texas
    Console:
    Xbox
    Begal, I've run into a problem... I've just now implemented "setMemory" into my code. Never used it before.

    I have everything set up correctly of course, but get this whenever I do :

    this.Console.setMemory(0x82497C80, new byte[] { 0x60 });

    Are my references messed up?

    [​IMG]

    EDIT**
    Silly silly me.. Am whooped and forgot to capitalize the "S" in "SetMemory".
     
  13. Coder123

    Coder123 Finnish Modder XPG Developer TeamXPG
    105/188

    Joined:
    Jan 21, 2012
    Messages:
    1,954
    Likes Received:
    717
    Trophy Points:
    105
    Gender:
    Male
    Location:
    Finland
    Console:
    Xbox
    they didnt patch anything. Offsets usually change when new title updates come. lol
     
    • Like Like x 1
  14. ReachModding

    ReachModding Banned BANNED
    0/47

    Joined:
    Dec 17, 2013
    Messages:
    87
    Likes Received:
    6
    Trophy Points:
    0
    Console:
    Playstation 3
    Thanks for the tutorial bro!
     
  15. Zehoan

    Zehoan Newbie
    0/47

    Joined:
    Jul 19, 2012
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    0
    Console:
    Xbox
    Thank you for the TUT!
     
  16. johnthorlby911

    johnthorlby911 Newbie
    0/47

    Joined:
    Aug 30, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    These tutorials are good but on my client index it just says gamers in game then 0-17, I'm a noob could someone help me?
     
  17. fl

    flareanon Newbie
    0/47

    Joined:
    Jan 8, 2014
    Messages:
    7
    Likes Received:
    2
    Trophy Points:
    0
    Gender:
    Male
    Console:
    Xbox
    what title update are you on?
     
  18. johnthorlby911

    johnthorlby911 Newbie
    0/47

    Joined:
    Aug 30, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Console:
    Xbox
    I was on tu9 but i was using tu9 offsets, but i used a different way and it works
     
  19. te

    testaccount1234 Newbie
    0/47

    Joined:
    Oct 8, 2014
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I'm trying to use your client method, for a black ops 2 tool i seem to be having this issue. [​IMG]
    I Also get this issue on mw3.
     

Share This Page

Close