ScriptzMoDz

BO1 Aimbot/Forge Mode

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