Where do I start..

Heeven Apr 13, 2014

  1. He

    Heeven Newbie
    0/47

    Joined:
    Mar 22, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    I've been on this forum a while but never created an account till a few days ago.
    I' got interested in coding/scripting and I would like to know where to start with this journey.


    Do i need any specific programs to do so
    Are there any tutorials you guys might know off that could be helpfull..

    I just want to learn how to make a mod tool and have no idea where to start..

    I'm sorry if this is on the wrong section!! (if it is)
     
  2. AD

    ADDZ Guest

    I started with Visual Basic and this code:

    Imports PackageIO
    Public Class Form1
    Dim FilePath As String
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim Open As New OpenFileDialog
    Open.Filter = "Gamesave (*.*)|*.*"
    Open.Title = "Open Gamesave"
    If Open.ShowDialog = Windows.Forms.DialogResult.OK Then
    FilePath = Open.FileName
    readfile(FilePath)
    Else
    Return
    End If
    End Sub

    Public Sub ReadFile(ByVal FilePath As String)
    Dim Reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
    Reader.Position = &H?? //edit here Heeven
    TextBox1.Text = Reader.ReadInt32
    End Sub

    Public Sub WriteFile(ByVal FilePath As String)
    Dim Writer As New PackageIO.Writer(FilePath, PackageIO.Endian.Big)
    Writer.Position = &H?? //edit here Heeven
    Writer.WriteInt32((TextBox1.Text))
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Try

    WriteFile(FilePath)
    MsgBox(("File Saved, Now Rehash and Resign!"))
    ReadFile(FilePath)
    Dim Reader As New PackageIO.Reader(FilePath, PackageIO.Endian.Big)
    Reader.Position = &H?? //edit here Heeven
    TextBox1.Text = Reader.ReadInt32
    Catch ex As Exception
    MsgBox("Error", MsgBoxStyle.Critical, "")
    End Try
    End Sub
    End Class

    Two buttons and a text bar, pretty simple, where the "Writer.Position = &H" and "Reader.Position = &H" are you add your offset that's going to be edited as long as it has no checks then it's an easy job.

    [​IMG]

    That's as basic as you can really get but some of the other guys will help you with more advanced stuff.
     
  3. KillerVidz

    KillerVidz Rocky BANNED
    0/47

    Joined:
    Feb 20, 2012
    Messages:
    3,312
    Likes Received:
    1,280
    Trophy Points:
    0
    Gender:
    Male
    Location:
    XPG-UK
    Console:
    Xbox One
    Like ADDZ said, if your just starting to code, your Best of in VB creating a mod tool or a little fun tool, that was my first language i now use C#.
     
  4. AD

    ADDZ Guest

    ...also a little look at LoonyRules coding an RTE

    https://www.youtube.com/watch?v=JyxXcK-dQsc

    His code:
    Code:
    #//CODES FROM LoonyRules's 'HOW TO MAKE A MOD TOOL IN C# TUTORIAL 2014' VIDEO THAT CAN BE FOUND AT http://youtu.be/JyxXcK-dQsc\\#
    #//THESE CODES WHERE FOUND BY LoonyRules HIMSELF\\#
    
    #//HAVE FUN <3\\#
    
    #//CODES BEGIN HERE\\#
    
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    using System.Threading;
    using System.Diagnostics;
    
    //Above are inmports that we WILL be needing.
    
    namespace ModToolTutorial
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            //This will import the .dll we need to create the mod tool
            [DllImport("kernel32.dll")]
            private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
            IntPtr pHandel;
    
            //This will look for the ProcessName
            public bool Process_Handle(string ProcessName)
            {
                try
                {
                    Process[] ProcList = Process.GetProcessesByName(ProcessName);
                    if (ProcList.Length == 0)
                        return false;
                    else
                    {
                        pHandel = ProcList[0].Handle;
                        return true;
                    }
                }
                catch (Exception ex)
                { Console.Beep(); Console.WriteLine("Process_Handle - " + ex.Message); return false; }
            }
    
    
            //Code to write the bytes to work the tool
            public void WriteBytes(long Address, byte[] Bytes)
            {
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Bytes, (uint)Bytes.Length, out Zero);
            }
           //Code to write the values to work the tool
            private void Write(long Address, int Value)
            {
                byte[] Buffer = BitConverter.GetBytes(Value);
                IntPtr Zero = IntPtr.Zero;
                WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
            }
    
    
            //THESE ARE OUR OFFSETS WE'LL BE USING
            long PlHealth1 = 0x143C7617C;
            long PlAmmo1 = 0x143DFA714;
            long PlAmmo2 = 0x143DFA720;
    
            //What happens when the form loads, you shouldn't need this
            private void Form1_Load(object sender, EventArgs e)
            {
    
            }
    
    
            //EVERYTHING FROM HERE ON IS SELF EXPLANITORY
            private void button1_Click(object sender, EventArgs e)
            {
                timer1.Start();
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                timer1.Stop();
            }
    
            private void button3_Click(object sender, EventArgs e)
            {
                timer2.Start();
            }
    
            private void button4_Click(object sender, EventArgs e)
            {
                timer2.Stop();
            }
    
            private void timer1_Tick(object sender, EventArgs e)
            {
                if (Process_Handle("iw6sp64_ship"))
                {
                    Write(PlHealth1, 999999999);
                }
            }
    
            private void timer2_Tick(object sender, EventArgs e)
            {
                if (Process_Handle("iw6sp64_ship"))
                {
                    Write(PlAmmo1, 999999999);
                    Write(PlAmmo2, 999999999);
                }
            }
        }
    }
    
    
    #//END OF CODES\\#
    
     
  5. He

    Heeven Newbie
    0/47

    Joined:
    Mar 22, 2014
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Thnk you so much ADDZ. I will try this asap!
     

Share This Page

Close