Пример #1
0
 private static void HarassHandler()
 {
     if (Player.ManaPercent < LissUtils.GetSlider("Harass.Mana"))
     {
         return;
     }
     if (LissUtils.Active("Harass.UseQ"))
     {
         var target = TargetSelector.GetTarget(Spells["Q"].Range, TargetSelector.DamageType.Magical);
         if (target != null)
         {
             CastQ(target);
         }
     }
     if (LissUtils.Active("Harass.UseW"))
     {
         var target = TargetSelector.GetTarget(Spells["W"].Range, TargetSelector.DamageType.Magical);
         if (target != null && target.IsValidTarget())
         {
             CastW(target);
         }
     }
     if (LissUtils.Active("Harass.UseE") && LissEMissile == null && !LissUtils.CanSecondE())
     {
         var target = TargetSelector.GetTarget(Spells["E"].Range, TargetSelector.DamageType.Magical);
         if (target != null && !target.IsInvulnerable)
         {
             CastE(target);
         }
     }
 }
Пример #2
0
        internal static float GetAvailableDamage(Obj_AI_Hero target)
        {
            if (ObjectManager.Player.Distance(target) > 3000) // save some fps
            {
                return(0);
            }

            bool   ExcludeE          = false;
            double totaldmgavailable = 0;

            if (SpellSlot.Q.IsReady() && LissUtils.Active("Combo.UseQ"))
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.Q);
            }
            if (SpellSlot.W.IsReady() && LissUtils.Active("Combo.UseW"))
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.W);
            }
            if (SpellSlot.E.IsReady() && LissUtils.Active("Combo.UseE") && !LissUtils.CanSecondE() && LissEMissile == null && !ExcludeE)
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.E);
            }
            if (SpellSlot.R.IsReady() && LissUtils.Active("Combo.UseR"))
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.R);
            }

            if (Spells["Ignite"].IsReady() && LissUtils.Active("Killsteal.UseIgnite"))
            {
                totaldmgavailable += Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            }

            return((float)totaldmgavailable);
        }
Пример #3
0
        private static void CastE(Obj_AI_Hero target)
        {
            if (LissEMissile == null && !LissUtils.CanSecondE())
            {
                var PredManager = new List <Tuple <Vector3, int, HitChance, List <Obj_AI_Hero> > >();
                foreach (
                    var hero in
                    HeroManager.Enemies
                    .Where(
                        h =>
                        h.IsValidTarget() && !h.IsZombie &&
                        Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["E"].Range))
                {
                    var pred = Spells["E"].GetPrediction(hero);
                    PredManager.Add(new Tuple <Vector3, int, HitChance, List <Obj_AI_Hero> >(pred.CastPosition,
                                                                                             pred.AoeTargetsHitCount, pred.Hitchance, pred.AoeTargetsHit));
                }

                // var OrganizedPredManager = PredManager.OrderByDescending(x => x.Item2);
                var BestLocation = PredManager.MaxOrDefault(x => x.Item4.Count);
                if (BestLocation.Item3 >= LissUtils.GetHitChance("Hitchance.E") && Spells["E"].IsReady())
                {
                    Spells["E"].Cast(BestLocation.Item1);
                }
            }
            SecondEChecker(target);
        }
Пример #4
0
        private static void WaveClearHandler()
        {
            var Minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    m.IsValidTarget() &&
                    (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range));



            if (SpellSlot.Q.IsReady() && LissUtils.Active("Waveclear.UseQ"))
            {
                var qminions =
                    Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range && m.IsValidTarget());
                MinionManager.FarmLocation QLocation = MinionManager.GetBestLineFarmLocation(qminions.Select(m => m.ServerPosition.To2D()).ToList(), Spells["Q"].Width, Spells["Q"].Range);
                if (QLocation.Position != null && QLocation.MinionsHit > 1)
                {
                    Spells["Q"].Cast(QLocation.Position);
                }
            }

            if (SpellSlot.E.IsReady() && LissUtils.Active("Waveclear.UseE"))
            {
                var eminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range && m.IsValidTarget());
                if (LissEMissile == null && !LissUtils.CanSecondE())
                {
                    var Eminions =
                        Minions.Where(
                            m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range);
                    MinionManager.FarmLocation ELocation =
                        MinionManager.GetBestLineFarmLocation(Eminions.Select(m => m.ServerPosition.To2D()).ToList(),
                                                              Spells["E"].Width, Spells["E"].Range);
                    if (ELocation.Position != null && ELocation.MinionsHit > 0)
                    {
                        Spells["E"].Cast(ELocation.Position);
                    }
                }
                else if (LissEMissile != null && LissUtils.Active("Waveclear.UseE2") && LissEMissile.Position == LissEMissile.EndPosition - 15 && SpellSlot.E.IsReady())
                {
                    if (LissUtils.PointUnderEnemyTurret(LissEMissile.Position) && LissUtils.Active("Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                }
            }

            if (SpellSlot.W.IsReady() && LissUtils.Active("Waveclear.UseW"))
            {
                var wminions = Minions.Where(m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range && m.IsValidTarget());
                if (wminions.Count() > LissUtils.GetSlider("Waveclear.Wcount"))
                {
                    Spells["W"].CastOnUnit(Player);
                }
            }
        }
Пример #5
0
 private static void EToMouse(Vector3 Position)
 {
     if (Spells["E"].IsReady() && LissEMissile == null && !LissUtils.CanSecondE())
     {
         Spells["E"].Cast(Position);
         jumping = true;
     }
 }
Пример #6
0
        private static void FarmHandler()
        {
            if (Player.ManaPercent < getSliderItem(lastHitMenu, "Farm.Mana"))
            {
                return;
            }
            var Minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    m.IsValidTarget() &&
                    (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range));

            if (SpellSlot.Q.IsReady() && getCheckBoxItem(lastHitMenu, "Farm.UseQ"))
            {
                var KillableMinionsQ =
                    Minions.Where(
                        m =>
                        m.Health <Player.GetSpellDamage(m, SpellSlot.Q) &&
                                  Vector3.Distance(m.ServerPosition, Player.ServerPosition)> Player.AttackRange);
                if (KillableMinionsQ.Any())
                {
                    Spells["Q"].Cast(KillableMinionsQ.FirstOrDefault().ServerPosition);
                }
            }
            if (SpellSlot.W.IsReady() && getCheckBoxItem(lastHitMenu, "Farm.UseW"))
            {
                var KillableMinionsW =
                    Minions.Where(
                        m =>
                        m.Health < Player.GetSpellDamage(m, SpellSlot.W) &&
                        Vector3.Distance(Player.ServerPosition, m.ServerPosition) < Spells["W"].Range);
                if (KillableMinionsW.Any())
                {
                    Spells["W"].CastOnUnit(Player);
                }
            }

            if (SpellSlot.E.IsReady() && getCheckBoxItem(lastHitMenu, "Farm.UseE") && LissEMissile == null &&
                !LissUtils.CanSecondE() && LissEMissile == null)
            {
                var KillableMinionsE =
                    Minions.Where(
                        m =>
                        m.Health <Player.GetSpellDamage(m, SpellSlot.E) &&
                                  Vector3.Distance(m.ServerPosition, Player.ServerPosition)> Player.AttackRange);
                if (KillableMinionsE.Any())
                {
                    Spells["E"].Cast(KillableMinionsE.FirstOrDefault().ServerPosition);
                }
            }
        }
Пример #7
0
        private static void CastE(AIHeroClient target)
        {
            if (LissEMissile == null && !LissUtils.CanSecondE())
            {
                var PredManager =
                    HeroManager.Enemies.Where(
                        h =>
                        h.IsValidTarget() && !h.IsZombie &&
                        Vector3.Distance(h.ServerPosition, Player.ServerPosition) <= Spells["E"].Range)
                    .Select(hero => Spells["E"].GetPrediction(hero))
                    .Select(
                        pred =>
                        new Tuple <Vector3, int, HitChance, List <AIHeroClient> >(pred.CastPosition,
                                                                                  pred.AoeTargetsHitCount, pred.Hitchance, pred.AoeTargetsHit));

                var BestLocation = PredManager.MaxOrDefault(x => x.Item4.Count);
                if (BestLocation.Item3 >= LissUtils.GetHitChance("Hitchance.E") && Spells["E"].IsReady())
                {
                    Spells["E"].Cast(BestLocation.Item1);
                }
            }
            SecondEChecker(target);
        }
Пример #8
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);
                }
            }
        }
Пример #9
0
        public static bool IsKillableFromPoint(this Obj_AI_Hero target, Vector3 Point, bool ExcludeE = false)
        {
            double totaldmgavailable = 0;

            if (SpellSlot.Q.IsReady() && LissUtils.Active("Combo.UseQ") && Vector3.Distance(Point, target.ServerPosition) < Spells["Q"].Range + 35)
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.Q);
            }
            if (SpellSlot.W.IsReady() && LissUtils.Active("Combo.UseW") && Vector3.Distance(Point, target.ServerPosition) < Spells["W"].Range + 35)
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.W);
            }
            if (SpellSlot.E.IsReady() && LissUtils.Active("Combo.UseE") && Vector3.Distance(Point, target.ServerPosition) < Spells["E"].Range + 35 && !LissUtils.CanSecondE() && LissEMissile == null && !ExcludeE)
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.E);
            }
            if (SpellSlot.R.IsReady() && LissUtils.Active("Combo.UseR") && Vector3.Distance(Point, target.ServerPosition) < Spells["Q"].Range + 35)
            {
                totaldmgavailable += Player.GetSpellDamage(target, SpellSlot.R);
            }

            if (Spells["Ignite"].IsReady() && LissUtils.Active("Killsteal.UseIgnite") && Vector3.Distance(Point, target.ServerPosition) < Spells["Ignite"].Range + 15)
            {
                totaldmgavailable += Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            }
            return(totaldmgavailable > target.Health);
        }
Пример #10
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);
                }
            }
        }
Пример #11
0
        private static void WaveClearHandler()
        {
            var Minions =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    m =>
                    m.LSIsValidTarget() && m.IsEnemy &&
                    (Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range ||
                     Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range));


            if (Spells["Q"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseQ"))
            {
                var qminions =
                    Minions.Where(
                        m =>
                        Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["Q"].Range &&
                        m.LSIsValidTarget());
                var QLocation =
                    MinionManager.GetBestLineFarmLocation(qminions.Select(m => m.ServerPosition.LSTo2D()).ToList(),
                                                          Spells["Q"].Width, Spells["Q"].Range);
                if (QLocation.Position != null && QLocation.MinionsHit > 1)
                {
                    Spells["Q"].Cast(QLocation.Position);
                }
            }

            if (Spells["E"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseE"))
            {
                if (LissEMissile == null && !LissUtils.CanSecondE())
                {
                    var Eminions =
                        Minions.Where(
                            m => Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["E"].Range);
                    var ELocation =
                        MinionManager.GetBestLineFarmLocation(Eminions.Select(m => m.ServerPosition.LSTo2D()).ToList(),
                                                              Spells["E"].Width, Spells["E"].Range);
                    if (ELocation.Position != null && ELocation.MinionsHit > 0)
                    {
                        Spells["E"].Cast(ELocation.Position);
                    }
                }
                else if (LissEMissile != null && getCheckBoxItem(clearMenu, "Waveclear.UseE2") &&
                         Vector2.Distance(MissilePosition, LissEMissile.EndPosition.LSTo2D()) <= 15 &&
                         Spells["E"].IsReady())
                {
                    if (LissUtils.PointUnderEnemyTurret(MissilePosition) &&
                        getCheckBoxItem(miscMenu, "Misc.DontETurret"))
                    {
                        return;
                    }
                    Spells["E"].CastOnUnit(Player);
                }
            }

            if (Spells["W"].IsReady() && getCheckBoxItem(clearMenu, "Waveclear.UseW"))
            {
                var wminions =
                    Minions.Where(
                        m =>
                        Vector3.Distance(m.ServerPosition, Player.ServerPosition) <= Spells["W"].Range &&
                        m.LSIsValidTarget());
                if (wminions.Count() > getSliderItem(clearMenu, "Waveclear.Wcount"))
                {
                    Spells["W"].CastOnUnit(Player);
                }
            }
        }