コード例 #1
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius)
        {
            Vector2 least = Vector2.Zero;
            Player playerTmp = null;
            float leastDist = float.MaxValue;

            try
            {
                foreach (Player player in csgo.Players)
                {
                    if (!PlayerValid(csgo.LocalPlayer, player, target))
                        continue;
                    if (csgo.GetValue<YesNo>("aimSpottedOnly") == YesNo.Yes && !player.SeenBy(csgo.LocalPlayer))
                        continue;

                    float multiplicator = this.GetFloatMultiplicator();
                    Vector2 head = AimAt(csgo, bone, player);
                    if (!Geometry.PointInCircle(head, screenM, radius))
                        continue;

                    float playerDist = Geometry.GetDistanceToPoint(player.Vector3, csgo.LocalPlayer.Vector3);

                    if (playerDist < leastDist)
                    {
                        least = head;
                        leastDist = playerDist;
                        playerTmp = player;
                    }
                }
            }
            catch { }
            return new AimMethodResult(playerTmp != null ? playerTmp.Index : 0, least);
        }
コード例 #2
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius)
        {
            Vector2 least = Vector2.Zero;
            int index = -1;
            float leastDist = float.MaxValue, dist = 0f;
            Vector3 currentAngles = csgo.ViewAngles;
            Vector3 aimAngles = Vector3.Zero;

            for (int i = 0; i < csgo.Players.Length; i++)
            {
                if (csgo.Players[i] == null)
                    continue;
                if (!csgo.LocalPlayer.SeenBy(csgo.Players[i]) && !csgo.Players[i].SeenBy(csgo.LocalPlayer))
                    continue;
                aimAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[i].Skeleton.GetBone(bone));
                aimAngles -= currentAngles;
                dist = aimAngles.Length();
                if(dist < leastDist)
                {
                    leastDist = dist;
                    index = csgo.Players[i].Index;
                }
            }
            return new AimMethodResult(index, least);
        }
コード例 #3
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius)
        {
            Vector2 least = Vector2.Zero;
            int index = -1;
            float leastDist = float.MaxValue;
            try
            {
                for (int i = 0; i < csgo.Players.Length; i++)
                {
                    if (!PlayerValid(csgo.LocalPlayer, csgo.Players[i], target))
                        continue;
                    if (csgo.GetValue<YesNo>("aimSpottedOnly") == YesNo.Yes && !csgo.Players[i].SeenBy(csgo.LocalPlayer))
                        continue;

                    Vector2 head = AimAt(csgo, bone, csgo.Players[i]);
                    if (csgo.GetValue<OnOff>("aimbotRagemode") == OnOff.Off)
                        if (!Geometry.PointInCircle(head, screenMid, radius))
                            continue;

                    float dist = (float)Math.Abs((head - screenMid).Length());
                    //Debug.WriteLine("Dist {0}: {1}", csgo.Players[i].Name, Math.Round(dist, 4));
                    if (dist < leastDist)
                    {
                        least = head;
                        leastDist = dist;
                        index = csgo.Players[i].Index;
                    }
                }
            }
            catch { }
            return new AimMethodResult(index, least);
        }
コード例 #4
0
        public Vector3 GetBone(AimBone bone)
        {
            switch (bone)
            {
            case AimBone.Head:
                return(Head);

            case AimBone.Neck:
                return(Neck);

            case AimBone.Torso:
                return(Spine3);

            case AimBone.Hip:
                return(Spine1);

            case AimBone.Knees:
                return(LeftKnee + (RightKnee - LeftKnee) / 2f);

            case AimBone.Feet:
                return(LeftFoot + (RightFoot - LeftFoot) / 2f);

            default:
                return(Neck);
            }
        }
コード例 #5
0
 private bool IsRandomAimBone(AimBone bone)
 {
     return
         (bone == AimBone.Random ||
          bone == AimBone.RandomLethal ||
          bone == AimBone.RandomBody);
 }
コード例 #6
0
 public Vector2 AimAt(CSGOImplementation csgo, AimBone bone, Player player)
 {
     if (player == null)
         return Vector2.Zero;
     //float multiplicator = GetFloatMultiplicator();
     return Geometry.WorldToScreen(
             csgo.ViewMatrix,
             csgo.ScreenSize,
             player.Skeleton.GetBone(bone)// + ((player.Velocity + player.BaseVelocity) - (csgo.LocalPlayer.Velocity + csgo.LocalPlayer.BaseVelocity)) * GetFloatMultiplicator() 
         );
 }
 public Vector2 AimAt(CSGOImplementation csgo, AimBone bone, Player player)
 {
     if (player == null)
     {
         return(Vector2.Zero);
     }
     //float multiplicator = GetFloatMultiplicator();
     return(Geometry.WorldToScreen(
                csgo.ViewMatrix,
                csgo.ScreenSize,
                player.Skeleton.GetBone(bone)// + ((player.Velocity + player.BaseVelocity) - (csgo.LocalPlayer.Velocity + csgo.LocalPlayer.BaseVelocity)) * GetFloatMultiplicator()
                ));
 }
コード例 #8
0
        public AimMethodResult GetAimTarget(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius)
        {
            if (!CSGOImplementationValid(csgo))
                return null;

            this.CheckTickLength();

            AimMethodResult least = OnGetAimPoint(csgo, target, bone, screenM, radius);

            this.UpdateTick();

            return least;
        }
コード例 #9
0
        private AimBone GetRandomBone(AimBone bone)
        {
            switch (bone)
            {
            case AimBone.Random:
                return(RandomBones[Program.random.Next(0, RandomBones.Length)]);

            case AimBone.RandomLethal:
                return(RandomLethalBones[Program.random.Next(0, RandomLethalBones.Length)]);

            case AimBone.RandomBody:
                return(RandomBodyBones[Program.random.Next(0, RandomBodyBones.Length)]);
            }
            return(AimBone.Feet);
        }
        public AimMethodResult GetAimTarget(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius)
        {
            if (!CSGOImplementationValid(csgo))
            {
                return(null);
            }

            this.CheckTickLength();

            AimMethodResult least = OnGetAimPoint(csgo, target, bone, screenM, radius);

            this.UpdateTick();

            return(least);
        }
コード例 #11
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius)
        {
            Vector2 least = Vector2.Zero;
            int     index = -1;
            float   leastDist = float.MaxValue, dist = 0f;
            Vector3 currentAngles = csgo.ViewAngles;
            Vector3 aimAngles     = Vector3.Zero;

            for (int i = 0; i < csgo.Players.Length; i++)
            {
                if (csgo.Players[i] == null)
                {
                    continue;
                }
                if (!csgo.LocalPlayer.SeenBy(csgo.Players[i]) && !csgo.Players[i].SeenBy(csgo.LocalPlayer))
                {
                    continue;
                }
                aimAngles  = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[i].Skeleton.GetBone(bone));
                aimAngles -= currentAngles;
                dist       = aimAngles.Length();
                if (dist < leastDist)
                {
                    leastDist = dist;
                    index     = csgo.Players[i].Index;
                }
            }
            return(new AimMethodResult(index, least));
        }
コード例 #12
0
        public override void OnUpdaterTick()
        {
            if (Program.GameImplementation == null)
                return;
            if (Program.GameController == null)
                return;
            if (!Program.GameController.IsGameRunning)
                return;
            csgo = (CSGOImplementation)Program.GameImplementation;
            CSGOGameController csgoController = (CSGOGameController)Program.GameController;
            if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL)
                return;
            if (csgoController.MemoryUpdater.Tick == lastTick)
                return;
            lastTick = csgoController.MemoryUpdater.Tick;

            if (csgo.LocalPlayer == null)
                return;
            if (csgo.LocalPlayer.Health <= 0)
                return;
            if ((csgo.WeaponType == WeaponType.Grenade || csgo.WeaponType == WeaponType.Melee || csgo.WeaponType == WeaponType.Special))
                return;
            if (csgo.WeaponClip1 <= 0)
                return;
            if (csgo.IsReloading)
                return;

            bool rcsCompensateOn = csgo.GetValue<OnOff>("aimbotCompensateRecoil") == OnOff.On;
            CSGOGameController controller = (CSGOGameController)Program.GameController;
            Vector3 rcsCompensation = Vector3.Zero;
            controller.RecoilControl.IsActive = lastTarget == null;

            if (csgo.GetValue<YesNo>("aimbotEnabled") == YesNo.No)
                return;
            if (csgo.GetValue<YesNo>("spectatorDisableAim") == YesNo.Yes && csgo.FirstPersonSpectator)
                return;

            //Aimkey not down
            //-> Reset target
            if (!Program.GameController.InputUpdater.KeyIsDown(Program.GameImplementation.GetValue<Keys>("aimbotKey")))
            {
                lastTarget = null;
                lastAimBone = (AimBone)(((int)lastAimBone + 1) % 9);
                return;
            }

            //Aimkey down but dead target
            //-> Release key to reset target
            if (lastTarget != null)
                if (!lastTarget.IsValid())
                    if (csgo.GetValue<YesNo>("aimAllowAimJump") == YesNo.No)
                        return;

            Vector2 screenM = new Vector2(csgo.ScreenSize.Width / 2f, csgo.ScreenSize.Height / 2f);
            AimBone bone = csgo.GetValue<AimBone>("aimbotBone");
            if (bone != lastAimBone)
            {
                lastAimBone = bone;
                if (IsRandomAimBone(lastAimBone))
                {
                    randomAimBone = GetRandomBone(bone);
                };
            }
            if (IsRandomAimBone(bone))
                bone = randomAimBone;
            //Aimkey down but no target
            //-> Get new target
            if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()) || csgo.GetValue<YesNo>("aimAllowAimJump") == YesNo.Yes)
            {
                Target target = csgo.GetValue<Target>("aimbotTarget");
                AimMethod method = csgo.GetValue<AimMethod>("aimbotMethod");
                float radius = csgo.GetValue<float>("aimbotRadius");

                if (csgo.GetValue<OnOff>("aimbotRagemode") == OnOff.On)
                {
                    currentImplementation = rageMode;
                }
                else
                {
                    switch (method)
                    {
                        case AimMethod.LowestHP:
                            currentImplementation = lowestHP;
                            break;
                        case AimMethod.NearestToCrosshair:
                            currentImplementation = nearestToCrosshair;
                            break;
                        case AimMethod.NearestToPlayer:
                            currentImplementation = nearestToPlayer;
                            break;
                    }
                }
                lastTarget = currentImplementation.GetAimTarget(csgo, target, bone, screenM, radius);
            }
            //No target found?
            //-> Break.
            if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()))
                return;

            //Vector2 aimPos = currentImplementation.AimAt(csgo, bone, csgo.GetPlayerByIndex(lastTarget.PlayerIndex));
            //if (aimPos != lastPoint && aimPos != Vector2.Zero)
            //{
            if (csgo.ViewAngles == Vector3.Zero)
                return;
            Vector3 viewAngles = csgo.ViewAngles;
            viewAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[lastTarget.PlayerIndex - 1].Skeleton.GetBone(bone));
            if (rcsCompensateOn)
                viewAngles = viewAngles - csgo.LocalPlayer.PunchVector * 2;

            if (csgo.GetValue<OnOff>("aimbotSmooth") == OnOff.On)
            {
                Vector3 smoothed = viewAngles - csgo.ViewAngles;
                smoothed *= csgo.GetValue<float>("aimbotSpeed") / 100f;
                if (Math.Abs(smoothed.Y) < 45)
                    viewAngles = csgo.ViewAngles + smoothed;
            }
            viewAngles.Z = 0f;
            viewAngles = Geometry.ClampAngle(viewAngles);
            ((CSGOGameController)Program.GameController).MemoryUpdater.WriteViewAngles(viewAngles);
            //}
        }
コード例 #13
0
 protected abstract AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius);
コード例 #14
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius)
        {
            Vector2 least     = Vector2.Zero;
            int     index     = -1;
            float   leastDist = float.MaxValue;

            try
            {
                for (int i = 0; i < csgo.Players.Length; i++)
                {
                    if (!PlayerValid(csgo.LocalPlayer, csgo.Players[i], target))
                    {
                        continue;
                    }
                    if (csgo.GetValue <YesNo>("aimSpottedOnly") == YesNo.Yes && !csgo.Players[i].SeenBy(csgo.LocalPlayer))
                    {
                        continue;
                    }

                    Vector2 head = AimAt(csgo, bone, csgo.Players[i]);
                    if (csgo.GetValue <OnOff>("aimbotRagemode") == OnOff.Off)
                    {
                        if (!Geometry.PointInCircle(head, screenMid, radius))
                        {
                            continue;
                        }
                    }

                    float dist = (float)Math.Abs((head - screenMid).Length());
                    //Debug.WriteLine("Dist {0}: {1}", csgo.Players[i].Name, Math.Round(dist, 4));
                    if (dist < leastDist)
                    {
                        least     = head;
                        leastDist = dist;
                        index     = csgo.Players[i].Index;
                    }
                }
            }
            catch { }
            return(new AimMethodResult(index, least));
        }
コード例 #15
0
 public Vector3 GetBone(AimBone bone)
 {
     switch (bone)
     {
         case AimBone.Head:
             return Head;
         case AimBone.Neck:
             return Neck;
         case AimBone.Torso:
             return Spine3;
         case AimBone.Hip:
             return Spine1;
         case AimBone.Knees:
             return LeftKnee + (RightKnee - LeftKnee) / 2f;
         case AimBone.Feet:
             return LeftFoot + (RightFoot - LeftFoot) / 2f;
         default:
             return Neck;
     }
 }
コード例 #16
0
 private bool IsRandomAimBone(AimBone bone)
 {
     return
         bone == AimBone.Random ||
         bone == AimBone.RandomLethal ||
         bone == AimBone.RandomBody;
 }
コード例 #17
0
        public override void OnUpdaterTick()
        {
            if (Program.GameImplementation == null)
            {
                return;
            }
            if (Program.GameController == null)
            {
                return;
            }
            if (!Program.GameController.IsGameRunning)
            {
                return;
            }
            csgo = (CSGOImplementation)Program.GameImplementation;
            CSGOGameController csgoController = (CSGOGameController)Program.GameController;

            if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL)
            {
                return;
            }
            if (csgoController.MemoryUpdater.Tick == lastTick)
            {
                return;
            }
            lastTick = csgoController.MemoryUpdater.Tick;

            if (csgo.LocalPlayer == null)
            {
                return;
            }
            if (csgo.LocalPlayer.Health <= 0)
            {
                return;
            }
            if ((csgo.WeaponType == WeaponType.Grenade || csgo.WeaponType == WeaponType.Melee || csgo.WeaponType == WeaponType.Special))
            {
                return;
            }
            if (csgo.WeaponClip1 <= 0)
            {
                return;
            }
            if (csgo.IsReloading)
            {
                return;
            }

            bool rcsCompensateOn               = csgo.GetValue <OnOff>("aimbotCompensateRecoil") == OnOff.On;
            CSGOGameController controller      = (CSGOGameController)Program.GameController;
            Vector3            rcsCompensation = Vector3.Zero;

            controller.RecoilControl.IsActive = lastTarget == null;

            if (csgo.GetValue <YesNo>("aimbotEnabled") == YesNo.No)
            {
                return;
            }
            if (csgo.GetValue <YesNo>("spectatorDisableAim") == YesNo.Yes && csgo.FirstPersonSpectator)
            {
                return;
            }

            //Aimkey not down
            //-> Reset target
            if (!Program.GameController.InputUpdater.KeyIsDown(Program.GameImplementation.GetValue <Keys>("aimbotKey")))
            {
                lastTarget  = null;
                lastAimBone = (AimBone)(((int)lastAimBone + 1) % 9);
                return;
            }

            //Aimkey down but dead target
            //-> Release key to reset target
            if (lastTarget != null)
            {
                if (!lastTarget.IsValid())
                {
                    if (csgo.GetValue <YesNo>("aimAllowAimJump") == YesNo.No)
                    {
                        return;
                    }
                }
            }

            Vector2 screenM = new Vector2(csgo.ScreenSize.Width / 2f, csgo.ScreenSize.Height / 2f);
            AimBone bone    = csgo.GetValue <AimBone>("aimbotBone");

            if (bone != lastAimBone)
            {
                lastAimBone = bone;
                if (IsRandomAimBone(lastAimBone))
                {
                    randomAimBone = GetRandomBone(bone);
                }
                ;
            }
            if (IsRandomAimBone(bone))
            {
                bone = randomAimBone;
            }
            //Aimkey down but no target
            //-> Get new target
            if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()) || csgo.GetValue <YesNo>("aimAllowAimJump") == YesNo.Yes)
            {
                Target    target = csgo.GetValue <Target>("aimbotTarget");
                AimMethod method = csgo.GetValue <AimMethod>("aimbotMethod");
                float     radius = csgo.GetValue <float>("aimbotRadius");

                if (csgo.GetValue <OnOff>("aimbotRagemode") == OnOff.On)
                {
                    currentImplementation = rageMode;
                }
                else
                {
                    switch (method)
                    {
                    case AimMethod.LowestHP:
                        currentImplementation = lowestHP;
                        break;

                    case AimMethod.NearestToCrosshair:
                        currentImplementation = nearestToCrosshair;
                        break;

                    case AimMethod.NearestToPlayer:
                        currentImplementation = nearestToPlayer;
                        break;
                    }
                }
                lastTarget = currentImplementation.GetAimTarget(csgo, target, bone, screenM, radius);
            }
            //No target found?
            //-> Break.
            if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()))
            {
                return;
            }

            //Vector2 aimPos = currentImplementation.AimAt(csgo, bone, csgo.GetPlayerByIndex(lastTarget.PlayerIndex));
            //if (aimPos != lastPoint && aimPos != Vector2.Zero)
            //{
            if (csgo.ViewAngles == Vector3.Zero)
            {
                return;
            }
            Vector3 viewAngles = csgo.ViewAngles;

            viewAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[lastTarget.PlayerIndex - 1].Skeleton.GetBone(bone));
            if (rcsCompensateOn)
            {
                viewAngles = viewAngles - csgo.LocalPlayer.PunchVector * 2;
            }

            if (csgo.GetValue <OnOff>("aimbotSmooth") == OnOff.On)
            {
                Vector3 smoothed = viewAngles - csgo.ViewAngles;
                smoothed *= csgo.GetValue <float>("aimbotSpeed") / 100f;
                if (Math.Abs(smoothed.Y) < 45)
                {
                    viewAngles = csgo.ViewAngles + smoothed;
                }
            }
            viewAngles.Z = 0f;
            viewAngles   = Geometry.ClampAngle(viewAngles);
            ((CSGOGameController)Program.GameController).MemoryUpdater.WriteViewAngles(viewAngles);
            //}
        }
 protected abstract AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius);
コード例 #19
0
        protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius)
        {
            Vector2 least     = Vector2.Zero;
            Player  playerTmp = null;
            float   leastDist = float.MaxValue;

            try
            {
                foreach (Player player in csgo.Players)
                {
                    if (!PlayerValid(csgo.LocalPlayer, player, target))
                    {
                        continue;
                    }
                    if (csgo.GetValue <YesNo>("aimSpottedOnly") == YesNo.Yes && !player.SeenBy(csgo.LocalPlayer))
                    {
                        continue;
                    }

                    float   multiplicator = this.GetFloatMultiplicator();
                    Vector2 head          = AimAt(csgo, bone, player);
                    if (!Geometry.PointInCircle(head, screenM, radius))
                    {
                        continue;
                    }

                    float playerDist = Geometry.GetDistanceToPoint(player.Vector3, csgo.LocalPlayer.Vector3);

                    if (playerDist < leastDist)
                    {
                        least     = head;
                        leastDist = playerDist;
                        playerTmp = player;
                    }
                }
            }
            catch { }
            return(new AimMethodResult(playerTmp != null ? playerTmp.Index : 0, least));
        }
コード例 #20
0
 private AimBone GetRandomBone(AimBone bone)
 {
     switch (bone)
     {
         case AimBone.Random:
             return RandomBones[Program.random.Next(0, RandomBones.Length)];
         case AimBone.RandomLethal:
             return RandomLethalBones[Program.random.Next(0, RandomLethalBones.Length)];
         case AimBone.RandomBody:
             return RandomBodyBones[Program.random.Next(0, RandomBodyBones.Length)];
     }
     return AimBone.Feet;
 }