Ejemplo n.º 1
0
        //return asap to check the most amount of times
        static void SecondEChecker(Obj_AI_Hero target)
        {
            if (LissUtils.AutoSecondE() && LissUtils.isHealthy() && LissEMissile != null && Spells["E"].IsReady())
            {
                if (Vector3.Distance(MissilePosition, target.ServerPosition) < Vector3.Distance(Player.ServerPosition, target.ServerPosition) && !LissUtils.PointUnderEnemyTurret(MissilePosition))
                {
                    Spells["E"].CastOnUnit(Player);
                    return;
                }
                var Enemiesatpoint  = Utility.GetEnemiesInRange(LissEMissile.Position, Spells["R"].Range);
                var enemiesatpointR = Enemiesatpoint.Count;

                if ((enemiesatpointR >= Config.Item("Combo.ecountR").GetValue <Slider>().Value&& SpellSlot.R.IsReady()) || (Enemiesatpoint.Any(e => e.IsKillableFromPoint(LissEMissile.Position) && Vector3.Distance(LissEMissile.Position, e.ServerPosition) < Vector3.Distance(Player.ServerPosition, e.ServerPosition))))
                {
                    if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                    return;
                }
                var enemiesatpointW = Utility.CountEnemiesInRange(LissEMissile.Position, Spells["W"].Range);
                if (enemiesatpointW >= Config.Item("Combo.ecountW").GetValue <Slider>().Value&& SpellSlot.W.IsReady())
                {
                    if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        //return asap to check the most amount of times
        private static void SecondEChecker(AIHeroClient target)
        {
            if (LissUtils.AutoSecondE() && LissUtils.isHealthy() && LissEMissile != null && Spells["E"].IsReady())
            {
                if (Vector2.Distance(MissilePosition, target.ServerPosition.To2D()) <
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition) &&
                    !LissUtils.PointUnderEnemyTurret(MissilePosition) &&
                    Vector3.Distance(target.ServerPosition, LissEMissile.EndPosition) >
                    Vector3.Distance(Player.ServerPosition, target.ServerPosition))
                {
                    Spells["E"].CastOnUnit(Player);
                    return;
                }
                var Enemiesatpoint  = LissEMissile.Position.GetEnemiesInRange(Spells["R"].Range);
                var enemiesatpointR = Enemiesatpoint.Count;

                if ((enemiesatpointR >= getSliderItem(comboMenu, "Combo.ecountR") && SpellSlot.R.IsReady()) ||
                    Enemiesatpoint.Any(
                        e =>
                        e.IsKillableFromPoint(LissEMissile.Position) &&
                        Vector3.Distance(LissEMissile.Position, e.ServerPosition) <
                        Vector3.Distance(Player.ServerPosition, e.ServerPosition)))
                {
                    if (LissUtils.PointUnderEnemyTurret(MissilePosition) &&
                        getCheckBoxItem(miscMenu, "Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                    return;
                }
                var enemiesatpointW = LissEMissile.Position.CountEnemiesInRange(Spells["W"].Range);
                if (enemiesatpointW >= getSliderItem(comboMenu, "Combo.ecountW") && SpellSlot.W.IsReady())
                {
                    if (LissUtils.PointUnderEnemyTurret(MissilePosition) &&
                        getCheckBoxItem(miscMenu, "Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                }
            }
        }
Ejemplo n.º 3
0
        static void KillSteal()
        {
            var targets =
                HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie);

            if (SpellSlot.Q.IsReady() && LissUtils.Active("Killsteal.UseQ"))
            {
                Obj_AI_Hero qtarget =
                    targets.Where(x => x.Distance(Player.Position) < Spells["Q"].Range)
                    .MinOrDefault(x => x.Health);
                if (qtarget != null)
                {
                    var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q);
                    if (qtarget.Health < qdmg)
                    {
                        var pred = Spells["Q"].GetPrediction(qtarget, false);
                        if (pred != null)
                        {
                            Spells["Q"].Cast(pred.CastPosition);
                        }
                    }
                }
            }
            if (SpellSlot.W.IsReady() && LissUtils.Active("Killsteal.UseW"))
            {
                Obj_AI_Hero wtarget =
                    targets.Where(x => x.Distance(Player.Position) < Spells["W"].Range)
                    .MinOrDefault(x => x.Health);
                if (wtarget != null)
                {
                    var wdmg = Player.GetSpellDamage(wtarget, SpellSlot.W);
                    if (wtarget.Health < wdmg)
                    {
                        Spells["W"].CastOnUnit(Player);
                    }
                }
            }

            Obj_AI_Hero etarget =
                targets.Where(x => x.Distance(Player.Position) < Spells["E"].Range).MinOrDefault(x => x.Health);

            if (SpellSlot.E.IsReady() && LissEMissile == null && !LissUtils.CanSecondE() && LissUtils.Active("Killsteal.UseE"))
            {
                if (etarget != null)
                {
                    var edmg = Player.GetSpellDamage(etarget, SpellSlot.E);
                    if (etarget.Health < edmg)
                    {
                        var pred = Spells["E"].GetPrediction(etarget, false);
                        if (pred != null)
                        {
                            Spells["E"].Cast(pred.CastPosition);
                        }
                    }
                }
            }

            if (LissEMissile != null && etarget != null && etarget.HealthPercent > 5 && etarget.HealthPercent < 15 && LissUtils.isHealthy() && LissUtils.Active("Killsteal.UseE2"))
            {
                if (Vector3.Distance(LissEMissile.Position, etarget.Position) < Spells["Q"].Range && SpellSlot.Q.IsReady() && etarget.Health < Player.GetSpellDamage(etarget, SpellSlot.Q))
                {
                    if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                }
            }

            if (Spells["Ignite"].IsReady() && LissUtils.Active("Killsteal.UseIgnite"))
            {
                Obj_AI_Hero igntarget =
                    targets.Where(x => x.Distance(Player.Position) < Spells["Ignite"].Range)
                    .MinOrDefault(x => x.Health);
                if (igntarget != null)
                {
                    var igniteDmg = Player.GetSummonerSpellDamage(igntarget, Damage.SummonerSpell.Ignite);
                    if (igniteDmg > igntarget.Health)
                    {
                        Spells["Ignite"].Cast(igntarget);
                    }
                }
            }

            if (SpellSlot.R.IsReady() && LissUtils.Active("Killsteal.UseR"))
            {
                var Rtarget = targets.Where(h =>
                                            (Vector3.Distance(Player.ServerPosition, h.ServerPosition) < Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) > 1 && h.Health < Player.GetSpellDamage(h, SpellSlot.R) && !LissUtils.Active("Blacklist." + h.ChampionName)).MinOrDefault(h => h.Health);
                if (Rtarget != null)
                {
                    Spells["R"].Cast(Rtarget);
                }
            }
        }
Ejemplo n.º 4
0
        static void CastR(Obj_AI_Hero currenttarget)
        {
            var Check =
                HeroManager.Enemies
                .Where(
                    h => h.IsValidTarget(Spells["R"].Range) && h.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount") && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList();

            if (Player.CountEnemiesInRange(Spells["R"].Range) >= LissUtils.GetSlider("Combo.Rcount"))
            {
                Check.Add(Player);
            }
            if (Check != null)
            {
                if (Check.Contains(Player) && !LissUtils.isHealthy())
                {
                    Spells["R"].CastOnUnit(Player);
                    return;
                }
                var target = Check.FirstOrDefault();
                if (target != null)
                {
                    Spells["R"].Cast(target);
                    return;
                }
            }
            if (LissUtils.Active("Blacklist." + currenttarget.ChampionName))
            {
                return;
            }
            if (currenttarget.IsKillableFromPoint(Player.ServerPosition))
            {
                Spells["R"].Cast(currenttarget);
                return;
            }


            if (LissUtils.PointUnderAllyTurret(currenttarget.ServerPosition))
            {
                Spells["R"].Cast(currenttarget);
                return;
            }

            var dmgto = Player.GetSpellDamage(currenttarget, SpellSlot.R);

            if (dmgto > currenttarget.Health && currenttarget.Health >= 0.40 * dmgto)
            {
                Spells["R"].Cast(currenttarget);
                return;
            }

            var enemycount = LissUtils.GetSlider("Combo.Rcount");

            if (!LissUtils.isHealthy() && Player.CountEnemiesInRange(Spells["R"].Range - 100) >= enemycount)
            {
                Spells["R"].CastOnUnit(Player);
                return;
            }

            var possibilities = HeroManager.Enemies.Where(h => (h.IsValidTarget() && Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["R"].Range || (h.IsKillableFromPoint(Player.ServerPosition) && h.IsValidTarget() && !h.IsInvulnerable)) && !LissUtils.Active("Blacklist." + h.ChampionName)).ToList();

            var arranged = possibilities.OrderByDescending(h => h.CountEnemiesInRange(Spells["R"].Range));

            if (LissUtils.Active("Misc.PrioritizeUnderTurret"))
            {
                var EnemyUnderTurret = arranged.Where(h => LissUtils.PointUnderAllyTurret(h.ServerPosition) && !h.IsInvulnerable);
                if (EnemyUnderTurret != null)
                {
                    var Enemytofocus = EnemyUnderTurret.MaxOrDefault(h => h.CountEnemiesInRange(Spells["R"].Range));
                    if (Enemytofocus != null)
                    {
                        Spells["R"].Cast(Enemytofocus);
                        return;
                    }
                }
            }

            var UltTarget = arranged.FirstOrDefault();

            if (UltTarget != null)
            {
                if (!LissUtils.isHealthy() &&
                    Player.CountEnemiesInRange(Spells["R"].Range) >
                    UltTarget.CountEnemiesInRange(Spells["R"].Range) + 1)
                {
                    Spells["R"].CastOnUnit(Player);
                    return;
                }
                Spells["R"].Cast(UltTarget);
            }
        }
Ejemplo n.º 5
0
        private static void KillSteal()
        {
            var targets = HeroManager.Enemies.Where(x => x.IsValidTarget() && !x.IsInvulnerable & !x.IsZombie);

            var objAiHeroes = targets as IList <AIHeroClient> ?? targets.ToList();

            if (SpellSlot.Q.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseQ"))
            {
                var qtarget =
                    objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["Q"].Range)
                    .MinOrDefault(x => x.Health);
                if (qtarget != null)
                {
                    var qdmg = Player.GetSpellDamage(qtarget, SpellSlot.Q);
                    if (qtarget.Health < qdmg)
                    {
                        var pred = Spells["Q"].GetPrediction(qtarget);
                        if (pred != null)
                        {
                            Spells["Q"].Cast(qtarget);
                        }
                    }
                }
            }
            if (SpellSlot.W.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseW"))
            {
                var wtarget =
                    objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["W"].Range)
                    .MinOrDefault(x => x.Health);
                if (wtarget != null)
                {
                    var wdmg = Player.GetSpellDamage(wtarget, SpellSlot.W);
                    if (wtarget.Health < wdmg)
                    {
                        Spells["W"].CastOnUnit(Player);
                    }
                }
            }

            var etarget =
                objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["E"].Range).MinOrDefault(x => x.Health);

            if (SpellSlot.E.IsReady() && LissEMissile == null && !LissUtils.CanSecondE() &&
                getCheckBoxItem(ksMenu, "Killsteal.UseE"))
            {
                if (etarget != null)
                {
                    var edmg = Player.GetSpellDamage(etarget, SpellSlot.E);
                    if (etarget.Health < edmg)
                    {
                        var pred = Spells["E"].GetPrediction(etarget);
                        if (pred != null)
                        {
                            Spells["E"].Cast(etarget);
                        }
                    }
                }
            }

            if (LissEMissile != null && etarget != null && etarget.HealthPercent > 5 && etarget.HealthPercent < 15 &&
                LissUtils.isHealthy() && getCheckBoxItem(ksMenu, "Killsteal.UseE2"))
            {
                if (Vector3.Distance(LissEMissile.Position, etarget.Position) < Spells["Q"].Range &&
                    SpellSlot.Q.IsReady() && etarget.Health < Player.GetSpellDamage(etarget, SpellSlot.Q))
                {
                    if (LissUtils.PointUnderEnemyTurret(MissilePosition) &&
                        getCheckBoxItem(miscMenu, "Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                }
            }

            if (Spells["Ignite"].IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseIgnite"))
            {
                var igntarget =
                    objAiHeroes.Where(x => x.Distance(Player.Position) < Spells["Ignite"].Range)
                    .MinOrDefault(x => x.Health);
                if (igntarget != null)
                {
                    var igniteDmg = Player.GetSummonerSpellDamage(igntarget, Damage.SummonerSpell.Ignite);
                    if (igniteDmg > igntarget.Health)
                    {
                        Spells["Ignite"].Cast(igntarget);
                    }
                }
            }

            if (SpellSlot.R.IsReady() && getCheckBoxItem(ksMenu, "Killsteal.UseR"))
            {
                var Rtarget =
                    objAiHeroes.Where(
                        h =>
                        (Vector3.Distance(Player.ServerPosition, h.ServerPosition) < Spells["R"].Range) &&
                        h.CountEnemiesInRange(Spells["R"].Range) > 1 &&
                        h.Health < Player.GetSpellDamage(h, SpellSlot.R) &&
                        !getCheckBoxItem(blackListMenu, "Blacklist." + h.NetworkId)).MinOrDefault(h => h.Health);
                if (Rtarget != null)
                {
                    Spells["R"].Cast(Rtarget);
                }
            }
        }
Ejemplo n.º 6
0
        private static void CastR(AIHeroClient currenttarget)
        {
            var Check =
                HeroManager.Enemies
                .Where(
                    h =>
                    h.LSIsValidTarget(Spells["R"].Range) &&
                    h.LSCountEnemiesInRange(Spells["R"].Range) >= getSliderItem(comboMenu, "Combo.Rcount") &&
                    !getCheckBoxItem(blackListMenu, "Blacklist." + h.NetworkId) && h.HealthPercent > getSliderItem(comboMenu, "Combo.MinRHealth")).ToList();

            if (Player.LSCountEnemiesInRange(Spells["R"].Range) >= getSliderItem(comboMenu, "Combo.Rcount"))
            {
                Check.Add(Player);
            }
            if (Check.Any())
            {
                if (Check.Contains(Player) && !LissUtils.isHealthy())
                {
                    Spells["R"].CastOnUnit(Player);
                    return;
                }
                var target = Check.MaxOrDefault(TargetSelector.GetPriority);
                if (target != null)
                {
                    Spells["R"].Cast(target);
                    return;
                }
            }
            if (getCheckBoxItem(blackListMenu, "Blacklist." + currenttarget.NetworkId))
            {
                return;
            }
            if (currenttarget.IsKillableFromPoint(Player.ServerPosition) && Player.LSDistance(currenttarget) < Spells["R"].Range)
            {
                Spells["R"].Cast(currenttarget);
                return;
            }


            if (LissUtils.PointUnderAllyTurret(currenttarget.ServerPosition))
            {
                Spells["R"].Cast(currenttarget);
                return;
            }

            var dmgto = Player.LSGetSpellDamage(currenttarget, SpellSlot.R);

            if (dmgto > currenttarget.Health && currenttarget.Health >= 0.40 * dmgto)
            {
                Spells["R"].Cast(currenttarget);
                return;
            }

            var enemycount = getSliderItem(comboMenu, "Combo.Rcount");

            if (!LissUtils.isHealthy() && Player.LSCountEnemiesInRange(Spells["R"].Range - 100) >= enemycount)
            {
                Spells["R"].CastOnUnit(Player);
                return;
            }

            var possibilities =
                HeroManager.Enemies.Where(
                    h =>
                    (h.LSIsValidTarget() &&
                     Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["R"].Range ||
                     (h.IsKillableFromPoint(Player.ServerPosition) && h.LSIsValidTarget() && !h.IsInvulnerable)) &&
                    !getCheckBoxItem(blackListMenu, "Blacklist." + h.NetworkId)).ToList();

            var arranged = possibilities.OrderByDescending(h => h.LSCountEnemiesInRange(Spells["R"].Range));

            if (getCheckBoxItem(miscMenu, "Misc.PrioritizeUnderTurret"))
            {
                var EnemyUnderTurret =
                    arranged.Where(h => LissUtils.PointUnderAllyTurret(h.ServerPosition) && !h.IsInvulnerable);

                var Enemytofocus = EnemyUnderTurret.MaxOrDefault(h => h.LSCountEnemiesInRange(Spells["R"].Range));
                if (Enemytofocus != null)
                {
                    Spells["R"].Cast(Enemytofocus);
                    return;
                }
            }

            var UltTarget = arranged.FirstOrDefault();

            if (UltTarget != null)
            {
                if (!LissUtils.isHealthy() &&
                    Player.LSCountEnemiesInRange(Spells["R"].Range) >
                    UltTarget.LSCountEnemiesInRange(Spells["R"].Range) + 1)
                {
                    Spells["R"].CastOnUnit(Player);
                    return;
                }
                Spells["R"].Cast(UltTarget);
            }
        }