Esempio n. 1
0
        private static void LaneClear(GameObjectProcessSpellCastEventArgs Args)
        {
            if (Args.SData == null || !Orbwalking.IsAutoAttack(Args.SData.Name) || Args.Target == null ||
                Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear || !Args.Target.IsEnemy ||
                !ManaManager.HasEnoughMana(Menu.GetSlider("LaneClearMana")) || !ManaManager.SpellFarm)
            {
                return;
            }

            if (Menu.GetBool("LaneClearW") && W.IsReady())
            {
                if (Args.Target.Type == GameObjectType.obj_AI_Turret || Args.Target.Type == GameObjectType.obj_Turret ||
                    Args.Target.Type == GameObjectType.obj_LampBulb)
                {
                    if (!Args.Target.IsDead)
                    {
                        W.Cast();
                    }
                }
                else
                {
                    var minion = (Obj_AI_Minion)Args.Target;

                    if (minion != null && minion.Health <= DamageCalculate.GetWDamage(minion))
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(minion);
                    }
                }
            }
        }
Esempio n. 2
0
        private void Clearing()
        {
            bool  useQ        = Menu["farming"]["useq"].Enabled;
            bool  useW        = Menu["farming"]["usew"].Enabled;
            bool  useE        = Menu["farming"]["usee"].Enabled;
            float manapercent = Menu["farming"]["mana"].As <MenuSlider>().Value;

            if (manapercent < Player.ManaPercent())
            {
                if (useQ)
                {
                    foreach (var minion in GetEnemyLaneMinionsTargetsInRange(Q.Range))
                    {
                        if (minion.IsValidTarget(Q.Range) && minion != null)
                        {
                            Q.CastOnUnit(minion);
                        }
                    }
                }
                if (useW)
                {
                    foreach (var minion in GetEnemyLaneMinionsTargetsInRange(W.Range))
                    {
                        if (minion.IsValidTarget(W.Range) && minion != null)
                        {
                            W.Cast();
                            Orbwalker.ForceTarget(minion);
                        }
                    }
                }
                if (useE)
                {
                    foreach (var minion in GetEnemyLaneMinionsTargetsInRange(E.Range))
                    {
                        if (GameObjects.EnemyMinions.Count(h => h.IsValidTarget(250, false, false,
                                                                                minion.ServerPosition)) >=
                            Menu["farming"]["hite"].As <MenuSlider>().Value)
                        {
                            if (minion.IsValidTarget(E.Range) && minion != null)
                            {
                                E.Cast(minion);
                            }
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            var enemy =
                HeroManager.Enemies.Find(
                    e => e.Buffs.Any(b => b.Name.ToLower() == "quinnw_cosmetic" && e.IsValidTarget(E.Range)));
            if (enemy != null)
            {
                if (enemy.Distance(ObjectManager.Player.Position) > Marksman.Utils.Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, enemy);
                }
                Orbwalker.ForceTarget(enemy);
            }

            if (Q.IsReady() && GetValue<KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                    return;
                var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (t != null)
                    Q.Cast(t, false, true);
            }

            if (ComboActive || HarassActive)
            {
                var useQ = GetValue<bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useE = GetValue<bool>("UseE" + (ComboActive ? "C" : "H"));

                if (Marksman.Utils.Orbwalking.CanMove(100))
                {
                    if (E.IsReady() && useE)
                    {
                        var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                        if (t.IsValidTarget() && !t.IsZombie && !isHePantheon(t) && !t.HasBuff("QuinnW_Cosmetic", true))
                        {
                            E.CastOnUnit(t);
                        }
                    }

                    if (Q.IsReady() && useQ)
                    {
                        var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                        if (t.IsValidTarget() && !t.IsZombie)
                            Q.Cast(t);
                    }

                    if (IsValorMode && !E.IsReady())
                    {
                        var vTarget = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                        if (vTarget != null)
                        {
                            calculateValorDamage();
                            if (vTarget.Health >= ValorMinDamage && vTarget.Health <= ValorMaxDamage)
                                R.Cast();
                        }
                    }
                }
            }
        }
Esempio n. 4
0
        private static void Game_OnUpdate(EventArgs args)
        {
            #region On Update

            KillSteal();
            switch (Orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                LaneClear();
                JungleClear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Mixed();
                break;

            case Orbwalking.OrbwalkingMode.None:
                break;
            }

            if (Config.Item("fleekey").GetValue <KeyBind>().Active)
            {
                Flee();
            }

            #region force target

            var qSpell = Config.Item("focust").GetValue <bool>();
            var target = HeroManager.Enemies.Find(en => en.IsValidTarget(ObjectManager.Player.AttackRange)
                                                  &&
                                                  en.Buffs.Any(buff => buff.Name == "gnarwproc" && buff.Count == 2));
            if (qSpell && target != null)
            {
                Orbwalker.ForceTarget(target);
                Hud.SelectedUnit = target;
            }

            #endregion

            #region Auto Q

            var autoQ = Config.Item("autoq").GetValue <bool>();
            if (autoQ && target != null)
            {
                GnarSpells.QMini.Cast(target);
            }

            #endregion

            #endregion
        }
Esempio n. 5
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.UseW && W.Ready)
                {
                    var minions =
                        GameObjects.EnemyMinions.Where(
                            x => x.IsValidTarget(Me.AttackRange + Me.BoundingRadius + 80) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        var wFarm = FarmPrediction.GetCircleFarmPosition(minions,
                                                                         Me.AttackRange + Me.BoundingRadius + 80, 280);

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

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

                                Orbwalker.ForceTarget(min);
                                LastForcusTime = Game.TickCount;
                            }
                        }
                        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.IsValidAutoRange())
                            {
                                HumanizerCardSelect.StartSelecting(HumanizerCards.Blue);

                                Orbwalker.ForceTarget(min);
                                LastForcusTime = Game.TickCount;
                            }
                        }
                    }
                }
            }
        }
Esempio n. 6
0
        private static void LaneClear(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
            {
                return;
            }
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (Ismelee())
            {
                return;
            }
            var obj = (Obj_AI_Base)args.Target;

            if (!GetBool("usewlr", typeof(bool)))
            {
                return;
            }
            if (GetValue("minmana") > Player.ManaPercent)
            {
                return;
            }

            if (W.IsReady() && obj.Health > Player.GetAutoAttackDamage(obj) + 30)
            {
                W.Cast();
                Orbwalker.ForceTarget((Obj_AI_Base)args.Target);
                Orbwalking.ResetAutoAttackTimer();
            }
            var minions =
                MinionManager.GetMinions(Player.Position, 300);

            foreach (var min in minions.Where(
                         x => x.NetworkId != ((Obj_AI_Base)args.Target).NetworkId && x.Health < Player.GetAutoAttackDamage(x) + 15))
            {
                if (obj.Health < Player.GetAutoAttackDamage(obj))
                {
                    if (W.IsReady())
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(min);
                        Orbwalking.ResetAutoAttackTimer();
                    }
                }
            }
        }
Esempio n. 7
0
 /// <summary>
 /// Post update.
 /// </summary>
 public void PostUpdate()
 {
     if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
         Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
     {
         if (Cards.Has(CardColor.Red))
         {
             var range   = Player.AttackRange + Player.BoundingRadius * 1.5f;
             var minions = MinionManager.GetMinions(range, MinionTypes.All, MinionTeam.NotAlly);
             var pred    = MinionManager.GetBestCircularFarmLocation(
                 minions.Select(m => m.Position.To2D()).ToList(), 500, range);
             var target = minions.OrderBy(m => m.Distance(pred.Position)).FirstOrDefault();
             if (target != null)
             {
                 Orbwalker.ForceTarget(target);
             }
         }
     }
     if (!Cards.ShouldWait && Cards.Status != SelectStatus.Selecting && Cards.Status != SelectStatus.Selected)
     {
         Orbwalker.ForceTarget(null);
     }
     if (Cards.Status != SelectStatus.Selected)
     {
         if (Menu.Item(Menu.Name + ".manual.blue").GetValue <KeyBind>().Active)
         {
             Cards.Select(CardColor.Blue);
         }
         if (Menu.Item(Menu.Name + ".manual.red").GetValue <KeyBind>().Active)
         {
             Cards.Select(CardColor.Red);
         }
         if (Menu.Item(Menu.Name + ".manual.gold").GetValue <KeyBind>().Active)
         {
             Cards.Select(CardColor.Gold);
         }
     }
     if (HeroListManager.Enabled("q-immobile") && Q.IsReady())
     {
         var target =
             GameObjects.EnemyHeroes.FirstOrDefault(
                 t =>
                 t.IsValidTarget(Q.Range) && HeroListManager.Check("q-immobile", t) &&
                 BestTargetOnlyManager.Check("q-immobile", W, t) && IsImmobile(t));
         if (target != null)
         {
             var best = BestQPosition(
                 target, GameObjects.EnemyHeroes.Select(e => e as Obj_AI_Base).ToList(), HitChance.High);
             if (!best.Item2.Equals(Vector3.Zero) && best.Item1 >= 1)
             {
                 Q.Cast(best.Item2);
             }
         }
     }
 }
Esempio n. 8
0
        private static void LaneClearEvent()
        {
            try
            {
                if (Me.ManaPercent() >= ClearMenu["FlowersFiora.ClearMenu.LaneClearManaPercent"].Value)
                {
                    if (ClearMenu["FlowersFiora.ClearMenu.LaneClearTurret"].Enabled && Me.IsUnderEnemyTurret())
                    {
                        return;
                    }

                    var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion()).ToArray();

                    if (minions.Any())
                    {
                        foreach (var minion in minions)
                        {
                            if (ClearMenu["FlowersFiora.ClearMenu.LaneClearQ"].Enabled && Q.Ready)
                            {
                                if (minion.Health < Me.GetSpellDamage(minion, SpellSlot.Q))
                                {
                                    Q.CastOnUnit(minion);
                                }
                                else if (!ClearMenu["FlowersFiora.ClearMenu.LaneClearQLH"].Enabled && minion.IsValidTarget(Q.Range))
                                {
                                    Q.CastOnUnit(minion);
                                }
                            }

                            if (ClearMenu["FlowersFiora.ClearMenu.LaneClearE"].Enabled && E.Ready && Orbwalker.CanAttack())
                            {
                                if (
                                    minion.IsValidTarget(Me.AttackRange + Me.BoundingRadius + minion.BoundingRadius + 30) &&
                                    minion.Health <
                                    Me.GetAutoAttackDamage(minion) + Me.GetAutoAttackDamage(minion) * 1.4)
                                {
                                    E.Cast();
                                    Orbwalker.ForceTarget(minion);
                                }
                            }

                            if (ClearMenu["FlowersFiora.ClearMenu.LaneClearItem"].Enabled && minions.Count(x => x.IsValidTarget(400)) > 2)
                            {
                                ItemsUse(false, true, true);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.LaneClearEvent." + ex);
            }
        }
Esempio n. 9
0
 public override void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     foreach (
         var target in
         HeroManager.Enemies.Where(
             e =>
             e.IsValid && e.Distance(ObjectManager.Player) < Orbwalking.GetRealAutoAttackRange(null) + 65 &&
             e.IsVisible).Where(target => target.HasBuff("kindredcharge")))
     {
         Orbwalker.ForceTarget(target);
     }
 }
Esempio n. 10
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;
            }
        }
Esempio n. 11
0
        public static void Laneclear()
        {
            var AA  = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Orbwalking.GetRealAutoAttackRange(player));
            var AAj = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.Neutral);

            var lanemana   = Config.Item("laneclearmana").GetValue <Slider>().Value;
            var junglemana = Config.Item("jungleclearmana").GetValue <Slider>().Value;
            var jungleQ    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width,
                                                      MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
            var laneQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range + Q.Width);

            var Qjunglepos = Q.GetLineFarmLocation(jungleQ, Q.Width + 30);

            var Qfarmpos = Q.GetCircularFarmLocation(laneQ, Q.Width + 30);


            foreach (var minion in jungleQ)
            {
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Qjunglepos.MinionsHit >= 1 &&
                    Config.Item("jungleQ").GetValue <bool>() &&
                    player.ManaPercent >= junglemana)
                {
                    Q.Cast(minion);
                }
            }

            foreach (var minion in AAj)
            {
                if (minion.HasBuff("QuinnW"))
                {
                    Orbwalker.ForceTarget(minion);
                    player.IssueOrder(GameObjectOrder.AutoAttack, minion);
                }
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Qfarmpos.MinionsHit >= Config.Item("laneQhit").GetValue <Slider>().Value&&
                Config.Item("laneQ").GetValue <bool>() &&
                player.ManaPercent >= lanemana)
            {
                Q.Cast(Qfarmpos.Position);
            }

            foreach (var minion in AA)
            {
                if (minion.HasBuff("QuinnW") && minion.Health < player.CalcDamage(minion, Damage.DamageType.Physical,
                                                                                  15 + (player.Level * 10) + (player.FlatPhysicalDamageMod * 0.5) + player.GetAutoAttackDamage(minion)))
                {
                    Orbwalker.ForceTarget(minion);
                    player.IssueOrder(GameObjectOrder.AutoAttack, minion);
                }
            }
        }
Esempio n. 12
0
        private void LogicQ()
        {
            if (Program.Farm && !FishBoneActive && !Player.IsWindingUp && Orbwalker.GetTarget() == null && SebbyLib.Orbwalking.CanAttack() && Config.Item("farmQout", true).GetValue <bool>() && Player.Mana > RMANA + WMANA + EMANA + 10)
            {
                foreach (var minion in Cache.GetMinions(Player.Position, bonusRange() + 30).Where(
                             minion => !SebbyLib.Orbwalking.InAutoAttackRange(minion) && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget(minion);
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!SebbyLib.Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Program.Combo && (Player.Mana > RMANA + WMANA + 10 || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Program.Harass && !Player.IsWindingUp && SebbyLib.Orbwalking.CanAttack() && Config.Item("Qharras", true).GetValue <bool>() && !ObjectManager.Player.UnderTurret(true) && Player.Mana > RMANA + WMANA + EMANA + 20 && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Program.Combo && Player.Mana > RMANA + WMANA + 20 && Player.CountEnemiesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.Mana < RMANA + WMANA + 20)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.CountEnemiesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Farm)
            {
                Q.Cast();
            }
        }
Esempio n. 13
0
 private void OnOrbwalkingAfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     _lastAutoAttack = Game.Time;
     if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit ||
         Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
     {
         var bTarget = unit as Obj_AI_Base;
         if (bTarget != null)
         {
             _lastAfterFarmTarget = bTarget;
         }
     }
     Orbwalker.ForceTarget(null);
 }
Esempio n. 14
0
        private static void OnSpellCasts(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (args.Target.Type != GameObjectType.obj_AI_Minion)
            {
                return;
            }
            var usew = GetBool("usewl", typeof(bool));

            if (!usew)
            {
                return;
            }
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var minions =
                    MinionManager.GetMinions(Player.Position, 300);

                if (W.IsReady())
                {
                    if (((Obj_AI_Base)args.Target).Health > Player.GetAutoAttackDamage((Obj_AI_Base)args.Target) + 50)
                    {
                        W.Cast();
                        Orbwalking.ResetAutoAttackTimer();
                        Orbwalker.ForceTarget((Obj_AI_Base)args.Target);
                    }
                    foreach (var min in minions.Where(
                                 x => x.NetworkId != ((Obj_AI_Base)args.Target).NetworkId))
                    {
                        if (((Obj_AI_Base)args.Target).Health > Player.GetAutoAttackDamage((Obj_AI_Base)args.Target))
                        {
                            W.Cast();
                            Orbwalking.ResetAutoAttackTimer();
                            Orbwalker.ForceTarget(min);
                        }
                    }
                }
            }
        }
Esempio n. 15
0
        private void AABlock()
        {
            var enemy = TargetSelector.GetTarget(550, TargetSelector.DamageType.Magical);

            if (enemy.IsValidTarget() && (enemy.Health < Player.GetAutoAttackDamage(enemy)))
            {
                Orbwalker.ForceTarget(enemy);
            }
            else
            {
                Orbwalker.SetAttack(!Config.CBlockAA.GetValue <bool>());
            }
            //SebbyLib.OktwCommon.blockAttack = Config.Item("CBlockAA").GetValue<bool>();
        }
Esempio n. 16
0
        public static void Lasthit()
        {
            var AA = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Orbwalking.GetRealAutoAttackRange(player));

            foreach (var minion in AA)
            {
                if (minion.HasBuff("QuinnW") && minion.Health < player.CalcDamage(minion, Damage.DamageType.Physical,
                                                                                  15 + (player.Level * 10) + (player.FlatPhysicalDamageMod * 0.5) + player.GetAutoAttackDamage(minion)))
                {
                    Orbwalker.ForceTarget(minion);
                    player.IssueOrder(GameObjectOrder.AutoAttack, minion);
                }
            }
        }
Esempio n. 17
0
        private static void DoJungleclear()
        {
            try
            {
                var minion =
                    MinionManager.GetMinions(
                        Player.ServerPosition,
                        Q.Range,
                        MinionTypes.All,
                        MinionTeam.Neutral,
                        MinionOrderTypes.MaxHealth).OrderByDescending(x => x.MaxHealth).FirstOrDefault();

                if (minion == null)
                {
                    return;
                }

                if (Player.ManaPercent < Menu.Item("GFUELQuinn.jungleclear.Mana").GetValue <Slider>().Value)
                {
                    return;
                }

                var passiveTarget =
                    MinionManager.GetMinions(Player.Position, Q.Range + Q.Width)
                    .Find(x => x.HasBuff("quinnw") && x.IsValidTarget(Q.Range));
                if (passiveTarget != null)
                {
                    Orbwalker.ForceTarget(passiveTarget);
                }
                else
                {
                    Orbwalker.ForceTarget(null);
                }

                if (IsActive("GFUELQuinn.jungleclear.Q"))
                {
                    Q.Cast(minion);
                }

                if (IsActive("GFUELQuinn.jungleclear.Q"))
                {
                    E.CastOnUnit(minion);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Esempio n. 18
0
        /// <summary>
        ///     Combo logic test
        /// </summary>
        private static void DoCombo()
        {
            try
            {
                var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                if (target == null)
                {
                    return;
                }

                var passiveTarget = HeroManager.Enemies.Find(x => x.HasBuff("quinnw") && x.IsValidTarget(Q.Range));
                if (passiveTarget != null)
                {
                    Orbwalker.ForceTarget(passiveTarget);
                }
                else
                {
                    Orbwalker.ForceTarget(null);
                }

                if (IsActive("GFUELQuinn.Combo.Ghostblade"))
                {
                    var ghostBlade = ItemData.Youmuus_Ghostblade.GetItem();
                    if (ghostBlade.IsReady() && ghostBlade.IsOwned(Player) &&
                        target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player) + 100))
                    {
                        ghostBlade.Cast();
                    }
                }

                if (IsActive("GFUELQuinn.Combo.E") && target.Distance(Player.Position) < E.Range && E.IsReady())
                {
                    E.CastOnUnit(target);
                }

                if (IsActive("GFUELQuinn.Combo.Q") && target.Distance(Player.Position) < Q.Range && Q.IsReady())
                {
                    var prediction = Q.GetPrediction(target);
                    if (prediction.Hitchance >= HitChance.High)
                    {
                        Q.Cast(prediction.CastPosition);
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Esempio n. 19
0
        protected override void Combo()
        {
            var minionsInRange = MinionManager.GetMinions(Player.ServerPosition, Orbwalking.GetRealAutoAttackRange(null)).OrderBy(m => m.Armor).ToList();

            if (Player.CountEnemiesInRange(600) == 0 && Items.HasItem((int)ItemId.The_Bloodthirster, Player) && minionsInRange.Count != 0 && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Player.HealthPercent < 60)
            {
                Orbwalker.ForceTarget(minionsInRange.FirstOrDefault());
            }

            if (Player.CountEnemiesInRange(1000) == 0)
            {
                return;
            }
            base.Combo();
        }
Esempio n. 20
0
        private static void DoLaneclear()
        {
            try
            {
                var minion = MinionManager.GetMinions(Player.Position, Q.Range + Q.Width).FirstOrDefault();
                if (minion == null)
                {
                    return;
                }

                if (Player.ManaPercent < Menu.Item("GFUELQuinn.laneclear.Mana").GetValue <Slider>().Value)
                {
                    return;
                }

                var passiveTarget =
                    MinionManager.GetMinions(Player.Position, Q.Range + Q.Width)
                    .Find(x => x.HasBuff("quinnw") && x.IsValidTarget(Q.Range));
                if (passiveTarget != null)
                {
                    Orbwalker.ForceTarget(passiveTarget);
                }
                else
                {
                    Orbwalker.ForceTarget(null);
                }

                if (IsActive("GFUELQuinn.laneclear.Q"))
                {
                    if (GetCenterMinion().IsValidTarget())
                    {
                        Q.Cast(GetCenterMinion());
                    }
                }

                if (IsActive("GFUELQuinn.laneclear.E"))
                {
                    if (E.GetDamage(minion) > minion.Health)
                    {
                        E.CastOnUnit(minion);
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Esempio n. 21
0
        private static void OnUpdate()
        {
            if (Game.TickCount - LastForcusTime > Orbwalker.WindUpTime)
            {
                if (Orbwalker.Mode != OrbwalkingMode.None)
                {
                    Orbwalker.ForceTarget(null);
                }
            }

            if (Me.IsDead || Me.IsRecalling())
            {
                return;
            }

            if (E.GetBasicSpell().Level > 0)
            {
                E.Range = 630 + 7 * (Me.Level - 1);
            }

            if (R.GetBasicSpell().Level > 0)
            {
                R.Range = 630 + 7 * (Me.Level - 1);
            }

            if (MiscOption.GetKey("E", "SemiE").Enabled&& E.Ready)
            {
                OneKeyCastE();
            }

            KillSteal();

            if (Orbwalker.Mode == OrbwalkingMode.Combo)
            {
                Combo();
            }

            if (Orbwalker.Mode == OrbwalkingMode.Mixed)
            {
                Harass();
            }

            if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
            {
                FarmHarass();
            }
        }
Esempio n. 22
0
 private static void OnPreAttack(object sender, PreAttackEventArgs Args)
 {
     try
     {
         if (MiscMenu["FlowersKalista.MiscMenu.ForcusAttack"].Enabled && Me.CanMoveMent() && Args.Target != null &&
             !Args.Target.IsDead && Args.Target.Health > 0)
         {
             if (Orbwalker.Mode == OrbwalkingMode.Combo || Orbwalker.Mode == OrbwalkingMode.Mixed)
             {
                 foreach (var target in GameObjects.EnemyHeroes.Where(x => !x.IsDead &&
                                                                      x.IsValidAutoRange() &&
                                                                      x.Buffs.Any(
                                                                          a =>
                                                                          a.Name.ToLower()
                                                                          .Contains(
                                                                              "kalistacoopstrikemarkally"))))
                 {
                     if (target != null && !target.IsDead && target.IsValidTarget(Me.GetFullAttackRange(target)))
                     {
                         Orbwalker.ForceTarget(target);
                     }
                 }
             }
             else if (Orbwalker.Mode == OrbwalkingMode.Laneclear)
             {
                 foreach (var target in GameObjects.Minions.Where(x => !x.IsDead && x.IsEnemy &&
                                                                  x.IsValidAutoRange() &&
                                                                  x.Buffs.Any(
                                                                      a =>
                                                                      a.Name.ToLower()
                                                                      .Contains(
                                                                          "kalistacoopstrikemarkally"))))
                 {
                     if (target != null && !target.IsDead && target.IsValidTarget(Me.GetFullAttackRange(target)))
                     {
                         Orbwalker.ForceTarget(target);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Error in MyEventManager.OnPreAttack." + ex);
     }
 }
Esempio n. 23
0
        /// <summary>
        /// Flee
        /// </summary>
        public void Flee()
        {
            try
            {
                Orbwalker.SetAttack(false);

                Utility.DelayAction.Add(125, () => {
                    if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.CustomMode)
                    {
                        Orbwalker.SetAttack(true);
                    }
                });

                if (Menu.Item(Menu.Name + ".flee.w").GetValue <bool>())
                {
                    if (W.IsReady() || Cards.Status == SelectStatus.Ready)
                    {
                        var target = TargetSelector.GetTarget(W.Range, W.DamageType, false);
                        if (target != null)
                        {
                            var best = GetBestCard(target, "flee");
                            if (best.Any())
                            {
                                Cards.Select(best);
                                Orbwalker.ForceTarget(target);
                            }
                        }
                    }
                    if (Player.CanAttack && (Cards.Has(CardColor.Red) || Cards.Has(CardColor.Gold)))
                    {
                        var target =
                            GameObjects.EnemyHeroes.Where(e => Orbwalking.InAutoAttackRange(e) && e.IsValidTarget())
                            .OrderBy(e => e.Distance(Player))
                            .FirstOrDefault();
                        if (target != null)
                        {
                            Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Esempio n. 24
0
 private void OnCorePostUpdate(EventArgs args)
 {
     try
     {
         if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear ||
             Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit)
         {
             if (Cards.Has(CardColor.Red))
             {
                 var range   = Player.AttackRange + Player.BoundingRadius * 1.5f;
                 var minions = MinionManager.GetMinions(range, MinionTypes.All, MinionTeam.NotAlly);
                 var pred    =
                     MinionManager.GetBestCircularFarmLocation(
                         minions.Select(m => m.Position.To2D()).ToList(), 500, range);
                 var target = minions.OrderBy(m => m.Distance(pred.Position)).FirstOrDefault();
                 if (target != null)
                 {
                     Orbwalker.ForceTarget(target);
                 }
             }
         }
         if (!Cards.ShouldWait && Cards.Status != SelectStatus.Selecting && Cards.Status != SelectStatus.Selected)
         {
             Orbwalker.ForceTarget(null);
         }
         if (Cards.Status != SelectStatus.Selected)
         {
             if (Menu.Item(Menu.Name + ".manual.blue").GetValue <KeyBind>().Active)
             {
                 Cards.Select(CardColor.Blue);
             }
             if (Menu.Item(Menu.Name + ".manual.red").GetValue <KeyBind>().Active)
             {
                 Cards.Select(CardColor.Red);
             }
             if (Menu.Item(Menu.Name + ".manual.gold").GetValue <KeyBind>().Active)
             {
                 Cards.Select(CardColor.Gold);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Esempio n. 25
0
        internal static void Init(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs Args)
        {
            if (!sender.IsMe || Args.SData == null || !Orbwalking.IsAutoAttack(Args.SData.Name) || Args.Target == null)
            {
                return;
            }

            if (Orbwalking.isCombo && Args.Target.Type == GameObjectType.obj_AI_Hero)
            {
                SpellManager.CastItem();

                var target = (Obj_AI_Hero)Args.Target;

                if (target != null && !target.IsDead && !target.IsZombie)
                {
                    if (Menu.GetBool("ComboW") && W.IsReady() && Orbwalking.InAutoAttackRange(target))
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(target);
                    }
                }
            }

            if (Orbwalking.isHarass && Args.Target.Type == GameObjectType.obj_AI_Hero)
            {
                SpellManager.CastItem();

                var target = (Obj_AI_Hero)Args.Target;

                if (target != null && !target.IsDead && !target.IsZombie)
                {
                    if (Menu.GetBool("HarassW") && W.IsReady() && Orbwalking.InAutoAttackRange(target))
                    {
                        W.Cast();
                        Orbwalker.ForceTarget(target);
                    }
                }
            }

            if (Orbwalking.isLaneClear)
            {
                LaneClear(Args);
                JungleClear(Args);
            }
        }
Esempio n. 26
0
        private static void OnPostAttack(object sender, PostAttackEventArgs Args)
        {
            try
            {
                Orbwalker.ForceTarget(null);

                var target = Args.Target;// as Obj_AI_Base;

                if (target == null || target.IsDead || !target.IsValidTarget())
                {
                    return;
                }

                switch (Orbwalker.Mode)
                {
                case OrbwalkingMode.Combo:
                    if (BurstMenu["FlowersRiven.BurstMenu.Key"].As <MenuKeyBind>().Enabled)
                    {
                        BurstAfterAttackEvent();
                    }
                    else
                    {
                        if (ComboMenu["FlowersRiven.ComboMenu.Item"].Enabled)
                        {
                            UseItem();
                        }

                        ComboAfterAttackEvent(target);
                    }
                    break;

                case OrbwalkingMode.Mixed:
                    HarassAfterAttackEvent(target);
                    break;

                case OrbwalkingMode.Laneclear:
                    ClearFarmAfterAttackEvent(target);
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.OnPostAttack." + ex);
            }
        }
Esempio n. 27
0
        private static void OnUpdate(EventArgs args)
        {
            if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 2 || !Orbwalking.CanAttack() || !Program.Combo)
            {
                return;
            }

            var orbT = Orbwalker.GetTarget() as AIHeroClient;

            if (orbT != null)
            {
                var bestTarget = orbT;

                if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 0)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => orbT.NetworkId != enemy.NetworkId && enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < bestTarget.Health / Player.GetAutoAttackDamage(bestTarget))
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                else
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => orbT.NetworkId != enemy.NetworkId && enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < 3)
                        {
                            bestTarget = enemy;
                            break;
                        }
                        if (Config.Item("TsAaPriority" + enemy.ChampionName).GetValue <Slider>().Value > Config.Item("TsAaPriority" + bestTarget.ChampionName).GetValue <Slider>().Value)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                if (bestTarget.NetworkId != orbT.NetworkId)
                {
                    Program.debug("force " + bestTarget.ChampionName);
                    Orbwalker.ForceTarget(bestTarget);
                }
            }
        }
Esempio n. 28
0
        protected override void OnAttack(AttackableUnit sender, AttackableUnit target)
        {
            base.OnAttack(sender, target);

            if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
            {
                return;
            }

            var t = (Obj_AI_Base)target;
            var possibleHeroTarget = TargetSelector.GetTarget(Orbwalking.GetRealAutoAttackRange(null),
                                                              TargetSelector.DamageType.Physical);

            if (target is Obj_AI_Minion && t.Health > Player.GetAutoAttackDamage(t) + 25 && possibleHeroTarget != null)
            {
                Orbwalker.ForceTarget(possibleHeroTarget);
            }
            _tumbleToKillSecondMinion = MinionManager.GetMinions(Player.Position, Orbwalking.GetRealAutoAttackRange(null)).Any(m => m.Health < Player.GetAutoAttackDamage(m) + 15);
        }
Esempio n. 29
0
 private void OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     try
     {
         if (sender != null && sender.IsEnemy && args.DangerLevel == Interrupter2.DangerLevel.High &&
             Orbwalking.InAutoAttackRange(sender))
         {
             if (Cards.Has(CardColor.Gold))
             {
                 Orbwalker.ForceTarget(sender);
                 Player.IssueOrder(GameObjectOrder.AttackUnit, sender);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Esempio n. 30
0
        private void EUsage()
        {
            // E Usage
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) && (Player.Mana > RManaC + E.ManaCost))
                {
                    var enemystunned =
                        HeroManager.Enemies.Find(
                            enemy =>
                            (enemy.IsValidTarget(E.Range) && enemy.HasBuff("stun")) ||
                            (enemy.IsStunned && Config.PrioritizeStunned.GetValue <bool>()));
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        E.CastOnUnit(enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(t);
                        E.CastOnUnit(t);
                    }
                }
                else
                {
                    // If there's a chance to KS/Get :kappa: a kill.
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if ((wDmg + eDmg > t.Health) && (Player.Mana > W.ManaCost + E.ManaCost))
                    {
                        E.CastOnUnit(t);
                        SpellCast.SebbySpellMain(W, t);
                    }
                }
            }
        }