Esempio n. 1
0
    public static int BestEntity(IntPtr ClientDLL)
    {
        int   curebest = -1;
        float Mindist  = float.MaxValue;
        float dist;

        for (int i = 1; i < 65; i++)
        {
            IntPtr LocalPlayer = Memory.Read <IntPtr>(ClientDLL + Offsets.LocalPlayer);
            IntPtr EntityList  = Memory.Read <IntPtr>(ClientDLL + Offsets.EntityList + i * 0x10);
            if (LocalPlayer == IntPtr.Zero)
            {
                continue;
            }
            if (EntityList == IntPtr.Zero)
            {
                continue;
            }
            if (Read.Team(LocalPlayer) == Read.Team(EntityList))
            {
                continue;
            }
            if (Memory.Read <Int32>(EntityList + Offsets.Health) < 1)
            {
                continue;
            }
            if (Memory.Read <Boolean>((IntPtr)EntityList + Offsets.Dormant))
            {
                continue;
            }


            IntPtr  Bonematrix = Memory.Read <IntPtr>(EntityList + Offsets.BoneMatrix);
            Vector3 BonePos    = new Vector3(Memory.Read <float>((IntPtr)Bonematrix + 0x30 * 8 + 0xC), Memory.Read <float>((IntPtr)Bonematrix + 0x30 * 8 + 0x1C), Memory.Read <float>((IntPtr)Bonematrix + 0x30 * 8 + 0x2C));



            Vector3 EyePos = Read.EyePos(LocalPlayer);
            Vector3 orgin  = Read.Orgin(LocalPlayer);
            Vector3 idk    = orgin + EyePos;

            angles Location = CalcAngle(idk, BonePos);
            dist = Getdistance(BonePos, orgin);
            if (dist > 1600)
            {
                continue;
            }

            if (dist < Mindist)
            {
                curebest = i;
                Mindist  = dist;
            }
        }
        return(curebest);
    }
Esempio n. 2
0
        static void Callouts()
        {
            var path = Path.Combine(Directory.GetCurrentDirectory(), @"Callouts");

            var         pathfront  = Path.Combine(path, @"Front.wav");
            var         pathBehind = Path.Combine(path, @"Behind.wav");
            var         pathLeft   = Path.Combine(path, @"Left.wav");
            var         pathRight  = Path.Combine(path, @"Right.wav");
            var         pathdead   = Path.Combine(path, @"Death.wav");
            SoundPlayer Front      = new SoundPlayer(pathfront);
            SoundPlayer Behind     = new SoundPlayer(pathBehind);
            SoundPlayer Left       = new SoundPlayer(pathLeft);
            SoundPlayer Right      = new SoundPlayer(pathRight);
            SoundPlayer Death      = new SoundPlayer(pathdead);



            Console.Write("Callout Bot Started:                                                                    Features: Callouts and bhop");
            Console.WriteLine("");
            Console.WriteLine("");
            bool alive = false;

            while (true)
            {
                Thread.Sleep(10);



                for (int i = 1; i < 64; i++)
                {
                    IntPtr LocalPlayer = Memory.Read <IntPtr>(ClientDLL + Offsets.LocalPlayer);
                    if (LocalPlayer == IntPtr.Zero)
                    {
                        continue;
                    }
                    int    bestEntity = Read.BestEntity(ClientDLL);
                    IntPtr EntityList = Memory.Read <IntPtr>(ClientDLL + Offsets.EntityList + bestEntity * 0x10);
                    if (Memory.Read <Int32>(LocalPlayer + Offsets.Health) < 1 || Memory.Read <Int32>(LocalPlayer + Offsets.Health) > 100)
                    {
                        if (alive == true)
                        {
                            int chance = new Random().Next(1, 100);

                            if (chance == 50)
                            {
                                Death.Play();
                                Thread.Sleep(5000);
                            }
                        }
                        alive = false;
                        continue;
                    }
                    else
                    {
                        alive = true;
                    }

                    if (Memory.Read <Int32>(EntityList + Offsets.Team) == Memory.Read <Int32>(LocalPlayer + Offsets.Team))
                    {
                        continue;
                    }
                    if (Memory.Read <Int32>(EntityList + Offsets.Health) < 1)
                    {
                        continue;
                    }
                    if (Memory.Read <Boolean>((IntPtr)EntityList + Offsets.Dormant))
                    {
                        continue;
                    }
                    int     BoneId     = 8;
                    IntPtr  Bonematrix = Memory.Read <IntPtr>(EntityList + Offsets.BoneMatrix);
                    Vector3 BonePos    = new Vector3(Memory.Read <float>((IntPtr)Bonematrix + 0x30 * BoneId + 0xC), Memory.Read <float>((IntPtr)Bonematrix + 0x30 * BoneId + 0x1C), Memory.Read <float>((IntPtr)Bonematrix + 0x30 * BoneId + 0x2C));

                    Vector3 Localorgin = Read.Orgin(LocalPlayer);
                    Vector3 LocalView  = Read.EyePos(LocalPlayer);
                    Vector3 idk        = Localorgin + LocalView;

                    IntPtr  Clientstate = Memory.Read <IntPtr>(EngineDLL + Offsets.clientstate);
                    Vector3 ViewAngles  = Memory.Read <Vector3>(Clientstate + Offsets.ViewAngles);
                    Vector3 PlayerOrgin = Read.Orgin(EntityList);

                    angles Aimat = Read.CalcAngle(idk, BonePos);



                    float difference = (Aimat.Y - (ViewAngles.Y));
                    if (difference > 180)
                    {
                        difference -= 360;
                    }
                    if (difference < -180)
                    {
                        difference += 360;
                    }


                    if (difference >= -45 && difference <= 45)
                    {
                        Front.Play();
                        Console.Write("\r{0}  ", "The Enemy is infront of you");
                    }
                    else if (difference >= 45 && difference <= 135)
                    {
                        Left.Play();
                        Console.Write("\r{0}  ", "The Enemy is to your left");
                    }
                    else if (difference >= -135 && difference <= -45)
                    {
                        Right.Play();
                        Console.Write("\r{0}  ", "The Enemy is to your right");
                    }
                    else if (difference >= 135 && difference <= 225)
                    {
                        Behind.Play();
                        Console.Write("\r{0}  ", "The Enemy is behind of you");
                    }
                    else if (difference <= -135 && difference >= -225)
                    {
                        Behind.Play();
                        Console.Write("\r{0}  ", "The Enemy is behind of you");
                    }
                    else if (difference <= -235 && difference >= -325)
                    {
                        Left.Play();
                        Console.Write("\r{0}  ", "The Enemy is to your left");
                    }


                    //    else if()



                    Thread.Sleep(5000);
                }
            }
        }
Esempio n. 3
0
 public state(angles a, uint w)
 {
     currangle = a;
     weight    = w;
 }