Exemplo n.º 1
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);
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(1500);

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

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

                    if (HarassOption.UseE && E.IsReady() && target.IsValidTarget() && !target.HasBuffOfType(BuffType.SpellShield))
                    {
                        if (HitECount(target) >= HarassOption.GetSlider("HarassECount").Value)
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Exemplo n.º 3
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);
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseW && W.IsReady())
                {
                    var target = HarassOption.GetTarget(W.Range);

                    if (target.IsValidTarget(W.Range) && target.DistanceToPlayer() > Q.Range)
                    {
                        var wPred = W.GetPrediction(target);

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

                if (HarassOption.UseQ && Q.IsReady())
                {
                    var target = HarassOption.GetTarget(bigGunRange);

                    if (target.IsValidTarget(bigGunRange) && Orbwalker.CanAttack())
                    {
                        if (target.CountEnemyHeroesInRange(150) >= 2 &&
                            Me.Mana > R.Mana + Q.Mana * 2 + W.Mana &&
                            target.DistanceToPlayer() > Q.Range)
                        {
                            if (Orbwalker.CanAttack())
                            {
                                Q.Cast();
                            }
                        }

                        if (target.DistanceToPlayer() > Q.Range &&
                            Me.Mana > R.Mana + Q.Mana * 2 + W.Mana)
                        {
                            if (Orbwalker.CanAttack())
                            {
                                Q.Cast();
                            }
                        }
                    }
                    else
                    {
                        if (Me.HasBuff("JinxQ") && Q.IsReady())
                        {
                            Q.Cast();
                        }
                    }
                }
                else if (Me.HasBuff("JinxQ") && Q.IsReady())
                {
                    Q.Cast();
                }
            }
        }
Exemplo n.º 5
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
            {
                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.UseQ && Q.Ready && target.IsValidTarget(Q.Range))
                        {
                            Q.CastOnUnit(target);
                        }
                        else if (ComboOption.UseW && ComboOption.GetBool("ComboWAA").Enabled&& W.Ready &&
                                 target.IsValidTarget(W.Range) && HasPassive(target))
                        {
                            var wPred = W.GetPrediction(target);

                            if (wPred.HitChance >= HitChance.High)
                            {
                                W.Cast(wPred.UnitPosition);
                            }
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed ||
                             Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana())
                        {
                            if (HarassOption.UseQ && Q.Ready && target.IsValidTarget(Q.Range))
                            {
                                Q.CastOnUnit(target);
                            }
                            else if (HarassOption.UseW && W.Ready && target.IsValidTarget(W.Range) &&
                                     HasPassive(target))
                            {
                                var wPred = W.GetPrediction(target);

                                if (wPred.HitChance >= HitChance.High)
                                {
                                    W.Cast(wPred.UnitPosition);
                                }
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 6
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
            {
                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.UseQ && Q.Ready)
                        {
                            if (!isWActive)
                            {
                                var qPred = Q.GetPrediction(target);

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

                        if (ComboOption.UseW && W.Ready)
                        {
                            W.Cast();
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed ||
                             Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.ChampionName))
                        {
                            if (HarassOption.UseQ && Q.Ready)
                            {
                                var qPred = Q.GetPrediction(target);

                                if (qPred.HitChance >= HitChance.High)
                                {
                                    Q.Cast(qPred.CastPosition);
                                }
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 7
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(Q.Range);

                if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                {
                    CastQ(target);
                }
            }
        }
Exemplo 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;
            }
        }
Exemplo 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;
            }
        }
Exemplo 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();
                        }
                    }
                }
            }
        }
Exemplo n.º 11
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana() && HarassOption.UseQ && Q.IsReady())
            {
                var target = HarassOption.GetTarget(Q.Range);

                if (target.IsValidTarget(Q.Range))
                {
                    var qPred = Q.GetPrediction(target);

                    if (qPred.Hitchance >= HitChance.High)
                    {
                        Q.Cast(qPred.UnitPosition);
                    }
                }
            }
        }
Exemplo n.º 12
0
        private static void HarassEvent()
        {
            if (HarassOption.HasEnouguMana() && HarassOption.UseE && E.IsReady())
            {
                var target = HarassOption.GetTarget(E.Range);

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

                    if (ePred.Hitchance >= HitChance.High ||
                        ePred.Hitchance >= HitChance.Medium && ePred.AoeTargetsHitCount > 1)
                    {
                        E.Cast(ePred.CastPosition);
                    }
                }
            }
        }
Exemplo n.º 13
0
        //private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args)
        //{
        //    if (E.IsReady() && target != null && target.IsValidTarget(E.Range))
        //    {
        //        switch (Args.Type)
        //        {
        //            case SpellType.Melee:
        //                if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
        //                {
        //                    var ePred = E.GetPrediction(target);
        //                    E.Cast(ePred.UnitPosition);
        //                }
        //                break;
        //            case SpellType.Dash:
        //            case SpellType.SkillShot:
        //            case SpellType.Targeted:
        //                {
        //                    var ePred = E.GetPrediction(target);
        //                    E.Cast(ePred.UnitPosition);
        //                }
        //                break;
        //        }
        //    }
        //}

        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type == OrbwalkerType.BeforeAttack)
            {
                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0 || !Q.IsReady())
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    var target = (AIHeroClient)Args.Target;
                    if (target != null && target.InAutoAttackRange())
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (ComboOption.UseQ && AxeOption.GetSlider("CatchCount").Value >= AxeCount)
                            {
                                Q.Cast();
                            }
                        }
                        else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass || Orbwalker.ActiveMode == OrbwalkerMode.LaneClear &&
                                 MyManaManager.SpellHarass)
                        {
                            if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.CharacterName))
                            {
                                if (HarassOption.UseQ)
                                {
                                    if (AxeCount < 2)
                                    {
                                        Q.Cast();
                                    }
                                }
                            }
                        }
                    }
                }
                break;
                }
            }
        }
Exemplo n.º 14
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();
                        }
                    }
                }
            }
        }
Exemplo n.º 15
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                if (HarassOption.UseW && W.IsReady() && !Me.HasBuff("AsheQAttack"))
                {
                    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);
                        }
                    }
                }
            }
        }
Exemplo n.º 16
0
        private static void OnPreAttack(object sender, PreAttackEventArgs Args)
        {
            if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0 || !Q.Ready)
            {
                return;
            }

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

                if (target != null && target.IsValidAutoRange())
                {
                    if (Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        if (ComboOption.UseQ && AxeOption.GetSlider("CatchCount").Value >= AxeCount)
                        {
                            Q.Cast();
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed || Orbwalker.Mode == OrbwalkingMode.Laneclear &&
                             MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.ChampionName))
                        {
                            if (HarassOption.UseQ)
                            {
                                if (AxeCount < 2)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 17
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(R.Range);

                if (target.IsValidTarget(R.Range))
                {
                    if (HarassOption.UseR && R.Ready && HarassOption.GetSlider("HarassRLimit").Value >= GetRCount &&
                        target.IsValidTarget(R.Range))
                    {
                        var rPred = R.GetPrediction(target);

                        if (rPred.HitChance >= HitChance.High)
                        {
                            R.Cast(rPred.CastPosition);
                        }
                    }

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

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

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

                        if (ePred.HitChance >= HitChance.High)
                        {
                            E.Cast(ePred.UnitPosition);
                        }
                    }
                }
            }
        }
Exemplo n.º 18
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;
                        }
                    }
                }
            }
        }
Exemplo n.º 19
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(R.Range);

                if (target.IsValidTarget(R.Range))
                {
                    if (HarassOption.UseR && R.IsReady() &&
                        R.Ammo >= HarassOption.GetSlider("HarassRLimit").Value&&
                        target.IsValidTarget(R.Range))
                    {
                        var rPred = R.GetPrediction(target);

                        if (rPred.Hitchance >= HitChance.High)
                        {
                            R.Cast(rPred.UnitPosition);
                        }
                    }

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

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

                    if (HarassOption.UseE && E.IsReady() && target.InAutoAttackRange())
                    {
                        E.Cast(Me.PreviousPosition);
                    }
                }
            }
        }
Exemplo n.º 20
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(R.Range);

                if (target.IsValidTarget(R.Range))
                {
                    if (HarassOption.UseR && R.Ready &&
                        R.GetBasicSpell().Ammo >= HarassOption.GetSlider("HarassRLimit").Value&&
                        target.IsValidTarget(R.Range))
                    {
                        var rPred = R.GetPrediction(target);

                        if (rPred.HitChance >= HitChance.High)
                        {
                            R.Cast(rPred.UnitPosition);
                        }
                    }

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

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

                    if (HarassOption.UseE && E.Ready && target.IsValidAutoRange())
                    {
                        E.Cast();
                    }
                }
            }
        }
Exemplo n.º 21
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type == OrbwalkerType.NonKillableMinion)
            {
                if (Me.IsDead || Me.IsRecalling() || !Me.CanMoveMent())
                {
                    return;
                }

                if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                {
                    return;
                }

                if (LastHitOption.HasEnouguMana && LastHitOption.UseE && E.IsReady())
                {
                    var minion = Args.Target as AIMinionClient;
                    if (minion != null && minion.IsValidTarget(E.Range) && Me.CountEnemyHeroesInRange(600) == 0 &&
                        minion.Health < E.GetKalistaRealDamage(minion))
                    {
                        E.Cast();
                    }
                }
            }

            if (Args.Type == OrbwalkerType.BeforeAttack)
            {
                if (MiscOption.GetBool("Forcus", "ForcusAttack").Enabled&& Me.CanMoveMent() && Args.Target != null &&
                    !Args.Target.IsDead && Args.Target.Health > 0)
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo || Orbwalker.ActiveMode == OrbwalkerMode.Harass)
                    {
                        foreach (var target in GameObjects.EnemyHeroes.Where(x => !x.IsDead &&
                                                                             x.InAutoAttackRange() &&
                                                                             x.Buffs.Any(
                                                                                 a =>
                                                                                 a.Name.ToLower()
                                                                                 .Contains(
                                                                                     "kalistacoopstrikemarkally"))))
                        {
                            if (!target.IsDead && target.IsValidTarget(Me.GetRealAutoAttackRange(target)))
                            {
                                Orbwalker.ForceTarget = target;
                                LastForcusTime        = Variables.GameTimeTickCount;
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                    {
                        foreach (var target in GameObjects.Minions.Where(x => !x.IsDead && x.IsEnemy &&
                                                                         x.InAutoAttackRange() &&
                                                                         x.Buffs.Any(
                                                                             a =>
                                                                             a.Name.ToLower()
                                                                             .Contains(
                                                                                 "kalistacoopstrikemarkally"))))
                        {
                            if (!target.IsDead && target.IsValidTarget(Me.GetRealAutoAttackRange(target)))
                            {
                                Orbwalker.ForceTarget = target;
                                LastForcusTime        = Variables.GameTimeTickCount;
                            }
                        }
                    }
                }
            }

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

                if (Args.Target == null || Args.Target.IsDead || Args.Target.Health <= 0 || Me.IsDead || !Q.IsReady())
                {
                    return;
                }

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

                    if (target != null && !target.IsDead && target.IsValidTarget(Q.Range))
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (ComboOption.UseQ)
                            {
                                var qPred = Q.GetPrediction(target);

                                if (qPred.Hitchance >= HitChance.High)
                                {
                                    Q.Cast(qPred.CastPosition);
                                }
                            }
                        }
                        else if (HarassOption.HasEnouguMana() &&
                                 (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                                  Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass))
                        {
                            if (HarassOption.UseQ)
                            {
                                var qPred = Q.GetPrediction(target);

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

                case GameObjectType.AIMinionClient:
                {
                    if (MyManaManager.SpellFarm && Orbwalker.ActiveMode == OrbwalkerMode.LaneClear &&
                        JungleClearOption.HasEnouguMana())
                    {
                        var mob = (AIMinionClient)Args.Target;
                        if (mob != null && mob.IsValidTarget(Q.Range) && mob.GetJungleType() != JungleType.Unknown)
                        {
                            if (JungleClearOption.UseQ)
                            {
                                Q.Cast(mob);
                            }
                        }
                    }
                }
                break;
                }
            }
        }
Exemplo n.º 22
0
        private static void Harass()
        {
            if (HarassOption.HasEnouguMana())
            {
                var target = HarassOption.GetTarget(1600f);

                if (target.IsValidTarget(1600f))
                {
                    if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(1600))
                    {
                        if (Q.IsCharging)
                        {
                            if (target != null && target.IsValidTarget(Q.ChargedMaxRange))
                            {
                                if (target.IsValidTarget(800))
                                {
                                    Q.ShootChargedSpell(target.Position);
                                }
                                else
                                {
                                    var qPred = Q.GetPrediction(target);

                                    if (qPred.Hitchance >= HitChance.High)
                                    {
                                        Q.ShootChargedSpell(qPred.CastPosition);
                                    }
                                }
                            }
                            else
                            {
                                foreach (
                                    var t in
                                    GameObjects.EnemyHeroes.Where(
                                        x => !x.IsDead && x.IsValidTarget(Q.ChargedMaxRange))
                                    .OrderBy(x => x.Health))
                                {
                                    if (t.IsValidTarget(800))
                                    {
                                        Q.ShootChargedSpell(t.Position);
                                    }
                                    else if (t.IsValidTarget(Q.ChargedMinRange))
                                    {
                                        var qPred = Q.GetPrediction(t);

                                        if (qPred.Hitchance >= HitChance.High)
                                        {
                                            Q.ShootChargedSpell(qPred.CastPosition);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            Q.StartCharging();
                        }
                    }

                    if (Q.IsCharging)
                    {
                        return;
                    }

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

                        if (ePred.Hitchance >= HitChance.High)
                        {
                            E.Cast(ePred.UnitPosition);
                        }
                    }
                }
            }
        }
Exemplo n.º 23
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type != OrbwalkerType.AfterAttack)
            {
                return;
            }

            if (Args.Target == null || Args.Target.IsDead || Args.Target.Health <= 0 || Me.IsDead || !Q.IsReady())
            {
                return;
            }

            switch (Args.Target.Type)
            {
            case GameObjectType.AIHeroClient:
            {
                var target = (AIHeroClient)Args.Target;
                if (target != null && target.IsValidTarget())
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        if (ComboOption.UseW && W.IsReady() && !isWActive)
                        {
                            if (GameObjects.EnemyHeroes.Any(x => x.IsValidTarget(W.Range)))
                            {
                                if (target.IsValidTarget(E.Range) && HaveEBuff(target))
                                {
                                    W.Cast();
                                }
                                else if (!E.IsReady() && target.IsValidTarget(350) && Variables.GameTimeTickCount - lastETime < 1500 + Game.Ping)
                                {
                                    W.Cast();
                                }
                            }
                        }
                        else if (ComboOption.UseQ && Q.IsReady())
                        {
                            var qPred = Q.GetPrediction(target);

                            if (qPred.Hitchance >= HitChance.High)
                            {
                                Q.Cast(qPred.UnitPosition);
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                             Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.CharacterName))
                        {
                            if (HarassOption.UseQ && Q.IsReady())
                            {
                                var qPred = Q.GetPrediction(target);

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

            case GameObjectType.AIMinionClient:
            {
                var mob = (AIMinionClient)Args.Target;
                if (mob != null && mob.IsValidTarget() && mob.GetJungleType() != JungleType.Unknown && mob.GetJungleType() != JungleType.Small)
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellFarm && JungleClearOption.HasEnouguMana())
                    {
                        if (JungleClearOption.UseQ && Q.IsReady() && mob.IsValidTarget(Q.Range))
                        {
                            Q.Cast(mob.PreviousPosition);
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 24
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);
                        }
                    }
                }
            }
        }
Exemplo n.º 25
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type != OrbwalkerType.BeforeAttack)
            {
                return;
            }

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

            switch (Args.Target.Type)
            {
            case GameObjectType.AIHeroClient:
            {
                var target = (AIHeroClient)Args.Target;
                if (target != null && target.IsValidTarget())
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        if (ComboOption.UseQ && Q.IsReady())
                        {
                            if (Me.HasBuff("JinxQ"))
                            {
                                if (target.Health < Me.GetAutoAttackDamage(target) * 3 &&
                                    target.DistanceToPlayer() <= Q.Range + 60)
                                {
                                    Q.Cast();
                                }
                                else if (Me.Mana < (rCoolDown == -1 ? 100 : (rCoolDown > 10 ? 130 : 150)))
                                {
                                    Q.Cast();
                                }
                                else if (target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast();
                                }
                            }
                            else
                            {
                                if (target.CountEnemyHeroesInRange(150) >= 2 &&
                                    Me.Mana > R.Mana + Q.Mana * 2 + W.Mana &&
                                    target.DistanceToPlayer() > Q.Range)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                             Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana())
                        {
                            if (HarassOption.UseQ && Q.IsReady())
                            {
                                if (Me.HasBuff("JinxQ"))
                                {
                                    if (target.DistanceToPlayer() >= bigGunRange)
                                    {
                                        Q.Cast();
                                    }
                                }
                                else
                                {
                                    if (target.CountEnemyHeroesInRange(150) >= 2 &&
                                        Me.Mana > R.Mana + Q.Mana * 2 + W.Mana &&
                                        target.DistanceToPlayer() > Q.Range)
                                    {
                                        Q.Cast();
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (Me.HasBuff("JinxQ") && Q.IsReady())
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;

            case GameObjectType.AIMinionClient:
            {
                var minion = (AIMinionClient)Args.Target;
                if (minion != null && minion.IsMinion())
                {
                    if (LaneClearOption.HasEnouguMana() && Q.IsReady() && LaneClearOption.UseQ)
                    {
                        var min     = (AIBaseClient)Args.Target;
                        var minions =
                            GameObjects.EnemyMinions.Where(x => x.IsValidTarget(bigGunRange) && x.IsMinion())
                            .ToList();

                        if (minions.Any() && min != null)
                        {
                            foreach (var m in minions.Where(x => x.NetworkId != min.NetworkId))
                            {
                                var count =
                                    ObjectManager.Get <AIMinionClient>().Count(x => x.Distance(m) <= 150);

                                if (m.DistanceToPlayer() <= bigGunRange)
                                {
                                    if (Me.HasBuff("JinxQ"))
                                    {
                                        if (LaneClearOption.GetSlider("LaneClearQCount").Value > count)
                                        {
                                            Q.Cast();
                                        }
                                        else if (min.Health > Me.GetAutoAttackDamage(min) * 1.1f)
                                        {
                                            Q.Cast();
                                        }
                                    }
                                    else if (!Me.HasBuff("JinxQ"))
                                    {
                                        if (LaneClearOption.GetSlider("LaneClearQCount").Value <= count)
                                        {
                                            Q.Cast();
                                        }
                                        else if (min.Health < Me.GetAutoAttackDamage(min) * 1.1f &&
                                                 min.DistanceToPlayer() > Q.Range)
                                        {
                                            Q.Cast();
                                        }
                                    }
                                }
                            }

                            if (minions.Count <= 2 && Me.HasBuff("JinxQ"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                    else
                    {
                        if (Me.HasBuff("JinxQ") && Q.IsReady())
                        {
                            Q.Cast();
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 26
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            if (Args.Target == null || Args.Target.IsDead || Args.Target.Health <= 0 || Me.IsDead || !Q.Ready)
            {
                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.UseW && W.Ready && !isWActive)
                        {
                            if (GameObjects.EnemyHeroes.Any(x => x.IsValidTarget(W.Range)))
                            {
                                if (target.IsValidTarget(E.Range) && HaveEBuff(target))
                                {
                                    W.Cast();
                                }
                                else if (!E.Ready && target.IsValidTarget(350) && Game.TickCount - lastETime < 1500 + Game.Ping)
                                {
                                    W.Cast();
                                }
                            }
                        }
                        else if (ComboOption.UseQ && Q.Ready)
                        {
                            var qPred = Q.GetPrediction(target);

                            if (qPred.HitChance >= HitChance.High)
                            {
                                Q.Cast(qPred.UnitPosition);
                            }
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed ||
                             Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.ChampionName))
                        {
                            if (HarassOption.UseQ && Q.Ready)
                            {
                                var qPred = Q.GetPrediction(target);

                                if (qPred.HitChance >= HitChance.High)
                                {
                                    Q.Cast(qPred.UnitPosition);
                                }
                            }
                        }
                    }
                }
            }
            break;

            case GameObjectType.obj_AI_Minion:
            {
                var mob = Args.Target as Obj_AI_Minion;

                if (mob != null && mob.IsMob() && mob.isBigMob())
                {
                    if (Orbwalker.Mode == OrbwalkingMode.Laneclear && MyManaManager.SpellFarm && JungleClearOption.HasEnouguMana())
                    {
                        if (JungleClearOption.UseQ && Q.Ready && mob.IsValidTarget(Q.Range))
                        {
                            Q.Cast(mob.ServerPosition);
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 27
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;
                }
            }
        }
Exemplo n.º 28
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)
            {
                return;
            }

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

                if (target != null && target.IsValidTarget())
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                        {
                            Q.CastOnUnit(target);
                        }
                        else if (ComboOption.UseW && ComboOption.GetBool("ComboWAA").Enabled&& W.IsReady() &&
                                 target.IsValidTarget(W.Range) && HasPassive(target))
                        {
                            var wPred = W.GetPrediction(target);

                            if (wPred.Hitchance >= HitChance.High)
                            {
                                W.Cast(wPred.UnitPosition);
                            }
                        }
                    }
                    else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                             Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                    {
                        if (HarassOption.HasEnouguMana())
                        {
                            if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                Q.CastOnUnit(target);
                            }
                            else if (HarassOption.UseW && W.IsReady() && target.IsValidTarget(W.Range) &&
                                     HasPassive(target))
                            {
                                var wPred = W.GetPrediction(target);

                                if (wPred.Hitchance >= HitChance.High)
                                {
                                    W.Cast(wPred.UnitPosition);
                                }
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Exemplo n.º 29
0
        //private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args)
        //{
        //    if (E.IsReady() && target != null && target.IsValidTarget(E.Range))
        //    {
        //        switch (Args.Type)
        //        {
        //            case SpellType.Melee:
        //                {
        //                    if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //            case SpellType.Dash:
        //                {
        //                    if (Args.EndPosition.DistanceToPlayer() <= 250 ||
        //                        target.PreviousPosition.DistanceToPlayer() <= 300)
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //            case SpellType.SkillShot:
        //            case SpellType.Targeted:
        //                {
        //                    if (target.PreviousPosition.DistanceToPlayer() <= 300)
        //                    {
        //                        E.Cast(Me.PreviousPosition.Extend(target.PreviousPosition, -E.Range));
        //                    }
        //                }
        //                break;
        //        }
        //    }
        //}


        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type == OrbwalkerType.BeforeAttack)
            {
                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                    {
                        var target = (AIHeroClient)Args.Target;
                        if (target != null && target.IsValidTarget(W.Range))
                        {
                            if (ComboOption.UseW && W.IsReady())
                            {
                                var pred = W.GetPrediction(target);
                                if (pred.Hitchance >= HitChance.High)
                                {
                                    W.Cast(pred.CastPosition);
                                }
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AITurretClient:
                case GameObjectType.HQClient:
                case GameObjectType.Barracks:
                case GameObjectType.BarracksDampenerClient:
                case GameObjectType.BuildingClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellFarm &&
                        LaneClearOption.HasEnouguMana(true))
                    {
                        if (LaneClearOption.UseW && W.IsReady())
                        {
                            W.Cast(Args.Target.Position);
                        }
                    }
                }
                break;
                }
            }

            if (Args.Type == OrbwalkerType.AfterAttack)
            {
                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    var target = (AIHeroClient)Args.Target;
                    if (target != null && target.IsValidTarget())
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                var qPred = Q.GetPrediction(target);
                                if (qPred.Hitchance >= HitChance.High)
                                {
                                    Q.Cast(qPred.CastPosition);
                                }
                            }
                        }
                        else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                                 Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                        {
                            if (!HarassOption.HasEnouguMana() ||
                                !HarassOption.GetHarassTargetEnabled(target.CharacterName))
                            {
                                return;
                            }

                            if (HarassOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                            {
                                var qPred = Q.GetPrediction(target);
                                if (qPred.Hitchance >= HitChance.High)
                                {
                                    Q.Cast(qPred.CastPosition);
                                }
                            }
                        }
                    }
                }
                break;
                }
            }
        }
Exemplo n.º 30
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type == OrbwalkerType.BeforeAttack)
            {
                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    var target = (AIHeroClient)Args.Target;
                    if (target != null && target.IsValidTarget())
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (ComboOption.UseW && W.IsReady())
                            {
                                W.Cast();
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AIMinionClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                    {
                        var mob = (AIMinionClient)Args.Target;
                        if (mob != null && mob.IsValidTarget() && mob.GetJungleType() != JungleType.Unknown &&
                            mob.GetJungleType() != JungleType.Small)
                        {
                            if (JungleClearOption.HasEnouguMana() && GetPassiveCount < 3)
                            {
                                if (JungleClearOption.UseW && W.IsReady())
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AITurretClient:
                case GameObjectType.HQClient:
                case GameObjectType.Barracks:
                case GameObjectType.BarracksDampenerClient:
                case GameObjectType.BuildingClient:
                {
                    if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellFarm && LaneClearOption.HasEnouguMana(true))
                    {
                        if (Me.CountEnemyHeroesInRange(800) == 0)
                        {
                            if (LaneClearOption.UseW && W.IsReady())
                            {
                                W.Cast();
                            }
                        }
                    }
                }
                break;
                }
            }

            if (Args.Type == OrbwalkerType.AfterAttack)
            {
                if (Args.Target == null || Args.Target.IsDead || !Args.Target.IsValidTarget() || Args.Target.Health <= 0)
                {
                    return;
                }

                switch (Args.Target.Type)
                {
                case GameObjectType.AIHeroClient:
                {
                    var target = (AIHeroClient)Args.Target;
                    if (target != null && target.IsValidTarget())
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (ComboOption.UseQ && Q.IsReady())
                            {
                                if (!isWActive)
                                {
                                    var qPred = Q.GetPrediction(target);

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

                            if (ComboOption.UseW && W.IsReady())
                            {
                                W.Cast();
                            }
                        }
                        else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                                 Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellHarass)
                        {
                            if (HarassOption.HasEnouguMana() && HarassOption.GetHarassTargetEnabled(target.CharacterName))
                            {
                                if (HarassOption.UseQ && Q.IsReady())
                                {
                                    var qPred = Q.GetPrediction(target);
                                    if (qPred.Hitchance >= HitChance.High)
                                    {
                                        Q.Cast(qPred.CastPosition);
                                    }
                                }
                            }
                        }
                    }
                }
                break;
                }
            }
        }