Example #1
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo = enemyInfo;
     Recall    = new RecallInf(
         EnemyInfo.Player.NetworkId,
         TeleportStatus.Unknown,
         TeleportType.Unknown,
         0);
     IncomingDamage = new Dictionary <int, float>();
 }
Example #2
0
        float GetTargetHealth(EnemyInfo enemyInfo, int additionalTime)
        {
            if (enemyInfo.Player.IsVisible)
            {
                return(enemyInfo.Player.Health);
            }

            float predictedHealth = enemyInfo.Player.Health + enemyInfo.Player.HPRegenRate * ((Environment.TickCount - enemyInfo.LastSeen + additionalTime) / 1000f);

            return(predictedHealth > enemyInfo.Player.MaxHealth ? enemyInfo.Player.MaxHealth : predictedHealth);
        }
Example #3
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo      = enemyInfo;
     type           = TeleportType.Unknown;
     status         = TeleportStatus.Unknown;
     duration       = 0;
     start          = 0;
     abduration     = 0;
     abstart        = 0;
     IncomingDamage = new Dictionary <int, float>();
 }
Example #4
0
        float GetTargetHealth(EnemyInfo enemyInfo, int additionalTime)
        {
            if (enemyInfo.Player.IsHPBarRendered)
            {
                return(enemyInfo.Player.Health);
            }

            var healthPerSec = 0.45f * enemyInfo.Player.Level;

            float predictedHealth = enemyInfo.Player.Health + (healthPerSec * ((Utils.TickCount - enemyInfo.LastSeen + additionalTime) / 1000f));

            return(predictedHealth > enemyInfo.Player.MaxHealth ? enemyInfo.Player.MaxHealth : predictedHealth);
        }
Example #5
0
        bool IsTargetKillable(EnemyInfo enemyInfo)
        {
            float totalUltDamage = enemyInfo.RecallInfo.IncomingDamage.Values.Sum();

            float targetHealth = GetTargetHealth(enemyInfo, enemyInfo.RecallInfo.GetRecallCountdown());

            if (Utils.TickCount - enemyInfo.LastSeen > 20000 && !Menu.Item("regardlessKey").GetValue <KeyBind>().Active)
            {
                if (totalUltDamage < enemyInfo.Player.MaxHealth)
                {
                    return(false);
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                return(false);
            }

            return(true);
        }
Example #6
0
        private bool IsTargetKillable(EnemyInfo enemyInfo)
        {
            float totalUltDamage = enemyInfo.RecallInfo.IncomingDamage.Values.Sum();
            float targetHealth   = GetTargetHealth(enemyInfo, enemyInfo.RecallInfo.GetRecallCountdown());

            if (Utils.TickCount - enemyInfo.LastSeen > 20000 && !getKeyBindItem(Menu, "regardlessKey"))
            {
                if (totalUltDamage < enemyInfo.Player.MaxHealth)
                {
                    Console.WriteLine("This 1");
                    return(false);
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                Console.WriteLine("This 2");
                return(false);
            }

            return(true);
        }
Example #7
0
        void HandleUltTarget(EnemyInfo enemyInfo)
        {
            bool ultNow = false;
            bool me     = false;

            foreach (AIHeroClient champ in Allies.Where(x => //gathering the damage from allies should probably be done once only with timers
                                                        x.IsValid <AIHeroClient>() &&
                                                        !x.IsDead &&
                                                        ((x.IsMe && !x.IsStunned) || TeamUlt.Items.Any(item => item.GetValue <bool>() && item.Name == x.ChampionName)) &&
                                                        CanUseUlt(x)))
            {
                if (Menu.Item("checkCollision").GetValue <bool>() && UltSpellData[champ.ChampionName].Collision && IsCollidingWithChamps(champ, EnemySpawnPos, UltSpellData[champ.ChampionName].Width))
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                //increase timeneeded if it should arrive earlier, decrease if later
                var timeneeded = GetUltTravelTime(champ, UltSpellData[champ.ChampionName].Speed, UltSpellData[champ.ChampionName].Delay, EnemySpawnPos) - 65;

                if (enemyInfo.RecallInfo.GetRecallCountdown() >= timeneeded)
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = (float)champ.GetSpellDamage(enemyInfo.Player, SpellSlot.R, UltSpellData[champ.ChampionName].SpellStage) * UltSpellData[champ.ChampionName].DamageMultiplicator;
                }
                else if (enemyInfo.RecallInfo.GetRecallCountdown() < timeneeded - (champ.IsMe ? 0 : 125)) //some buffer for allies so their damage isnt getting reset
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                if (champ.IsMe)
                {
                    me = true;

                    enemyInfo.RecallInfo.EstimatedShootT = timeneeded;

                    if (enemyInfo.RecallInfo.GetRecallCountdown() - timeneeded < 60)
                    {
                        ultNow = true;
                    }
                }
            }

            if (me)
            {
                if (!IsTargetKillable(enemyInfo))
                {
                    enemyInfo.RecallInfo.LockedTarget = false;
                    return;
                }

                enemyInfo.RecallInfo.LockedTarget = true;

                if (!ultNow || Menu.Item("panicKey").GetValue <KeyBind>().Active)
                {
                    return;
                }

                Ultimate.Cast(EnemySpawnPos, true);
                LastUltCastT = Utils.TickCount;
            }
            else
            {
                enemyInfo.RecallInfo.LockedTarget    = false;
                enemyInfo.RecallInfo.EstimatedShootT = 0;
            }
        }
Example #8
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo      = enemyInfo;
     Recall         = new Packet.S2C.Teleport.Struct(EnemyInfo.Player.NetworkId, Packet.S2C.Teleport.Status.Unknown, Packet.S2C.Teleport.Type.Unknown, 0);
     IncomingDamage = new Dictionary <int, float>();
 }
Example #9
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo = enemyInfo;
     Recall = new Packet.S2C.Teleport.Struct(EnemyInfo.Player.NetworkId, Packet.S2C.Teleport.Status.Unknown, Packet.S2C.Teleport.Type.Unknown, 0);
     IncomingDamage = new Dictionary<int, float>();
 }
Example #10
0
        bool IsTargetKillable(EnemyInfo enemyInfo)
        {
            float totalUltDamage = enemyInfo.RecallInfo.IncomingDamage.Values.Sum();

            float targetHealth = GetTargetHealth(enemyInfo, enemyInfo.RecallInfo.GetRecallCountdown());

            if (Utils.TickCount - enemyInfo.LastSeen > 20000 && !Menu.Item("regardlessKey").GetValue<KeyBind>().Active)
            {
                if (totalUltDamage < enemyInfo.Player.MaxHealth)
                    return false;
            }
            else if (totalUltDamage < targetHealth)
                return false;

            return true;
        }
Example #11
0
        private bool IsTargetKillable(EnemyInfo enemyInfo)
        {
            float totalUltDamage = enemyInfo.RecallInfo.IncomingDamage.Values.Sum();
            float targetHealth = GetTargetHealth(enemyInfo, enemyInfo.RecallInfo.GetRecallCountdown());

            if (Utils.TickCount - enemyInfo.LastSeen > 20000 && !getKeyBindItem(Menu, "regardlessKey"))
            {
                if (totalUltDamage < enemyInfo.Player.MaxHealth)
                {
                    Console.WriteLine("This 1");
                    return false;
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                Console.WriteLine("This 2");
                return false;
            }

            return true;
        }
Example #12
0
        float GetTargetHealth(EnemyInfo enemyInfo, int additionalTime)
        {
            if (enemyInfo.Player.IsVisible)
                return enemyInfo.Player.Health;

            float predictedHealth = enemyInfo.Player.Health + enemyInfo.Player.HPRegenRate * ((Utils.TickCount - enemyInfo.LastSeen + additionalTime) / 1000f);

            return predictedHealth > enemyInfo.Player.MaxHealth ? enemyInfo.Player.MaxHealth : predictedHealth;
        }
Example #13
0
        void HandleUltTarget(EnemyInfo enemyInfo)
        {
            bool shoot = false;

            foreach (Obj_AI_Hero champ in Allies.Where(x => //gathering the damage from allies should probably be done once only with timers
                                                       x.IsValid &&
                                                       !x.IsDead &&
                                                       ((x.IsMe && !x.IsStunned) || TeamUlt.Items.Any(item => item.GetValue <bool>() && item.Name == x.ChampionName)) &&
                                                       CanUseUlt(x)))
            {
                if (UltSpellData[champ.ChampionName].Collision && IsCollidingWithChamps(champ, EnemySpawnPos, UltSpellData[champ.ChampionName].Width))
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                //increase timeneeded if it should arrive earlier, decrease if later
                var timeneeded = GetUltTravelTime(champ, UltSpellData[champ.ChampionName].Speed, UltSpellData[champ.ChampionName].Delay, EnemySpawnPos) - 65;

                if (enemyInfo.RecallInfo.GetRecallCountdown() >= timeneeded)
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = (float)Damage.GetSpellDamage(champ, enemyInfo.Player, SpellSlot.R, UltSpellData[champ.ChampionName].SpellStage) * UltSpellData[champ.ChampionName].DamageMultiplicator;
                }
                else if (enemyInfo.RecallInfo.GetRecallCountdown() < timeneeded)
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                if (champ.IsMe && enemyInfo.RecallInfo.GetRecallCountdown() - timeneeded < 65)
                {
                    shoot = true;
                }
            }

            float totalUltDamage = enemyInfo.RecallInfo.IncomingDamage.Values.Sum();

            float targetHealth = GetTargetHealth(enemyInfo, enemyInfo.RecallInfo.GetRecallCountdown());

            if (!shoot || Menu.Item("panicKey").GetValue <KeyBind>().Active)
            {
                return;
            }

            int time = Environment.TickCount;

            if (time - enemyInfo.LastSeen > 20000 && !Menu.Item("regardlessKey").GetValue <KeyBind>().Active)
            {
                if (totalUltDamage < enemyInfo.Player.MaxHealth)
                {
                    return;
                }
            }
            else if (totalUltDamage < targetHealth)
            {
                return;
            }

            Ultimate.Cast(EnemySpawnPos, true);
            LastUltCastT = time;
        }
Example #14
0
        private void HandleUltTarget(EnemyInfo enemyInfo)
        {
            bool ultNow = false;
            bool me     = false;

            foreach (AIHeroClient champ in Allies.Where(x => x.IsValid <AIHeroClient>() && !x.IsDead && ((x.IsMe && !x.IsStunned) || getCheckBoxItem(TeamUlt, x.ChampionName)) && CanUseUlt(x)))
            {
                Console.WriteLine("0");
                if (getCheckBoxItem(Menu, "checkCollision") && UltSpellData[champ.ChampionName].Collision && IsCollidingWithChamps(champ, EnemySpawnPos, UltSpellData[champ.ChampionName].Width))
                {
                    Console.WriteLine("1");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                var timeneeded = GetUltTravelTime(champ, UltSpellData[champ.ChampionName].Speed, UltSpellData[champ.ChampionName].Delay, EnemySpawnPos) - 65;

                Console.WriteLine("2 : " + timeneeded + " | " + enemyInfo.RecallInfo.GetRecallCountdown());
                if (enemyInfo.RecallInfo.GetRecallCountdown() >= timeneeded)
                {
                    Console.WriteLine("2");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = (float)champ.LSGetSpellDamage(enemyInfo.Player, SpellSlot.R, UltSpellData[champ.ChampionName].SpellStage) * UltSpellData[champ.ChampionName].DamageMultiplicator;
                }
                else if (enemyInfo.RecallInfo.GetRecallCountdown() < timeneeded - (champ.IsMe ? 0 : 125)) //some buffer for allies so their damage isnt getting reset
                {
                    Console.WriteLine("3");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                Console.WriteLine("4");

                if (champ.IsMe)
                {
                    me = true;

                    enemyInfo.RecallInfo.EstimatedShootT = timeneeded;

                    Console.WriteLine("Time Needed : " + timeneeded);

                    if ((enemyInfo.RecallInfo.GetRecallCountdown() - timeneeded) < 60)
                    {
                        ultNow = true;
                    }
                }
            }

            if (me)
            {
                Console.WriteLine("7");
                if (!IsTargetKillable(enemyInfo))
                {
                    enemyInfo.RecallInfo.LockedTarget = false;
                    Console.WriteLine("RETURN 1");
                    return;
                }

                enemyInfo.RecallInfo.LockedTarget = true;

                if (!ultNow || getKeyBindItem(Menu, "panicKey"))
                {
                    Console.WriteLine("RETURN 2");
                    return;
                }
                Console.WriteLine("Casted.");
                Ultimate.Cast(EnemySpawnPos, true);
                LastUltCastT = Utils.TickCount;
            }
            else
            {
                enemyInfo.RecallInfo.LockedTarget    = false;
                enemyInfo.RecallInfo.EstimatedShootT = 0;
            }
        }
Example #15
0
 public RecallInfo(EnemyInfo enemyInfo)
 {
     EnemyInfo = enemyInfo;
     type = TeleportType.Unknown;
     status = TeleportStatus.Unknown;
     duration = 0;
     start = 0;
     abduration = 0;
     abstart = 0;
     IncomingDamage = new Dictionary<int, float>();
 }
Example #16
0
        void HandleUltTarget(EnemyInfo enemyInfo)
        {
            bool ultNow = false;
            bool me = false;

            foreach (Obj_AI_Hero champ in Allies.Where(x => //gathering the damage from allies should probably be done once only with timers
                            x.IsValid<Obj_AI_Hero>() &&
                            !x.IsDead &&
                            ((x.IsMe && !x.IsStunned) || TeamUlt.Items.Any(item => item.GetValue<bool>() && item.Name == x.ChampionName)) &&
                            CanUseUlt(x)))
            {
                if (Menu.Item("checkCollision").GetValue<bool>() && UltSpellData[champ.ChampionName].Collision && IsCollidingWithChamps(champ, EnemySpawnPos, UltSpellData[champ.ChampionName].Width))
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                //increase timeneeded if it should arrive earlier, decrease if later
                var timeneeded = GetUltTravelTime(champ, UltSpellData[champ.ChampionName].Speed, UltSpellData[champ.ChampionName].Delay, EnemySpawnPos) - 65;

                if (enemyInfo.RecallInfo.GetRecallCountdown() >= timeneeded)
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = (float)champ.GetSpellDamage(enemyInfo.Player, SpellSlot.R, UltSpellData[champ.ChampionName].SpellStage) * UltSpellData[champ.ChampionName].DamageMultiplicator;
                else if (enemyInfo.RecallInfo.GetRecallCountdown() < timeneeded - (champ.IsMe ? 0 : 125)) //some buffer for allies so their damage isnt getting reset
                {
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                if (champ.IsMe)
                {
                    me = true;

                    enemyInfo.RecallInfo.EstimatedShootT = timeneeded;

                    if(enemyInfo.RecallInfo.GetRecallCountdown() - timeneeded < 60)
                        ultNow = true;
                }
            }

            if(me)
            {
                if(!IsTargetKillable(enemyInfo))
                {
                    enemyInfo.RecallInfo.LockedTarget = false;
                    return;
                }

                enemyInfo.RecallInfo.LockedTarget = true;

                if (!ultNow || Menu.Item("panicKey").GetValue<KeyBind>().Active)
                    return;

                Ultimate.Cast(EnemySpawnPos, true);
                LastUltCastT = Utils.TickCount;
            }
            else
            {
                enemyInfo.RecallInfo.LockedTarget = false;
                enemyInfo.RecallInfo.EstimatedShootT = 0;
            }
        }
Example #17
0
        private void HandleUltTarget(EnemyInfo enemyInfo)
        {
            bool ultNow = false;
            bool me = false;

            foreach (AIHeroClient champ in Allies.Where(x => x.IsValid<AIHeroClient>() && !x.IsDead && ((x.IsMe && !x.IsStunned) || getCheckBoxItem(TeamUlt, x.ChampionName)) && CanUseUlt(x)))
            {
                Console.WriteLine("0");
                if (getCheckBoxItem(Menu, "checkCollision") && UltSpellData[champ.ChampionName].Collision && IsCollidingWithChamps(champ, EnemySpawnPos, UltSpellData[champ.ChampionName].Width))
                {
                    Console.WriteLine("1");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                var timeneeded = GetUltTravelTime(champ, UltSpellData[champ.ChampionName].Speed, UltSpellData[champ.ChampionName].Delay, EnemySpawnPos) - 65;

                Console.WriteLine("2 : " + timeneeded + " | " + enemyInfo.RecallInfo.GetRecallCountdown());
                if (enemyInfo.RecallInfo.GetRecallCountdown() >= timeneeded)
                {
                    Console.WriteLine("2");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = (float)champ.LSGetSpellDamage(enemyInfo.Player, SpellSlot.R, UltSpellData[champ.ChampionName].SpellStage) * UltSpellData[champ.ChampionName].DamageMultiplicator;
                }
                else if (enemyInfo.RecallInfo.GetRecallCountdown() < timeneeded - (champ.IsMe ? 0 : 125)) //some buffer for allies so their damage isnt getting reset
                {
                    Console.WriteLine("3");
                    enemyInfo.RecallInfo.IncomingDamage[champ.NetworkId] = 0;
                    continue;
                }

                Console.WriteLine("4");

                if (champ.IsMe)
                {
                    me = true;

                    enemyInfo.RecallInfo.EstimatedShootT = timeneeded;

                    Console.WriteLine("Time Needed : " + timeneeded);

                    if ((enemyInfo.RecallInfo.GetRecallCountdown() - timeneeded) < 60)
                    {
                        ultNow = true;
                    }
                }
            }

            if (me)
            {
                Console.WriteLine("7");
                if (!IsTargetKillable(enemyInfo))
                {
                    enemyInfo.RecallInfo.LockedTarget = false;
                    Console.WriteLine("RETURN 1");
                    return;
                }

                enemyInfo.RecallInfo.LockedTarget = true;

                if (!ultNow || getKeyBindItem(Menu, "panicKey"))
                {
                    Console.WriteLine("RETURN 2");
                    return;
                }
                Console.WriteLine("Casted.");
                Ultimate.Cast(EnemySpawnPos, true);
                LastUltCastT = Utils.TickCount;
            }
            else
            {
                enemyInfo.RecallInfo.LockedTarget = false;
                enemyInfo.RecallInfo.EstimatedShootT = 0;
            }
        }