Tutorial: Basics of C# RTM Tool Coding Tutorial SUPER NOOB FRIENDLY! - Page 12 - NextGenUpdate
Page 12 of 12 First 2 10 11 12
THREAD: Basics of C# RTM Tool Coding Tutorial SUPER NOOB FRIENDLY!
  1. 02-14-2014, 10:28 PM
    #1
    RatchetBooty's Avatar
    RatchetBooty
    Former Staff
    RatchetBooty's Avatar
    RatchetBooty
    Former Staff
    2,036
    Posts
    30,651
    Reputation
    Nov 2013
    NextGenUpdate
    Part 2 is now available! : [Only registered and activated users can see links. ]

    Hey guys, I've finally thought that I should create a thread about the basics of C# and how to use them into coding a RTM Tool for any game. This is a SUPER NOOB friendly tutorial, meaning people that don't know a thing about C# can learn from this. We will be using the game Call of Duty : Ghosts as a example today. But you can follow my steps and create it for any other game as long as you have the offsets. So lets get started off!

    First you will need Visual Studios, you can get any version you want. But if you want to keep up to date get Visual Studios 2013 Ultimate, Click [Only registered and activated users can see links. ]to download it.

    Now while you're waiting for it to download (will take around a hour) you can go to this thread for the Ghosts 1.07 Offsets [Only registered and activated users can see links. ] Credit to Mango_Knife for posting all of these offsets.There are a couple more offset threads around NGU, or just simply Google Ghosts 1.07 Offsets.

    After Visual Studios has downloaded open it up, it should look like this:
    Spoiler:




    If you're wondering how I got the color of VS to be dark all you have to do is go to Tools, and click "Options"
    Example:
    Spoiler:

    and you should see the very first option is called "Color Theme", there are 3 different ones, look at them all and see which one you like most.

    Alright so now back to the coding, click "New Project" on the top left of Visual Studios and a windows like so shall pop up.
    Spoiler:

    Click on "Windows Form Application" and where it says "Name" you can name it anything you want like My First RTM Tool or Ghosts RTM Tool.

    Now you should get a form looking like this:
    Spoiler:

    You can change it's size to whatever you want simply by dragging the little white squares around the Form.

    Now you might of seen other people using TMAPI, we're going to be using PS3Lib. It's a shorter version of TMAPI and its compatible with CCAPI. So you're coding will work for DEX users and CEX users. Click [Only registered and activated users can see links. ] to download PS3Lib.Dll

    Once you have download PS3Lib.Dll you need to add it as a reference, same goes with other dll's. If you ever wanted to make your program have a nice design you use DevComponents, it's a dll, so you would add it as reference. Remember that you can't add CCAPI.dll as a reference but you do need it in the same folder as your program.

    To add it as a reference go to: Project on the top of Visual Studios, click on it. Go down to Add a reference. A box should pop up looking like this:
    Spoiler:


    Click "Browse" and find the PS3Lib.Dll and add it as a reference.
    Now once you have added PS3Lib, double click on the Form and it should look like this:
    Spoiler:


    Where it says "using System; using System.Collections.Generic; and so on, under those. Add "using PS3Lib;" without the quotation marks.

    Now under "InitializeComponent();" add this code:
    Code:
    public static PS3API PS3 = new PS3API();
    What this code is doing is declaring the 3 letter word "PS3" as a API. And where it says new PS3API(); If you wanted your tool to be just CCAPI compatible or just DEX compatible you would put either new PS3API(SelectAPI.TargetManager); or new PS3API(SelectAPI.ControlConsole);

    So now that we have that out of our way lets go back to the form. The design of your form should be at the top, click Form1.cs[Design]*

    Now click on the form once, and you will see a properties windows pop up & and toolbox. If the toolbox isn't there. Go to the top of Visual Studios and click "View" and then click toolbox.

    Now drag 2 buttons to the form and size them to however you like. Name one "Connect" and name one "Attach". You can rename them simply by clicking on the button and on the properties windows find "Text" and you can change the text there.
    Spoiler:


    Double click on the "Connect" button or whatever you've named it.
    And put the following code:

    Code:
       try
                {
                    PS3.ConnectTarget(0);
                    MessageBox.Show("Successfully Connected to Target!", "Connected", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch
                {
                    MessageBox.Show("Failed to Connect", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
    "try" & "catch" is for exception handling meaning that it will try the block of code in the first { } brackets and if it succeeds, in our case if its connects successfully a messagebox will pop up saying we've successfully connected. But if it fails, it will "catch" it, meaning it wont leave the program unresponding. It will catch the error with a messagebox saying it failed.

    Now it's same thing for the "Attach" button, use the same code but instead of PS3.ConnectTarget(0); use PS3.AttachProcess();

    Your code would look something like this:
    Code:
     try
                {
                   PS3.AttachProcess();
                    MessageBox.Show("Successfully Attached to Proccess!", "Attached", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                catch
                {
                    MessageBox.Show("Failed to Attached", "Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
    Now before we continue hit the "Save All" button on the top of Visual Studios just in case Visual Studios crashes.
    Click the box circled in grey in the following picture:
    Spoiler:


    Ok, now we have to add 2 radio buttons so the user can select weather they want to Connect using "DEX" or "CEX". Go into the toolbox and drag 2 radio buttons and name once "DEX and the other one "CEX". Now double click on "DEX" and add the following code:
    Code:
    PS3.ChangeAPI(SelectAPI.TargetManager);
    And now go back and double click on the "CEX" radio button and add the following code:
    Code:
    PS3.ChangeAPI(SelectAPI.ControlConsole);
    Spoiler:

    You're probably getting a error on the "Control Console" bit because it's saying that PS3Lib doesn't contain "Control Console" that's because you have to add CCAPI.Dll to the debug folder. It won't let you add it as a reference. Download CCAPI.Dll [Only registered and activated users can see links. ]
    Now find where your "Visual Studios" folder is located, mine is in my documents folder. Once you have found it, open it. Click "Projects", find your project. Open it. There should be another folder inside it named the same thing so open that folder. Then open the folder "Bin", then open the folder "Debug" and drag the CCAPI.Dll in the debug folder. If you're still getting the error build the solution so it refreshes. Click "Build" at the top of Visual Studios and click "Build Solution"
    Spoiler:

    What these codes are doing is changing the API or Kernel the user is connecting to, as specified earlier in the thread, we didn't say weather on load our API method will be TargetManager or Control Console. In this code with the 2 radio buttons you can change between target types.



    Now add another 2 buttons to the Form and name one "No Recoil ON" & then other one "No Recoil OFF".
    You can still follow the tutorial if you have a different offset for lets say red boxes, or chrome players, or anything like that. So these are the No Recoil ON and OFF bytes including the address.
    Code:
    Red Boxes: 0x14492C (On - 0x60, 0x00, 0x00, 0x00 | Off - 0x41, 0x82,0x00, 0x0c)
    Double click the "No Recoil ON" button and put the following code:
    Code:
    byte[] norecoilon = new byte[] { 0x60, 0x00, 0x00, 0x00 };
    PS3.SetMemory(0x14492C, norecoilon);
    What you're doing here is declaring a byte named "norecoilon" remember that the name of the byte doesn't really matter, you can name it "34itji43tjj4" because it doesn't really matter. Then the ON bytes for No Recoil are 0x60, 0x00, 0x00, 0x00 so you're putting the bytes into hex format.
    Then your setting the memory with the No Recoil address which is 0x14492C, and then beside it your putting the byte norecoilon. So lets conclude this: You've made a byte named norecoilon, that byte has the bytes in hex: 0x60, 0x00, 0x00, 0x00. Then your setting the memory to your PS3 by setting the bytes in "norecoilon" to the offset 0x14492C.

    Now you do the same thing for No Recoil OFF but its different bytes. Your code for No Recoil OFF would look like:
    Code:
    byte[] norecoiloff = new byte[] { 0x41, 0x82,0x00, 0x0c };
    PS3.SetMemory(0x14492C, norecoiloff);
    Now you're finally finished, all you have to do now is run the .exe. You can debug it meaning if any random error occurs in the code the program will stop or run it without debugging meaning just running it straight from the .exe. To debug all you have to do is click "Start" at the top of Visual Studios or if you want to run it without debugging click the little arrow beside "Start" and it will drop down with another Start feature, click that start.
    Spoiler:


    Now you're finally done, to distribute your file click "Save All" (there was a pic earlier in the thread) and find the Visual Studios 2013 folder. Mine is located in my documents, once you have found it. Click on it, click "Projects" and find the folder with your tool that you've just created. You're tool will be in the debug folder. Remember if you're going to send people the tool remember to send them with the dll's. You can add a lot more non host mods or anything you would like from this offset thread:
    [Only registered and activated users can see links. ]

    But some of the offsets like changing name and lobby settings require a bit different kind of coding as coding requires encodings and array reversing. I will be making a part 2 tutorial soon, comment what you guys would like to see.
    If you guys want the download for the project we just did. You can see how everything's coded if you're getting a error.
    Open Source: [Only registered and activated users can see links. ]
    Last edited by RatchetBooty; 03-27-2014 at 10:26 PM.

  2. The Following 87 Users Say Thank You to RatchetBooty For This Useful Post:

    , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

  3. 01-11-2017, 02:36 PM
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    9
    Posts
    10
    Reputation
    Dec 2016
    NextGenUpdate
    Sponsored Links

    Followed this tut to the tee and every time i get Error messages about unexpected ({) and "Does not contain a definition for 'Button_1 click' Ect...
    any idea's guys?
    Last edited by Roosty_boy; 01-11-2017 at 02:37 PM. Reason: Missed words

  4. Sponsored Links
  5. 01-11-2017, 11:55 PM
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    5,551
    Posts
    58,679
    Reputation
    Jun 2014
    NextGenUpdate
    Originally Posted by Roosty_boy View Post
    Followed this tut to the tee and every time i get Error messages about unexpected ({) and "Does not contain a definition for 'Button_1 click' Ect...
    any idea's guys?
    What are you trying to do?
  6. 01-13-2017, 09:41 AM
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    9
    Posts
    10
    Reputation
    Dec 2016
    NextGenUpdate
    Originally Posted by Dr. Luckeyy View Post
    What are you trying to do?
    It's my first try making a RTM tool for bo2 so I want to learn the basics but I can't get to grips with the tut it just throws errors at me. Thanks.
  7. 01-13-2017, 09:47 AM
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    5,551
    Posts
    58,679
    Reputation
    Jun 2014
    NextGenUpdate
    Originally Posted by Roosty_boy View Post
    It's my first try making a RTM tool for bo2 so I want to learn the basics but I can't get to grips with the tut it just throws errors at me. Thanks.
    What are you trying to code? Off host mods?
  8. 01-13-2017, 11:12 AM
    John's Avatar
    John
    Coding Nub
    John's Avatar
    John
    Coding Nub
    1,906
    Posts
    62,427
    Reputation
    Dec 2012
    NextGenUpdate
    Originally Posted by Roosty_boy View Post
    Followed this tut to the tee and every time i get Error messages about unexpected ({) and "Does not contain a definition for 'Button_1 click' Ect...
    any idea's guys?
    You misplaced a curly bracket. Upload your code to pastebin or something and I'l help you fix it
  9. 01-16-2017, 05:40 AM
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    9
    Posts
    10
    Reputation
    Dec 2016
    NextGenUpdate
    Originally Posted by Dr. Luckeyy View Post
    What are you trying to code? Off host mods?
    Just trying to link the ccapi and tmapi buttons to the correct path then host/non-host buttons like rank editor ect..
  10. 01-16-2017, 05:41 AM
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    9
    Posts
    10
    Reputation
    Dec 2016
    NextGenUpdate
    Originally Posted by John View Post
    You misplaced a curly bracket. Upload your code to pastebin or something and I'l help you fix it
    Ah thanks buddy means a lot
  11. 01-16-2017, 08:11 AM
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    Dr. Luckeyy's Avatar
    Dr. Luckeyy
    GAMERCHOICE™
    5,551
    Posts
    58,679
    Reputation
    Jun 2014
    NextGenUpdate
    Originally Posted by Roosty_boy View Post
    Just trying to link the ccapi and tmapi buttons to the correct path then host/non-host buttons like rank editor ect..
    Here's my base connections are already done and it shows how to code off host mods

    ⚝Gamer Choice™ Open source RTM Tool Base
  12. 01-16-2017, 04:40 PM
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    Roosty_boy's Avatar
    Roosty_boy
    Save Point
    9
    Posts
    10
    Reputation
    Dec 2016
    NextGenUpdate
    Originally Posted by Dr. Luckeyy View Post
    Here's my base connections are already done and it shows how to code off host mods

    [Only registered and activated users can see links. ]
    Ah thanks dude.
  13. 04-23-2017, 11:31 PM
    BrettHud's Avatar
    BrettHud
    Gobble
    BrettHud's Avatar
    BrettHud
    Gobble
    3
    Posts
    10
    Reputation
    Mar 2016
    NextGenUpdate
    why would my console freeze immediately when click a programmed button such as godmode or give 3 stars ?
Page 12 of 12 First 2 10 11 12

Posting Permissions

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