ScriptzMoDz

MW3 Aimbot/Forge Mode

Aug 25th, 2014
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 18.06 KB | None | 0 0
  1.       .o.        o8o                     .o8                     .                                    .o8  
  2.      .888.       `"'                    "888                   .o8                                   "888  
  3.    .8"888.     oooo  ooo. .oo.  .oo.    888oooo.   .ooooo.  .o888oo       .oooo.   ooo. .oo.    .oooo888  
  4.    .8' `888.    `888  `888P"Y88bP"Y88b   d88' `88b d88' `88b   888        `P  )88b  `888P"Y88b  d88' `888  
  5.   .88ooo8888.    888   888   888   888   888   888 888   888   888         .oP"888   888   888  888   888  
  6. .8'     `888.   888   888   888   888   888   888 888   888   888 .      d8(  888   888   888  888   888  
  7. o88o     o8888o o888o o888o o888o o888o  `Y8bod8P' `Y8bod8P'   "888"      `Y888""8o o888o o888o `Y8bod88P"
  8.                                                                                                            
  9.                                                                                                            
  10.                                                                                                            
  11. oooooooooooo                                         ooo        ooooo                 .o8                  
  12. `888'     `8                                         `88.       .888'                "888                  
  13. 888          .ooooo.  oooo d8b  .oooooooo  .ooooo.   888b     d'888   .ooooo.   .oooo888   .ooooo.        
  14. 888oooo8    d88' `88b `888""8P 888' `88b  d88' `88b  8 Y88. .P  888  d88' `88b d88' `888  d88' `88b      
  15. 888    "    888   888  888     888   888  888ooo888  8  `888'   888  888   888 888   888  888ooo888      
  16. 888         888   888  888     `88bod8P'  888    .o  8    Y     888  888   888 888   888  888    .o      
  17. o888o        `Y8bod8P' d888b    `8oooooo.  `Y8bod8P' o8o        o888o `Y8bod8P' `Y8bod88P" `Y8bod8P'      
  18.                                 d"     YD                                                                  
  19.                                "Y88888P'                                                                  
  20.                                                                                                          
  21. .o8                                      .oooooo.    .oooooo..o oooooooooo.  oooo    oooo                
  22. "888                                     d8P'  `Y8b  d8P'    `Y8 `888'   `Y8b `888   .8P'                  
  23. 888oooo.  oooo    ooo      oooo    ooo 888          Y88bo.       888     888  888  d8'    oooo    ooo    
  24.  d88' `88b  `88.  .8'        `88b..8P'  888           `"Y8888o.   888oooo888'  88888[       `88b..8P'      
  25. 888   888   `88..8'           Y888'    888               `"Y88b  888    `88b  888`88b.       Y888'        
  26.  888   888    `888'          .o8"'88b   `88b    ooo  oo     .d8P  888    .88P  888  `88b.   .o8"'88b      
  27. `Y8bod8P'     .8'          o88'   888o  `Y8bood8P'  8""88888P'  o888bood8P'  o888o  o888o o88'   888o    
  28.           .o..P'                                                                                          
  29.           `Y8P'        
  30.                                                                                  
  31. ENG:
  32.  
  33. PLEASE READ!!!
  34. Hello Guys i finish my Aimbot and ForgeMode i worked about 3 Weeks on the Aimbot to make it best working. :)
  35. I will add MW2 ,BO2 and Ghost.
  36. IF YOU USING THIS CLASS OR THE FUNCTIONS GIVE CREDITS TO:
  37.  
  38. xCSBKx: Making this class the Aimbot and the ForgeMode Function
  39. VezahModz: AnglestoForward Function
  40. iMCSx and Seb5594: Read+Write Functions
  41.  
  42. Have Fun and enjoy using it. :)
  43. www.YouTube.com/GMTPS3
  44.  
  45. peace out
  46. xCSBKx/Chris
  47.  
  48. GER:
  49.  
  50. ERST LESEN!!!
  51. Hallo Leute ich hab meinen Aimbot und ForgeMode endlich fertig bekommen ich hab an dem Aimbot 3 Wochen gearbeitet und ihn endlich fertig er läuft jetz so gut das ich ihn Releasen kann. :)
  52. Ich werde den Aimbot auch für MW2, BO2 and Ghosts.                                                      
  53. WENN DU DIESE KLASSE ODER DIE FUNKTIONEN NUTZEN WILLST DEN FOLGENDEN LEUTEN CREDITS:
  54.  
  55. xCSBKx: Making this class the Aimbot and the ForgeMode Function
  56. VezahModz: AnglestoForward Function
  57. iMCSx and Seb5594: Read+Write Functions
  58.  
  59. Wünsche euch viel Spaß. :)
  60. www.YouTube.com/GMTPS3
  61.  
  62. mfg
  63. xCSBKx/Chris
  64.  
  65.  
  66. How to use:
  67.  
  68. Aimbot:
  69.  
  70. private void timer1_Tick(object sender, EventArgs e)
  71.        {
  72.          //Checks if player is aiming.
  73.          //Guckt ob der Spieler ziehlt.
  74.          if (Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + (Client * 0x3980)) > 0)
  75.          Aimbot_and_ForgeMode.Aimbot(Client,Aimbot_and_ForgeMode.FindClosestEnemy(Client)
  76.        }
  77.  
  78. ForgeMode:
  79.  
  80. private void timer1_Tick(object sender, EventArgs e)
  81.        {
  82.          //Checks if player is aiming.
  83.          //Guckt ob der Spieler ziehlt.
  84.           uint Enemy = Aimbot_and_ForgeMode.FindClosestEnemy(Client);
  85.            //This is just only a way you can use Key_Down.
  86.            //Das ist nur ein weg um es zu nutzen benutz am besten Key_Down.
  87.            if (Aimbot_and_ForgeMode.ReadFloat(0x110a5f8 + ((uint)numericUpDown1.Value * 0x3980)) > 0)
  88.            {
  89.                RPC.Aimbot_and_ForgeMode.Freeze(Enemy, true);
  90.                RPC.Aimbot_and_ForgeMode.ForgeMode(Client, Enemy);
  91.            }
  92.            else
  93.            {
  94.                RPC.Aimbot_and_ForgeMode.Freeze(Enemy, false);
  95.            }
  96.        }
  97.  
  98. public static class Aimbot_and_ForgeMode
  99.        {
  100.            //If you using this class or the Functions give Credits to
  101.            //xCSBKx: Making this class the Aimbot and the ForgeMode Function
  102.            //VezahModz: AnglestoForward Function
  103.            //iMCSx and Seb5594 Read+Write Function
  104.            //Have Fun and enjoy using it :)
  105.            //www.YouTube.com/GMTPS3
  106.            #region Read + Write
  107.            //Read and return an Integer.
  108.            //Liest und gibt eine Integer wieder.
  109.            public static int ReadInt(uint Offset)
  110.            {
  111.                byte[] buffer = new byte[4];
  112.                PS3.GetMemory(Offset, buffer);
  113.                Array.Reverse(buffer);
  114.                int Value = BitConverter.ToInt32(buffer, 0);
  115.                return Value;
  116.            }
  117.  
  118.            //Read and return 1 Byte.
  119.            //Liest und gibt einen Byte wieder.
  120.            public static byte ReadByte(uint Offset)
  121.            {
  122.                byte[] buffer = new byte[1];
  123.                PS3.GetMemory(Offset, buffer);
  124.                return buffer[0];
  125.            }
  126.  
  127.            //Read and return an float value over Length.
  128.            //Liest und gibt eine Float Value wieder über eine Länge wieder.
  129.            public static float[] ReadFloatLength(uint Offset, int Length)
  130.            {
  131.                byte[] buffer = new byte[Length * 4];
  132.                PS3.GetMemory(Offset, buffer);
  133.                ReverseBytes(buffer);
  134.                float[] Array = new float[Length];
  135.                for (int i = 0; i < Length; i++)
  136.                {
  137.                    Array[i] = BitConverter.ToSingle(buffer, (Length - 1 - i) * 4);
  138.                }
  139.                return Array;
  140.            }
  141.  
  142.            //Write a Float Array in Memory.
  143.            //Schreibt einen Float Array in den Memory.
  144.            public static void WriteFloatArray(uint Offset, float[] Array)
  145.            {
  146.                byte[] buffer = new byte[Array.Length * 4];
  147.                for (int Lenght = 0; Lenght < Array.Length; Lenght++)
  148.                {
  149.                    ReverseBytes(BitConverter.GetBytes(Array[Lenght])).CopyTo(buffer, Lenght * 4);
  150.                }
  151.                PS3.SetMemory(Offset, buffer);
  152.            }
  153.  
  154.            //Read and return an Float Value. (4 Bytes)
  155.            //Liest und gibt eine Float Value wieder. (4 Bytes)
  156.            public static float ReadFloat(uint Offset)
  157.            {
  158.                byte[] buffer = new byte[4];
  159.                PS3.GetMemory(Offset, buffer);
  160.                Array.Reverse(buffer, 0, 4);
  161.                return BitConverter.ToSingle(buffer, 0);
  162.            }
  163.            #endregion
  164.  
  165.            //Freeze or unfreeze the selected Client.
  166.            //Friert oder taut den Clienten ein oder auf.
  167.            public static void Freeze(uint Client, bool State)
  168.            {
  169.                if (State == true)
  170.                {
  171.                    PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x04 });
  172.                }
  173.                else
  174.                {
  175.                    PS3.SetMemory(0x0110d87f + (Client * 0x3980), new byte[] { 0x00 });
  176.                }
  177.            }
  178.  
  179.            //Set Client View Angles to aim on Target
  180.            //Setzs das Aiming vom Client auf die Position des Target
  181.            public static void Aimbot(uint Client, uint Target)
  182.            {
  183.                #region Check if Dead
  184.                //Checks if Target is Dead or Alive.
  185.                //Guckt ob der Gegeners Tot oder Lebendig ist.
  186.                if (ReadInt(0xFCA41D + (Target * 0x280)) > 0)
  187.                {
  188.                    #region Stance
  189.                    //Displays the player's Status.
  190.                    //Zeigt den Status des Spielers an.
  191.                    byte StanceByte = ReadByte(0x110d88a + (Target * 0x3980));
  192.                    float Stance = 0;
  193.                    //if Target is crouch Stance = 21.
  194.                    //Wenn der Gegeners Hockt ist Stance = 21.    
  195.                    if (StanceByte == 2)
  196.                        Stance = 21;
  197.                    //if Target is lie Stance = 47.
  198.                    //Wenn der Gegeners liegt ist Stance = 47.
  199.                    else if (StanceByte == 1)
  200.                        Stance = 47;
  201.                    //if Target is standing Stance = 0.
  202.                    //Wenn der Gegeners steht ist Stance = 0.
  203.                    else
  204.                        Stance = 0;
  205.                    #endregion
  206.  
  207.                    #region Origin
  208.                    //Get the Origin of the Client.
  209.                    //Gibt die Position des Clienten an.
  210.                    float[] O1 = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
  211.  
  212.                    //Get the Origin of the Target.
  213.                    //Gibt die Position des Gegeners an.
  214.                    float[] O2 = ReadFloatLength(0x110a29c + (Target * 0x3980), 3);
  215.                    //ZValue - Stance
  216.                    O2[2] = O2[2] - Stance;
  217.                    #endregion
  218.  
  219.                    #region VectoAngles
  220.                    //Calculates the X angle and Y angle to give a direction.
  221.                    //Berechnet den X Winkel und den Y Winkel um eine Richtung  anzugeben.
  222.                    //Source: http://www.java2s.com/Open-Source/Java/Game/Jake2-0.9.5/Jake2/util/Math3D.java.htm
  223.                    float[] value1 = new float[] { O2[0] - O1[0], O2[1] - O1[1], O2[2] - O1[2] };
  224.                    float yaw, pitch;
  225.                    float[] angles = new float[3];
  226.  
  227.                    if ((value1[1] == 0f) && (value1[0] == 0f))
  228.                    {
  229.                        yaw = 0f;
  230.                        pitch = 0f;
  231.                        if (value1[2] > 0f)
  232.                            pitch = 90f;
  233.                        else
  234.                            pitch = 270f;
  235.                    }
  236.                    else
  237.                    {
  238.                        if (value1[0] != -1f)
  239.                            yaw = (float)((Math.Atan2(value1[1], value1[0]) * 180) / Math.PI);
  240.                        else if (value1[1] > 0f)
  241.                            yaw = 90f;
  242.                        else
  243.                            yaw = 270f;
  244.                        if (yaw < 0f)
  245.                            yaw += 360f;
  246.                        float forward = (float)Math.Sqrt(((value1[0] * value1[0]) + (value1[1] * value1[1])));
  247.                        pitch = (float)((Math.Atan2(value1[2], (double)forward) * 180.0) / Math.PI);
  248.                        if (pitch < 0f)
  249.                            pitch += 360f;
  250.                    }
  251.                    angles[0] = -pitch;
  252.                    angles[1] = yaw;
  253.                    angles[2] = 0;
  254.                    #endregion
  255.  
  256.                    #region SetViewAngles
  257.                    //0x1767E0 - SetClientViewAngle(gentity_s *ent, const float *angle)
  258.                            //Writes the angles to 0x1000000.
  259.                            //Schreibt die Winkel auf 0x1000000.
  260.                            PS3.WriteFloatArray(0x1000000, angles);
  261.                            //Calls the SetClientViewAnlge and sets the Angles
  262.                            //Ruft die SetCleintView Angles function auf und setzt die Winkel
  263.                            RPC.Call(0x1767E0, 0xFCA280 + (0x280 * Client), 0x1000000);
  264.                    #endregion
  265.                }
  266.                #endregion
  267.            }
  268.  
  269.            //Teleport the Target in the Client Crosshairs.
  270.            //Teleportiert den Target in das Fadenkreuz des Clienten.
  271.            //The distance is set by a Metric size(Meters).
  272.            //3 Yard = 1 Meter (rounded)
  273.            public static void ForgeMode(uint Client, uint Target, uint Distance_in_Meters = 6)
  274.            {
  275.                #region Get Angles and Origion
  276.                //Get the Angles of the Client.
  277.                //Gibt die Sicht Winkel des Clienten an.
  278.                float[] Angles = ReadFloatLength(0x110a3d8 + (Client * 0x3980), 2);
  279.                //Get the Origin of the Client.
  280.                //Gibt die Position des Clienten an.
  281.                float[] Origin = ReadFloatLength(0x110a29c + (Client * 0x3980), 3);
  282.                #endregion
  283.  
  284.                #region AnglestoForward
  285.                //The Distance shows how far away the target is from the client.
  286.                //Die Distance gibt an wie weit weg der Target vom Clienten ist.
  287.                float diff = Distance_in_Meters * 40;
  288.  
  289.                //Calculates the Angles and th to give a direction.
  290.                //Berechnet die anzugeben.
  291.                //http://www.nextgenupdate.com/forums/playstation-3-elite/723550-c-anglestoforward-function.html
  292.                float num = ((float)Math.Sin((Angles[0] * Math.PI) / 180)) * diff;
  293.                float num1 = (float)Math.Sqrt(((diff * diff) - (num * num)));
  294.                float num2 = ((float)Math.Sin((Angles[1] * Math.PI) / 180)) * num1;
  295.                float num3 = ((float)Math.Cos((Angles[1] * Math.PI) / 180)) * num1;
  296.                float[] forward = new float[] { Origin[0] + num3, Origin[1] + num2, Origin[2] - num };
  297.                #endregion
  298.  
  299.                #region Set Target Origin
  300.                Freeze(Target, true);
  301.                WriteFloatArray(0x110a29c + (Target * 0x3980), forward);
  302.                #endregion
  303.            }
  304.  
  305.            //Returns the Client who is closest to the Attacker.
  306.            //Gibt den Clienten wieder der am nähsten zum Angreifer ist.
  307.            public static float[] distances = new float[18];
  308.            public static uint FindClosestEnemy(uint Attacker)
  309.            {
  310.                #region Check if Alive and Get Origin
  311.                for (uint i = 0; i < 18; i++)
  312.                {
  313.                    //Only if the Target is Alive it stores there distance.
  314.                    //Nur wenn der Target lebt wird seine Enferung zum Clienten angezeigt.
  315.                    if (ReadInt(0xFCA41D + (i * 0x280)) > 0)
  316.                    {
  317.                        #region Attacker Origin
  318.                        //Get the Origin of the Attacker.
  319.                        //Gibt die Position des Angreifers an.
  320.                        float[] O1 = ReadFloatLength(0x110a29c + ((uint)Attacker * 0x3980), 3);
  321.                        #endregion
  322.  
  323.                        #region Client Origin
  324.                        //Get the Origin of the Target.
  325.                        //Gibt die Position des Gegners an.
  326.                        float[] O2 = ReadFloatLength(0x110a29c + (i * 0x3980), 3);
  327.                        #endregion
  328.  
  329.                        #region Get Distance
  330.                        //Convertet the Origin from Client and Target and shows the Distance.
  331.                        //Convertiert die Position von Client und Target und gibt die Enferung an.
  332.                        distances[i] = (float)(Math.Sqrt(
  333.                        ((O2[0] - O1[0]) * (O2[0] - O1[0])) +
  334.                        ((O2[1] - O1[1]) * (O2[1] - O1[1])) +
  335.                        ((O2[2] - O1[2]) * (O2[2] - O1[2]))
  336.                        ));
  337.                        #endregion
  338.                    }
  339.                    else
  340.                    {
  341.                        #region Dead Players get Max Value
  342.                        //If the Client is Dead the Distance set to Max.
  343.                        //Wenn der Client Tod ist wird die Enfernung auf Max gesetzt.
  344.                        distances[i] = float.MaxValue;
  345.                        #endregion
  346.                    }
  347.                }
  348.                #endregion
  349.  
  350.                #region Copy Distances
  351.                float[] newDistances = new float[18];
  352.                Array.Copy(distances, newDistances, distances.Length);
  353.                #endregion
  354.  
  355.                #region Sort Distances and return Client
  356.                //Sorts the Distances from Small to Big
  357.                //Sortiert die Enfernungen von Klein zu Groß
  358.                Array.Sort(newDistances);
  359.                //Array.Sort(distances);
  360.                for (uint i = 0; i < 18; i++)
  361.                {
  362.                    //Shows which Client is the closest (0 is the attacker)
  363.                    //Zeigt an welcher Client der nähste ist(0 ist der Angreifer)
  364.                    if (distances[i] == newDistances[1])
  365.                    //if (distances[i] == distances[1])
  366.                    {
  367.                        return i;
  368.                    }
  369.                }
  370.                #endregion
  371.  
  372.                #region Failed
  373.                //If finding ClosestEnemey Function is Failed it returns -1 but never happend :P
  374.                //Wenn die ClosestEnemy Funktion einen Fehler hat gibt sie -1 zurück das Passiert aber nie :P
  375.                int Failed = -1;
  376.                return (uint)Failed;
  377.                #endregion
  378.            }
  379.        }
Add Comment
Please, Sign In to add comment