Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://www.nextgenupdate.com/forums/modern-warfare-3-mods-patches-tutorials/759859-mw3-1-24-c-source-aimbot-unfair-all-clients.html
- //Credits: zRayz-
- //Download: http://www.mediafire.com/download/au2tdp5muddmejb/AimbotUnfair+C%23.rar
- //Form1.cs
- 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.Threading;
- using MetroFramework;
- using PS3Lib;
- namespace AimbotNGU
- {
- public partial class Form1 : MetroFramework.Forms.MetroForm
- {
- public static PS3API PS3 = new PS3API();
- public static uint ProcessID;
- public static uint[] processIDs;
- private uint Client;
- public static string snresult;
- public static string Info;
- public static PS3TMAPI.ConnectStatus connectStatus;
- public static string Status;
- public static string MemStatus;
- private Random rand = new Random();
- public static CCAPI CCAPI = new CCAPI();
- public static uint PlayersName = 0x01BBBC2C;
- public Form1()
- {
- InitializeComponent();
- }
- #region Aimbot
- private void StartAimbot(UInt32 Client)
- {
- //Checks if player is aiming.
- //Guckt ob der Spieler ziehlt.
- if (RPC.Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + (Client * 0x3980)) > 0)
- RPC.Aimbot_and_ForgeMode.Aimbot(Client, RPC.Aimbot_and_ForgeMode.FindClosestEnemy(Client));
- }
- private void StartForgeMode(UInt32 Client)
- {
- //Checks if player is aiming.
- //Guckt ob der Spieler ziehlt.
- uint Enemy = RPC.Aimbot_and_ForgeMode.FindClosestEnemy(Client);
- //This is just only a way you can use Key_Down.
- //Das ist nur ein weg um es zu nutzen benutz am besten Key_Down.
- if (RPC.Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + ((uint)Client * 0x3980)) > 0)
- {
- RPC.Aimbot_and_ForgeMode.Freeze(Enemy, true);
- RPC.Aimbot_and_ForgeMode.ForgeMode(Client, Enemy);
- }
- else
- {
- RPC.Aimbot_and_ForgeMode.Freeze(Enemy, false);
- }
- }
- #endregion
- private void Form1_Load(object sender, EventArgs e)
- {
- // Hope you will have a fun and maybe you will make better this Type of unfair aimbot <3 //
- // Follow me at Youtube : Rayz1337 Facebook : Rayz MoDz //
- // You need help ' Add me on Facebook or Skype ;) //
- // Facebook url : https://www.facebook.com/Rayz1337 //
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (PS3.ConnectTarget())
- {
- string Message = "Connected";
- MessageBox.Show(Message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- else
- {
- string Message = "Impossible to connect";
- MessageBox.Show(Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- if (PS3.AttachProcess())
- {
- string Message = "Attached";
- MessageBox.Show(Message, "Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- RPC.Enable();
- RPC.EnableRPC();
- }
- else
- {
- MessageBox.Show("Cant'attach", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- if (button2.Text == "Aimbot Unfair [OFF]")
- {
- timer1.Start();
- timer2.Start();
- RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Unfair ^2ON");
- button2.Text = "Aimbot Unfair [ON]";
- }
- else if (button2.Text == "Aimbot Unfair [ON]")
- {
- timer1.Stop();
- timer2.Stop();
- RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Unfair ^2ON");
- button2.Text = "Aimbot Unfair [OFF]";
- }
- }
- #region Aimbot Unfair
- public static UInt32 G_Entity(Int32 clientIndex, UInt32 Mod = 0)
- {
- return ((0xfca280 + Mod) + ((UInt32)(0x280 * clientIndex)));
- }
- public static void PlayerDie(uint Killer, uint Victim)
- {
- RPC.Call(0x183E18, G_Entity((int)Victim), G_Entity((int)Killer), G_Entity((int)0), 0xD00CFF6C, 0xD00CFFA8, 0x64, 0, 1, 0, 0x1378, 0x10008DA0, 0xD00CFF24, 0xD00CF12C);
- }
- public void unfire(int Killer)
- {
- if (Buttons.PressL1R1((int)numericUpDown1.Value))
- {
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 0);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 1);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 2);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 3);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 4);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 5);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 6);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 7);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 8);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 9);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 10);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 11);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 12);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 13);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 14);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 15);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 16);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 17);
- Thread.Sleep(0);
- }
- }
- #endregion
- #region Aimbot UnfairR1
- public void unfireR1(int Killer)
- {
- if (Buttons.PressR1((int)numericUpDown1.Value))
- {
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 0);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 1);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 2);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 3);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 4);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 5);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 6);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 7);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 8);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 9);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 10);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 11);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 12);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 13);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 14);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 15);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 16);
- Thread.Sleep(50);
- PlayerDie((uint)numericUpDown1.Value, 17);
- Thread.Sleep(0);
- }
- }
- #endregion
- private void timer1_Tick(object sender, EventArgs e)
- {
- unfire((int)numericUpDown1.Value);
- }
- private void timer2_Tick(object sender, EventArgs e)
- {
- unfireR1((int)numericUpDown1.Value);
- }
- private void button3_Click(object sender, EventArgs e)
- {
- try
- {
- HOST.Text = RPC.ServerInfo.getHostName();
- MAP.Text = RPC.ServerInfo.getMapName();
- MODE.Text = RPC.ServerInfo.getGameMode();
- for (int i = 0; i < 18; i++)
- {
- dataGridView1.Enabled = true;
- dataGridView1.RowCount = 18;
- dataGridView1.Rows[i].Cells[0].Value = i;
- dataGridView1.Rows[i].Cells[1].Value = GetName(i);
- Application.DoEvents();
- }
- }
- catch
- {
- for (int i = 0; i < 18; i++)
- {
- HOST.Text = "Null";
- MAP.Text = "Null";
- MODE.Text = "Null";
- dataGridView1.RowCount = 18;
- dataGridView1.Rows[i].Cells[0].Value = i;
- dataGridView1.Rows[i].Cells[1].Value = "";
- }
- }
- }
- #region GetName
- public static uint NameAddress = 0x0110d60c;
- public static string GetName(int client)
- {
- byte[] buffer = new byte[16];
- PS3.GetMemory(NameAddress + 0x3980 * (uint)client, buffer);
- string names = Encoding.ASCII.GetString(buffer);
- names = names.Replace("\0", "");
- return names;
- }
- #endregion
- private void button4_Click(object sender, EventArgs e)
- {
- if (button4.Text == "Aimbot Classic [OFF]")
- {
- timer3.Start();
- RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Classic ^2ON");
- button4.Text = "Aimbot Classic [ON]";
- }
- else if (button4.Text == "Aimbot Classic [ON]")
- {
- timer3.Stop();
- RPC.iPrintln((int)numericUpDown1.Value, "Aimbot Classic ^1OFF");
- button4.Text = "Aimbot Classic [OFF]";
- }
- }
- private void timer3_Tick(object sender, EventArgs e)
- {
- StartAimbot((uint)numericUpDown1.Value);
- }
- }
- }
- //Button.cs
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using PS3Lib;
- namespace AimbotNGU
- {
- class Buttons
- {
- public static uint
- X = 1024,
- O = 512,
- Square = 2097152,
- L3 = 139264,
- R3 = 67371008,
- L2 = 32768,
- R2 = 16384,
- Start = 128,
- L1 = 2056,
- R1 = 65536,
- Crouch = 512,
- Prone = 256;
- public static uint getPlayerState(int clientIndex)
- {
- byte[] ClientPtr = new byte[4];
- PS3.GetMemoryR(0xFCA280 + ((uint)clientIndex * 0x280) + 0x158, ref ClientPtr);
- Array.Reverse(ClientPtr);
- uint Next = BitConverter.ToUInt32(ClientPtr, 0);
- return Next;
- }
- public static uint UseButtonMonitoring(int client)
- {
- return (getPlayerState(client) + 0x3609);
- }
- public static uint DetectButton(int clientID)
- {
- byte[] Button = new byte[4];
- PS3.GetMemoryR(UseButtonMonitoring(clientID), ref Button);
- return System.BitConverter.ToUInt32(Button, 0);
- }
- public static bool PressR1(int client)
- {
- uint ButtonDown = DetectButton(client);
- if (ButtonDown == Buttons.R1 || ButtonDown == Buttons.R1 + Buttons.Crouch || ButtonDown == Buttons.R1 + Buttons.Prone)
- {
- return true;
- }
- return false;
- }
- public static bool PressL1R1(int client)
- {
- uint ButtonDown = DetectButton(client);
- if (ButtonDown == Buttons.L1 + Buttons.R1 || ButtonDown == Buttons.L1 + Buttons.R1 + Buttons.Crouch || ButtonDown == Buttons.L1 + Buttons.R1 + Buttons.Prone)
- {
- return true;
- }
- return false;
- }
- }
- }
- //Offset.cs
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AimbotNGU
- {
- class Offset
- {
- public static UInt32
- G_HudElems = 0xF0E10C,
- HudelemSize = 0xB8,
- InGame = 0x7F072C,
- LevelTime = 0xFC3DB0,
- G_Client = 0x110A280,
- G_ClientSize = 0x3980,
- G_Entity = 0xFCA280,
- G_EntitySize = 0x280,
- ButtonMonitoring = 0xFCA280,
- PlayerName = 0x1BBBC2C,
- ClientName = G_Client + 0x338C,
- FreezeClient = G_Client + 0x35FF;
- }
- }
- //PS3.cs
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using PS3Lib;
- namespace AimbotNGU
- {
- class PS3
- {
- public static PS3API PS31 = new PS3API();
- private static PS3API DEX = new PS3API(SelectAPI.TargetManager);
- public static void ChangeAPI(SelectAPI API)
- {
- DEX.ChangeAPI(API);
- }
- public static void Connect()
- {
- DEX.ConnectTarget(0);
- DEX.AttachProcess();
- }
- public static SelectAPI CurrentAPI;
- public static byte[] GetBytes(uint offset, int length, SelectAPI API)
- {
- byte[] bytes = new byte[length];
- if (API == SelectAPI.ControlConsole)
- {
- return DEX.GetBytes(offset, length);
- }
- if (API == SelectAPI.TargetManager)
- {
- bytes = DEX.GetBytes(offset, length);
- }
- return bytes;
- }
- public static SelectAPI GetCurrentAPI()
- {
- return DEX.GetCurrentAPI();
- }
- public static byte[] GetMemory(uint offset, int length)
- {
- byte[] buffer = new byte[length];
- DEX.GetMemory(offset, buffer);
- return buffer;
- }
- public static byte[] GetMemoryL(uint address, int length)
- {
- byte[] buffer = new byte[length];
- DEX.GetMemory(address, buffer);
- return buffer;
- }
- public static void GetMemoryR(uint Address, ref byte[] Bytes)
- {
- DEX.GetMemory(Address, Bytes);
- }
- public static void SetMemory(uint Address, byte[] Bytes)
- {
- DEX.SetMemory(Address, Bytes);
- }
- public class Extension
- {
- private static SelectAPI CurrentAPI;
- private static byte[] GetBytes(uint offset, int length, SelectAPI API)
- {
- byte[] bytes = new byte[length];
- if (API == SelectAPI.ControlConsole)
- {
- return PS3.DEX.GetBytes(offset, length);
- }
- if (API == SelectAPI.TargetManager)
- {
- bytes = PS3.DEX.GetBytes(offset, length);
- }
- return bytes;
- }
- private static void GetMem(uint offset, byte[] buffer, SelectAPI API)
- {
- if (API == SelectAPI.ControlConsole)
- {
- PS3.GetMemoryR(offset, ref buffer);
- }
- else if (API == SelectAPI.TargetManager)
- {
- PS3.GetMemoryR(offset, ref buffer);
- }
- }
- public static bool ReadBool(uint offset)
- {
- byte[] buffer = new byte[1];
- GetMem(offset, buffer, CurrentAPI);
- return (buffer[0] != 0);
- }
- public static byte ReadByte(uint offset)
- {
- return GetBytes(offset, 1, CurrentAPI)[0];
- }
- public static byte[] ReadBytes(uint offset, int length)
- {
- return GetBytes(offset, length, CurrentAPI);
- }
- public static float ReadFloat(uint offset)
- {
- byte[] array = GetBytes(offset, 4, CurrentAPI);
- Array.Reverse(array, 0, 4);
- return BitConverter.ToSingle(array, 0);
- }
- public static short ReadInt16(uint offset)
- {
- byte[] array = GetBytes(offset, 2, CurrentAPI);
- Array.Reverse(array, 0, 2);
- return BitConverter.ToInt16(array, 0);
- }
- public static int ReadInt32(uint offset)
- {
- byte[] array = GetBytes(offset, 4, CurrentAPI);
- Array.Reverse(array, 0, 4);
- return BitConverter.ToInt32(array, 0);
- }
- public static long ReadInt64(uint offset)
- {
- byte[] array = GetBytes(offset, 8, CurrentAPI);
- Array.Reverse(array, 0, 8);
- return BitConverter.ToInt64(array, 0);
- }
- public static sbyte ReadSByte(uint offset)
- {
- byte[] buffer = new byte[1];
- GetMem(offset, buffer, CurrentAPI);
- return (sbyte) buffer[0];
- }
- public static string ReadString(uint offset)
- {
- int length = 40;
- int num2 = 0;
- string source = "";
- do
- {
- byte[] bytes = ReadBytes(offset + ((uint) num2), length);
- source = source + Encoding.UTF8.GetString(bytes);
- num2 += length;
- }
- while (!source.Contains<char>('\0'));
- int index = source.IndexOf('\0');
- string str2 = source.Substring(0, index);
- source = string.Empty;
- return str2;
- }
- public static ushort ReadUInt16(uint offset)
- {
- byte[] array = GetBytes(offset, 2, CurrentAPI);
- Array.Reverse(array, 0, 2);
- return BitConverter.ToUInt16(array, 0);
- }
- public static uint ReadUInt32(uint offset)
- {
- byte[] array = GetBytes(offset, 4, CurrentAPI);
- Array.Reverse(array, 0, 4);
- return BitConverter.ToUInt32(array, 0);
- }
- public static ulong ReadUInt64(uint offset)
- {
- byte[] array = GetBytes(offset, 8, CurrentAPI);
- Array.Reverse(array, 0, 8);
- return BitConverter.ToUInt64(array, 0);
- }
- public static byte[] ReverseArray(float float_0)
- {
- byte[] bytes = BitConverter.GetBytes(float_0);
- Array.Reverse(bytes);
- return bytes;
- }
- public static byte[] ReverseBytes(byte[] inArray)
- {
- Array.Reverse(inArray);
- return inArray;
- }
- private static void SetMem(uint Address, byte[] buffer, SelectAPI API)
- {
- PS3.DEX.SetMemory(Address, buffer);
- }
- public static byte[] ToHexFloat(float Axis)
- {
- byte[] bytes = BitConverter.GetBytes(Axis);
- Array.Reverse(bytes);
- return bytes;
- }
- public static byte[] uintBytes(uint input)
- {
- byte[] bytes = BitConverter.GetBytes(input);
- Array.Reverse(bytes);
- return bytes;
- }
- public static void WriteBool(uint offset, bool input)
- {
- byte[] buffer = new byte[] { input ? ((byte) 1) : ((byte) 0) };
- SetMem(offset, buffer, CurrentAPI);
- }
- public static void WriteByte(uint offset, byte input)
- {
- byte[] buffer = new byte[] { input };
- SetMem(offset, buffer, CurrentAPI);
- }
- public static void WriteBytes(uint offset, byte[] input)
- {
- byte[] buffer = input;
- SetMem(offset, buffer, CurrentAPI);
- }
- public static void WriteFloat(uint offset, float input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteInt16(uint offset, short input)
- {
- byte[] array = new byte[2];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 2);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteInt32(uint offset, int input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteInt64(uint offset, long input)
- {
- byte[] array = new byte[8];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 8);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteSByte(uint offset, sbyte input)
- {
- byte[] buffer = new byte[] { (byte) input };
- SetMem(offset, buffer, CurrentAPI);
- }
- public static void WriteString(uint offset, string input)
- {
- byte[] bytes = Encoding.UTF8.GetBytes(input);
- Array.Resize<byte>(ref bytes, bytes.Length + 1);
- SetMem(offset, bytes, CurrentAPI);
- }
- public static void WriteUInt16(uint offset, ushort input)
- {
- byte[] array = new byte[2];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 2);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteUInt32(uint offset, uint input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- SetMem(offset, array, CurrentAPI);
- }
- public static void WriteUInt64(uint offset, ulong input)
- {
- byte[] array = new byte[8];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 8);
- SetMem(offset, array, CurrentAPI);
- }
- }
- }
- }
- //RPC.cs
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Threading;
- namespace AimbotNGU
- {
- class RPC
- {
- #region RPC
- public static void Enable()
- {
- if (PS3.Extension.ReadString(0x00277213) == "H")
- {
- //This will check if the RPC is set already, to prevent freeze's.
- }
- else
- {
- byte[] WritePPC = new byte[] {0x3F,0x80,0x10,0x05,0x81,0x9C,0x00,0x48,0x2C,0x0C,0x00,0x00,0x41,0x82,0x00,0x78,
- 0x80,0x7C,0x00,0x00,0x80,0x9C,0x00,0x04,0x80,0xBC,0x00,0x08,0x80,0xDC,0x00,0x0C,
- 0x80,0xFC,0x00,0x10,0x81,0x1C,0x00,0x14,0x81,0x3C,0x00,0x18,0x81,0x5C,0x00,0x1C,
- 0x81,0x7C,0x00,0x20,0xC0,0x3C,0x00,0x24,0xC0,0x5C,0x00,0x28,0xC0,0x7C,0x00,0x2C,
- 0xC0,0x9C,0x00,0x30,0xC0,0xBC,0x00,0x34,0xC0,0xDC,0x00,0x38,0xC0,0xFC,0x00,0x3C,
- 0xC1,0x1C,0x00,0x40,0xC1,0x3C,0x00,0x44,0x7D,0x89,0x03,0xA6,0x4E,0x80,0x04,0x21,
- 0x38,0x80,0x00,0x00,0x90,0x9C,0x00,0x48,0x90,0x7C,0x00,0x4C,0xD0,0x3C,0x00,0x50,
- 0x48,0x00,0x00,0x14};
- PS3.SetMemory(func_address, new byte[] { 0x41 });
- PS3.SetMemory(func_address + 4, WritePPC);
- PS3.SetMemory(func_address, new byte[] { 0x40 });
- Thread.Sleep(10);
- RPC.DestroyAll();
- }
- }
- public static void EnableRPC()
- {
- PS3.SetMemory(0x523b10, new byte[0x87f]);
- byte[] bytes = new byte[4];
- bytes[0] = 0x60;
- PS3.SetMemory(0x18be6c, bytes);
- bytes = new byte[4];
- bytes[0] = 0x60;
- PS3.SetMemory(0x3bc9cc, bytes);
- bytes = new byte[4];
- bytes[0] = 0x48;
- bytes[3] = 0x68;
- PS3.SetMemory(0x18be74, bytes);
- PS3.SetMemory(0x1db1244, new byte[4]);
- PS3.SetMemory(0x114ae64, new byte[4]);
- PS3.SetMemory(0x3bc9e4, new byte[] {
- 0x41, 130, 2, 0x20, 0x3d, 0, 0, 0x52, 0x80, 0x68, 0x3b, 0x10, 0x80, 0x88, 0x3b, 20,
- 0x80, 0xa8, 0x3b, 0x18, 0x80, 200, 0x3b, 0x1c, 0x80, 0xe8, 0x3b, 0x20, 0x39, 0, 0, 0,
- 0x48, 0, 0, 0x1d, 60, 0x80, 1, 0x15, 0x90, 100, 0xae, 100, 0x38, 0x80, 0, 0,
- 60, 0x60, 1, 0xdb, 0x90, 0x83, 0x12, 0x44, 0x48, 0, 1, 0xe8, 0x4e, 0x80, 0, 0x20,
- 0x60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x60, 0, 0, 0
- });
- }
- public static void DestroyAll()
- {
- Byte[] clear = new Byte[0xB4 * 1024];
- PS3.SetMemory(0xF0E10C, clear);
- }
- private static void WriteSingle(uint address, float input)
- {
- byte[] array = new byte[4];
- BitConverter.GetBytes(input).CopyTo(array, 0);
- Array.Reverse(array, 0, 4);
- PS3.SetMemory(address, array);
- }
- private static void WriteSingle(uint address, float[] input)
- {
- int length = input.Length;
- byte[] array = new byte[length * 4];
- for (int i = 0; i < length; i++)
- {
- ReverseBytes(BitConverter.GetBytes(input[i])).CopyTo(array, (int)(i * 4));
- }
- PS3.SetMemory(address, array);
- }
- private static byte[] ReverseBytes(byte[] inArray)
- {
- Array.Reverse(inArray);
- return inArray;
- }
- public static Int32 Call(UInt32 address, params Object[] parameters)
- {
- Int32 length = parameters.Length;
- Int32 index = 0;
- UInt32 count = 0;
- UInt32 Strings = 0;
- UInt32 Single = 0;
- UInt32 Array = 0;
- while (index < length)
- {
- if (parameters[index] is Int32)
- {
- PS3.Extension.WriteInt32(0x10050000 + (count * 4), (Int32)parameters[index]);
- count++;
- }
- else if (parameters[index] is UInt32)
- {
- PS3.Extension.WriteUInt32(0x10050000 + (count * 4), (UInt32)parameters[index]);
- count++;
- }
- else if (parameters[index] is Int16)
- {
- PS3.Extension.WriteInt16(0x10050000 + (count * 4), (Int16)parameters[index]);
- count++;
- }
- else if (parameters[index] is UInt16)
- {
- PS3.Extension.WriteUInt16(0x10050000 + (count * 4), (UInt16)parameters[index]);
- count++;
- }
- else if (parameters[index] is Byte)
- {
- PS3.Extension.WriteByte(0x10050000 + (count * 4), (Byte)parameters[index]);
- count++;
- } //Should work now :D let me try
- else
- {
- UInt32 pointer;
- if (parameters[index] is String)
- {
- pointer = 0x10052000 + (Strings * 0x400);
- PS3.Extension.WriteString(pointer, Convert.ToString(parameters[index]));
- PS3.Extension.WriteUInt32(0x10050000 + (count * 4), pointer);
- count++;
- Strings++;
- }
- else if (parameters[index] is Single)
- {
- WriteSingle(0x10050024 + (Single * 4), (Single)parameters[index]);
- Single++;
- }
- else if (parameters[index] is Single[])
- {
- Single[] Args = (Single[])parameters[index];
- pointer = 0x10051000 + Array * 4;
- WriteSingle(pointer, Args);
- PS3.Extension.WriteUInt32(0x10050000 + count * 4, pointer);
- count++;
- Array += (UInt32)Args.Length;
- }
- }
- index++;
- }
- PS3.Extension.WriteUInt32(0x10050048, address);
- Thread.Sleep(20);
- return PS3.Extension.ReadInt32(0x1005004c);
- }
- public static uint func_address = 0x0277208;
- public static uint str_pointer(string str)
- {
- uint addr = 0x523B30;
- byte[] check = new byte[1];
- uint i;
- for (i = 0; i < 5; i++)
- {
- PS3.GetMemoryR(addr, ref check);
- if (check[0] == 0x00)
- break;
- if (i == 4)
- {
- i = 0; break;
- }
- }
- addr = (0x523B30 + (i * 0x68));
- PS3.SetMemory(addr, new byte[0x68]);
- PS3.SetMemory(addr, Encoding.UTF8.GetBytes(str));
- return addr;
- }
- public static void CallFunc(uint func_addr, uint param1 = 0, uint param2 = 0, uint param3 = 0, uint param4 = 0, uint param5 = 0)
- {
- byte[] par1 = BitConverter.GetBytes(param1);
- byte[] par2 = BitConverter.GetBytes(param2);
- byte[] par3 = BitConverter.GetBytes(param3);
- byte[] par4 = BitConverter.GetBytes(param4);
- byte[] par5 = BitConverter.GetBytes(param5);
- Array.Reverse(par1);
- Array.Reverse(par2);
- Array.Reverse(par3);
- Array.Reverse(par4);
- Array.Reverse(par5);
- PS3.SetMemory(0x523B10, par1);
- PS3.SetMemory(0x523B14, par2);
- PS3.SetMemory(0x523B18, par3);
- PS3.SetMemory(0x523B1C, par4);
- PS3.SetMemory(0x523B20, par5);
- PS3.SetMemory(0x3BCA04, MakeBl(0x3BCA04, func_addr));
- PS3.SetMemory(0x1DB1244, new byte[] { 0x00, 0x00, 0x00, 0x01 });
- }
- public static uint GetFuncReturn()
- {
- byte[] ret = new byte[4];
- PS3.GetMemoryR(0x114AE64, ref ret);
- Array.Reverse(ret);
- return BitConverter.ToUInt32(ret, 0);
- }
- public static byte[] MakeBl(uint callAddr, uint addrToBlTo)
- {
- byte[] instruction = new byte[4];
- uint addr_t = (uint)(((int)addrToBlTo - (int)callAddr) + 1);
- if ((int)addrToBlTo > (int)callAddr) instruction[3] = 0x48;
- else
- {
- instruction[3] = 0x4B; addr_t = (uint)(0x1000000 - ((int)callAddr - (int)addrToBlTo) + 1);
- }
- byte[] addr = BitConverter.GetBytes(addr_t);
- for (int i = 0; i < 3; i++)
- {
- instruction[i] = addr[i];
- }
- Array.Reverse(instruction);
- return instruction;
- }
- public static void SV_Kickclient(int client, string command)
- {
- CallFunc(Addresses.SV_KickClient, (uint)client, 0, str_pointer(command), 0, 0);
- }
- public static void SV_GameSendServerCommand(int client, string command)
- {
- CallFunc(Addresses.SV_GameSendServerCommand, (uint)client, 0, str_pointer(command), 0, 0);
- }
- public static void iPrintln(int client, string Text)
- {
- SV_GameSendServerCommand((int)client, "f \"" + Text + "\"");
- Thread.Sleep(20);
- }
- public static void iPrintlnBold(uint client, string Text)
- {
- SV_GameSendServerCommand((int)client, "c \"" + Text + "\"");
- Thread.Sleep(20);
- }
- public static void method_25(int int_4, string string_3)
- {
- SV_GameSendServerCommand(int_4, "q " + string_3);
- }
- public static void SetModel(int client, string model)
- {
- CallFunc(Addresses.G_SetModel, (uint)(Addresses.G_Entity + (client * 640)), str_pointer(model), 0, 0, 0);
- }
- public static void Visions(uint client, string VisionName)
- {
- SV_GameSendServerCommand((int)client, "J \"" + VisionName + "\"");
- }
- public static void Fov(int client, string Text)
- {
- SV_GameSendServerCommand((int)client, "q \"cg_fov \"" + Text + "\"");
- System.Threading.Thread.Sleep(20);
- }
- #region Cbuf_AddText
- public static void CBuf_AddText(int client, string command)
- {
- CallFunc(Addresses.CBuf_AddText, (uint)client, str_pointer(command), 0, 0, 0);
- }
- #endregion
- #region G_ClientFunction
- public static uint G_ClientFunction(int client)
- {
- return Addresses.G_Client + ((uint)client * 0x3980);
- }
- #endregion
- public static void GiveWeapon(int client, int weapon)
- {
- CallFunc(Addresses.G_GivePlayerWeapon, (uint)G_ClientFunction(client), (uint)weapon, 0);
- CallFunc(Addresses.Add_Ammo, (uint)(Addresses.G_Entity + (client * 0x280)), (uint)weapon, 0, 9999, 1);
- }
- #endregion
- #region Addresses
- public static class Addresses
- {
- public static uint
- G_Client = 0x110A280,
- g_client = 0x110A280,
- G_ClientIndex = 0x3980,
- EntityIndex = 0x280,
- G_Entity = 0xFCA280,
- MapBrushModel = 0x7F80,
- BG_GetPerkIndexForName = 0x210B0,
- BG_GetNumWeapons = 0x3CFBC,
- BG_FindWeaponIndexForName = 0x3CFD0,
- BG_GetWeaponIndexForName = 0x3D434,
- BG_GetViewModelWeaponIndex = 0x3D7D8,
- Cmd_ExecuteSingleCommand = 0x1DB240,
- BG_WeaponFireRecoil = 0x3FBD0,
- CG_FireWeapon = 0xBE498,
- Key_IsDown = 0xD1CD8,
- Key_StringToKeynum = 0xD1D18,
- Key_IsValidGamePadChar = 0xD1E64,
- Key_KeyNumToString = 0xD1EA4,
- Key_Unbind_f = 0xD2368,
- Key_Bind_f = 0xD247C,
- BG_TakePlayerWeapon = 0x1C409C,
- G_GivePlayerWeapon = 0x1C3034,
- SV_GameSendServerCommand = 0x228FA8,
- SV_GetConfigString = 0x22A4A8,
- SV_SetConfigString = 0x22A208,
- va = 0x299490,
- G_SetModel = 0x1BEF5C,
- G_LocalizedStringIndex = 0x1BE6CC,
- G_MaterialIndex = 0x1BE744,
- G_ModelIndex = 0x1BE7A8,
- G_ModelName = 0x1BE8A0,
- Add_Ammo = 0x18A29C,
- PlayerCmd_SetPerk = 0x17EBE8,
- G_Damage = 0x183E18,
- G_RadiusDamage = 0x185600,
- G_GetClientScore = 0x18EA74,
- G_GetClientDeaths = 0x18EA98,
- Cmd_AddCommandInternal = 0x1DC4FC,
- CBuf_AddText /*(int localClientNum, const char *text)*/ = 0x001DB240,
- SV_SendDisconnect /*(client_s *client, int state, const char *reason)*/ = 0x0022472C,
- SV_SendClientGameState /*(client_s *client)*/ = 0x002284F8,
- SV_KickClient /*(client_s *cl, char *playerName, int maxPlayerNameLen)*/ = 0x00223BD0,
- G_CallSpawnEntity /*(gentity_s *ent)*/ = 0x001BA730,
- Player_Die /*(unsigned int *self, unsigned int *inflictor, unsigned int *attacker, int damage, int meansOfDeath, int iWeapon, const float *vDir, unsigned int hitLoc, int psTimeOffset)*/ = 0x00183748,
- SV_DropClient /*(client_s *drop, const char *reason, bool tellThem)*/ = 0x002249FC,
- SV_SendServerCommand /*(client_s *,svscmd_type,char const *,...)*/ = 0x0022CEBC,
- Scr_Notify /*(gentity_s *ent, unsigned __int16 stringValue, unsigned int paramcount)*/ = 0x001BB1B0,
- Sv_SetGametype /*(void)*/ = 0x00229C1C,
- Sv_Maprestart /*(int fast_restart)*/ = 0x00223774,
- sv_maprestart_f = 0x00223B20,
- sv_spawnsever /*(const char *server)*/ = 0x0022ADF8,
- sv_map_f = 0x002235A0,
- sv_matchend /*(void)*/ = 0x0022F7A8,
- R_AddCmdDrawText /*(const char *text, int maxChars, void *font, float x, float y, float xScale, float yScale, float rotation, const float *color, int style)*/ = 0x00393640,
- R_RegisterFont /*(char* asset, int imagetrack)*/ /*(const char *name, int imageTrack)*/ = 0x003808B8,
- R_AddCmdDrawStretchPic /*(float x, float y, float w, float h, float xScale, float yScale, float xay, float yay, const float *color, int material)*/ = 0x00392D78,
- CL_DrawTextHook /*(const char *text, int maxChars, void *font, float x, float y, float xScale, float yScale, const float *color, int style)*/ = 0x000D93A8,
- R_AddCmdDrawTextWithEffects /*(char const *,int,Font_s *,float,float,float,float,float,float const * const,int,float const * const,Material *,Material *,int,int,int,int)*/ = 0x003937C0,
- CG_BoldGameMessage /*(int LocalClientNum, const char *Message)*/ = 0x0007A5C8,
- UI_FillRectPhysical /*(float x, float y, float width, float height, const float *color)*/ = 0x0023A810,
- UI_DrawLoadBar /*(ScreenPlacement *scrPlace, float x, float y, float w, float h, int horzAlign, int vertAlign, const float *color, Material *material)*/ = 0x0023A730,
- Scr_MakeGameMessage /*(int iClientNum, const char *pszCmd)*/ = 0x001B07F0,
- Scr_ConstructMessageString /*(int firstParmIndex, int lastParmIndex, const char *errorContext, char *string, unsigned int stringLimit)*/ = 0x001B04F4,
- R_NormalizedTextScale /*(Font_s *font, float scale)*/ = 0x003808F0,
- TeleportPlayer /*(gentity_s *player, float *origin, float *angles)*/ = 0x00191B00,
- CL_DrawText /*(ScreenPlacement *scrPlace, const char *text, int maxChars, Font_s *font, float x, float y, int horzAlign, int vertAlign, float xScale, float yScale, const float *color, int style)*/ = 0x000D9490,
- CL_DrawTextRotate /*(ScreenPlacement *scrPlace, const char *text, int maxChars, Font_s *font, float x, float y, float rotation, int horzAlign, int vertAlign, float xScale, float yScale, const float *color, int style)*/ = 0x000D9554,
- SV_GameDropClient /*(int clientNum, const char *reason)*/ = 0x00229020,
- Dvar_GetBool /*(const char *dvarName)*/ = 0x00291060,
- Dvar_GetInt /*(const char *dvarName)*/ = 0x002910DC,
- Dvar_GetFloat /*(const char *dvarName)*/ = 0x00291148,
- Dvar_RegisterBool /*(const char *dvarName, bool value, unsigned __int16 flags, const char *description)*/ = 0x002933F0,
- Dvar_IsValidName /*(const char *dvarName)*/ = 0x0029019C,
- Material_RegisterHandle /*(const char *name, int imageTrack)*/ = 0x0038B044,
- CL_RegisterFont /*(const char *fontName, int imageTrack)*/ = 0x000D9734,
- SetClientViewAngle /*(gentity_s *ent, const float *angle)*/ = 0x001767E0,
- R_RegisterDvars /*(void)*/ = 0x0037E420,
- PlayerCmd_SetClientDvar /*(scr_entref_t entref)*/ = 0x0017CB4C,
- Jump_RegisterDvars /*(void)*/ = 0x00018E20,
- AimTarget_RegisterDvars = 0x00012098,
- G_FreeEntity /*(gentity_s *ed)*/ = 0x001C0840,
- G_EntUnlink /*(gentity_s *ent)*/ = 0x001C4A5C,
- SV_DObjGetTree /*(gentity_s *ent)*/ = 0x00229A68,
- BG_GetEntityTypeName /*(const int eType)*/ = 0x0001D1F0,
- CL_GetClientState /*(int localClientNum, uiClientState_s *state)*/ = 0x000E26A8,
- CL_GetConfigString /*(int localClientNum, int configStringIndex)*/ = 0x000C5E7C,
- Info_ValueForKey /*(const char *s, const char *key)*/ = 0x00299604,
- Scr_GetInt /*(unsigned int index)*/ = 0x002201C4,
- ClientSpawn /*(gentity_s *ent, const float *spawn_origin, const float *spawn_angles)*/ = 0x00177468,
- Sv_ClientCommand /*(client_s *cl, msg_t *msg)*/ = 0x00228178,
- Sv_ExecuteClientMessage /*(client_s *cl, msg_t *msg)*/ = 0x00228B50,
- Sv_ExecuteClientCommand /*(client_s *cl, const char *s, int clientOK)*/ = 0x00182DEC,
- ClientCommand /*(int clientNum)*/ = 0x00182440,
- CalculateRanks /*(void)*/ = 0x0019031C,
- ClientScr_SetScore /*(gclient_s *pSelf, client_fields_s *pField)*/ = 0x00176150,
- ClientScr_SetMaxHealth /*(gclient_s *pSelf, client_fields_s *pField)*/ = 0x00176094,
- Sv_ReceiveStats /*(netadr_t from, msg_t *msg)*/ = 0x002244E0,
- ClientConnect /*(int clientNum, unsigned __int16 scriptPersId)*/ = 0x001771A0,
- Sv_DirectConnect /*(netadr_t from)*/ = 0x00255BB4,
- Sv_SetConfigstring /*(int index, const char *val)*/ = 0x0022A208,
- Sv_AddServerCommand /*(client_s *client, svscmd_type type, const char *cmd)*/ = 0x0022CBA0,
- IntermissionClientEndFrame /*(gentity_s *ent)*/ = 0x001745F8,
- memset = 0x0049B928,
- str_pointer = 0x523b30,
- g_gametype = 0x8360d5;
- }
- #endregion
- #region ServerInFo
- public static class ServerInfo
- {//credits to Seb5594 for this
- public static String ReturnInfos(Int32 Index)
- {
- return Encoding.ASCII.GetString(PS3.Extension.ReadBytes(0x8360d5, 0x100)).Replace(@"\", "|").Split(new char[] { '|' })[Index];
- }
- public static String getHostName()
- {
- String str = ReturnInfos(0x10);
- switch (str)
- {
- case "Modern Warfare 3":
- return "Dedicated Server (No Player is Host)";
- case "":
- return "You are not In-Game";
- }
- return str;
- }
- public static String getGameMode()
- {
- switch (ReturnInfos(2))
- {
- case "war":
- return "Team Deathmatch";
- case "dm":
- return "Free for All";
- case "sd":
- return "Search and Destroy";
- case "dom":
- return "Domination";
- case "conf":
- return "Kill Confirmed";
- case "sab":
- return "Sabotage";
- case "koth":
- return "Head Quartes";
- case "ctf":
- return "Capture The Flag";
- case "infect":
- return "Infected";
- case "sotf":
- return "Hunted";
- case "dd":
- return "Demolition";
- case "grnd":
- return "Drop Zone";
- case "tdef":
- return "Team Defender";
- case "tjugg":
- return "Team Juggernaut";
- case "jugg":
- return "Juggernaut";
- case "gun":
- return "Gun Game";
- case "oic":
- return "One In The Chamber";
- }
- return "Unknown Gametype";
- }
- public static String getMapName()
- {
- switch (ReturnInfos(6))
- {
- case "mp_alpha":
- return "Lockdown";
- case "mp_bootleg":
- return "Bootleg";
- case "mp_bravo":
- return "Mission";
- case "mp_carbon":
- return "Carbon";
- case "mp_dome":
- return "Dome";
- case "mp_exchange":
- return "Downturn";
- case "mp_hardhat":
- return "Hardhat";
- case "mp_interchange":
- return "Interchange";
- case "mp_lambeth":
- return "Fallen";
- case "mp_mogadishu":
- return "Bakaara";
- case "mp_paris":
- return "Resistance";
- case "mp_plaza2":
- return "Arkaden";
- case "mp_radar":
- return "Outpost";
- case "mp_seatown":
- return "Seatown";
- case "mp_underground":
- return "Underground";
- case "mp_village":
- return "Village";
- case "mp_aground_ss":
- return "Aground";
- case "mp_aqueduct_ss":
- return "Aqueduct";
- case "mp_cement":
- return "Foundation";
- case "mp_hillside_ss":
- return "Getaway";
- case "mp_italy":
- return "Piazza";
- case "mp_meteora":
- return "Sanctuary";
- case "mp_morningwood":
- return "Black Box";
- case "mp_overwatch":
- return "Overwatch";
- case "mp_park":
- return "Liberation";
- case "mp_qadeem":
- return "Oasis";
- case "mp_restrepo_ss":
- return "Lookout";
- case "mp_terminal_cls":
- return "Terminal";
- }
- return "Unknown Map";
- }
- }
- #endregion
- #region Aimbot & ForgeMode
- public static class Aimbot_and_ForgeMode
- {
- //If you using this class or the Functions give Credits to
- //xCSBKx: Making this class the Aimbot and the ForgeMode Function
- //VezahModz: AnglestoForward Function
- //iMCSx and Seb5594 Read+Write Function
- //Have Fun and enjoy using it :)
- //www.YouTube.com/GMTPS3
- #region Read + Write
- //Read and return an Integer.
- //Liest und gibt eine Integer wieder.
- public static int ReadInt(uint Offset)
- {
- byte[] buffer = new byte[4];
- PS3.PS31.GetMemory(Offset, buffer);
- Array.Reverse(buffer);
- int Value = BitConverter.ToInt32(buffer, 0);
- return Value;
- }
- //Read and return 1 Byte.
- //Liest und gibt einen Byte wieder.
- public static byte ReadByte(uint Offset)
- {
- byte[] buffer = new byte[1];
- PS3.PS31.GetMemory(Offset, buffer);
- return buffer[0];
- }
- //Read and return an float value over Length.
- //Liest und gibt eine Float Value wieder über eine Länge wieder.
- public static float[] ReadFloatLength(uint Offset, int Length)
- {
- byte[] buffer = new byte[Length * 4];
- PS3.PS31.GetMemory(Offset, buffer);
- ReverseBytes(buffer);
- float[] Array = new float[Length];
- for (int i = 0; i < Length; i++)
- {
- Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
- }
- return Array;
- }
- //Write a Float Array in Memory.
- //Schreibt einen Float Array in den Memory.
- public static void WriteFloatArray(uint Offset, float[] Array)
- {
- byte[] buffer = new byte[Array.Length * 4];
- for (int Lenght = 0; Lenght < Array.Length; Lenght++)
- {
- ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
- }
- PS3.SetMemory(Offset, buffer);
- }
- //Read and return an Float Value. (4 Bytes)
- //Liest und gibt eine Float Value wieder. (4 Bytes)
- public static float ReadFloat(uint Offset)
- {
- byte[] buffer = new byte[4];
- PS3.PS31.GetMemory(Offset, buffer);
- Array.Reverse(buffer, 0, 4);
- return BitConverter.ToSingle(buffer, 0);
- }
- #endregion
- //Freeze or unfreeze the selected Client.
- //Friert oder taut den Clienten ein oder auf.
- public static void Freeze(uint Client, bool State)
- {
- if (State == true)
- {
- PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x04 });
- }
- else
- {
- PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x00 });
- }
- }
- //Set Client View Angles to aim on Target
- //Setzs das Aiming vom Client auf die Position des Target
- public static void Aimbot(uint Client, uint Target)
- {
- #region Check if Dead
- //Checks if Target is Dead or Alive.
- //Guckt ob der Gegeners Tot oder Lebendig ist.
- if (ReadInt(0xFCA41D + (Target * 0x280)) > 0)
- {
- #region Stance
- //Displays the player's Status.
- //Zeigt den Status des Spielers an.
- byte StanceByte = ReadByte(0x110d88a + (Target * 0x3980));
- float Stance = 0;
- //if Target is crouch Stance = 21.
- //Wenn der Gegeners Hockt ist Stance = 21.
- if (StanceByte == 2)
- Stance = 21;
- //if Target is lie Stance = 47.
- //Wenn der Gegeners liegt ist Stance = 47.
- else if (StanceByte == 1)
- Stance = 47;
- //if Target is standing Stance = 0.
- //Wenn der Gegeners steht ist Stance = 0.
- else
- Stance = 0;
- #endregion
- #region Origin
- //Get the Origin of the Client.
- //Gibt die Position des Clienten an.
- float[] O1 = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
- //Get the Origin of the Target.
- //Gibt die Position des Gegeners an.
- float[] O2 = ReadFloatLength(0x110a29c + (Target * 0x3980), 3);
- //ZValue - Stance
- O2[2] = O2[2] - Stance;
- #endregion
- #region VectoAngles
- //Calculates the X angle and Y angle to give a direction.
- //Berechnet den X Winkel und den Y Winkel um eine Richtung anzugeben.
- //Source: http://www.java2s.com/Open-Source/Java/Game/Jake2-0.9.5/Jake2/util/Math3D.java.htm
- float[] value1 = new float[] { O2[0] - O1[0], O2[1] - O1[1], O2[2] - O1[2] };
- float yaw, pitch;
- float[] angles = new float[3];
- if ((value1[1] == 0f) && (value1[0] == 0f))
- {
- yaw = 0f;
- pitch = 0f;
- if (value1[2] > 0f)
- pitch = 90f;
- else
- pitch = 270f;
- }
- else
- {
- if (value1[0] != -1f)
- yaw = (float)((Math.Atan2(value1[1], value1[0]) * 180) / Math.PI);
- else if (value1[1] > 0f)
- yaw = 90f;
- else
- yaw = 270f;
- if (yaw < 0f)
- yaw += 360f;
- float forward = (float)Math.Sqrt(((value1[0] * value1[0]) + (value1[1] * value1[1])));
- pitch = (float)((Math.Atan2(value1[2], (double)forward) * 180.0) / Math.PI);
- if (pitch < 0f)
- pitch += 360f;
- }
- angles[0] = -pitch;
- angles[1] = yaw;
- angles[2] = 0;
- #endregion
- #region SetViewAngles
- //0x1767E0 - SetClientViewAngle(gentity_s *ent, const float *angle)
- //Writes the angles to 0x1000000.
- //Schreibt die Winkel auf 0x1000000.
- WriteFloatArray(0x1000000, angles);
- //Calls the SetClientViewAnlge and sets the Angles
- //Ruft die SetCleintView Angles function auf und setzt die Winkel
- RPC.Call(0x1767E0, 0xFCA280 + (0x280 * Client), 0x1000000);
- #endregion
- }
- #endregion
- }
- //Teleport the Target in the Client Crosshairs.
- //Teleportiert den Target in das Fadenkreuz des Clienten.
- //The distance is set by a Metric size(Meters).
- //3 Yard = 1 Meter (rounded)
- public static void ForgeMode(uint Client, uint Target, uint Distance_in_Meters = 6)
- {
- #region Get Angles and Origion
- //Get the Angles of the Client.
- //Gibt die Sicht Winkel des Clienten an.
- float[] Angles = ReadFloatLength(0x110a3d8 + (Client * 0x3980), 2);
- //Get the Origin of the Client.
- //Gibt die Position des Clienten an.
- float[] Origin = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
- #endregion
- #region AnglestoForward
- //The Distance shows how far away the target is from the client.
- //Die Distance gibt an wie weit weg der Target vom Clienten ist.
- float diff = Distance_in_Meters * 40;
- //Calculates the Angles and th to give a direction.
- //Berechnet die anzugeben.
- //http://www.nextgenupdate.com/forums/playstation-3-elite/723550-c-anglestoforward-function.html
- float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
- float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
- float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
- float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
- float[] forward = new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
- #endregion
- #region Set Target Origin
- Freeze(Target, true);
- WriteFloatArray(0x110a29c + (Target * 0x3980), forward);
- #endregion
- }
- public static UInt32 G_Entity(Int32 clientIndex, UInt32 Mod = 0)
- {
- return ((0xfca280 + Mod) + ((UInt32)(0x280 * clientIndex)));
- }
- public static void
- PlayerDie(Int32 Killer, Int32 Victim)
- {
- RPC.Call(0x183748, new Object[] { G_Entity(Victim), G_Entity(Victim), G_Entity(Killer), 60, 0, 0x43B29, 0, 0, 0xD00CF12C });
- }
- //Returns the Client who is closest to the Attacker.
- //Gibt den Clienten wieder der am nähsten zum Angreifer ist.
- public static float[] distances = new float[18];
- public static uint FindClosestEnemy(uint Attacker)
- {
- #region Check if Alive and Get Origin
- for (uint i = 0; i < 18; i++)
- {
- //Only if the Target is Alive it stores there distance.
- //Nur wenn der Target lebt wird seine Enferung zum Clienten angezeigt.
- if (ReadInt(0xFCA41D + (i * 0x280)) > 0)
- {
- #region Attacker Origin
- //Get the Origin of the Attacker.
- //Gibt die Position des Angreifers an.
- float[] O1 = ReadFloatLength(0x110a29c + ((uint)Attacker * 0x3980), 3);
- #endregion
- #region Client Origin
- //Get the Origin of the Target.
- //Gibt die Position des Gegners an.
- float[] O2 = ReadFloatLength(0x110a29c + (i * 0x3980), 3);
- #endregion
- #region Get Distance
- //Convertet the Origin from Client and Target and shows the Distance.
- //Convertiert die Position von Client und Target und gibt die Enferung an.
- distances[i] = (float)(Math.Sqrt(
- ((O2[0] - O1[0]) * (O2[0] - O1[0])) +
- ((O2[1] - O1[1]) * (O2[1] - O1[1])) +
- ((O2[2] - O1[2]) * (O2[2] - O1[2]))
- ));
- #endregion
- }
- else
- {
- #region Dead Players get Max Value
- //If the Client is Dead the Distance set to Max.
- //Wenn der Client Tod ist wird die Enfernung auf Max gesetzt.
- distances[i] = float.MaxValue;
- #endregion
- }
- }
- #endregion
- #region Copy Distances
- float[] newDistances = new float[18];
- Array.Copy(distances, newDistances, distances.Length);
- #endregion
- #region Sort Distances and return Client
- //Sorts the Distances from Small to Big
- //Sortiert die Enfernungen von Klein zu Groß
- Array.Sort(newDistances);
- //Array.Sort(distances);
- for (uint i = 0; i < 18; i++)
- {
- //Shows which Client is the closest (0 is the attacker)
- //Zeigt an welcher Client der nähste ist(0 ist der Angreifer)
- if (distances[i] == newDistances[1])
- //if (distances[i] == distances[1])
- {
- return i;
- }
- }
- #endregion
- #region Failed
- //If finding ClosestEnemey Function is Failed it returns -1 but never happend :P
- //Wenn die ClosestEnemy Funktion einen Fehler hat gibt sie -1 zurück das Passiert aber nie :P
- int Failed = -1;
- return (uint)Failed;
- #endregion
- }
- }
- #endregion
- }
- }
- //Form1.Designer.cs
- namespace AimbotNGU
- {
- partial class Form1
- {
- /// <summary>
- /// Variabile di progettazione necessaria.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Liberare le risorse in uso.
- /// </summary>
- /// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
- #region Codice generato da Progettazione Windows Form
- /// <summary>
- /// Metodo necessario per il supporto della finestra di progettazione. Non modificare
- /// il contenuto del metodo con l'editor di codice.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
- this.button1 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.timer2 = new System.Windows.Forms.Timer(this.components);
- this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
- this.button3 = new System.Windows.Forms.Button();
- this.dataGridView1 = new System.Windows.Forms.DataGridView();
- this.label1 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label3 = new System.Windows.Forms.Label();
- this.MODE = new System.Windows.Forms.Label();
- this.MAP = new System.Windows.Forms.Label();
- this.HOST = new System.Windows.Forms.Label();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.button4 = new System.Windows.Forms.Button();
- this.timer3 = new System.Windows.Forms.Timer(this.components);
- this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
- this.groupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(12, 63);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(163, 34);
- this.button1.TabIndex = 1;
- this.button1.Text = "Connect/Attach";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(12, 169);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(163, 27);
- this.button2.TabIndex = 2;
- this.button2.Text = "Aimbot Unfair [OFF]";
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // timer1
- //
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
- // timer2
- //
- this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
- //
- // numericUpDown1
- //
- this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.numericUpDown1.Location = new System.Drawing.Point(181, 156);
- this.numericUpDown1.Maximum = new decimal(new int[] {
- 17,
- 0,
- 0,
- 0});
- this.numericUpDown1.Name = "numericUpDown1";
- this.numericUpDown1.Size = new System.Drawing.Size(32, 20);
- this.numericUpDown1.TabIndex = 3;
- //
- // button3
- //
- this.button3.Location = new System.Drawing.Point(12, 103);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(163, 27);
- this.button3.TabIndex = 5;
- this.button3.Text = "GetClient";
- this.button3.UseVisualStyleBackColor = true;
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // dataGridView1
- //
- this.dataGridView1.AllowUserToAddRows = false;
- this.dataGridView1.AllowUserToDeleteRows = false;
- this.dataGridView1.AllowUserToResizeColumns = false;
- this.dataGridView1.AllowUserToResizeRows = false;
- dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
- dataGridViewCellStyle1.NullValue = null;
- this.dataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
- this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
- this.dataGridView1.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
- this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
- this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
- this.Column1,
- this.Column2});
- this.dataGridView1.Location = new System.Drawing.Point(219, 29);
- this.dataGridView1.MultiSelect = false;
- this.dataGridView1.Name = "dataGridView1";
- this.dataGridView1.ReadOnly = true;
- this.dataGridView1.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
- this.dataGridView1.RowHeadersWidth = 10;
- this.dataGridView1.Size = new System.Drawing.Size(183, 429);
- this.dataGridView1.StandardTab = true;
- this.dataGridView1.TabIndex = 32;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label1.Location = new System.Drawing.Point(6, 26);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(32, 15);
- this.label1.TabIndex = 33;
- this.label1.Text = "Host";
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label2.Location = new System.Drawing.Point(6, 51);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(32, 15);
- this.label2.TabIndex = 34;
- this.label2.Text = "Map";
- //
- // label3
- //
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label3.Location = new System.Drawing.Point(6, 75);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(41, 15);
- this.label3.TabIndex = 35;
- this.label3.Text = "Game";
- //
- // MODE
- //
- this.MODE.AutoSize = true;
- this.MODE.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.MODE.Location = new System.Drawing.Point(49, 75);
- this.MODE.Name = "MODE";
- this.MODE.Size = new System.Drawing.Size(14, 15);
- this.MODE.TabIndex = 38;
- this.MODE.Text = "?";
- //
- // MAP
- //
- this.MAP.AutoSize = true;
- this.MAP.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.MAP.Location = new System.Drawing.Point(49, 51);
- this.MAP.Name = "MAP";
- this.MAP.Size = new System.Drawing.Size(14, 15);
- this.MAP.TabIndex = 37;
- this.MAP.Text = "?";
- //
- // HOST
- //
- this.HOST.AutoSize = true;
- this.HOST.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.HOST.Location = new System.Drawing.Point(49, 26);
- this.HOST.Name = "HOST";
- this.HOST.Size = new System.Drawing.Size(14, 15);
- this.HOST.TabIndex = 36;
- this.HOST.Text = "?";
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.label1);
- this.groupBox1.Controls.Add(this.MODE);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.MAP);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.HOST);
- this.groupBox1.Location = new System.Drawing.Point(12, 202);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(180, 109);
- this.groupBox1.TabIndex = 39;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "Info\'s";
- //
- // button4
- //
- this.button4.Location = new System.Drawing.Point(12, 136);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(163, 27);
- this.button4.TabIndex = 40;
- this.button4.Text = "Aimbot Classic [OFF]";
- this.button4.UseVisualStyleBackColor = true;
- this.button4.Click += new System.EventHandler(this.button4_Click);
- //
- // timer3
- //
- this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
- //
- // richTextBox1
- //
- this.richTextBox1.Location = new System.Drawing.Point(12, 319);
- this.richTextBox1.Name = "richTextBox1";
- this.richTextBox1.ReadOnly = true;
- this.richTextBox1.Size = new System.Drawing.Size(179, 120);
- this.richTextBox1.TabIndex = 41;
- this.richTextBox1.Text = "Update v1 *\nAimbot Classic can be given to all clients\nAimbot Unfair can be given" +
- " to all clients but must be fix\nBy RayzModz\nCredits\nxCSBKx\nVezah\nSticky";
- //
- // Column1
- //
- this.Column1.FillWeight = 20F;
- this.Column1.HeaderText = "#";
- this.Column1.Name = "Column1";
- this.Column1.ReadOnly = true;
- this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.Column1.Width = 40;
- //
- // Column2
- //
- this.Column2.DividerWidth = 1;
- this.Column2.FillWeight = 30F;
- this.Column2.HeaderText = "Name";
- this.Column2.Name = "Column2";
- this.Column2.ReadOnly = true;
- this.Column2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.Column2.Width = 130;
- //
- // Form1
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(410, 463);
- this.Controls.Add(this.richTextBox1);
- this.Controls.Add(this.button4);
- this.Controls.Add(this.groupBox1);
- this.Controls.Add(this.dataGridView1);
- this.Controls.Add(this.button3);
- this.Controls.Add(this.numericUpDown1);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.button1);
- this.Location = new System.Drawing.Point(0, 0);
- this.Name = "Form1";
- this.Text = "Unfair by Rayz";
- this.Load += new System.EventHandler(this.Form1_Load);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
- this.groupBox1.ResumeLayout(false);
- this.groupBox1.PerformLayout();
- this.ResumeLayout(false);
- }
- #endregion
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Timer timer1;
- private System.Windows.Forms.Timer timer2;
- private System.Windows.Forms.NumericUpDown numericUpDown1;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.DataGridView dataGridView1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label MODE;
- private System.Windows.Forms.Label MAP;
- private System.Windows.Forms.Label HOST;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Button button4;
- private System.Windows.Forms.Timer timer3;
- private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
- private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
- private System.Windows.Forms.RichTextBox richTextBox1;
- }
- }
Add Comment
Please, Sign In to add comment