Ejemplo n.º 1
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(Q2.Range);

                if (target.IsValidTarget(Q2.Range))
                {
                    if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(Q2.Range))
                    {
                        QLogic(target, HarassOption.GetBool("HarassQ1").Enabled);
                    }

                    if (HarassOption.UseE && E.IsReady() && target.IsValidTarget(E.Range))
                    {
                        var ePred = E.GetPrediction(target);

                        if (ePred.Hitchance >= HitChance.High)
                        {
                            E.Cast(ePred.UnitPosition);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                if (HarassOption.UseE && E.IsReady())
                {
                    var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, true,
                                                          ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (target.IsValidTarget(E.Range))
                    {
                        if (HarassOption.GetBool("HarassE2Passive"))
                        {
                            if (target.IsValidTarget(E.Range) && Has2WStacks(target))
                            {
                                E.CastOnUnit(target, true);
                            }
                        }
                        else
                        {
                            if (CondemnCheck(Me.ServerPosition, target))
                            {
                                E.CastOnUnit(target, true);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseE && E.IsReady())
                {
                    var target = HarassOption.GetTarget(E.Range);

                    if (target.IsValidTarget(E.Range))
                    {
                        if (HarassOption.GetBool("HarassE2Passive").Enabled)
                        {
                            if (target.IsValidTarget(E.Range) && Has2WStacks(target))
                            {
                                E.CastOnUnit(target);
                            }
                        }
                        else
                        {
                            if (CondemnCheck(Me.PreviousPosition, target))
                            {
                                E.CastOnUnit(target);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseQ && Q.IsReady())
                {
                    var target = HarassOption.GetTarget(Q2.Range);

                    if (target != null && target.IsValidTarget(Q2.Range))
                    {
                        QLogic(target, HarassOption.GetBool("HarassQExtend").Enabled);
                    }
                }

                if (HarassOption.UseW && W.IsReady())
                {
                    var target = HarassOption.GetTarget(W.Range);

                    if (target != null && target.IsValidTarget(W.Range))
                    {
                        var wPred = W.GetPrediction(target);

                        if (wPred.Hitchance >= HitChance.High)
                        {
                            W.Cast(wPred.UnitPosition);
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                if (HarassOption.UseQ && Q.IsReady())
                {
                    foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(QExtend.Range) && HarassOption.GetHarassTarget(x.ChampionName)))
                    {
                        if (target.IsValidTarget(QExtend.Range))
                        {
                            QLogic(target, HarassOption.GetBool("HarassQExtend"));
                            return;
                        }
                    }
                }

                if (HarassOption.UseW && W.IsReady())
                {
                    foreach (var target in ObjectManager.Heroes.Enemies.Where(x => x.IsValidTarget(W.Range) && HarassOption.GetHarassTarget(x.ChampionName)))
                    {
                        if (target.IsValidTarget(W.Range))
                        {
                            var wPred = W.GetPrediction(target);

                            if (wPred.Hitchance >= HitChance.VeryHigh)
                            {
                                W.Cast(wPred.CastPosition, true);
                                return;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                if (E.IsReady())
                {
                    if (HarassOption.UseE)
                    {
                        var target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                        if (target.IsValidTarget(E.Range))
                        {
                            E.CastOnUnit(target, true);
                        }
                    }

                    if (HarassOption.GetBool("HarassEToMinion"))
                    {
                        foreach (var minion in MinionManager.GetMinions(E.Range).Where(m =>
                                                                                       m.Health < Me.GetAutoAttackDamage(m) && m.CountEnemiesInRange(m.BoundingRadius + 150) >= 1))
                        {
                            var etarget = E.GetTarget();

                            if (etarget != null)
                            {
                                return;
                            }

                            E.CastOnUnit(minion, true);
                            myOrbwalker.ForceTarget(minion);
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                if (HarassOption.UseQ && Q.IsReady())
                {
                    var target = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.CastOnUnit(target, true);
                    }
                    else if (target.IsValidTarget(Q.Range + 300) && HarassOption.GetBool("HarassQMinion"))
                    {
                        if (Me.HasBuff("JhinPassiveReload") || (!Me.HasBuff("JhinPassiveReload") &&
                                                                Me.CountEnemiesInRange(Orbwalker.GetRealAutoAttackRange(Me)) == 0))
                        {
                            var qPred       = Core.Prediction.GetPrediction(target, 0.25f);
                            var bestQMinion =
                                MinionManager.GetMinions(qPred.CastPosition, 300)
                                .Where(x => x.IsValidTarget(Q.Range))
                                .OrderBy(x => x.Distance(target))
                                .ThenBy(x => x.Health)
                                .FirstOrDefault();

                            if (bestQMinion != null)
                            {
                                Q.CastOnUnit(bestQMinion, true);
                            }
                        }
                    }
                }

                if (HarassOption.UseE && E.IsReady() && Utils.TickCount - LastECast > 2500 && !IsAttack)
                {
                    var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (eTarget.IsValidTarget(E.Range))
                    {
                        SpellManager.PredCast(E, eTarget, true);
                    }
                }

                if (HarassOption.UseW && W.IsReady())
                {
                    var target = TargetSelector.GetTarget(1500f, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (target.IsValidTarget(W.Range))
                    {
                        if (HarassOption.GetBool("HarassWOnly") && !HasPassive(target))
                        {
                            return;
                        }

                        SpellManager.PredCast(W, target, true);
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type != OrbwalkerType.AfterAttack)
            {
                return;
            }

            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0 ||
                wCd != 0 || W.Level == 0 || !W.IsReady() || isWActive)
            {
                return;
            }

            switch (Args.Target.Type)
            {
            case GameObjectType.AIHeroClient:
            {
                var target = Args.Target as AIHeroClient;

                if (target != null && target.IsValidTarget())
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        if (ComboOption.GetBool("UseWCombo").Enabled)
                        {
                            if (target.InAutoAttackRange())
                            {
                                Orbwalker.ResetAutoAttackTimer();
                                W.Cast();
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                             Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() &&
                            HarassOption.GetHarassTargetEnabled(target.CharacterName) &&
                            HarassOption.GetBool("UseWHarass").Enabled)
                        {
                            if (target.InAutoAttackRange())
                            {
                                Orbwalker.ResetAutoAttackTimer();
                                W.Cast();
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 9
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0 ||
                wCd != 0 || W.GetBasicSpell().Level == 0 || !W.Ready || isWActive)
            {
                return;
            }

            switch (Args.Target.Type)
            {
            case GameObjectType.obj_AI_Hero:
            {
                var target = Args.Target as Obj_AI_Hero;

                if (target != null && target.IsValidTarget())
                {
                    if (Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        if (ComboOption.GetBool("UseWCombo").Enabled)
                        {
                            if (target.IsValidAutoRange())
                            {
                                Orbwalker.ResetAutoAttackTimer();
                                W.Cast();
                            }
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed ||
                             Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() &&
                            HarassOption.GetHarassTargetEnabled(target.ChampionName) &&
                            HarassOption.GetBool("UseWHarass").Enabled)
                        {
                            if (target.IsValidAutoRange())
                            {
                                Orbwalker.ResetAutoAttackTimer();
                                W.Cast();
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 10
0
        private static void HarassEvent()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(Q.Range);

                if (target.IsValidTarget(Q.Range))
                {
                    if (HarassOption.UseQ && Q.IsReady())
                    {
                        var qPred = Q.GetPrediction(target);

                        if (qPred.Hitchance >= HitChance.High)
                        {
                            Q.Cast(qPred.CastPosition);
                        }
                    }

                    if (HarassOption.UseE && E.IsReady() && Variables.GameTimeTickCount - lastETime > 500 + Game.Ping)
                    {
                        if (HarassOption.GetBool("HarassESlow").Enabled&&
                            target.IsValidTarget(E.Range) &&
                            target.Buffs.Any(a => a.Name.ToLower().Contains("kalistaexpungemarker")))
                        {
                            var EKillMinion = GameObjects.Minions.Where(x => x.IsValidTarget(Me.GetRealAutoAttackRange(x)))
                                              .FirstOrDefault(x => x.Buffs.Any(a => a.Name.ToLower().Contains("kalistaexpungemarker")) &&
                                                              x.DistanceToPlayer() <= E.Range && x.Health < E.GetKalistaRealDamage(x));

                            if (EKillMinion != null && EKillMinion.IsValidTarget(E.Range) &&
                                target.IsValidTarget(E.Range))
                            {
                                E.Cast();
                            }
                        }

                        if (HarassOption.GetSliderBool("HarassELeave").Enabled&&
                            target.DistanceToPlayer() >= 800 &&
                            target.Buffs.Find(a => a.Name.ToLower().Contains("kalistaexpungemarker")).Count >=
                            HarassOption.GetSliderBool("HarassELeave").Value)
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                if (target.IsValidTarget(Q.Range))
                {
                    if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                    {
                        SpellManager.PredCast(Q, target);
                    }

                    if (HarassOption.UseE && E.IsReady() && target.IsValidTarget(E.Range) &&
                        target.HasBuff("kalistaexpungemarker"))
                    {
                        var buffcount = target.GetBuffCount("kalistaexpungemarker");

                        if (HarassOption.GetBool("HarassELeave") && target.DistanceToPlayer() >= 800 &&
                            target.IsValidTarget(E.Range) &&
                            buffcount >= HarassOption.GetSlider("HarassECount"))
                        {
                            E.Cast(true);
                        }

                        if (HarassOption.GetBool("HarassESlow"))
                        {
                            var EKillMinion = MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All,
                                                                       MinionTeam.NotAlly)
                                              .FirstOrDefault(x => x.HasBuff("kalistaexpungemarker") &&
                                                              x.DistanceToPlayer() <= E.Range && x.Health < GetRealEDamage(x));

                            if (EKillMinion != null && EKillMinion.DistanceToPlayer() <= E.Range &&
                                target.IsValidTarget(E.Range))
                            {
                                E.Cast(true);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseW && W.IsReady())
                {
                    var target = HarassOption.GetTarget(W.Range);

                    if (target.IsValidTarget(W.Range))
                    {
                        var wPred = W.GetPrediction(target);

                        if (wPred.Hitchance >= HitChance.High)
                        {
                            W.Cast(wPred.CastPosition);
                        }
                    }
                }

                if (HarassOption.UseE && E.IsReady())
                {
                    var target = HarassOption.GetTarget(E.Range);

                    if (target.IsValidTarget(E.Range))
                    {
                        if (HarassOption.GetBool("HarassEStack").Enabled)
                        {
                            if (target.DistanceToPlayer() > E.Range * 0.8 && target.IsValidTarget(E.Range) &&
                                GetEStackCount(target) >= HarassOption.GetSlider("HarassEStackCount").Value)
                            {
                                E.Cast();
                            }
                        }

                        if (HarassOption.GetBool("HarassEFull").Enabled&& GetEStackCount(target) >= 6)
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                var target = TargetSelector.GetTarget(QExtend.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                if (target.IsValidTarget(QExtend.Range))
                {
                    if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(QExtend.Range))
                    {
                        QLogic(target, HarassOption.GetBool("HarassQ1"));
                    }

                    if (HarassOption.UseE && E.IsReady() && target.IsValidTarget(E.Range))
                    {
                        E.Cast(target.Position, true);
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (E.IsReady())
                {
                    if (HarassOption.UseE)
                    {
                        var target = HarassOption.GetTarget(E.Range);

                        if (target.IsValidTarget(E.Range))
                        {
                            E.CastOnUnit(target);
                        }
                    }

                    if (HarassOption.GetBool("HarassEToMinion").Enabled)
                    {
                        foreach (
                            var minion in
                            GameObjects.EnemyMinions.Where(
                                x =>
                                x.IsValidTarget(E.Range) && x.IsMinion() && x.Health < Me.GetAutoAttackDamage(x) &&
                                x.CountEnemyHeroesInRange(x.BoundingRadius + 150) >= 1))
                        {
                            var target = HarassOption.GetTarget(E.Range);

                            if (target != null)
                            {
                                return;
                            }

                            E.CastOnUnit(minion);
                            Orbwalker.ForceTarget = minion;
                            LastForcusTime        = Variables.GameTimeTickCount;
                        }
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana)
            {
                if (HarassOption.UseW && W.IsReady())
                {
                    var wTarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (wTarget.IsValidTarget(W.Range))
                    {
                        SpellManager.PredCast(W, wTarget, true);
                    }
                }

                if (HarassOption.UseE && E.IsReady())
                {
                    var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, true, ObjectManager.Heroes.Enemies.Where(x => !HarassOption.GetHarassTarget(x.ChampionName)));

                    if (eTarget.IsValidTarget(E.Range))
                    {
                        if (HarassOption.GetBool("HarassEStack"))
                        {
                            if (eTarget.DistanceToPlayer() > E.Range * 0.8 && eTarget.IsValidTarget(E.Range) &&
                                GetEStackCount(eTarget) >= HarassOption.GetSlider("HarassEStackCount"))
                            {
                                E.Cast();
                            }
                        }

                        if (HarassOption.GetBool("HarassEFull") && GetEStackCount(eTarget) >= 6)
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 16
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            Orbwalker.ForceTarget(null);

            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() ||
                Args.Target.Health <= 0 || Orbwalker.Mode == OrbwalkingMode.None)
            {
                return;
            }

            switch (Args.Target.Type)
            {
            case GameObjectType.obj_AI_Hero:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Combo)
                {
                    if (ComboOption.GetBool("ComboAQA").Enabled)
                    {
                        var target = Args.Target as Obj_AI_Hero;

                        if (target != null && !target.IsDead && Q.Ready)
                        {
                            AfterQLogic(target);
                        }
                    }
                }
                else if (Orbwalker.Mode == OrbwalkingMode.Mixed || Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellHarass)
                {
                    if (HarassOption.HasEnouguMana() && HarassOption.UseQ)
                    {
                        var target = Args.Target as Obj_AI_Hero;

                        if (target != null && !target.IsDead && Q.Ready &&
                            HarassOption.GetHarassTargetEnabled(target.ChampionName))
                        {
                            if (HarassOption.GetBool("HarassQ2Passive").Enabled&& !Has2WStacks(target))
                            {
                                return;
                            }

                            AfterQLogic(target);
                        }
                    }
                }
            }
            break;

            case GameObjectType.obj_AI_Minion:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    if (Args.Target.IsMinion())
                    {
                        if (LaneClearOption.HasEnouguMana() && LaneClearOption.UseQ)
                        {
                            var minions =
                                GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Me.AttackRange + Me.BoundingRadius) && x.IsMinion())
                                .Where(m => m.Health <= Me.GetAutoAttackDamage(m) + Me.GetSpellDamage(m, SpellSlot.Q))
                                .ToArray();

                            if (minions.Any() && minions.Length >= 1)
                            {
                                var minion         = minions.OrderBy(m => m.Health).FirstOrDefault();
                                var afterQPosition = Me.ServerPosition.Extend(Game.CursorPos, Q.Range);

                                if (minion != null &&
                                    afterQPosition.Distance(minion.ServerPosition) <= Me.AttackRange + Me.BoundingRadius)
                                {
                                    Q.Cast(Game.CursorPos);
                                }
                            }
                        }
                    }
                    else if (Args.Target.IsMob())
                    {
                        if (JungleClearOption.HasEnouguMana() && JungleClearOption.UseQ)
                        {
                            Q.Cast(Game.CursorPos);
                        }
                    }
                }
            }
            break;

            case GameObjectType.obj_AI_Turret:
            case GameObjectType.obj_HQ:
            case GameObjectType.obj_Barracks:
            case GameObjectType.obj_BarracksDampener:
            case GameObjectType.obj_Building:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    if (LaneClearOption.HasEnouguMana(true) && LaneClearOption.UseQ)
                    {
                        if (Me.CountEnemyHeroesInRange(850) == 0)
                        {
                            if (Me.CanMoveMent())
                            {
                                Q.Cast(Game.CursorPos);
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 17
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type == OrbwalkerType.BeforeAttack)
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.Combo || Orbwalker.ActiveMode == OrbwalkerMode.Harass)
                {
                    var ForcusTarget =
                        GameObjects.EnemyHeroes.FirstOrDefault(
                            x => x.IsValidTarget(Me.AttackRange + Me.BoundingRadius + x.BoundingRadius + 50) && Has2WStacks(x));

                    if (MiscOption.GetBool("Forcus", "ForcusAttack").Enabled&& ForcusTarget != null &&
                        ForcusTarget.IsValidTarget(Me.AttackRange + Me.BoundingRadius - ForcusTarget.BoundingRadius + 15))
                    {
                        Orbwalker.ForceTarget = ForcusTarget;
                        LastForcusTime        = Variables.GameTimeTickCount;
                    }
                    else
                    {
                        Orbwalker.ForceTarget = null;
                    }
                }
            }

            if (Args.Type == OrbwalkerType.AfterAttack)
            {
                Orbwalker.ForceTarget = null;

                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() ||
                    Args.Target.Health <= 0 || Orbwalker.ActiveMode == OrbwalkerMode.None)
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        if (ComboOption.GetBool("ComboAQA").Enabled)
                        {
                            var target = (AIHeroClient)Args.Target;
                            if (target != null && !target.IsDead && Q.IsReady())
                            {
                                AfterQLogic(target);
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass || Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() && HarassOption.UseQ)
                        {
                            var target = (AIHeroClient)Args.Target;
                            if (target != null && !target.IsDead && Q.IsReady() &&
                                HarassOption.GetHarassTargetEnabled(target.CharacterName))
                            {
                                if (HarassOption.GetBool("HarassQ2Passive").Enabled&& !Has2WStacks(target))
                                {
                                    return;
                                }

                                AfterQLogic(target);
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AIMinionClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                    {
                        var m = (AIMinionClient)Args.Target;
                        if (m != null && m.IsValidTarget())
                        {
                            if (m.IsMinion())
                            {
                                if (LaneClearOption.HasEnouguMana() && LaneClearOption.UseQ)
                                {
                                    var minions =
                                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Me.AttackRange + Me.BoundingRadius) && x.IsMinion())
                                        .Where(x => x.Health <= Me.GetAutoAttackDamage(x) + Me.GetSpellDamage(x, SpellSlot.Q))
                                        .ToList();

                                    if (minions.Any() && minions.Count >= 1)
                                    {
                                        var minion         = minions.OrderBy(x => x.Health).FirstOrDefault();
                                        var afterQPosition = Me.PreviousPosition.Extend(Game.CursorPosRaw, Q.Range);

                                        if (minion != null &&
                                            afterQPosition.Distance(minion.PreviousPosition) <= Me.AttackRange + Me.BoundingRadius)
                                        {
                                            Q.Cast(Game.CursorPosRaw);
                                        }
                                    }
                                }
                            }
                            else if (m.GetJungleType() != JungleType.Unknown)
                            {
                                if (JungleClearOption.HasEnouguMana() && JungleClearOption.UseQ)
                                {
                                    Q.Cast(Game.CursorPosRaw);
                                }
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AITurretClient:
                case GameObjectType.HQClient:
                case GameObjectType.Barracks:
                case GameObjectType.BarracksDampenerClient:
                case GameObjectType.BuildingClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                    {
                        if (LaneClearOption.HasEnouguMana(true) && LaneClearOption.UseQ)
                        {
                            if (Me.CountEnemyHeroesInRange(850) == 0)
                            {
                                if (Me.CanMoveMent())
                                {
                                    Q.Cast(Game.CursorPosRaw);
                                }
                            }
                        }
                    }
                }
                break;
                }
            }
        }
Ejemplo n.º 18
0
        private static void AfterAttack(AttackableUnit unit, AttackableUnit tar)
        {
            if (!unit.IsMe || Me.IsDead)
            {
                return;
            }

            myOrbwalker.ForceTarget(null);

            if (tar == null || tar.IsDead || !tar.IsVisible)
            {
                return;
            }

            if (isComboMode)
            {
                if (ComboOption.GetBool("ComboAQA"))
                {
                    var target = tar as AIHeroClient;

                    if (target != null && !target.IsDead && !target.IsZombie && Q.IsReady())
                    {
                        AfterQLogic(target);
                        return;
                    }
                }
            }

            if (isHarassMode || (isFarmMode && MyManaManager.SpellHarass))
            {
                if (HarassOption.HasEnouguMana && HarassOption.UseQ)
                {
                    var target = tar as AIHeroClient;

                    if (target != null && !target.IsDead && !target.IsZombie && Q.IsReady() && HarassOption.GetHarassTarget(target.ChampionName))
                    {
                        if (HarassOption.GetBool("HarassQ2Passive") && !Has2WStacks(target))
                        {
                            return;
                        }

                        AfterQLogic(target);
                        return;
                    }
                }
            }

            if (isLaneClearMode && LaneClearOption.HasEnouguMana && LaneClearOption.UseQ)
            {
                if (tar.ObjectType == GameObjectType.obj_AI_Turret || tar.ObjectType == GameObjectType.obj_Turret ||
                    tar.ObjectType == GameObjectType.obj_HQ || tar.ObjectType == GameObjectType.obj_Barracks ||
                    tar.ObjectType == GameObjectType.obj_BarracksDampener)
                {
                    if (Me.CountEnemiesInRange(850) == 0)
                    {
                        if (Me.CanMoveMent())
                        {
                            Q.Cast(Game.CursorPosition, true);
                            return;
                        }
                    }
                }
                else if (tar.ObjectType == GameObjectType.obj_AI_Minion && tar.Team != GameObjectTeam.Neutral)
                {
                    var minions =
                        MinionManager.GetMinions(Me.Position, Me.AttackRange + Me.BoundingRadius)
                        .Where(m => m.Health <= Me.GetAutoAttackDamage(m) + Q.GetDamage(m))
                        .ToArray();

                    if (minions.Any() && minions.Length >= 1)
                    {
                        var minion         = minions.OrderBy(m => m.Health).FirstOrDefault();
                        var afterQPosition = Me.ServerPosition.Extend(Game.CursorPosition, Q.Range);

                        if (minion != null && afterQPosition.Distance(minion.ServerPosition) <= Me.AttackRange + Me.BoundingRadius)
                        {
                            if (Q.Cast(Game.CursorPosition, true))
                            {
                                myOrbwalker.ForceTarget(minion);
                                return;
                            }
                        }
                    }
                }
            }

            if (isJungleClearMode && tar.ObjectType == GameObjectType.obj_AI_Minion && tar.Team == GameObjectTeam.Neutral && JungleClearOption.HasEnouguMana && JungleClearOption.UseQ)
            {
                var mobs = MinionManager.GetMinions(Me.Position, 800, MinionTypes.All, MinionTeam.Neutral,
                                                    MinionOrderTypes.MaxHealth);

                if (mobs.Any())
                {
                    if (Me.CanMoveMent())
                    {
                        Q.Cast(Game.CursorPosition, true);
                    }
                }
            }
        }
Ejemplo n.º 19
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseQ && Q.IsReady())
                {
                    var target = HarassOption.GetTarget(Q.Range + 300);

                    if (target.IsValidTarget(Q.Range))
                    {
                        Q.Cast(target);
                    }
                    else if (target.IsValidTarget(Q.Range + 300) && HarassOption.GetBool("HarassQMinion").Enabled)
                    {
                        if (Me.HasBuff("JhinPassiveReload") || !Me.HasBuff("JhinPassiveReload") &&
                            Me.CountEnemyHeroesInRange(Me.AttackRange + Me.BoundingRadius) == 0)
                        {
                            var qPred =
                                SpellPrediction.GetPrediction(new SpellPrediction.PredictionInput {
                                Unit = target, Delay = 0.25f
                            });
                            var bestQMinion =
                                GameObjects.EnemyMinions.Where(x => x.IsValidTarget(300, true, qPred.CastPosition) && x.MaxHealth > 5)
                                .Where(x => x.IsValidTarget(Q.Range))
                                .OrderBy(x => x.Distance(target))
                                .ThenBy(x => x.Health)
                                .FirstOrDefault();

                            if (bestQMinion != null && bestQMinion.IsValidTarget(Q.Range))
                            {
                                Q.CastOnUnit(bestQMinion);
                            }
                        }
                    }
                }

                if (HarassOption.UseE && E.IsReady() && Variables.GameTimeTickCount - lastETime > 2500 && !isAttacking)
                {
                    var target = HarassOption.GetTarget(E.Range);

                    if (target.IsValidTarget(E.Range))
                    {
                        var ePred = E.GetPrediction(target);

                        if (ePred.Hitchance >= HitChance.High)
                        {
                            E.Cast(ePred.CastPosition);
                        }
                    }
                }

                if (HarassOption.UseW && W.IsReady())
                {
                    var target = HarassOption.GetTarget(1500);

                    if (target.IsValidTarget(W.Range))
                    {
                        if (HarassOption.GetBool("HarassWOnly").Enabled&& !HasPassive(target))
                        {
                            return;
                        }

                        var wPred = W.GetPrediction(target);

                        if (wPred.Hitchance >= HitChance.High)
                        {
                            W.Cast(wPred.UnitPosition);
                        }
                    }
                }
            }
        }