Ejemplo n.º 1
0
        private static void LaneClearEvent()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady() && AxeCount < 2 && Orbwalker.CanAttack())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(600) && x.IsMinion()).ToList();

                    if (minions.Any() && minions.Count >= 2)
                    {
                        Q.Cast();
                    }
                }

                if (LaneClearOption.GetSliderBool("LaneClearECount").Enabled&& E.IsReady())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToList();

                    if (minions.Any() && minions.Count >= LaneClearOption.GetSliderBool("LaneClearECount").Value)
                    {
                        var eFarm = E.GetLineFarmLocation(minions);

                        if (eFarm.MinionsHit >= LaneClearOption.GetSliderBool("LaneClearECount").Value)
                        {
                            E.Cast(eFarm.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        foreach (var minion in minions.Where(x => !x.IsDead && x.Health > 0))
                        {
                            if (LaneClearOption.GetBool("LaneClearQLH").Enabled)
                            {
                                if (minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                                {
                                    Q.Cast(minion);
                                }
                            }
                            else
                            {
                                Q.Cast(minion);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private static void LaneClear()
        {
            if (Variables.GameTimeTickCount - lastCastTime < 600 + Game.Ping ||
                Me.Buffs.Any(x => x.Name.ToLower() == "lucianpassivebuff"))
            {
                return;
            }

            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var qMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                    if (qMinions.Any())
                    {
                        foreach (var minion in qMinions)
                        {
                            var q2Minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q2.Range) && x.IsMinion()).ToList();

                            if (minion != null && minion.IsValidTarget(Q.Range) &&
                                Q2.GetHitCounts(q2Minions, Me.PreviousPosition.Extend(minion.PreviousPosition, 900)) >= 2)
                            {
                                Q.CastOnUnit(minion);
                                return;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.GetSliderBool("LaneClearQCount").Enabled&& Q.IsReady())
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        var qFarm = Q.GetCircularFarmLocation(minions);

                        if (qFarm.MinionsHit >= LaneClearOption.GetSliderBool("LaneClearQCount").Value)
                        {
                            Q.Cast(qFarm.Position);
                        }
                    }
                }

                if (LaneClearOption.GetSliderBool("LaneClearWCount").Enabled&& W.IsReady() && !isWActive)
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(W.Range) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        if (minions.Count >= LaneClearOption.GetSliderBool("LaneClearWCount").Value)
                        {
                            W.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 5
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.GetSliderBool("LaneClearQCount").Enabled&& Q.Ready)
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        var qFarm = Q.GetSpellFarmPosition(minions);

                        if (qFarm.HitCount >= LaneClearOption.GetSliderBool("LaneClearQCount").Value)
                        {
                            Q.Cast(qFarm.CastPosition);
                        }
                    }
                }

                if (LaneClearOption.GetSliderBool("LaneClearWCount").Enabled&& W.Ready && !isWActive)
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(W.Range) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        if (minions.Length >= LaneClearOption.GetSliderBool("LaneClearWCount").Value)
                        {
                            W.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        var qFarm = Q.GetLineFarmLocation(minions, 60);

                        if (qFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                        {
                            Q.Cast(qFarm.Position);
                        }
                    }
                }

                if (LaneClearOption.UseW && W.IsReady())
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(
                            x => x.IsValidTarget(Me.AttackRange + Me.BoundingRadius + 80) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        var wFarm = FarmPrediction.GetBestCircularFarmLocation(minions.Select(x => x.Position.ToVector2()).ToList(),
                                                                               Me.AttackRange + Me.BoundingRadius + 80, 280);

                        if (LaneClearOption.GetBool("LaneClearWRed").Enabled&& wFarm.MinionsHit >= 3)
                        {
                            var min = minions.FirstOrDefault(x => x.Distance(wFarm.Position) <= 80);

                            if (min != null)
                            {
                                HumanizerCardSelect.StartSelecting(HumanizerCards.Red);

                                Orbwalker.ForceTarget = min;
                                LastForcusTime        = Variables.GameTimeTickCount;
                            }
                        }
                        else if (LaneClearOption.GetBool("LaneClearWBlue").Enabled)
                        {
                            var min = minions.FirstOrDefault(x => x.Health < Me.GetSpellDamage(x, SpellSlot.W) + Me.GetAutoAttackDamage(x));

                            if (min != null && min.InAutoAttackRange())
                            {
                                HumanizerCardSelect.StartSelecting(HumanizerCards.Blue);

                                Orbwalker.ForceTarget = min;
                                LastForcusTime        = Variables.GameTimeTickCount;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.Ready)
                {
                    var qMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(1600f) && x.IsMinion()).ToArray();

                    if (qMinions.Any())
                    {
                        var qFarm = Q.GetSpellFarmPosition(qMinions);

                        if (qFarm.HitCount >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                        {
                            if (Q.IsCharging)
                            {
                                if (qFarm.CastPosition.DistanceToPlayer() <= Q.ChargedMaxRange)
                                {
                                    Q.Cast(qFarm.CastPosition);
                                }
                            }
                            else
                            {
                                Q.StartCharging(Game.CursorPos);
                            }
                        }
                    }
                }

                if (Q.IsCharging)
                {
                    return;
                }

                if (LaneClearOption.UseE && E.Ready)
                {
                    var eMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToArray();

                    if (eMinions.Any())
                    {
                        var eFarm = E.GetSpellFarmPosition(eMinions);

                        if (eFarm.HitCount >= LaneClearOption.GetSlider("LaneClearECount").Value)
                        {
                            E.Cast(eFarm.CastPosition);
                        }
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var qMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(1600f) && x.IsMinion()).ToList();

                    if (qMinions.Any())
                    {
                        var qFarm = Q.GetLineFarmLocation(qMinions);

                        if (qFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                        {
                            if (Q.IsCharging)
                            {
                                if (qFarm.Position.DistanceToPlayer() <= Q.ChargedMaxRange)
                                {
                                    Q.ShootChargedSpell(qFarm.Position);
                                }
                            }
                            else
                            {
                                Q.StartCharging();
                            }
                        }
                    }
                }

                if (Q.IsCharging)
                {
                    return;
                }

                if (LaneClearOption.UseE && E.IsReady())
                {
                    var eMinions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToList();

                    if (eMinions.Any())
                    {
                        var eFarm = E.GetCircularFarmLocation(eMinions);

                        if (eFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearECount").Value)
                        {
                            E.Cast(eFarm.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(R.Range) && x.IsMinion()).ToArray();

                if (minions.Any())
                {
                    if (LaneClearOption.UseR && R.Ready && LaneClearOption.GetSlider("LaneClearRLimit").Value >= GetRCount)
                    {
                        var rMinion =
                            minions.FirstOrDefault(x => x.DistanceToPlayer() > Me.AttackRange + Me.BoundingRadius);

                        if (rMinion != null && rMinion.IsValidTarget(R.Range))
                        {
                            R.Cast(rMinion);
                        }
                    }

                    if (LaneClearOption.UseE && E.Ready)
                    {
                        var eMinions = minions.Where(x => x.IsValidTarget(E.Range)).ToArray();
                        var eFarm    = E.GetSpellFarmPosition(eMinions);

                        if (eFarm.HitCount >= LaneClearOption.GetSlider("LaneClearECount").Value)
                        {
                            E.Cast(eFarm.CastPosition);
                        }
                    }

                    if (LaneClearOption.UseQ && Q.Ready)
                    {
                        var qMinion =
                            minions.Where(x => x.IsValidTarget(Q.Range))
                            .FirstOrDefault(
                                x =>
                                x.Health <Me.GetSpellDamage(x, SpellSlot.Q) &&
                                          x.Health> Me.GetAutoAttackDamage(x));

                        if (qMinion != null && qMinion.IsValidTarget(Q.Range))
                        {
                            Q.Cast(qMinion);
                        }
                    }
                }
            }
        }
Ejemplo n.º 10
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana() && LaneClearOption.UseQ && Q.IsReady())
            {
                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();

                if (minions.Any())
                {
                    var qFarm = Q.GetLineFarmLocation(minions);

                    if (qFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                    {
                        Q.Cast(qFarm.Position);
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.Ready)
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToArray();
                    if (minions.Any())
                    {
                        var qFarm = Q.GetSpellFarmPosition(minions);

                        if (qFarm.HitCount >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                        {
                            Q.Cast(qFarm.CastPosition);
                        }
                    }
                }

                if (LaneClearOption.UseE && E.Ready)
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToArray();

                    if (minions.Any() && minions.Length >= LaneClearOption.GetSlider("LaneClearECount").Value)
                    {
                        E.Cast();
                    }
                }

                if (LaneClearOption.UseR && R.Ready &&
                    R.GetBasicSpell().Ammo >= LaneClearOption.GetSlider("LaneClearRLimit").Value)
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(R.Range) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        var rFarm = R.GetSpellFarmPosition(minions);

                        if (rFarm.HitCount >= LaneClearOption.GetSlider("LaneClearRCount").Value)
                        {
                            R.Cast(rFarm.CastPosition);
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToList();
                    if (minions.Any())
                    {
                        var qFarm = Q.GetCircularFarmLocation(minions);

                        if (qFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearQCount").Value)
                        {
                            Q.Cast(qFarm.Position);
                        }
                    }
                }

                if (LaneClearOption.UseE && E.IsReady())
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToList();

                    if (minions.Any() && minions.Count >= LaneClearOption.GetSlider("LaneClearECount").Value)
                    {
                        E.Cast(Me.PreviousPosition);
                    }
                }

                if (LaneClearOption.UseR && R.IsReady() &&
                    R.Ammo >= LaneClearOption.GetSlider("LaneClearRLimit").Value)
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(R.Range) && x.IsMinion()).ToList();

                    if (minions.Any())
                    {
                        var rFarm = R.GetLineFarmLocation(minions);

                        if (rFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearRCount").Value)
                        {
                            R.Cast(rFarm.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private static void LaneClearEvent()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.GetSliderBool("LaneClearE").Enabled&& E.IsReady())
                {
                    var KSCount =
                        GameObjects.EnemyMinions.Where(
                            x => x.IsValidTarget(E.Range) && x.IsMinion())
                        .Where(x => x.Buffs.Any(a => a.Name.ToLower().Contains("kalistaexpungemarker")))
                        .Count(x => x.Health < E.GetKalistaRealDamage(x));

                    if (KSCount > 0 && KSCount >= LaneClearOption.GetSliderBool("LaneClearE").Value)
                    {
                        E.Cast();
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseE && E.IsReady())
                {
                    var eKillMinionsCount =
                        GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion())
                        .Count(
                            x =>
                            x.DistanceToPlayer() <= E.Range && x.Buffs.Any(b => b.Name.ToLower() == "twitchdeadlyvenom") &&
                            x.Health < GetRealEDamage(x));

                    if (eKillMinionsCount >= LaneClearOption.GetSlider("LaneClearECount").Value)
                    {
                        E.Cast();
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(E.Range) && x.IsMinion()).ToList();

                if (minions.Any())
                {
                    if (LaneClearOption.UseE && E.IsReady())
                    {
                        var eFarm = E.GetCircularFarmLocation(minions);

                        if (eFarm.MinionsHit >= LaneClearOption.GetSlider("LaneClearECount").Value)
                        {
                            E.Cast(eFarm.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 16
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseW && W.Ready)
                {
                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(W.Range) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        var wFarm = W.GetSpellFarmPosition(minions);

                        if (wFarm.HitCount >= LaneClearOption.GetSlider("LaneClearWCount").Value)
                        {
                            W.Cast(wFarm.CastPosition);
                        }
                    }
                }
            }
        }
Ejemplo n.º 17
0
        private static void LaneClear()
        {
            if (LaneClearOption.GetBool("LaneClearReload").Enabled&& !Me.HasBuff("JhinPassiveReload"))
            {
                return;
            }

            if (LaneClearOption.HasEnouguMana())
            {
                var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range + 300) && x.IsMinion()).ToList();

                if (minions.Any())
                {
                    var minion = minions.MinOrDefault(x => x.Health);

                    if (LaneClearOption.UseQ && Q.IsReady())
                    {
                        if (minion != null && minion.IsValidTarget(Q.Range) && minions.Count >= 2 &&
                            minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                        {
                            Q.Cast(minion);
                        }
                    }

                    if (LaneClearOption.UseW && W.IsReady())
                    {
                        var wFarm = W.GetLineFarmLocation(minions);

                        if (wFarm.MinionsHit >= 3)
                        {
                            W.Cast(wFarm.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 18
0
        private static void LaneClear()
        {
            if (LaneClearOption.HasEnouguMana())
            {
                if (LaneClearOption.UseQ && Q.IsReady())
                {
                    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))
                        .ToList();

                    if (minions.Any() && minions.Count > 1)
                    {
                        var minion         = minions.OrderBy(m => m.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);
                        }
                    }
                }
            }
        }
Ejemplo n.º 19
0
        private static void PreAttack(object sender, PreAttackEventArgs Args)
        {
            if (Args.Target == null || Me.IsDead || Args.Target.IsDead || !Args.Target.IsValidTarget())
            {
                return;
            }

            switch (Args.Target.Type)
            {
            case GameObjectType.obj_AI_Hero:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Combo)
                {
                    if (ComboOption.UseQ && Q.Ready)
                    {
                        var target = (Obj_AI_Hero)Args.Target;

                        if (!target.IsDead && target.IsValidAutoRange())
                        {
                            if (Me.HasBuff("asheqcastready"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;

            case GameObjectType.obj_AI_Minion:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    if (Args.Target.IsMob())
                    {
                        if (JungleClearOption.HasEnouguMana() && JungleClearOption.UseQ && Q.Ready)
                        {
                            var mob = (Obj_AI_Minion)Args.Target;

                            if (!mob.IsValidAutoRange() ||
                                !(mob.Health > Me.GetAutoAttackDamage(mob) * 2) ||
                                !MobsName.Contains(mob.UnitSkinName.ToLower()))
                            {
                                return;
                            }

                            if (Me.HasBuff("asheqcastready"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            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.HasBuff("asheqcastready"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 20
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type != OrbwalkerType.AfterAttack)
            {
                return;
            }

            havePassive = false;

            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 = Args.Target as AIHeroClient;

                    if (target != null && target.IsValidTarget())
                    {
                        if (ComboOption.GetBool("ComboEReset").Enabled&& E.IsReady())
                        {
                            ResetELogic(target);
                        }
                        else if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range))
                        {
                            Q.CastOnUnit(target);
                        }
                        else if (ComboOption.UseW && W.IsReady())
                        {
                            if (ComboOption.GetBool("ComboWLogic").Enabled)
                            {
                                W2.Cast(target.PreviousPosition);
                            }
                            else
                            {
                                var wPred = W.GetPrediction(target);

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

            case GameObjectType.AIMinionClient:
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                {
                    var mob = (AIMinionClient)Args.Target;
                    if (mob != null && mob.IsValidTarget() && mob.GetJungleType() != JungleType.Unknown && MyManaManager.SpellFarm && JungleClearOption.HasEnouguMana())
                    {
                        if (JungleClearOption.UseE && E.IsReady())
                        {
                            E.Cast(Me.PreviousPosition.Extend(Game.CursorPos, 130));
                        }
                        else if (JungleClearOption.UseQ && Q.IsReady())
                        {
                            Q.CastOnUnit(mob);
                        }
                        else if (JungleClearOption.UseW && W.IsReady())
                        {
                            W2.Cast(mob.PreviousPosition);
                        }
                    }
                }
            }
            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.UseE && E.IsReady())
                        {
                            E.Cast(Me.PreviousPosition.Extend(Game.CursorPos, 130));
                        }
                        else if (LaneClearOption.UseW && W.IsReady())
                        {
                            W.Cast(Game.CursorPos);
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 21
0
        private static void PreAttack(object sender, PreAttackEventArgs 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.UseW && W.Ready)
                        {
                            W.Cast();
                        }
                    }
                }
            }
            break;

            case GameObjectType.obj_AI_Minion:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    if (JungleClearOption.HasEnouguMana() && Args.Target.IsMob() && GetPassiveCount < 3)
                    {
                        if (JungleClearOption.UseW && W.Ready)
                        {
                            W.Cast();
                        }
                    }
                }
            }
            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 && MyManaManager.SpellFarm && LaneClearOption.HasEnouguMana(true))
                {
                    if (Me.CountEnemyHeroesInRange(800) == 0)
                    {
                        if (LaneClearOption.UseW && W.Ready)
                        {
                            W.Cast();
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 22
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)
            {
                return;
            }

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

                    if (target != null && target.IsValidTarget(E.Range))
                    {
                        if (ComboOption.UseE && E.Ready && ComboOption.GetBool("ComboEOnlyAfterAA").Enabled)
                        {
                            E.CastOnUnit(target);
                        }
                    }
                }
            }
            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 && MyManaManager.SpellFarm && LaneClearOption.HasEnouguMana(true))
                {
                    if (Me.CountEnemyHeroesInRange(800) == 0)
                    {
                        if (LaneClearOption.UseE && E.Ready)
                        {
                            E.CastOnUnit(Args.Target as Obj_AI_Base);

                            if (LaneClearOption.UseQ && Q.Ready)
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 23
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;
            }
        }
Ejemplo n.º 24
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.º 25
0
        //private static void OnGapcloser(AIHeroClient target, GapcloserArgs Args)
        //{
        //    if (R.IsReady() && target != null && target.IsValidTarget(R.Range))
        //    {
        //        switch (Args.Type)
        //        {
        //            case SpellType.Melee:
        //                if (target.IsValidTarget(target.AttackRange + target.BoundingRadius + 100))
        //                {
        //                    R.CastOnUnit(target);
        //                }
        //                break;
        //            case SpellType.Dash:
        //            case SpellType.SkillShot:
        //            case SpellType.Targeted:
        //                {
        //                    R.CastOnUnit(target);
        //                }
        //                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:
                {
                    var target = (AIHeroClient)Args.Target;
                    if (target != null && target.IsValidTarget())
                    {
                        if (Orbwalker.ActiveMode == OrbwalkerMode.Combo)
                        {
                            if (MiscOption.GetBool("Forcus", "Forcustarget").Enabled)
                            {
                                foreach (
                                    var forcusTarget in
                                    GameObjects.EnemyHeroes.Where(
                                        x => x.InAutoAttackRange() && x.HasBuff("TristanaEChargeSound")))
                                {
                                    Orbwalker.ForceTarget = forcusTarget;
                                    LastForcusTime        = Variables.GameTimeTickCount;
                                }
                            }

                            if (ComboOption.UseQ && Q.IsReady())
                            {
                                if (target.HasBuff("TristanaEChargeSound") || target.HasBuff("TristanaECharge"))
                                {
                                    Q.Cast();
                                }

                                if (ComboOption.GetBool("ComboQAlways").Enabled)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                        else if (Orbwalker.ActiveMode == OrbwalkerMode.Harass ||
                                 Orbwalker.ActiveMode == OrbwalkerMode.LaneClear && MyManaManager.SpellFarm)
                        {
                            if (MiscOption.GetBool("Forcus", "Forcustarget").Enabled)
                            {
                                foreach (
                                    var forcusTarget in
                                    GameObjects.EnemyHeroes.Where(
                                        x => x.InAutoAttackRange() && x.HasBuff("TristanaEChargeSound")))
                                {
                                    Orbwalker.ForceTarget = forcusTarget;
                                    LastForcusTime        = Variables.GameTimeTickCount;
                                }
                            }
                        }
                    }
                }
                break;

                case GameObjectType.AIMinionClient:
                {
                    var mob = (AIMinionClient)Args.Target;
                    if (mob != null && mob.IsValidTarget() && mob.GetJungleType() != JungleType.Unknown)
                    {
                        if (JungleClearOption.HasEnouguMana())
                        {
                            if (JungleClearOption.UseQ && Q.IsReady())
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
                break;
                }
            }

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

                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(E.Range))
                        {
                            if (ComboOption.UseE && E.IsReady() && ComboOption.GetBool("ComboEOnlyAfterAA").Enabled)
                            {
                                E.CastOnUnit(target);
                            }
                        }
                    }
                }
                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.UseE && E.IsReady())
                            {
                                E.CastOnUnit(Args.Target as AIBaseClient);

                                if (LaneClearOption.UseQ && Q.IsReady())
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
                break;
                }
            }
        }
Ejemplo n.º 26
0
        private static void PostAttack(object sender, PostAttackEventArgs Args)
        {
            havePassive = false;

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

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

                    if (target != null && target.IsValidTarget())
                    {
                        if (ComboOption.GetBool("ComboEReset").Enabled&& E.Ready)
                        {
                            ResetELogic(target);
                        }
                        else if (ComboOption.UseQ && Q.Ready && target.IsValidTarget(Q.Range))
                        {
                            Q.CastOnUnit(target);
                        }
                        else if (ComboOption.UseW && W.Ready)
                        {
                            if (ComboOption.GetBool("ComboWLogic").Enabled)
                            {
                                W2.Cast(target.ServerPosition);
                            }
                            else
                            {
                                var wPred = W.GetPrediction(target);

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

            case GameObjectType.obj_AI_Minion:
            {
                if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
                {
                    if (Args.Target.IsMob() && MyManaManager.SpellFarm && JungleClearOption.HasEnouguMana())
                    {
                        var mob = Args.Target as Obj_AI_Minion;

                        if (mob != null && mob.IsValidTarget())
                        {
                            if (JungleClearOption.UseE && E.Ready)
                            {
                                E.Cast(Me.ServerPosition.Extend(Game.CursorPos, 130));
                            }
                            else if (JungleClearOption.UseQ && Q.Ready)
                            {
                                Q.CastOnUnit(mob);
                            }
                            else if (JungleClearOption.UseW && W.Ready)
                            {
                                W2.Cast(mob.ServerPosition);
                            }
                        }
                    }
                }
            }
            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 && MyManaManager.SpellFarm && LaneClearOption.HasEnouguMana(true))
                {
                    if (Me.CountEnemyHeroesInRange(800) == 0)
                    {
                        if (LaneClearOption.UseE && E.Ready)
                        {
                            E.Cast(Me.ServerPosition.Extend(Game.CursorPos, 130));
                        }
                        else if (LaneClearOption.UseW && W.Ready)
                        {
                            W.Cast(Game.CursorPos);
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 27
0
        private static void OnAction(object sender, OrbwalkerActionArgs Args)
        {
            if (Args.Type != OrbwalkerType.BeforeAttack)
            {
                return;
            }

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

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

                        if (!target.IsDead && target.InAutoAttackRange())
                        {
                            if (Me.HasBuff("asheqcastready"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;

            case GameObjectType.AIMinionClient:
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                {
                    if (Args.Target is AIMinionClient)
                    {
                        var mob = (AIMinionClient)Args.Target;
                        if (mob != null && mob.GetJungleType() != JungleType.Unknown)
                        {
                            if (JungleClearOption.HasEnouguMana() && JungleClearOption.UseQ && Q.IsReady())
                            {
                                if (!mob.InAutoAttackRange() ||
                                    !(mob.Health > Me.GetAutoAttackDamage(mob) * 2) ||
                                    !(mob.GetJungleType() == JungleType.Legendary || mob.GetJungleType() == JungleType.Large))
                                {
                                    return;
                                }

                                if (Me.HasBuff("asheqcastready"))
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
            }
            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.HasBuff("asheqcastready"))
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
            }
            break;
            }
        }
Ejemplo n.º 28
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;
                }
            }
        }
Ejemplo n.º 29
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;
                }
            }
        }
Ejemplo n.º 30
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 || Orbwalker.ActiveMode == OrbwalkerMode.None)
            {
                return;
            }

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

            case GameObjectType.AIMinionClient:
            {
                if (Orbwalker.ActiveMode == OrbwalkerMode.LaneClear)
                {
                    var minion = (AIMinionClient)Args.Target;
                    if (minion != null && minion.IsValidTarget())
                    {
                        if (minion.IsMinion())
                        {
                            if (LaneClearOption.HasEnouguMana() && LaneClearOption.UseW && W.IsReady())
                            {
                                var minions =
                                    GameObjects.EnemyMinions.Count(
                                        x =>
                                        x.IsValidTarget(Me.AttackRange + Me.BoundingRadius + 200) &&
                                        x.IsMinion());

                                if (minions >= 3)
                                {
                                    W.Cast();
                                }
                            }
                        }
                        else if (minion.GetJungleType() != JungleType.Unknown)
                        {
                            if (JungleClearOption.HasEnouguMana() && JungleClearOption.UseW && W.IsReady())
                            {
                                if (!minion.InAutoAttackRange() ||
                                    !(minion.Health > Me.GetAutoAttackDamage(minion) * 2) ||
                                    minion.GetJungleType() == JungleType.Small)
                                {
                                    return;
                                }

                                W.Cast();
                            }
                        }
                    }
                }
            }
            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.UseW && W.IsReady())
                    {
                        if (Me.CountEnemyHeroesInRange(850) == 0)
                        {
                            W.Cast();
                        }
                    }
                }
            }
            break;
            }
        }