Beispiel #1
0
        private static bool PixCombo(AIHeroClient target, bool useQ, bool useE, bool killSteal = false)
        {
            if (!target.IsValidTarget() || !Pix.IsValid())
            {
                return(false);
            }

            useQ &= Q.IsReady() && (killSteal || !Q.HasManaCondition());
            useE &= useQ && E.IsReady() && (killSteal || !E.HasManaCondition()) &&
                    Player.Mana > ManaCostDictionary[Q.Slot][Q.Level] + ManaCostDictionary[E.Slot][E.Level];

            if (useQ && SpellManager.PixQ.IsInRange(target) && SpellManager.PixQ.Cast(target).IsCasted())
            {
                Console.WriteLine("[Pix] Cast Q");
                return(true);
            }

            if (!useE)
            {
                return(false);
            }

            var eqTarget = Pix.GetETarget(target);

            if (eqTarget == null || !E.CastOnUnit(eqTarget))
            {
                return(false);
            }

            Console.WriteLine("[Pix] Cast E");
            return(true);
        }
Beispiel #2
0
        private static bool PixCombo()
        {
            if (!Pix.IsValid())
            {
                return(false);
            }

            var mode = Orbwalker.ActiveMode.GetModeString();
            var useQ = Q.IsReady() && !Q.HasManaCondition() && Menu.Item("QPix" + mode).IsActive();
            var useE = E.IsReady() && !E.HasManaCondition() && Menu.Item("EQPix" + mode).IsActive();

            if (!useQ && !useE)
            {
                return(false);
            }

            var target = Pix.GetTarget();

            if (!target.IsValidTarget())
            {
                var eqTarget = Pix.GetTarget(Q.Range + E.Range);

                if (!eqTarget.IsValidTarget())
                {
                    return(false);
                }

                var eTarget = SpellManager.E.IsInRange(eqTarget) ? eqTarget : Pix.GetETarget(eqTarget);

                if (eTarget == null || !E.CastOnUnit(eTarget))
                {
                    return(false);
                }

                Console.WriteLine("[Pix] Cast E");
                return(true);
            }

            if (!useQ)
            {
                return(false);
            }

            if (useE && E.IsInRange(target) && E.CastOnUnit(target))
            {
                return(true);
            }

            if (!SpellManager.PixQ.Cast(target).IsCasted())
            {
                return(false);
            }

            Console.WriteLine("[Pix] Cast Q");
            return(true);
        }
Beispiel #3
0
        public override void OnFarm(Orbwalking.OrbwalkingMode mode)
        {
            if (!Menu.Item("QFarm").IsActive() || !Q.IsReady() || Q.HasManaCondition())
            {
                return;
            }

            var condition = mode == Orbwalking.OrbwalkingMode.LaneClear ? Menu.Item("QLC") : Menu.Item("QLH");

            if (condition == null || !condition.IsActive())
            {
                return;
            }

            var qMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
            var killable = qMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (killable != null && !killable.CanAAKill() && Q.Cast(killable).IsCasted())
            {
                return;
            }

            var pixMinions = Pix.GetMinions();

            killable = pixMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (Pix.IsValid() && killable != null && !killable.CanAAKill() &&
                SpellManager.PixQ.Cast(killable).IsCasted())
            {
                return;
            }

            if (mode == Orbwalking.OrbwalkingMode.LastHit)
            {
                return;
            }

            var pos   = Q.GetLineFarmLocation(qMinions);
            var spell = Q;

            var pixPos = Pix.GetFarmLocation();

            if (Pix.IsValid() && pixPos.MinionsHit > pos.MinionsHit)
            {
                pos   = pixPos;
                spell = SpellManager.PixQ;
            }

            if (pos.MinionsHit > 2 && spell.Cast(pos.Position))
            {
            }
        }
Beispiel #4
0
        public override void OnFarm()
        {
            if (!getKeyBindItem(qMenu, "QFarm") || !Q.IsReady() || Q.HasManaCondition())
            {
                return;
            }

            var condition = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ? getCheckBoxItem(qMenu, "QLC") : getCheckBoxItem(qMenu, "QLH");

            if (qMenu["QLC"] == null || qMenu["QLH"] == null || !condition)
            {
                return;
            }

            var qMinions = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
            var killable = qMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (killable != null && !killable.CanAAKill() && Q.Cast(killable).IsCasted())
            {
                return;
            }

            var pixMinions = Pix.GetMinions();

            killable = pixMinions.FirstOrDefault(o => o.Health < Q.GetDamage(o));

            if (Pix.IsValid() && killable != null && !killable.CanAAKill() &&
                SpellManager.PixQ.Cast(killable).IsCasted())
            {
                return;
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                return;
            }

            var pos   = Q.GetLineFarmLocation(qMinions);
            var spell = Q;

            var pixPos = Pix.GetFarmLocation();

            if (Pix.IsValid() && pixPos.MinionsHit > pos.MinionsHit)
            {
                pos   = pixPos;
                spell = SpellManager.PixQ;
            }

            if (pos.MinionsHit > 2 && spell.Cast(pos.Position))
            {
            }
        }
Beispiel #5
0
        private static void PixCombo()
        {
            if (!Q.IsReady() || Q.HasManaCondition() || !Pix.IsValid())
            {
                return;
            }

            var target = Pix.GetTarget();

            if (!target.IsValidTarget())
            {
                if (!E.IsReady() || !Menu.Item("EQPix").IsActive())
                {
                    return;
                }

                var eqTarget = Pix.GetTarget(Q.Range + E.Range);
                if (!eqTarget.IsValidTarget())
                {
                    return;
                }

                var eTarget = Pix.GetETarget(eqTarget);
                if (eTarget != null && E.CastOnUnit(eTarget))
                {
                    Console.WriteLine("[Pix] Cast E (->Q)");
                    return;
                }
                return;
            }

            if (Menu.Item("QPix").IsActive() && SpellManager.PixQ.Cast(target).IsCasted())
            {
                Console.WriteLine("[Pix] Cast Q");
            }
        }
Beispiel #6
0
        private static bool Killsteal()
        {
            if (!Menu.Item("KSEnabled").IsActive())
            {
                return(false);
            }

            var useQ = Menu.Item("KSQ").IsActive() && Q.IsReady();
            var useE = Menu.Item("KSE").IsActive() && E.IsReady();

            if (!useQ && !useE)
            {
                return(false);
            }

            foreach (var enemy in Enemies.Where(e => e.IsValidTarget(E.Range + Q.Range)).OrderBy(e => e.Health))
            {
                var eDmg = E.GetDamage(enemy);

                if (useE && E.IsInRange(enemy) && eDmg > enemy.Health && E.CastOnUnit(enemy))
                {
                    return(true);
                }

                var qDmg = Q.GetDamage(enemy);

                if (useQ && qDmg > enemy.Health)
                {
                    if (Q.IsInRange(enemy) && Q.Cast(enemy).IsCasted())
                    {
                        return(true);
                    }

                    if (Pix.IsValid() && SpellManager.PixQ.IsInRange(enemy) && SpellManager.PixQ.Cast(enemy).IsCasted())
                    {
                        return(true);
                    }
                }

                if (useQ && useE && E.IsInRange(enemy) && qDmg + eDmg > enemy.Health && E.CastOnUnit(enemy))
                {
                    QAfterETarget = enemy;
                    return(true);
                }

                if (Menu.Item("KSEQ").IsActive() && useQ && useE && qDmg > enemy.Health)
                {
                    var eTarget = Pix.GetETarget(enemy);
                    if (eTarget == null)
                    {
                        continue;
                    }

                    if (E.CastOnUnit(eTarget))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }