Example #1
0
 internal static void Unkillable(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && Config.QSettings.unkillableMinion && SpellManager.Q.IsReady())
     {
         SpellManager.CastQ(false);
     }
 }
Example #2
0
        /// <summary>
        /// Casts E Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast())
            {
                _spellCasted = false;
                return;
            }

            if (_spellCasted)
            {
                if (HitChanceCast(E, target, 70)) _spellCasted = false;
            }
            else if (!target.Valid(E.Range))
            {
                return;
            }

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    if (HitChanceCast(E, target)) _spellCasted = true;
                    break;
                case Orbwalker.ActiveModes.Harass:
                    if (HitChanceCast(E, target)) _spellCasted = true;
                    break;
            }
        }
Example #3
0
 /// <summary>
 ///     Called Before the orbwalker attacks.
 /// </summary>
 /// <param name="args">The <see cref="Orbwalking.BeforeAttackEventArgs" /> instance containing the event data.</param>
 private void BeforeAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (ShouldGetExecuted())
     {
         args.Process = false;
     }
 }
Example #4
0
        /// <summary>
        ///     Called on orbwalker action.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
        public static void OnAction(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (PortAIO.OrbwalkerManager.isComboActive)
            {
                if (Vars.getCheckBoxItem(Vars.MiscMenu, "noaacombo"))
                {
                    if (Vars.Q.IsReady() ||
                        Vars.W.IsReady() ||
                        Vars.E.IsReady() ||
                        !Bools.HasSheenBuff() ||
                        GameObjects.Player.ManaPercent > 10)
                    {
                        args.Process = false;
                    }
                }
            }

            if (PortAIO.OrbwalkerManager.isHarassActive || PortAIO.OrbwalkerManager.isLastHitActive || PortAIO.OrbwalkerManager.isLaneClearActive)
            {
                if (Vars.getCheckBoxItem(Vars.MiscMenu, "support"))
                {
                    if (args.Target is Obj_AI_Minion &&
                        GameObjects.AllyHeroes.Any(a => a.Distance(GameObjects.Player) < 2500))
                    {
                        args.Process = false;
                    }
                }
            }
        }
Example #5
0
        public static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            /// <summary>
            ///     The Target Forcing Logic.
            /// </summary>
            if (args.Target is AIHeroClient &&
                Vars.GetRealHealth(args.Target as AIHeroClient) >
            GameObjects.Player.GetAutoAttackDamage(args.Target as AIHeroClient) * 3)
            {
                if (GameObjects.EnemyHeroes.Any(
                    t =>
                        t.IsValidTarget(Vars.AARange) &&
                        t.HasBuff("kalistacoopstrikemarkally")))
                {
                    args.Process = false;
                    Orbwalker.ForcedTarget = GameObjects.EnemyHeroes.Where(
                        t =>
                            t.IsValidTarget(Vars.AARange) &&
                            t.HasBuff("kalistacoopstrikemarkally")).OrderByDescending(
                                o =>
                                    Data.Get<ChampionPriorityData>().GetPriority(o.ChampionName)).First();
                    return;
                }

                Orbwalker.ForcedTarget = null;
            }
        }
Example #6
0
 private static void Orbwalker_PreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (args.Target.IsMe)
     {
         args.Process = !_Player.HasBuff("KatarinaR");
     }
 }
Example #7
0
        private static void BeforeAuto(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.Useauto") && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                args.Process = false;
                return;

            }
            if (CassioUtils.getCheckBoxItem(CassiopeiaMenu.Combo, "Combo.Disableautoifspellsready") && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                if (SpellSlot.Q.IsReady() || SpellSlot.W.IsReady() || SpellSlot.E.IsReady() || SpellSlot.R.IsReady())
                {
                    args.Process = false;
                    return;
                }
            }
            if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Waveclear, "Waveclear.Useauto") && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                args.Process = false;
                return;
            }
            if (!CassioUtils.getCheckBoxItem(CassiopeiaMenu.Farm, "Farm.Useauto") && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)))
            {
                args.Process = false;
                return;
            }


        }
Example #8
0
        /// <summary>
        ///     Called on orbwalker action.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
        public static void OnAction(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                /// <summary>
                ///     The 'No AA in Combo' Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.MiscMenu, "noaacombo"))
                {
                    if (Vars.Q.IsReady() ||
                        Vars.W.IsReady() ||
                        Vars.E.IsReady() ||
                        !Bools.HasSheenBuff() ||
                        GameObjects.Player.ManaPercent > 10)
                    {
                        args.Process = false;
                    }
                }
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                /// <summary>
                ///     The 'Support Mode' Logic.
                /// </summary>
                if (Vars.getCheckBoxItem(Vars.MiscMenu, "support"))
                {
                    if (args.Target is Obj_AI_Minion &&
                        GameObjects.AllyHeroes.Any(a => a.Distance(GameObjects.Player) < 2500))
                    {
                        args.Process = false;
                    }
                }
            }
        }
Example #9
0
 public static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (target == null || args.Target == null || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear)
         || Orbwalker.ValidAzirSoldiers.Count(s => s.IsAlly) < 1)
     {
         return;
     }
     var orbtarget = args.Target as Obj_AI_Base;
     foreach (var sold in Orbwalker.ValidAzirSoldiers)
     {
         if (sold != null)
         {
             var sold1 = sold;
             var minion =
                 EntityManager.MinionsAndMonsters.EnemyMinions.FirstOrDefault(
                     m => m.IsInRange(sold1, sold1.GetAutoAttackRange()) && m.IsKillable());
             if (minion != null && minion != orbtarget)
             {
                 var killable = Player.Instance.GetAutoAttackDamage(orbtarget, true)
                                >= Prediction.Health.GetPrediction(orbtarget, (int)Player.Instance.AttackDelay);
                 if (!killable)
                 {
                     args.Process = false;
                     Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
                 }
             }
         }
     }
 }
Example #10
0
 private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {/*
     var minion = target as Obj_AI_Minion;
     if (minion != null && minion.IsValidTarget(SpellManager.Q.Range) && Settings.UseQun && Player.Instance.ManaPercent >= Settings.ManaLast)
     {
         SpellManager.Q.Cast(minion);
     }*/
 }
Example #11
0
        private static void OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) return;

            if (Q.IsReady() && target.IsValidTarget(Q.Range) && !target.IsZombie)
            {
                Q.Cast(target.Position);
            }
        }
Example #12
0
        private void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            if (Game.CursorPos.GetTumbleEndPos().IsPositionSafe())
            {
                Q.Cast(Game.CursorPos.ExtendPlayerVector(250));
            }

            Orbwalker.OnUnkillableMinion -= Orbwalker_OnUnkillableMinion;
        }
Example #13
0
 private static void BeforeAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (Utils.isChecked(MenuX.Misc, "Support") && target.Type == GameObjectType.obj_AI_Minion)
     {
         var allyinrage = EntityManager.Heroes.Allies.Count(x => !x.IsMe && x.Distance(_Player) <= 0x4b0);
         if (allyinrage > 0)
             args.Process = false;
     }
 }
Example #14
0
 public override bool ShouldBeExecuted(Orbwalker.ActiveModes activeModes)
 {
     if (activeModes.HasFlag(Orbwalker.ActiveModes.Combo))
     {
         return true;
     }
     var deadCombo = Instance.GetGlobal<CheckBox>("ComboWhileDead");
     return deadCombo != null && deadCombo.CurrentValue && Instance.IsDead;
 }
Example #15
0
        /// <summary>
        /// Casts W Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast()) return;

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    if(Player.Instance.HealthPercent <= 25 && EntityManager.Heroes.Enemies.Count(e => !e.IsDead && W.IsInRange(e)) > 0)
                    {
                        if (CastOnAlly())
                        {
                            return;
                        }

                        var firstOrDefault = EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && W.IsInRange(e));
                        if (firstOrDefault != null)
                            W.Cast(firstOrDefault.ServerPosition);
                    }
                    if (CastOnAlly()) return;
                    break;
                case Orbwalker.ActiveModes.Harass:
                    if (Player.Instance.HealthPercent <= 20 && EntityManager.Heroes.Enemies.Count(e => !e.IsDead && W.IsInRange(e)) > 0)
                    {
                        if (CastOnAlly())
                        {
                            return;
                        }
                        else
                        {
                            var firstOrDefault = EntityManager.Heroes.Enemies.FirstOrDefault(e => !e.IsDead && W.IsInRange(e));
                            if (firstOrDefault != null)
                                W.Cast(firstOrDefault.ServerPosition);
                        }
                    }
                    if (CastOnAlly()) return;
                    break;
                case Orbwalker.ActiveModes.JungleClear:
                    if (Player.Instance.HealthPercent <= 20)
                    {
                        var firstMonster = EntityManager.MinionsAndMonsters.Monsters.FirstOrDefault(m => m.IsValidTarget(W.Range));
                        if(firstMonster != null)
                            W.Cast(firstMonster);
                    }

                    break;
                case Orbwalker.ActiveModes.LaneClear:
                    if (Player.Instance.HealthPercent <= 20)
                    {
                        var minion = EntityManager.MinionsAndMonsters.EnemyMinions.FirstOrDefault(m => m.IsValidTarget(W.Range));
                        if(minion != null)
                            W.Cast(minion);
                    }

                    break;
            }
        }
Example #16
0
 public static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     /// <summary>
     ///     Stop attack commands while channeling E.
     /// </summary>
     if (GameObjects.Player.HasBuff("pantheonesound"))
     {
         args.Process = false;
     }
 }
Example #17
0
 private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     var dmg = Prediction.Health.GetPrediction(target, Spells.Q.CastDelay) - 30 <= target.Health;
     var count = EntityManager.MinionsAndMonsters.GetLaneMinions().Count(m => m.IsEnemy && m.IsInRange(target, 600) && dmg);
     if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) && Helpers.GetCheckBoxValue(Helpers.MenuTypes.LastHit, "qLast") && Spells.Q.IsReady() && dmg &&
         target.Health <= Player.Instance.GetAutoAttackDamage(target) && count >= 2)
     {
         Spells.Q.Cast(target);
     }
 }
Example #18
0
 private static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
         return;
     if (Player.Instance.HasBuff("rengarpassivebuff") && !Player.HasBuff("RengarR"))
     {
         args.Process = false;
         BushTargeting();
     }
 }
Example #19
0
 internal static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (!IsNone)
     {
         if (Orbwalker.ForcedTarget != null)
         {
             args.Process = Orbwalker.ForcedTarget.IdEquals(args.Target) && Champion.HasFishBonesActive;
         }
     }
 }
Example #20
0
        public static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo)) return;

            if (MenuConfig.ComboMode != 1) return;

            if (!MenuConfig.TripleQAAReset) return;

            Spells.Q.Cast();
        }
Example #21
0
 private void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (FocusWBuffedEnemyBool)
     {
         Orbwalker.ForcedTarget =
             ValidTargets.FirstOrDefault(
                 h =>
                 h.Distance(ObjectManager.Player.ServerPosition) < 600
                 && h.HasBuff("kalistacoopstrikemarkally"));
     }
 }
Example #22
0
 private static void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     var minion = target as Obj_AI_Minion;
     if (minion != null && minion.IsValidTarget(SpellManager.Q.Range) && LastConfig.UseQ &&
         Player.Instance.ManaPercent >= LastConfig.LastMana &&
         Prediction.Health.GetPrediction(minion, SpellManager.Q.CastDelay) > 10 &&
         Prediction.Health.GetPrediction(minion, SpellManager.Q.CastDelay) <
         SpellDamage.GetRealDamage(SpellSlot.Q, minion))
     {
         SpellManager.Q.Cast(minion);
     }
 }
Example #23
0
 private void OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     if (UnkillableE.CurrentValue && (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)))
     {
         // Check if target is in E range and killable with E
         if (E.IsReady() && E.IsInRange(target) && !IsDefileActive && target.TotalShieldHealth() < Player.Instance.GetSpellDamage(target, E.Slot))
         {
             // Cast E
             CastDefilePulse();
         }
     }
 }
Example #24
0
 private static void UnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
 {
     if (Config.Modes.Harass.Mana >= Player.Instance.ManaPercent)
         return;
     if (Settings.useQFarm && Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
     {
         if (SpellManager.Q.IsReady() && target.IsInRange(Player.Instance, SpellManager.Q.Range))
         {
             SpellManager.Q.Cast(target);
         }
     }
 }
Example #25
0
 public void RegisterSpellUsage(
     Spell.SpellBase spell,
     Orbwalker.ActiveModes modes,
     DamageType damageType = DamageType.Physical,
     Func<bool> preCondition = null,
     Func<AIHeroClient, bool> heroCondition = null,
     Func<Obj_AI_Minion, bool> minionCondition = null,
     HitChance hitChance = HitChance.Unknown,
     bool checkTarget = true,
     string customName = null)
 {
     GetModes(modes).ForEach(mode => { SpellUsages[mode].Add(new SpellUsage(customName, spell, damageType, preCondition, heroCondition, minionCondition, hitChance, checkTarget)); });
 }
Example #26
0
 /// <summary>
 ///     Called on orbwalker action.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
 public static void OnAction(AttackableUnit target, Orbwalker.PreAttackArgs args)
 {
     if (!GameObjects.Player.IsUnderEnemyTurret() &&
         GameObjects.Player.HasBuff("TwitchHideInShadows"))
     {
         if (GameObjects.Player.GetBuff("TwitchHideInShadows").EndTime - Game.Time >
             GameObjects.Player.GetBuff("TwitchHideInShadows").EndTime - GameObjects.Player.GetBuff("TwitchHideInShadows").StartTime -
             (Vars.getSliderItem(Vars.MiscMenu, "stealthtime") - Game.Ping) / 1000)
         {
             args.Process = false;
         }
     }
 }
Example #27
0
        public static void Orbwalker_OnPreAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (Program.ComboMenu["useRCombo"].Cast<CheckBox>().CurrentValue && target.IsValidTarget() && target is AIHeroClient)
            {
                if (Program.ComboMenu["noRUnderTurret"].Cast<CheckBox>().CurrentValue &&
                    ((AIHeroClient)target).IsUnderAlliedTurret())
                {
                    return;
                }

                Program.R.Cast();
            }
        }
Example #28
0
        public static void OnBeforeAttack(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (target != null && (!target.IsValid || target.IsDead))
                return;

            if (Variables.ComboMode)
            {
                if (Variables.GetCheckBoxConfig(MessageText.ucomboQ) && _Q.IsReady())
                {
                    if (target != null) _Q.Cast(target.Position);
                }
            }
        }
Example #29
0
        private void OW(AttackableUnit target, Orbwalker.PreAttackArgs args)
        {
            if (ShouldGetExecuted() && ObjectManager.Player.Buffs.Any(m => m.Name.ToLower() == "vaynetumblefade"))
            {
                if (ObjectManager.Player.CountEnemiesInRange(1100f) <= 1
                    || ObjectManager.Player.CountEnemiesInRange(1100f) < MenuGenerator.miscMenu["dz191.vhr.misc.tumble.noaa.enemies"].Cast<Slider>().CurrentValue)
                {
                    return;
                }

                args.Process = false;
            }
        }
Example #30
0
        /// <summary>
        /// Casts Q Logic.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <param name="activeMode">The active mode.</param>
        public override void Cast(Obj_AI_Base target, Orbwalker.ActiveModes activeMode)
        {
            if (!ShouldCast() || !target.Valid(Q.Range)) return;

            switch (activeMode)
            {
                case Orbwalker.ActiveModes.Combo:
                    base.HitChanceCast(Q, target);
                    break;
                case Orbwalker.ActiveModes.Harass:
                    base.HitChanceCast(Q, target);
                    break;
            }
        }
Example #31
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);
                }
            }
        }
Example #32
0
        private static void Combo()
        {
            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (target.IsValidTarget(Q.Range))
            {
                if (ComboOption.GetBool("ComboAttack") && target.DistanceToPlayer() > Me.AttackRange + Me.BoundingRadius)
                {
                    var minion =
                        MinionManager.GetMinions(Me.Position, Me.AttackRange + Me.BoundingRadius, MinionTypes.All,
                                                 MinionTeam.NotAlly)
                        .Where(Orbwalker.InAutoAttackRange)
                        .OrderBy(x => x.DistanceToPlayer())
                        .FirstOrDefault();

                    if (minion != null && !minion.IsDead)
                    {
                        Orbwalker.Orbwalk(minion, Game.CursorPosition);
                    }
                }

                if (ComboOption.UseQ && Q.IsReady() && target.IsValidTarget(Q.Range) &&
                    !Orbwalker.InAutoAttackRange(target))
                {
                    if (ComboOption.GetBool("ComboMana"))
                    {
                        if (Me.Mana > Q.ManaCost + E.ManaCost)
                        {
                            var qPred = Q.GetPrediction(target);

                            if (qPred.Hitchance >= HitChance.VeryHigh)
                            {
                                Q.Cast(qPred.CastPosition, true);
                            }
                        }
                    }
                    else
                    {
                        var qPred = Q.GetPrediction(target);

                        if (qPred.Hitchance >= HitChance.VeryHigh)
                        {
                            Q.Cast(qPred.CastPosition, true);
                        }
                    }
                }

                if (ComboOption.UseW && W.IsReady() && Utils.TickCount - LastCastTickW > 2000)
                {
                    if (NavMesh.IsGrass(target.ServerPosition) && !target.IsVisible)
                    {
                        if (ComboOption.GetBool("ComboMana"))
                        {
                            if (Me.Mana > Q.ManaCost + E.ManaCost * 2 + W.ManaCost + R.ManaCost)
                            {
                                W.Cast(target.ServerPosition, true);
                            }
                        }
                        else
                        {
                            W.Cast(target.ServerPosition, true);
                        }
                    }
                }

                if (ComboOption.UseE && E.IsReady() && target.IsValidTarget(E.Range) &&
                    target.HasBuff("kalistaexpungemarker") && Utils.TickCount - lastETime >= 500)
                {
                    if (target.Health < GetRealEDamage(target))
                    {
                        E.Cast(true);
                    }

                    if (ComboOption.GetBool("ComboEUse") &&
                        target.DistanceToPlayer() > Orbwalker.GetRealAutoAttackRange(Me) + 100)
                    {
                        var EKillMinion = MinionManager.GetMinions(Me.Position, E.Range, MinionTypes.All,
                                                                   MinionTeam.NotAlly)
                                          .FirstOrDefault(x => x.HasBuff("kalistaexpungemarker") &&
                                                          x.DistanceToPlayer() <= E.Range && x.Health < GetRealEDamage(x));

                        if (EKillMinion != null && EKillMinion.DistanceToPlayer() <= E.Range &&
                            target.IsValidTarget(E.Range))
                        {
                            E.Cast(true);
                        }
                    }
                }
            }
        }
Example #33
0
        void Flee()
        {
            Orbwalker.DisableAttacking = true; // BERB
            if (GetBool("Flee.UseQ2", YasuoMenu.MiscM) && !Yasuo.LSIsDashing() && SpellSlot.Q.IsReady() && TornadoReady)
            {
                var qtarg = TargetSelector.GetTarget(Spells[Q2].Range, DamageType.Physical);
                if (qtarg != null)
                {
                    Spells[Q2].Cast(qtarg.ServerPosition);
                }
            }

            if (FleeMode == FleeType.ToCursor)
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);

                var smart = GetBool("Flee.Smart", YasuoMenu.MiscM);

                if (Spells[E].IsReady())
                {
                    if (smart)
                    {
                        Obj_AI_Base dashTarg;

                        if (Yasuo.ServerPosition.PointUnderEnemyTurret())
                        {
                            var closestturret =
                                ObjectManager.Get <Obj_AI_Turret>()
                                .Where(x => x.IsEnemy)
                                .MinOrDefault(y => y.LSDistance(Yasuo));

                            var potential =
                                ObjectManager.Get <Obj_AI_Base>()
                                .Where(x => x.IsDashable())
                                .MaxOrDefault(x => GetDashPos(x).LSDistance(closestturret));

                            var gdpos = GetDashPos(potential);
                            if (potential != null && gdpos.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) && gdpos.LSDistance(closestturret.Position) - closestturret.BoundingRadius > Yasuo.LSDistance(closestturret.Position) - Yasuo.BoundingRadius)
                            {
                                Spells[E].Cast(potential);
                            }
                        }

                        dashTarg = ObjectManager.Get <Obj_AI_Base>()
                                   .Where(x => x.IsDashable())
                                   .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos));

                        if (dashTarg != null)
                        {
                            var posafdash = GetDashPos(dashTarg);

                            if (posafdash.LSDistance(Game.CursorPos) < Yasuo.LSDistance(Game.CursorPos) &&
                                !posafdash.PointUnderEnemyTurret())
                            {
                                Spells[E].CastOnUnit(dashTarg);
                            }
                        }
                    }

                    else
                    {
                        var dashtarg =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(x => x.IsDashable())
                            .MinOrDefault(x => GetDashPos(x).LSDistance(Game.CursorPos));

                        if (dashtarg != null)
                        {
                            Spells[E].CastOnUnit(dashtarg);
                        }
                    }
                }

                if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady && !Yasuo.LSIsDashing())
                {
                    Obj_AI_Minion qtarg = null;
                    if (!Spells[E].IsReady())
                    {
                        qtarg =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Find(x => x.IsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x));
                    }
                    else
                    {
                        var etargs =
                            ObjectManager.Get <Obj_AI_Minion>()
                            .Where(
                                x => x.IsValidTarget(Spells[E].Range) && MinionManager.IsMinion(x) && x.IsDashable());
                        if (!etargs.Any())
                        {
                            qtarg =
                                ObjectManager.Get <Obj_AI_Minion>()
                                .Find(x => x.IsValidTarget(Spells[Q].Range) && MinionManager.IsMinion(x));
                        }
                    }

                    if (qtarg != null)
                    {
                        Spells[Q].Cast(qtarg);
                    }
                }
            }

            if (FleeMode == FleeType.ToNexus)
            {
                var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly);
                if (nexus != null)
                {
                    Orbwalker.OrbwalkTo(nexus.Position);
                    var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position));
                    if (bestminion != null && (!GetBool("Flee.Smart", YasuoMenu.MiscM) || GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position)))
                    {
                        Spells[E].CastOnUnit(bestminion);
                        if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady)
                        {
                            Spells[Q].Cast(bestminion);
                        }
                    }
                }
            }

            if (FleeMode == FleeType.ToAllies)
            {
                Obj_AI_Base bestally = HeroManager.Allies.Where(x => !x.IsMe && x.CountEnemiesInRange(300) == 0).MinOrDefault(x => x.LSDistance(Yasuo));
                if (bestally == null)
                {
                    bestally =
                        ObjectManager.Get <Obj_AI_Minion>()
                        .Where(x => x.IsValidAlly(3000))
                        .MinOrDefault(x => x.LSDistance(Yasuo));
                }

                if (bestally != null)
                {
                    Orbwalker.OrbwalkTo(bestally.ServerPosition);
                    if (Spells[E].IsReady())
                    {
                        var besttarget =
                            ObjectManager.Get <Obj_AI_Base>()
                            .Where(x => x.IsDashable())
                            .MinOrDefault(x => GetDashPos(x).LSDistance(bestally.ServerPosition));
                        if (besttarget != null)
                        {
                            Spells[E].CastOnUnit(besttarget);
                            if (GetBool("Flee.StackQ", YasuoMenu.MiscM) && SpellSlot.Q.IsReady() && !TornadoReady)
                            {
                                Spells[Q].Cast(besttarget);
                            }
                        }
                    }
                }

                else
                {
                    var nexus = ObjectManager.Get <Obj_Shop>().FirstOrDefault(x => x.IsAlly);
                    if (nexus != null)
                    {
                        Orbwalker.OrbwalkTo(nexus.Position);
                        var bestminion = ObjectManager.Get <Obj_AI_Base>().Where(x => x.IsDashable()).MinOrDefault(x => GetDashPos(x).LSDistance(nexus.Position));
                        if (bestminion != null && GetDashPos(bestminion).LSDistance(nexus.Position) < Yasuo.LSDistance(nexus.Position))
                        {
                            Spells[E].CastOnUnit(bestminion);
                        }
                    }
                }
            }
        }
Example #34
0
        private static void Clear()
        {
            var minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(Q.Range) && x.IsMinion());

            var mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range));

            var lMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() == JungleType.Legendary);

            var bMobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() == JungleType.Large);

            System.Collections.Generic.IEnumerable <AIMinionClient> targets;

            if (minions.Any())
            {
                targets = minions;
            }
            else if (bMobs.Any())
            {
                targets = bMobs;
            }
            else if (lMobs.Any())
            {
                targets = lMobs;
            }
            else
            {
                targets = mobs;
            }

            if (targets == null)
            {
                return;
            }

            if (comb(laneclear, "lq") > 0 && Q.IsReady())
            {
                if (comb(laneclear, "lq") == 1)
                {
                    var target = targets.Where(x => x.Health > myhero.GetAutoAttackDamage(x) + 10).OrderByDescending(x => HealthPrediction.GetPrediction(x, x.qtt())).FirstOrDefault();
                    Q.Cast(target);
                }
                else
                {
                    var target = targets.Where(x => x != null && HealthPrediction.GetPrediction(x, x.qtt()) > 30 && HealthPrediction.GetPrediction(x, x.qtt()) < Q.GetDamage(x)).OrderByDescending(x => HealthPrediction.GetPrediction(x, x.qtt())).FirstOrDefault();

                    if (target == null || ((Orbwalker.GetTarget() == target as AttackableUnit || Orbwalker.LastTarget == target as AttackableUnit) &&
                                           (HealthPrediction.GetPrediction(target, target.qtt()) <= myhero.GetAutoAttackDamage(target) || target.UnderAllyTurret())))
                    {
                        goto lol2;
                    }

                    Q.Cast(target);
                }
            }

lol2:
            var min = slider(laneclear, "lwmin");

            if (laneclear.check("lw") && W.IsReady() && targets.Where(x => x.Health > 20 && W.IsInRange(x)).Count() >= min)
            {
                W.Collision = true;
                foreach (var minion in targets.Where(x => x != null && HealthPrediction.GetPrediction(x, x.qtt()) > 3))
                {
                    var pred = W.GetPrediction(minion as AIBaseClient);

                    if (pred.CollisionObjects.Where(x => x.IsMinion && !x.IsAlly).Count() >= 3)
                    {
                        W.Cast(pred.CastPosition);
                    }
                }
                W.Collision = false;
            }

            if (laneclear.check("lr") && myhero.HasBuff("AnnieRController"))
            {
                if (myhero.GetBuff("AnnieRController").EndTime - Game.Time < 0.5f)
                {
                    return;                                                                //prevents throwing null exceptions before the end of R controller
                }
                var target = targets.OrderByDescending(x => x.Health).FirstOrDefault(x => x as AttackableUnit != Orbwalker.GetTarget());
                if (target != null)
                {
                    R.CastOnUnit(target);
                }
                Game.Print(true);
            }
        }
Example #35
0
        private static void Obj_AI_Base_OnPlayAnimation(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            var T = 0;

            switch (args.Animation)
            {
            case "Spell1a":

                LastQ  = Core.GameTickCount;
                CountQ = 1;
                T      = 291;

                break;

            case "Spell1b":

                LastQ  = Core.GameTickCount;
                CountQ = 2;
                T      = 291;

                break;

            case "Spell1c":

                LastQ  = 0;
                CountQ = 0;
                T      = 393;

                break;

            case "Spell2":
                T = 170;

                break;

            case "Spell3":

                break;

            case "Spell4a":
                T = 0;

                break;

            case "Spell4b":
                T = 150;

                break;
            }

            if (T != 0)
            {
                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                {
                    Orbwalker.ResetAutoAttack();
                    Core.DelayAction(CancelAnimation, T - Game.Ping);
                }
                else if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
                {
                    Orbwalker.ResetAutoAttack();
                    Core.DelayAction(CancelAnimation, T - Game.Ping);
                }
            }
        }
Example #36
0
        private static void OnPostAttack(object sender, PostAttackEventArgs Args)
        {
            try
            {
                Orbwalker.ForceTarget(null);

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

                switch (Args.Target.Type)
                {
                case GameObjectType.obj_AI_Hero:
                    if (Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        UseItem();

                        if (ComboMenu["FlowersDarius.ComboMenu.W"].Enabled && W.Ready)
                        {
                            var target = (Obj_AI_Hero)Args.Target;

                            if (target != null && !target.IsDead)
                            {
                                W.Cast();
                                Orbwalker.ForceTarget(target);
                            }
                        }
                    }
                    else if (Orbwalker.Mode == OrbwalkingMode.Mixed)
                    {
                        if (Me.ManaPercent() >= HarassMenu["FlowersDarius.HarassMenu.HarassManaPercent"].Value)
                        {
                            if (HarassMenu["FlowersDarius.HarassMenu.W"].Enabled && W.Ready)
                            {
                                var target = (Obj_AI_Hero)Args.Target;

                                if (target != null && !target.IsDead)
                                {
                                    W.Cast();
                                    Orbwalker.ForceTarget(target);
                                }
                            }
                        }
                    }
                    break;

                case GameObjectType.obj_AI_Minion:
                    if (MyManaManager.SpellFarm && Orbwalker.Mode == OrbwalkingMode.Laneclear)
                    {
                        if (Args.Target.IsMinion())
                        {
                            if (Me.ManaPercent() >= ClearMenu["FlowersDarius.ClearMenu.LaneClearManaPercent"].Value)
                            {
                                if (ClearMenu["FlowersDarius.ClearMenu.LaneClearW"].Enabled && W.Ready)
                                {
                                    var target = (Obj_AI_Minion)Args.Target;

                                    if (target != null && !target.IsDead && target.Health > 0 && target.Health < W.GetDamage(target))
                                    {
                                        W.Cast();
                                        Orbwalker.ForceTarget(target);
                                    }
                                }
                            }
                        }
                        else if (Args.Target.IsMob())
                        {
                            UseItem();

                            if (Me.ManaPercent() >= ClearMenu["FlowersDarius.ClearMenu.JungleClearManaPercent"].Value)
                            {
                                if (ClearMenu["FlowersDarius.ClearMenu.JungleClearW"].Enabled && W.Ready)
                                {
                                    var target = (Obj_AI_Minion)Args.Target;

                                    if (target != null && !target.IsDead && target.Health > 0)
                                    {
                                        W.Cast();
                                        Orbwalker.ForceTarget(target);
                                    }
                                }
                            }
                        }
                    }
                    break;

                case GameObjectType.obj_AI_Turret:
                case GameObjectType.obj_Building:
                case GameObjectType.obj_Barracks:
                case GameObjectType.obj_BarracksDampener:
                case GameObjectType.obj_HQ:
                    if (MyManaManager.SpellFarm && Orbwalker.Mode == OrbwalkingMode.Laneclear)
                    {
                        if (Me.ManaPercent() >= ClearMenu["FlowersDarius.ClearMenu.LaneClearManaPercent"].Value)
                        {
                            if (ClearMenu["FlowersDarius.ClearMenu.LaneClearW"].Enabled && W.Ready)
                            {
                                var target = (Obj_AI_Turret)Args.Target;

                                if (target != null && !target.IsDead)
                                {
                                    W.Cast();
                                    Orbwalker.ForceTarget(target);
                                }
                            }
                        }
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in MyEventManager.OnPostAttack." + ex);
            }
        }
Example #37
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            Orbwalker.SetAttack(!(Player.AttackRange < 0 || Player.Spellbook.GetSpell(SpellSlot.E).Name == "kennenlrcancel"));

            var targets =
                ObjectManager.Get <Obj_AI_Hero>().Where(t => (t.IsValidTarget(900) && StormMarkStacks(t) > 0) || (Player.HasBuff("KennenShurikenStorm") && t.IsValidTarget(550))).ToList();
            var useW = GetValue <bool>("UseWH");

            if (useW)
            {
                foreach (Obj_AI_Hero enemy in targets)
                {
                    if (StormMarkStacks(enemy) > 0 && (StormMarkStacks(enemy) == 2 || StormMarkTimeLeft(enemy) < 0.5 || (Player.Distance(enemy) > 800 && Prediction.GetPrediction(enemy, 1).UnitPosition.Distance(Prediction.GetPrediction(Player, 1).UnitPosition) > 900) || (GetValue <bool>("UseWM") && enemy.Health < GetSurgeDamage(enemy))))
                    {
                        W.Cast();
                    }
                }
                if (targets.Count >= 3)
                {
                    W.Cast();
                }
            }

            if (LaneClearActive)
            {
                var useQ = GetValue <bool>("UseQL");

                if (Q.IsReady() && useQ)
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (Obj_AI_Base minions in
                             vMinions.Where(
                                 minions => minions.Health < ObjectManager.Player.GetSpellDamage(minions, SpellSlot.Q) && (Orbwalker.GetTarget() == null || minions.ToString() != Orbwalker.GetTarget().ToString())))
                    {
                        Q.Cast(minions);
                    }
                }
            }

            if ((!ComboActive && !HarassActive && !GetValue <KeyBind>("UseQHT").Active))
            {
                return;
            }
            var tar = (Obj_AI_Hero)Orbwalker.GetTarget() ??
                      TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (tar.IsValidTarget() && AttackNow)
            {
                Q.Cast(tar);
            }
        }
Example #38
0
        private static void Combo()
        {
            if (ComboOption.UseW && W.IsReady())
            {
                var target = MyTargetSelector.GetTarget(W.Range);

                if (target.IsValidTarget(W.Range) && target.DistanceToPlayer() > Q.Range &&
                    Me.CountEnemyHeroesInRange(W.Range - 300) <= 2)
                {
                    var wPred = W.GetPrediction(target);

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

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

                if (target.IsValidTarget(E.Range))
                {
                    if (!target.CanMoveMent())
                    {
                        E.Cast(target);
                    }
                    else
                    {
                        var ePred = E.GetPrediction(target);

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

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

                if (Me.HasBuff("JinxQ"))
                {
                    if (Me.Mana < (rCoolDown == -1 ? 100 : (rCoolDown > 10 ? 130 : 150)))
                    {
                        if (Orbwalker.CanAttack())
                        {
                            Q.Cast();
                        }
                    }

                    if (Me.CountEnemyHeroesInRange(1500) == 0)
                    {
                        Q.Cast();
                    }

                    if (target == null)
                    {
                        if (Orbwalker.CanAttack())
                        {
                            Q.Cast();
                        }
                    }
                    else if (target.IsValidTarget(bigGunRange))
                    {
                        if (target.Health < Me.GetAutoAttackDamage(target) * 3 &&
                            target.DistanceToPlayer() <= Q.Range + 60)
                        {
                            if (Orbwalker.CanAttack())
                            {
                                Q.Cast();
                            }
                        }
                    }
                }
                else
                {
                    if (target.IsValidTarget(bigGunRange))
                    {
                        if (Me.CountEnemyHeroesInRange(Q.Range) == 0 &&
                            Me.CountEnemyHeroesInRange(bigGunRange) > 0 &&
                            Me.Mana > R.Mana + W.Mana + Q.Mana * 2)
                        {
                            if (Orbwalker.CanAttack())
                            {
                                Q.Cast();
                            }
                        }

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

            if (ComboOption.UseR && R.IsReady())
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(1200)))
                {
                    if (ComboOption.GetBool("ComboRTeam").Enabled&& target.IsValidTarget(600) &&
                        Me.CountEnemyHeroesInRange(600) >= 2 &&
                        target.CountAllyHeroesInRange(200) <= 3 && target.HealthPercent < 50)
                    {
                        var rPred = R.GetPrediction(target);

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

                    if (ComboOption.GetBool("ComboRSolo").Enabled&& Me.CountEnemyHeroesInRange(1500) <= 2 &&
                        target.DistanceToPlayer() > Q.Range &&
                        target.DistanceToPlayer() < bigGunRange && target.Health > Me.GetAutoAttackDamage(target) &&
                        target.Health < Me.GetSpellDamage(target, SpellSlot.R) + Me.GetAutoAttackDamage(target) * 3)
                    {
                        var rPred = R.GetPrediction(target);

                        if (rPred.Hitchance >= HitChance.High)
                        {
                            R.Cast(rPred.CastPosition);
                        }
                    }
                }
            }
        }
Example #39
0
        private static void Combo()
        {
            if (R.Name == "JhinRShot")
            {
                return;
            }

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

                if (target != null && target.IsValidTarget(W.Range))
                {
                    if (ComboOption.GetBool("ComboWOnly").Enabled)
                    {
                        if (HasPassive(target))
                        {
                            var wPred = W.GetPrediction(target);

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

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

            if (ComboOption.UseQ && Q.IsReady())
            {
                var target  = MyTargetSelector.GetTarget(Q.Range + 300);
                var qTarget = MyTargetSelector.GetTarget(Q.Range);

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

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

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

                if (target != null && target.IsValidTarget(E.Range))
                {
                    if (!target.CanMoveMent())
                    {
                        E.Cast(target.PreviousPosition);
                    }
                    else
                    {
                        var ePred = E.GetPrediction(target);

                        if (ePred.Hitchance >= HitChance.High)
                        {
                            E.Cast(ePred.CastPosition);
                        }
                    }
                }
            }
        }
Example #40
0
        private static void JungleClear()
        {
            if (JungleClearOption.HasEnouguMana())
            {
                var mobs =
                    GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && x.GetJungleType() != JungleType.Unknown)
                    .OrderByDescending(x => x.MaxHealth)
                    .ToList();

                if (mobs.Any())
                {
                    var bigmob = mobs.FirstOrDefault(x => x.GetJungleType() != JungleType.Small);

                    if (bigmob != null && bigmob.IsValidTarget(E.Range) && (!bigmob.InAutoAttackRange() || !Orbwalker.CanAttack()))
                    {
                        if (JungleClearOption.UseE && E.IsReady() && bigmob.IsValidTarget(E.Range))
                        {
                            E.Cast(bigmob.PreviousPosition);
                        }

                        if (JungleClearOption.UseQ && Q.IsReady() && bigmob.IsValidTarget(Q.Range))
                        {
                            Q.CastOnUnit(bigmob);
                        }

                        if (JungleClearOption.UseW && W.IsReady() && bigmob.IsValidTarget(W.Range))
                        {
                            W.Cast(bigmob.PreviousPosition);
                        }
                    }
                    else
                    {
                        var farmMobs = mobs.Where(x => x.IsValidTarget(E.Range)).ToList();

                        if (JungleClearOption.UseE && E.IsReady())
                        {
                            var eFarm = E.GetCircularFarmLocation(farmMobs);

                            if (eFarm.MinionsHit >= 2)
                            {
                                E.Cast(eFarm.Position);
                            }
                        }

                        if (JungleClearOption.UseQ && Q.IsReady())
                        {
                            if (farmMobs.Count >= 2)
                            {
                                Q.CastOnUnit(farmMobs.FirstOrDefault());
                            }
                        }

                        if (JungleClearOption.UseW && W.IsReady())
                        {
                            var wFarm = W.GetLineFarmLocation(farmMobs);

                            if (wFarm.MinionsHit >= 2)
                            {
                                W.Cast(wFarm.Position);
                            }
                        }
                    }
                }
            }
        }
Example #41
0
        private void LogicQ()
        {
            if (LaneClear && !FishBoneActive && !Player.Spellbook.IsAutoAttack && Orbwalker.GetTarget() == null && Orbwalker.CanAttack() && Config[Player.CharacterName]["farm"].GetValue <MenuBool>("farmQout").Enabled&& Player.Mana > RMANA + WMANA + EMANA + QMANA)
            {
                foreach (var minion in Cache.GetMinions(Player.PreviousPosition, bonusRange() + 30).Where(
                             minion => !minion.InAutoAttackRange() && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetPrediction(minion, 400, 70);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForceTarget = minion;
                        Q.Cast();
                        return;
                    }
                }
            }

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

            if (t.IsValidTarget())
            {
                if (!FishBoneActive && (!t.InAutoAttackRange() || t.CountEnemyHeroesInRange(250) > 2) && Orbwalker.GetTarget() == null)
                {
                    var distance = GetRealDistance(t);
                    if (Combo && (Player.Mana > RMANA + WMANA + QMANA || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Harass && !Player.Spellbook.IsAutoAttack && Orbwalker.CanAttack() && Config[Player.CharacterName]["QConfig"].GetValue <MenuBool>("Qharass").Enabled&& !Player.IsUnderEnemyTurret() && Player.Mana > RMANA + WMANA + EMANA + QMANA + QMANA && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Combo && Player.Mana > RMANA + WMANA + QMANA + QMANA && Player.CountEnemyHeroesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.Mana < RMANA + WMANA + QMANA + QMANA)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Combo && Player.CountEnemyHeroesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && LaneClear)
            {
                Q.Cast();
            }
        }
Example #42
0
 public static void Flee()
 {
     Orbwalker.MoveTo(Game.CursorPos);
     W.Cast();
 }
Example #43
0
        public static void Execute()
        {
            var qTarget = TargetSelector.GetTarget(925, DamageType.Physical);

            if ((qTarget != null) && PossibleToInterruptQ(qTarget))
            {
                var positionAfterE = Prediction.Position.PredictUnitPosition(qTarget, 300);
                var pos            = Player.Instance.Position.Extend(Game.CursorPos, positionAfterE.Distance(Player.Instance) + qTarget.BoundingRadius).To3D();

                if (!pos.IsVectorUnderEnemyTower())
                {
                    E.Cast(pos);
                    return;
                }
            }

            ELogics();

            if (Q.IsReady() && Settings.Combo.UseQ && !IsCastingR && !HasPassiveBuff && !Player.Instance.HasSheenBuff())
            {
                var target  = TargetSelector.GetTarget(Q.Range, DamageType.Physical);
                var target2 = TargetSelector.GetTarget(925, DamageType.Physical);

                if (PossibleEqCombo(target) || PossibleEqCombo(target2))
                {
                    return;
                }

                if (!IsPostAttack && (target != null) && Orbwalker.CanAutoAttack)
                {
                    var predictedPosition = Prediction.Position.PredictUnitPosition(target,
                                                                                    (int)((Player.Instance.AttackCastDelay + Player.Instance.AttackDelay) * 1000) + Game.Ping / 2);

                    if (Player.Instance.IsInRange(predictedPosition, Player.Instance.GetAutoAttackRange()))
                    {
                        goto WRLogc;
                    }
                }

                if ((target != null) && target.IsValidTarget(Q.Range) &&
                    (((Player.Instance.Mana - QMana > EMana + (R.IsReady() ? RMana : 0)) && !Player.Instance.IsDashing()) ||
                     (Player.Instance.GetSpellDamageCached(target, SpellSlot.Q) + Player.Instance.GetAutoAttackDamageCached(target, true) * 3 > target.TotalHealthWithShields())))
                {
                    Q.Cast(target);
                    return;
                }

                if (Settings.Combo.ExtendQOnMinions && (target2 != null) &&
                    (((Player.Instance.Mana - QMana > EMana + (R.IsReady() ? RMana : 0)) && !Player.Instance.IsDashing()) ||
                     (Player.Instance.GetSpellDamageCached(target2, SpellSlot.Q) +
                      Player.Instance.GetAutoAttackDamageCached(target2, true) * 3 > target2.TotalHealthWithShields())) && !Player.Instance.IsDashing())
                {
                    var source = GetQExtendSource(target2);

                    if (source != null)
                    {
                        Q.Cast(source);
                        return;
                    }
                }
            }

WRLogc:

            if (W.IsReady() && Settings.Combo.UseW && !IsCastingR && !HasPassiveBuff && !Player.Instance.HasSheenBuff())
            {
                var target = TargetSelector.GetTarget(W.Range, DamageType.Physical);

                if ((target != null) && (((Player.Instance.Mana - WMana > (R.IsReady() ? RMana : 0)) && !Player.Instance.IsDashing()) ||
                                         (Player.Instance.GetSpellDamageCached(target, SpellSlot.W) > target.TotalHealthWithShields())))
                {
                    if (Settings.Combo.IgnoreCollisionW)
                    {
                        var orbwalkingTarget = Orbwalker.GetTarget() as AIHeroClient;

                        if (orbwalkingTarget != null)
                        {
                            W.Cast(target);
                            return;
                        }
                    }

                    var wPrediction = W.GetPrediction(target);

                    if (wPrediction.HitChance == HitChance.Medium)
                    {
                        W.Cast(wPrediction.CastPosition);
                        return;
                    }
                }
            }

            if (!R.IsReady() || !Settings.Combo.UseR || Player.Instance.IsUnderTurret())
            {
                return;
            }

            if (Player.Instance.CountEnemiesInRange(Player.Instance.GetAutoAttackRange() + 150) == 0)
            {
                var rTarget = TargetSelector.GetTarget(R.Range - 100, DamageType.Physical);

                if ((rTarget == null) || rTarget.HasUndyingBuffA())
                {
                    return;
                }

                var health = rTarget.TotalHealthWithShields() - IncomingDamage.GetIncomingDamage(rTarget);

                if (health < 0)
                {
                    return;
                }

                int[] shots = { 0, 20, 25, 30 };

                var damage     = 0f;
                var singleShot = Damage.GetSingleRShotDamage(rTarget);
                var distance   = Player.Instance.Distance(rTarget);

                if (Player.Instance.MoveSpeed >= rTarget.MoveSpeed)
                {
                    damage = singleShot * shots[R.Level];
                }
                else if ((rTarget.Path.Last().Length() > 100) && (Player.Instance.MoveSpeed < rTarget.MoveSpeed))
                {
                    var difference = rTarget.MoveSpeed - Player.Instance.MoveSpeed;

                    for (var i = 1; i < shots[R.Level]; i++)
                    {
                        if ((distance > R.Range) || (i >= shots[R.Level]))
                        {
                            continue;
                        }

                        distance += difference / 1000 * (3000f / shots[R.Level] * i);
                        damage    = singleShot * i;
                    }
                }
                if ((damage >= health) && (Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name == "LucianR"))
                {
                    R.CastMinimumHitchance(rTarget, 65);
                }
            }
            else if (Player.Instance.CountEnemiesInRange(Player.Instance.GetAutoAttackRange() + 300) == 1)
            {
                var target = TargetSelector.GetTarget(Player.Instance.GetAutoAttackRange(), DamageType.Physical);

                if ((target == null) || !HasWDebuff(target) || !target.IsFacingB(Player.Instance) || !target.IsMoving ||
                    (target.Distance(Player.Instance) < 200) ||
                    (Player.Instance.Spellbook.GetSpell(SpellSlot.R).Name != "LucianR"))
                {
                    return;
                }

                var health = target.TotalHealthWithShields() - IncomingDamage.GetIncomingDamage(target);

                if (health < GetComboDamage(target, 3))
                {
                    return;
                }

                R.CastMinimumHitchance(target, HitChance.High);
            }
        }
Example #44
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            Orbwalker.DisableMovement  = false;
            Orbwalker.DisableAttacking = false;

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                Harass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) ||
                Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Clear();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
            {
                if (getCheckBoxItem(harassMenu, "useqLHH") && !justE)
                {
                    Lasthit();
                }
            }

            if (getCheckBoxItem(miscMenu, "AutoR") && R.IsReady())
            {
                foreach (
                    var enemy in
                    HeroManager.Enemies.Where(
                        e =>
                        ((e.UnderTurret(true) &&
                          e.MaxHealth / 100 * getSliderItem(miscMenu, "Rhealt") * 0.75f >
                          e.Health - IncDamages.GetEnemyData(e.NetworkId).DamageTaken) ||
                         (!e.UnderTurret(true) &&
                          e.MaxHealth / 100 * getSliderItem(miscMenu, "Rhealt") >
                          e.Health - IncDamages.GetEnemyData(e.NetworkId).DamageTaken)) &&
                        e.HealthPercent > getSliderItem(miscMenu, "RhealtMin") && e.IsValidTarget() &&
                        e.LSDistance(player) > 1500))
                {
                    var pred = IncDamages.GetEnemyData(enemy.NetworkId);
                    if (pred != null && pred.DamageTaken < enemy.Health)
                    {
                        var ally =
                            HeroManager.Allies.OrderBy(a => a.Health).FirstOrDefault(a => enemy.LSDistance(a) < 1000);
                        if (ally != null)
                        {
                            var pos = Prediction.GetPrediction(enemy, 0.75f);
                            if (pos.CastPosition.LSDistance(enemy.Position) < 450 && pos.Hitchance >= HitChance.VeryHigh)
                            {
                                if (enemy.IsMoving)
                                {
                                    R.Cast(enemy.Position.Extend(pos.CastPosition, 450));
                                }
                                else
                                {
                                    R.Cast(enemy.ServerPosition);
                                }
                            }
                        }
                    }
                }
            }
            if (getKeyBindItem(comboMenu, "EQtoCursor") && E.IsReady() && Q.IsReady())
            {
                Orbwalker.DisableMovement = true;
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    var cp        = Game.CursorPos;
                    var cursorPos = barrel.LSDistance(cp) > BarrelConnectionRange
                        ? barrel.Position.LSExtend(cp, BarrelConnectionRange)
                        : cp;

                    var points =
                        CombatHelper.PointsAroundTheTarget(player.Position, E.Range - 200)
                        .Where(p => p.LSDistance(player.Position) < E.Range);
                    var middle      = GetMiddleBarrel(barrel, points, cursorPos);
                    var threeBarrel = cursorPos.LSDistance(cp) > BarrelExplosionRange && E.Instance.Ammo >= 2 &&
                                      Game.CursorPos.LSDistance(player.Position) < E.Range && middle.IsValid();
                    var firsDelay = threeBarrel ? 500 : 1;
                    if (cursorPos.IsValid() && cursorPos.LSDistance(player.Position) < E.Range)
                    {
                        E.Cast(threeBarrel ? middle : cursorPos);
                        Utility.DelayAction.Add(firsDelay, () => Q.CastOnUnit(barrel));
                        if (threeBarrel)
                        {
                            if (player.IsMoving)
                            {
                                Player.IssueOrder(GameObjectOrder.Stop, player.Position);
                            }
                            Utility.DelayAction.Add(801, () => E.Cast(middle.Extend(cp, BarrelConnectionRange)));
                        }
                        else
                        {
                            Orbwalker.DisableMovement = false;
                            Orbwalker.OrbwalkTo(Game.CursorPos);
                        }
                    }
                    else
                    {
                        Orbwalker.DisableMovement = false;
                        Orbwalker.OrbwalkTo(Game.CursorPos);
                    }
                }
            }
            else if (getKeyBindItem(comboMenu, "EQtoCursor"))
            {
                Orbwalker.DisableMovement = false;
                Orbwalker.OrbwalkTo(Game.CursorPos);
            }
            if (getKeyBindItem(comboMenu, "QbarrelCursor") && Q.IsReady())
            {
                var meleeRangeBarrel =
                    GetBarrels()
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault(
                        o =>
                        o.Health > 1 && o.LSDistance(player) < Orbwalking.GetRealAutoAttackRange(o) &&
                        !KillableBarrel(o, true));
                if (meleeRangeBarrel != null && Orbwalker.CanAutoAttack)
                {
                    Orbwalker.DisableAttacking = true;
                    Player.IssueOrder(GameObjectOrder.AttackUnit, meleeRangeBarrel);
                    return;
                }
                var barrel =
                    GetBarrels()
                    .Where(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o))
                    .OrderBy(o => o.LSDistance(Game.CursorPos))
                    .FirstOrDefault();
                if (barrel != null)
                {
                    Q.CastOnUnit(barrel);
                }
            }

            if (getCheckBoxItem(miscMenu, "AutoQBarrel") && Q.IsReady())
            {
                var barrel =
                    GetBarrels()
                    .FirstOrDefault(
                        o =>
                        o.IsValid && !o.IsDead && o.LSDistance(player) < Q.Range &&
                        o.BaseSkinName == "GangplankBarrel" && o.GetBuff("gangplankebarrellife").Caster.IsMe&&
                        KillableBarrel(o) &&
                        (o.CountEnemiesInRange(BarrelExplosionRange - 50) > 0 ||
                         HeroManager.Enemies.Count(
                             e =>
                             e.IsValidTarget() &&
                             Prediction.GetPrediction(e, 0.1f).UnitPosition.LSDistance(o.Position) <
                             BarrelExplosionRange - 20) > 0));

                if (barrel != null)
                {
                    Q.Cast(barrel);
                }
            }
        }
Example #45
0
        public override void OnAfterAttack(AttackableUnit target, EventArgs args)
        {
            if (W.IsReady())
            {
                if (Player.Distance(target) <= Player.GetAutoAttackRange())
                {
                    var combo = Features.First(it => it.NameFeature == "Combo");

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && combo.IsChecked("combo.w") && combo.IsChecked("combo.w.aareset"))
                    {
                        if (W.Cast())
                        {
                            Orbwalker.ResetAutoAttack();
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target);
                        }

                        return;
                    }

                    var harass = Features.First(it => it.NameFeature == "Harass");

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass) && harass.IsChecked("harass.w") && harass.IsChecked("harass.w.aareset") && Player.ManaPercent >= harass.SliderValue("harass.mana%"))
                    {
                        if (W.Cast())
                        {
                            Orbwalker.ResetAutoAttack();
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target);
                        }

                        return;
                    }

                    var laneclear = Features.First(it => it.NameFeature == "Lane Clear");

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && laneclear.IsChecked("laneclear.w") && Player.ManaPercent >= laneclear.SliderValue("laneclear.mana%"))
                    {
                        if (target.Health > Player.GetAutoAttackDamage((Obj_AI_Base)target) && W.Cast())
                        {
                            Orbwalker.ResetAutoAttack();
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target);
                        }

                        return;
                    }

                    var jungleclear = Features.First(it => it.NameFeature == "Jungle Clear");

                    if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) && jungleclear.IsChecked("jungleclear.w") && Player.ManaPercent >= jungleclear.SliderValue("jungleclear.mana%"))
                    {
                        if (target.Health > Player.GetAutoAttackDamage((Obj_AI_Base)target) && W.Cast())
                        {
                            Orbwalker.ResetAutoAttack();
                            EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, target);
                        }

                        return;
                    }
                }
            }

            return;
        }
Example #46
0
        private void OnOrbwalkingAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
        {
            if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
            {
                Orbwalker.ForceTarget = null;
                var possible2WTarget = ValidTargets.FirstOrDefault(
                    h =>
                    h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 &&
                    h.GetBuffCount("vaynesilvereddebuff") == 2);
                if (Orbwalker.ActiveMode != OrbwalkingMode.Combo)
                {
                    if (possible2WTarget.IsValidTarget() && UseEAs3rdWProcBool && possible2WTarget.GetWaypoints().LastOrDefault().Distance(ObjectManager.Player.ServerPosition) < 1000)
                    {
                        if (EDelaySlider.Value > 0)
                        {
                            var thisEnemy = possible2WTarget;
                            DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                            return;
                        }
                        E.CastOnUnit(possible2WTarget);
                    }
                }
                if (orbwalkingActionArgs.Target is Obj_AI_Hero && UseQBool)
                {
                    if (Q.IsReady())
                    {
                        var tg = orbwalkingActionArgs.Target as Obj_AI_Hero;
                        if (tg != null)
                        {
                            var mode           = QModeStringList.SelectedValue;
                            var tumblePosition = Game.CursorPos;
                            switch (mode)
                            {
                            case "PRADA":
                                tumblePosition = GetTumblePos(tg);
                                break;

                            default:
                                tumblePosition = Game.CursorPos;
                                break;
                            }
                            if (tumblePosition.Distance(ObjectManager.Player.Position) > 2000 || IsDangerousPosition(tumblePosition))
                            {
                                return;
                            }
                            Q.Cast(tumblePosition);
                        }
                    }
                }
                if (orbwalkingActionArgs.Target is Obj_AI_Minion && Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var tg = orbwalkingActionArgs.Target as Obj_AI_Minion;
                    if (E.IsReady())
                    {
                        if (IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.IsValidTarget() && UseEJungleFarm)
                        {
                            if (EDelaySlider.Value > 0)
                            {
                                var thisEnemy = tg;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(tg);
                        }
                    }
                    if (UseQFarm && Q.IsReady())
                    {
                        if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.IsValidTarget() && !IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (GameObjects.EnemyMinions.Count(
                                m =>
                                m.Position.Distance(ObjectManager.Player.Position) < 550 &&
                                m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + Q.GetDamage(m)) > 1 &&
                            !IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (ObjectManager.Player.UnderAllyTurret())
                        {
                            if (GameObjects.EnemyMinions.Count(
                                    m =>
                                    m.Position.Distance(ObjectManager.Player.Position) < 550 &&
                                    m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + Q.GetDamage(m)) > 0 && !IsDangerousPosition(Game.CursorPos))
                            {
                                Q.Cast(Game.CursorPos);
                            }
                        }
                    }
                }
                if (UseQOnlyAt2WStacksBool && Orbwalker.ActiveMode != OrbwalkingMode.Combo && possible2WTarget.IsValidTarget())
                {
                    Q.Cast(GetTumblePos(possible2WTarget));
                }
            }
            if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
            {
                var possible2WTarget = ValidTargets.FirstOrDefault(
                    h =>
                    h.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 500 &&
                    h.GetBuffCount("vaynesilvereddebuff") == 2);
                if (TryToFocus2WBool && possible2WTarget.IsValidTarget())
                {
                    Orbwalker.ForceTarget = possible2WTarget;
                }
                if (ObjectManager.Player.HasBuff("vaynetumblefade") && DontAttackWhileInvisibleAndMeelesNearBool)
                {
                    if (
                        ValidTargets.Any(
                            e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350 && e.IsMelee))
                    {
                        orbwalkingActionArgs.Process = false;
                    }
                }
                if (ObjectManager.Player.HasBuff("vaynetumblebonus") && orbwalkingActionArgs.Target is Obj_AI_Minion &&
                    UseQBonusOnEnemiesNotCS)
                {
                    var possibleTarget = Variables.TargetSelector.GetTarget(-1f, DamageType.Physical);
                    if (possibleTarget != null && possibleTarget.InAutoAttackRange())
                    {
                        Orbwalker.ForceTarget = possibleTarget;
                        Orbwalker.Attack(possibleTarget);
                        orbwalkingActionArgs.Process = false;
                    }
                }
                var possibleNearbyMeleeChampion =
                    ValidTargets.FirstOrDefault(
                        e => e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

                if (possibleNearbyMeleeChampion.IsValidTarget())
                {
                    if (Q.IsReady() && UseQBool)
                    {
                        var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition,
                                                                             -350);
                        if (!IsDangerousPosition(pos))
                        {
                            Q.Cast(pos);
                        }
                        orbwalkingActionArgs.Process = false;
                    }
                    if (UseEWhenMeleesNearBool && !Q.IsReady() && E.IsReady())
                    {
                        var possibleMeleeChampionsGapclosers = from tuplet in CachedGapclosers
                                                               where tuplet.Item1 == possibleNearbyMeleeChampion.CharData.BaseSkinName
                                                               select tuplet.Item2;
                        if (possibleMeleeChampionsGapclosers.FirstOrDefault() != null)
                        {
                            if (
                                possibleMeleeChampionsGapclosers.Any(
                                    gapcloserEntry =>
                                    possibleNearbyMeleeChampion.Spellbook.GetSpell(gapcloserEntry.Slot).IsReady()))
                            {
                                return;
                            }
                        }
                        if (
                            possibleNearbyMeleeChampion.GetWaypoints()
                            .LastOrDefault()
                            .Distance(ObjectManager.Player.ServerPosition) < possibleNearbyMeleeChampion.AttackRange)
                        {
                            if (EDelaySlider.Value > 0)
                            {
                                var thisEnemy = possibleNearbyMeleeChampion;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(possibleNearbyMeleeChampion);
                        }
                    }
                }
            }
        }
Example #47
0
        private static void Escapeterino()
        {
            // Walljumper credits to Hellsing

            if (!IsBurrowed() && _w.IsReady() && _be.IsReady())
            {
                _w.Cast();
            }

            // We need to define a new move position since jumping over walls
            // requires you to be close to the specified wall. Therefore we set the move
            // point to be that specific piont. People will need to get used to it,
            // but this is how it works.
            var wallCheck = GetFirstWallPoint(_player.Position, Game.CursorPos);

            // Be more precise
            if (wallCheck != null)
            {
                wallCheck = GetFirstWallPoint((Vector3)wallCheck, Game.CursorPos, 5);
            }

            // Define more position point
            var movePosition = wallCheck != null ? (Vector3)wallCheck : Game.CursorPos;

            // Update fleeTargetPosition
            var tempGrid = NavMesh.WorldToGrid(movePosition.X, movePosition.Y);

            // Only calculate stuff when our Q is up and there is a wall inbetween
            if (IsBurrowed() && _be.IsReady() && wallCheck != null)
            {
                // Get our wall position to calculate from
                var wallPosition = movePosition;

                // Check 300 units to the cursor position in a 160 degree cone for a valid non-wall spot
                var   direction     = (Game.CursorPos.LSTo2D() - wallPosition.LSTo2D()).Normalized();
                float maxAngle      = 80;
                var   step          = maxAngle / 20;
                float currentAngle  = 0;
                float currentStep   = 0;
                var   jumpTriggered = false;
                while (true)
                {
                    // Validate the counter, break if no valid spot was found in previous loops
                    if (currentStep > maxAngle && currentAngle < 0)
                    {
                        break;
                    }

                    // Check next angle
                    if ((currentAngle == 0 || currentAngle < 0) && currentStep != 0)
                    {
                        currentAngle = currentStep * (float)Math.PI / 180;
                        currentStep += step;
                    }

                    else if (currentAngle > 0)
                    {
                        currentAngle = -currentAngle;
                    }

                    Vector3 checkPoint;

                    // One time only check for direct line of sight without rotating
                    if (currentStep == 0)
                    {
                        currentStep = step;
                        checkPoint  = wallPosition + _be.Range * direction.To3D();
                    }
                    // Rotated check
                    else
                    {
                        checkPoint = wallPosition + _be.Range * direction.Rotated(currentAngle).To3D();
                    }

                    // Check if the point is not a wall
                    if (!checkPoint.IsWall())
                    {
                        // Check if there is a wall between the checkPoint and wallPosition
                        wallCheck = GetFirstWallPoint(checkPoint, wallPosition);
                        if (wallCheck != null)
                        {
                            // There is a wall inbetween, get the closes point to the wall, as precise as possible
                            var wallPositionOpposite =
                                (Vector3)GetFirstWallPoint((Vector3)wallCheck, wallPosition, 5);

                            // Check if it's worth to jump considering the path length
                            if (_player.GetPath(wallPositionOpposite).ToList().LSTo2D().PathLength()
                                - _player.LSDistance(wallPositionOpposite) > 200) //200
                            {
                                // Check the distance to the opposite side of the wall
                                if (_player.LSDistance(wallPositionOpposite, true)
                                    < Math.Pow(_be.Range + 200 - _player.BoundingRadius / 2, 2))
                                {
                                    // Make the jump happen
                                    _be.Cast(wallPositionOpposite);

                                    // Update jumpTriggered value to not orbwalk now since we want to jump
                                    jumpTriggered = true;

                                    break;
                                }
                            }

                            else
                            {
                                // yolo
                                Render.Circle.DrawCircle(Game.CursorPos, 35, Color.Red, 2);
                            }
                        }
                    }
                }

                // Check if the loop triggered the jump, if not just orbwalk
                if (!jumpTriggered)
                {
                    Orbwalker.MoveTo(Game.CursorPos);
                }
            }

            // Either no wall or W on cooldown, just move towards to wall then
            else
            {
                Orbwalker.MoveTo(Game.CursorPos);
                if (IsBurrowed() && _be.IsReady())
                {
                    _be.Cast(Game.CursorPos);
                }
            }
        }
Example #48
0
 private static void AnimateCAnsl()
 {
     Orbwalker.ResetAutoAttack();
 }
Example #49
0
        private void LogicQ()
        {
            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(1600) && Q.GetDamage(enemy) + GetWDmg(enemy) > enemy.Health))
            {
                if (enemy.IsValidTarget(R.Range))
                {
                    CastQ(enemy);
                }
                return;
            }

            if (MainMenu.Item("maxQ", true).GetValue <bool>() && (Q.Range < 1500) && Player.CountEnemiesInRange(AArange) == 0)
            {
                return;
            }

            var t = Orbwalker.GetTarget() as Obj_AI_Hero;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            }

            if (t.IsValidTarget())
            {
                if (Q.IsCharging)
                {
                    if (MainMenu.Item("fastQ", true).GetValue <bool>())
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }

                    if (GetQEndTime() > 2)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    return;
                }

                if ((OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && CanCast && !E.IsReady()) || !Orbwalking.InAutoAttackRange(t))
                {
                    if ((Program.Combo || (OktwCommon.GetBuffCount(t, "varuswdebuff") == 3 && Program.Harass)) && Player.Mana > RMANA + QMANA)
                    {
                        CastQ(t);
                    }
                    else if (Program.Harass && Player.Mana > RMANA + EMANA + QMANA + QMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        CastQ(t);
                    }
                    else if (!Program.None && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            CastQ(enemy);
                        }
                    }
                }
            }
            else if (FarmSpells && MainMenu.Item("farmQ", true).GetValue <bool>() && Q.Range > 1500 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > MainMenu.Item("Mana", true).GetValue <Slider>().Value)))
            {
                var allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 3 || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Example #50
0
        private static void JungleClear()
        {
            if (JungleClearOption.HasEnouguMana())
            {
                var mobs =
                    GameObjects.Jungle.Where(x => x.IsValidTarget(bigGunRange) && x.GetJungleType() != JungleType.Unknown)
                    .OrderByDescending(x => x.MaxHealth)
                    .ToList();

                if (mobs.Any())
                {
                    if (JungleClearOption.UseW && W.IsReady() &&
                        mobs.FirstOrDefault(x => x.GetJungleType() != JungleType.Unknown) != null)
                    {
                        W.Cast(mobs.FirstOrDefault(x => !x.Name.ToLower().Contains("mini")));
                    }

                    if (JungleClearOption.UseQ && Q.IsReady())
                    {
                        if (Me.HasBuff("JinxQ"))
                        {
                            foreach (var mob in mobs)
                            {
                                var count = ObjectManager.Get <AIMinionClient>().Count(x => x.Distance(mob) <= 150);

                                if (mob.DistanceToPlayer() <= bigGunRange)
                                {
                                    if (count < 2)
                                    {
                                        if (Orbwalker.CanAttack())
                                        {
                                            Q.Cast();
                                        }
                                    }
                                    else if (mob.Health > Me.GetAutoAttackDamage(mob) * 1.1f)
                                    {
                                        if (Orbwalker.CanAttack())
                                        {
                                            Q.Cast();
                                        }
                                    }
                                }
                            }

                            if (mobs.Count < 2)
                            {
                                if (Orbwalker.CanAttack())
                                {
                                    Q.Cast();
                                }
                            }
                        }
                        else
                        {
                            foreach (var mob in mobs)
                            {
                                var count = ObjectManager.Get <AIMinionClient>().Count(x => x.Distance(mob) <= 150);

                                if (mob.DistanceToPlayer() <= bigGunRange)
                                {
                                    if (count >= 2)
                                    {
                                        if (Orbwalker.CanAttack())
                                        {
                                            Q.Cast();
                                        }
                                    }
                                    else if (mob.Health < Me.GetAutoAttackDamage(mob) * 1.1f &&
                                             mob.DistanceToPlayer() > Q.Range)
                                    {
                                        if (Orbwalker.CanAttack())
                                        {
                                            Q.Cast();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    if (Me.HasBuff("JinxQ") && Q.IsReady())
                    {
                        Q.Cast();
                    }
                }
            }
            else
            {
                if (Me.HasBuff("JinxQ") && Q.IsReady())
                {
                    Q.Cast();
                }
            }
        }
Example #51
0
        private static void OnDoCastRange(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            if (args.SData.Name == "jayceshockblast" && !Ismelee())
            {
                if (GetBool("manualeq", typeof(KeyBind)))
                {
                    var pos = Player.Position.Extend(Game.CursorPos, Player.BoundingRadius + 150);
                    E.Cast(pos);
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && GetBool("useecr", typeof(bool)))
                {
                    var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                    if (target == null)
                    {
                        return;
                    }
                    var pred         = Q.GetPrediction(target).CastPosition;
                    var castposition = Player.Position.Extend(pred, Player.BoundingRadius + 150);
                    E.Cast(castposition);
                }
                if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && GetBool("useehr", typeof(bool)))
                {
                    var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
                    if (target == null)
                    {
                        return;
                    }
                    var pred         = Q.GetPrediction(target).CastPosition;
                    var castposition = Player.Position.Extend(pred, Player.BoundingRadius + 150);
                    E.Cast(castposition);
                }
            }
            if (!Orbwalking.IsAutoAttack(args.SData.Name))
            {
                return;
            }
            if (!sender.IsMe)
            {
                return;
            }
            if (!args.SData.IsAutoAttack())
            {
                return;
            }
            if (args.Target.Type != GameObjectType.obj_AI_Hero)
            {
                return;
            }
            if (Ismelee())
            {
                return;
            }

            if (W.IsReady())
            {
                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && GetBool("usewcr", typeof(bool))) ||
                    (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed && GetBool("usewhr", typeof(bool))))
                {
                    W.Cast();
                    Orbwalker.ForceTarget((Obj_AI_Hero)args.Target);
                    Orbwalking.ResetAutoAttackTimer();
                }
            }
        }
Example #52
0
        /// <summary>
        ///     Every tick update
        /// </summary>
        /// <param name="args"></param>
        #region On Update
        private static void OnGameUpdate(EventArgs args)
        {
            /*
             * foreach (var buff in Player.Buffs)
             * {
             *  if (buff.Name.ToLower() != "odinplayerbuff"
             || buff.Name.ToLower() != "kalistacoopstrikeally"
             || buff.Name != "pyromania_marker")
             ||     Game.PrintChat(buff.Name.ToLower());
             ||}
             */

            Orbwalker.SetAttack(true);
            if (Player.IsRecalling())
            {
                return;
            }

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

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

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

            case Orbwalking.OrbwalkingMode.Mixed:
                Mixed();
                break;
            }
            var target = TargetSelector.GetTarget(Q.Range + 200, TargetSelector.DamageType.Magical);

            if (target != null)
            {
                if (Player.Distance(target) > Q.Range &&
                    ((!Q.IsReady() || !W.IsReady() || !R.IsReady())))
                {
                    Orbwalker.SetAttack(false);
                }
                else
                {
                    Orbwalker.SetAttack(true);
                }
            }
            Parostack();
            KillSteal();

            if (!Config.Item("tibmove").GetValue <KeyBind>().Active)
            {
                Tibbers.Tibbersmove();
            }
            else if (Config.Item("tibmove").GetValue <KeyBind>().Active)
            {
                MoveTibbers();
            }

            if (Config.Item("comboMenu.flashmenu.flashr").GetValue <KeyBind>().Active ||
                Config.Item("comboMenu.flashmenu.flasher").GetValue <KeyBind>().Active)
            {
                TibbersFlash();
            }
        }
Example #53
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

            if (!Config.Item("farmQ", true).GetValue <bool>())
            {
                return;
            }

            var minions = Cache.GetMinions(Player.ServerPosition, Q.Range);

            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            foreach (var minion in minions.Where(minion => orbTarget != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                {
                    return;
                }
            }

            if (Config.Item("LC", true).GetValue <bool>() && Program.LaneClear && !SebbyLib.Orbwalking.CanAttack() && FarmSpells)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion) && orbTarget != minion.NetworkId))
                {
                    var hpPred    = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 300);
                    var dmgMinion = minion.GetAutoAttackDamage(minion);
                    var qDmg      = Q.GetDamage(minion);
                    if (hpPred < qDmg)
                    {
                        if (hpPred > dmgMinion)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                    else if (LCP)
                    {
                        if (hpPred > dmgMinion + qDmg)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Example #54
0
File: Anim.cs Project: riwalry1/AIO
        public static void OnPlay(Obj_AI_Base sender, GameObjectPlayAnimationEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }
            var t = 0;

            var a = 0;
            var b = "";

            switch (args.Animation) // Logic from Fluxy
            {
            case "Spell1a":
                lastQ  = Utils.GameTimeTickCount;
                t      = 291;
                Qstack = 2;
                b      = "Q2";
                a      = t - MenuConfig.Qld - (Game.Ping - MenuConfig.Qd);
                break;

            case "Spell1b":
                lastQ  = Utils.GameTimeTickCount;
                t      = 290;
                Qstack = 3;
                b      = "Q3";
                a      = t - MenuConfig.Qld - (Game.Ping - MenuConfig.Qd);
                break;

            case "Spell1c":     // q3?
                lastQ  = Utils.GameTimeTickCount;
                t      = 343;
                Qstack = 1;
                b      = "Q1";
                a      = t - MenuConfig.Qld - (Game.Ping - MenuConfig.Qd);
                break;

            case "Spell2":
                t = 170;
                break;

            case "Spell3":
                if (MenuConfig.Burst || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) ||
                    MenuConfig.FastHarass || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
                {
                    Usables.CastYoumoo();
                }
                break;

            case "Spell4a":
                t     = 0;
                lastR = Utils.GameTimeTickCount;
                break;

            case "Spell4b":
                t = 150;
                var target = TargetSelector.SelectedTarget;
                if (Spells.Q.IsReady() && target.LSIsValidTarget())
                {
                    ForceCastQ(target);
                }
                break;
            }

            if (a != 0 && (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.None)))
            {
                LeagueSharp.Common.Utility.DelayAction.Add(a, () =>
                {
                    Console.WriteLine(b);
                    Orbwalker.ResetAutoAttack();
                    EloBuddy.Player.DoEmote(Emote.Dance);
                });
            }
        }
Example #55
0
        private static void Combo()
        {
            if (ComboOption.UseQ && Q.IsReady() && Orbwalker.GetTarget() != null)
            {
                var target = Orbwalker.GetTarget() as AIHeroClient;
                if (target != null && !target.IsDead && target.InAutoAttackRange())
                {
                    if (Me.HasBuff("asheqcastready"))
                    {
                        Q.Cast();
                    }
                }
            }

            if (ComboOption.UseR && R.IsReady())
            {
                foreach (var target in GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(1200)))
                {
                    if (ComboOption.GetBool("ComboRTeam").Enabled)
                    {
                        if (target.IsValidTarget(600) && Me.CountEnemyHeroesInRange(600) >= 3 &&
                            target.CountAllyHeroesInRange(200) <= 2)
                        {
                            var rPred = R.GetPrediction(target);

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

                    if (ComboOption.GetBool("ComboRSolo").Enabled)
                    {
                        if (Me.CountEnemyHeroesInRange(800) == 1 &&
                            !target.InAutoAttackRange() &&
                            target.DistanceToPlayer() <= 700 &&
                            target.Health > Me.GetAutoAttackDamage(target) &&
                            target.Health < Me.GetSpellDamage(target, SpellSlot.R) + Me.GetAutoAttackDamage(target) * 3 &&
                            !target.HasBuffOfType(BuffType.SpellShield))
                        {
                            var rPred = R.GetPrediction(target);

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

                        if (target.DistanceToPlayer() <= 1000 &&
                            (!target.CanMoveMent() || target.HasBuffOfType(BuffType.Stun) ||
                             R.GetPrediction(target).Hitchance == HitChance.Immobile))
                        {
                            var rPred = R.GetPrediction(target);

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

            if (ComboOption.UseW && W.IsReady() && !Me.HasBuff("AsheQAttack"))
            {
                if (ComboOption.GetBool("ComboSaveMana").Enabled&&
                    Me.Mana > (R.IsReady() ? R.Mana : 0) + W.Mana + Q.Mana ||
                    !ComboOption.GetBool("ComboSaveMana").Enabled)
                {
                    var target = MyTargetSelector.GetTarget(W.Range);

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

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

            if (ComboOption.UseE && E.IsReady())
            {
                var target = MyTargetSelector.GetTarget(1000);

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

                    if (ePred.UnitPosition.IsGrass() || target.PreviousPosition.IsGrass())
                    {
                        E.Cast(ePred.UnitPosition);
                    }
                }
            }
        }
Example #56
0
        private static void Combo()
        {
            var target = MyTargetSelector.GetTarget(R.Range);

            if (target.IsValidTarget(R.Range) && !target.IsUnKillable() && (!target.InAutoAttackRange() || !Orbwalker.CanAttack()))
            {
                if (ComboOption.UseR && R.IsReady() &&
                    R.Ammo >= ComboOption.GetSlider("ComboRLimit").Value&&
                    target.IsValidTarget(R.Range) && target.HealthPercent <= ComboOption.GetSlider("ComboRHP").Value)
                {
                    var rPred = R.GetPrediction(target);

                    if (rPred.Hitchance >= HitChance.High)
                    {
                        R.Cast(rPred.UnitPosition);
                    }
                    else if (rPred.Hitchance == HitChance.Collision)
                    {
                        foreach (var collsion in rPred.CollisionObjects.Where(x => x.IsValidTarget(R.Range)))
                        {
                            if (collsion.DistanceSquared(target) <= Math.Pow(85, 2))
                            {
                                R.Cast(collsion.PreviousPosition);
                            }
                        }
                    }
                }

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

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

                if (ComboOption.UseE && E.IsReady() && target.IsValidTarget(E.Range))
                {
                    E.Cast(Me.PreviousPosition);
                }
            }
        }
Example #57
0
        private void LogicW()
        {
            if (Config.Item("Wdragon", true).GetValue <bool>() && !Orbwalker.GetTarget().IsValidTarget() && !Program.Combo && Player.CountEnemiesInRange(800) == 0)
            {
                if (wCount > 0)
                {
                    Vector3 baronPos;
                    baronPos.X = 5232;
                    baronPos.Y = 10788;
                    baronPos.Z = 0;
                    if (Player.Distance(baronPos) < 5000)
                    {
                        W.Cast(baronPos);
                    }
                }
                if (wCount == 0)
                {
                    Vector3 dragonPos;
                    dragonPos.X = 9919f;
                    dragonPos.Y = 4475f;
                    dragonPos.Z = 0f;
                    if (Player.Distance(dragonPos) < 5000)
                    {
                        W.Cast(dragonPos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }

                if (wCount == 1)
                {
                    Vector3 redPos;
                    redPos.X = 8022;
                    redPos.Y = 4156;
                    redPos.Z = 0;
                    if (Player.Distance(redPos) < 5000)
                    {
                        W.Cast(redPos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }
                if (wCount == 2)
                {
                    Vector3 bluePos;
                    bluePos.X = 11396;
                    bluePos.Y = 7076;
                    bluePos.Z = 0;
                    if (Player.Distance(bluePos) < 5000)
                    {
                        W.Cast(bluePos);
                    }
                    else
                    {
                        wCount++;
                    }
                    return;
                }
                if (wCount > 2)
                {
                    wCount = 0;
                }
            }
        }
Example #58
0
        void OnUpdate(EventArgs args)
        {
            if (Yasuo.IsDead || Yasuo.IsRecalling())
            {
                return;
            }

            CastUlt();

            if (GetBool("Misc.AutoStackQ", YasuoMenu.MiscM) && !TornadoReady && !CurrentTarget.IsValidEnemy(Spells[Q].Range))
            {
                var closest =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(x => x.IsValidMinion(Spells[Q].Range) && MinionManager.IsMinion(x))
                    .MinOrDefault(x => x.LSDistance(Yasuo));

                var pred = Spells[Q].GetPrediction(closest);
                if (pred.Hitchance >= HitChance.Low)
                {
                    Spells[Q].Cast(closest);
                }
            }

            if (GetBool("Misc.Walljump", YasuoMenu.MiscM) && Game.MapId == GameMapId.SummonersRift)
            {
                WallJump.OnUpdate();
            }

            Fleeing = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee);

            if (GetBool("Killsteal.Enabled", YasuoMenu.KillstealM) && !Fleeing)
            {
                Killsteal();
            }

            if (GetKeyBind("Harass.KB", YasuoMenu.HarassM) && !Fleeing)
            {
                Harass();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Combo();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Mixed();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                LHSkills();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear))
            {
                Orbwalker.OrbwalkTo(Game.CursorPos);
                Orbwalker.DisableAttacking = false;
                Waveclear();
            }

            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                Flee();
            }
        }
Example #59
0
 private static void CancelAnimation()
 {
     Player.DoEmote(Emote.Dance);
     Orbwalker.ResetAutoAttack();
 }
Example #60
0
 private void ResetAutoAttack()
 {
     Player.DoEmote(Emote.Dance);
     Orbwalker.ResetAutoAttack();
 }