コード例 #1
0
        public static void Start() //disabled
        {
            while (true)
            {
                Thread.Sleep(1);

                if (!Properties.Settings.Default.runboostbot)
                {
                    continue;
                }

                if (!LocalPlayer.InGame)
                {
                    continue;
                }

                if (LocalPlayer.Health <= 0)
                {
                    continue;
                }

                if (LocalPlayer.Dormant)
                {
                    continue;
                }

                Entity target = null;

                while ((DllImport.GetAsyncKeyState(Properties.Hotkey.Default.runboostbotKey) & 0x8000) != 0)
                {
                    Thread.Sleep(1);

                    if (target == null)
                    {
                        target = Aimbot.BestDistance();
                    }

                    boosting = true;

                    Vector3 position = target.Position;

                    if (target.Speed <= 0)
                    {
                        LocalPlayer.MoveClearX();
                    }
                    else
                    {
                        LocalPlayer.ViewAngleY = Aimbot.NormalizedAngle(Aimbot.CalcAngle(LocalPlayer.ViewPosition, position)).y;

                        LocalPlayer.MoveForward();
                    }
                }

                if (boosting)
                {
                    LocalPlayer.MoveClearX();
                    boosting = false;
                }
            }
        }
コード例 #2
0
ファイル: BlockBot.cs プロジェクト: Owen0225/AnimeSoftware
        public static void Start()
        {
            while (true)
            {
                Thread.Sleep(1);

                if (!Properties.Settings.Default.blockbot)
                {
                    continue;
                }

                if (!LocalPlayer.InGame)
                {
                    continue;
                }

                if (LocalPlayer.Health <= 0)
                {
                    continue;
                }

                Entity target = null;

                while ((DllImport.GetAsyncKeyState(Properties.Hotkey.Default.blockbotKey) & 0x8000) != 0)
                {
                    Thread.Sleep(1);
                    if (target == null)
                    {
                        target = Aimbot.BestDistance();
                    }

                    blocking = true;
                    float speed = target.Speed;
                    if ((LocalPlayer.Position - target.BonePosition(8)).Length < 30)
                    {
                        if (LocalPlayer.Flags == 256)
                        {
                            continue;
                        }

                        if (bb)
                        {
                            LocalPlayer.MoveClearY();
                            bb = false;
                        }

                        hb = true;

                        if (target.Speed == 0 && (LocalPlayer.Position - target.ViewPosition).Length < 10)
                        {
                            LocalPlayer.MoveClearX();
                            continue;
                        }

                        LocalPlayer.ViewAngleY = Aimbot.NormalizedAngle(Aimbot.CalcAngle(LocalPlayer.ViewPosition, target.Position)).y;


                        LocalPlayer.MoveForward();
                    }
                    else
                    {
                        bb = true;
                        Vector3 angle = Aimbot.CalcAngle(LocalPlayer.ViewPosition, target.Position);
                        angle.y -= LocalPlayer.ViewAngle.y;
                        angle    = Aimbot.NormalizedAngle(angle);


                        if (speed > 1 || Math.Abs(angle.y) > 1)
                        {
                            if (angle.y < 0.0f)
                            {
                                LocalPlayer.MoveRight();
                            }

                            else if (angle.y > 0.0f)
                            {
                                LocalPlayer.MoveLeft();
                            }
                        }
                        else
                        {
                            LocalPlayer.MoveClearY();
                        }
                    }
                }
                if (blocking || hb || bb)
                {
                    if (hb)
                    {
                        LocalPlayer.MoveClearX();
                        hb = false;
                    }
                    Thread.Sleep(1);
                    if (bb)
                    {
                        LocalPlayer.MoveClearY();
                        bb = false;
                    }
                    blocking = false;
                }
            }
        }
コード例 #3
0
ファイル: BlockBot.cs プロジェクト: Owen0225/AnimeSoftware
        public static void Start2()
        {
            while (true)
            {
                Thread.Sleep(1);

                if (!Properties.Settings.Default.blockbot)
                {
                    continue;
                }

                if (!LocalPlayer.InGame)
                {
                    continue;
                }

                if (LocalPlayer.Health <= 0)
                {
                    continue;
                }

                Entity target = null;

                bool blocked = false;

                while ((DllImport.GetAsyncKeyState(Properties.Hotkey.Default.blockbotKey) & 0x8000) != 0)
                {
                    if (target == null)
                    {
                        target = Aimbot.BestDistance();
                        Memory.Write <int>(Memory.Client + signatures.dwForceRight, 5);
                        Memory.Write <int>(Memory.Client + signatures.dwForceForward, 5);
                        blocked = true;
                    }

                    if ((LocalPlayer.Position - target.BonePosition(8)).Length < 43)
                    {
                        Vector3 targetOrigin = target.Position + target.Velocity * trajFactor;
                        targetOrigin.z = 0;

                        Vector3 localOrigin = LocalPlayer.Position;
                        localOrigin.z = 0;

                        float distance = (targetOrigin - localOrigin).Length;
                        distance *= distanceFactor;

                        if (distance > 10)
                        {
                            distance = 10;
                        }

                        float angle = LocalPlayer.ViewAngle.y - Aimbot.CalcAngle(LocalPlayer.Position, target.Position).y + 360.0f;

                        LocalPlayer.SideSpeed    = (float)Math.Sin(angle * 0.0174533) * 45 * distance;
                        LocalPlayer.ForwardSpeed = (float)Math.Cos(angle * 0.0174533) * 45 * distance;
                    }
                    else
                    {
                        if ((DllImport.GetAsyncKeyState(0x57) & 0x8000) != 0)
                        {
                            LocalPlayer.ForwardSpeed = 450;
                        }
                        else
                        {
                            LocalPlayer.ForwardSpeed = 0;
                        }
                        Vector3 angle = Aimbot.CalcAngle(LocalPlayer.ViewPosition, target.Position);
                        angle.y -= LocalPlayer.ViewAngle.y;
                        angle    = Aimbot.NormalizedAngle(angle);

                        float sidemove = -angle.y * 25;

                        LocalPlayer.SideSpeed = sidemove > 450 ? 450 : sidemove < -450 ? -450 : sidemove;
                    }
                }

                if (blocked)
                {
                    Memory.Write <int>(Memory.Client + signatures.dwForceRight, 6);
                    Memory.Write <int>(Memory.Client + signatures.dwForceForward, 6);
                    LocalPlayer.SideSpeed    = 450;
                    LocalPlayer.ForwardSpeed = 450;
                }
            }
        }
コード例 #4
0
ファイル: BlockBot.cs プロジェクト: sagirilover/AnimeSoftware
        public static void Start()
        {
            while (true)
            {
                Thread.Sleep(1);

                if (!Properties.Settings.Default.blockbot)
                {
                    continue;
                }

                if (!Engine.InGame)
                {
                    continue;
                }

                var lp = new LocalPlayer();

                if (lp.Ptr == IntPtr.Zero || lp.Health <= 0)
                {
                    continue;
                }

                Player target = null;

                var blocked = false;

                while ((WinAPI.GetAsyncKeyState(Properties.Hotkey.Default.blockbotKey) & 0x8000) != 0)
                {
                    if (target == null)
                    {
                        var    bestDistance = float.MaxValue;
                        Player result       = null;
                        foreach (var player in EntityList.GetPlayers())
                        {
                            if (player.Dormant || player.Health <= 0)
                            {
                                continue;
                            }

                            var distance = (player.Position - lp.Position).Length2D;
                            if (distance < bestDistance)
                            {
                                result       = player;
                                bestDistance = distance;
                            }
                        }

                        target = result;
                        Memory.Write <int>(Memory.Client + Signatures.dwForceRight, 5);
                        Memory.Write <int>(Memory.Client + Signatures.dwForceForward, 5);
                        blocked = true;
                    }

                    if (target == null)
                    {
                        continue;
                    }

                    if ((lp.Position - target.GetBonePosition(8)).Length < 43)
                    {
                        var targetOrigin = target.Position + target.Velocity * trajFactor;
                        targetOrigin.Z = 0;

                        var localOrigin = lp.Position;
                        localOrigin.Z = 0;

                        var distance = (targetOrigin - localOrigin).Length;
                        distance *= distanceFactor;

                        if (distance > 10)
                        {
                            distance = 10;
                        }

                        var angle = lp.ViewAngle.Y -
                                    Aimbot.CalcAngles(lp.Position, target.Position).Y + 360.0f;

                        lp.SideSpeed    = (float)Math.Sin(angle * 0.0174533) * 45 * distance;
                        lp.ForwardSpeed = (float)Math.Cos(angle * 0.0174533) * 45 * distance;
                    }
                    else
                    {
                        if ((WinAPI.GetAsyncKeyState(0x57) & 0x8000) != 0)
                        {
                            lp.ForwardSpeed = 450;
                        }
                        else
                        {
                            lp.ForwardSpeed = 0;
                        }
                        var angle = Aimbot.CalcAngles(lp.EyePosition, target.Position);
                        angle.Y -= lp.ViewAngle.Y;
                        angle.NormalizeAngle();

                        var sidemove = -angle.Y * 25;

                        lp.SideSpeed = sidemove > 450 ? 450 : sidemove < -450 ? -450 : sidemove;
                    }
                }

                if (blocked)
                {
                    Memory.Write <int>(Memory.Client + Signatures.dwForceRight, 6);
                    Memory.Write <int>(Memory.Client + Signatures.dwForceForward, 6);
                    lp.SideSpeed    = 450;
                    lp.ForwardSpeed = 450;
                }
            }
        }