private void OnAction(object sender, OrbwalkingActionArgs e)
        {
            if (AIOmode == 2)
                return;

            if (e.Type == OrbwalkingType.BeforeAttack)
            {
                if (Combo && MenuAdvance["comboAa"])
                {
                    var t = (Obj_AI_Hero)e.Target;
                    if (6 * Player.GetAutoAttackDamage(t) < t.Health - OktwCommon.GetIncomingDamage(t) && !t.HasBuff("luxilluminatingfraulein") && !Player.HasBuff("sheen"))
                        e.Process = false;
                }

                if (Farm && MenuAdvance["support"])
                {
                    if (e.Target.Type == GameObjectType.obj_AI_Minion) e.Process = false;
                }
            }
        }
Example #2
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(object sender, OrbwalkingActionArgs args)
        {
            switch (args.Type)
            {
            case OrbwalkingType.BeforeAttack:

                /// <summary>
                ///     The Target Forcing Logic.
                /// </summary>
                var hero       = args.Target as Obj_AI_Hero;
                var bestTarget =
                    GameObjects.EnemyHeroes.FirstOrDefault(
                        t => t.IsValidTarget(Vars.AaRange) && t.HasBuff("TristanaECharge"));
                if (hero != null && bestTarget?.NetworkId != hero.NetworkId &&
                    Vars.GetRealHealth(hero) > GameObjects.Player.GetAutoAttackDamage(hero) * 3)
                {
                    Variables.Orbwalker.ForceTarget = bestTarget;
                    return;
                }

                Variables.Orbwalker.ForceTarget = null;
                break;
            }
        }
Example #3
0
        private void OnAction(object sender, OrbwalkingActionArgs e)
        {
            if (e.Type == OrbwalkingType.BeforeAttack)
            {
                if (!Q.IsReady() || !MenuQ["Auto"] || !FishBoneActive)
                {
                    return;
                }

                var t = e.Target as Obj_AI_Hero;

                if (t != null)
                {
                    var realDistance = GetRealDistance(t) - 50;
                    if (Combo && (realDistance < GetRealPowPowRange(t) || (Player.Mana < RMANA + 20 && Player.GetAutoAttackDamage(t) * 3 < t.Health)))
                    {
                        Q.Cast();
                    }
                    else if (Farm && MenuQ["Mix"] && (realDistance > bonusRange() || realDistance < GetRealPowPowRange(t) || Player.Mana < RMANA + EMANA + WMANA + WMANA))
                    {
                        Q.Cast();
                    }
                }

                var minion = e.Target as Obj_AI_Minion;
                if (Farm && minion != null)
                {
                    var realDistance = GetRealDistance(minion);

                    if (realDistance < GetRealPowPowRange(minion) || Player.ManaPercent < MenuFarm["Mana"])
                    {
                        Q.Cast();
                    }
                }
            }
        }
Example #4
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
 }
Example #5
0
 private void OnAction(object sender, OrbwalkingActionArgs args)
 {
     if (args.Type == OrbwalkingType.BeforeAttack)
     {
         args.Process = AttacksEnabled;
     }
 }
Example #6
0
        private static void Orbwalker_AfterAttack(OrbwalkingActionArgs e)
        {
            var targetAsHero   = e.Target as AIHeroClient;
            var targetAsMinion = e.Target as Obj_AI_Minion;

            switch (Variables.Orbwalker.ActiveMode)
            {
            case OrbwalkingMode.Combo:
                if (targetAsHero == null)
                {
                    //타겟이 챔피언이 아닐경우 브레이크
                    break;
                }

                if (Config.Modes.Combo.UseW && SpellManager.W.IsReady() && targetAsHero.InAutoAttackRange())
                {
                    SpellManager.W.Cast();
                }
                break;

            case OrbwalkingMode.Hybrid:
                if (targetAsHero == null)
                {
                    //타겟이 챔피언이 아닐경우 브레이크
                    break;
                }

                if (Config.Modes.Combo.UseW && SpellManager.W.IsReady() && GameObjects.Player.ManaPercent > Config.Modes.Harass.MinMana && targetAsHero.InAutoAttackRange())
                {
                    SpellManager.W.Cast();
                }
                break;

            case OrbwalkingMode.LastHit:
                break;

            case OrbwalkingMode.LaneClear:
                if (targetAsMinion == null)
                {
                    //타겟이 미니언이 아닐경우 브레이크
                    break;
                }

                //때린 오브젝트가 정글 몹인지 아닌지 판단
                if (targetAsMinion.GetJungleType().HasFlag(JungleType.Unknown))
                {    //정글몹이 아니면 - laneclear
                    if (Config.Modes.LaneClear.UseQ && SpellManager.Q.IsReady() && GameObjects.Player.ManaPercent > Config.Modes.LaneClear.MinMana)
                    {
                        var farmPosition = SpellManager.Q.GetLineFarmLocation(GameObjects.EnemyMinions.Where(x => x.IsValidTarget(SpellManager.Q.Range)).ToList());
                        if (farmPosition.MinionsHit >= 3)
                        {
                            SpellManager.Q.Cast(farmPosition.Position);
                        }
                    }

                    if (Config.Modes.LaneClear.UseW && SpellManager.W.IsReady() && GameObjects.Player.ManaPercent > Config.Modes.LaneClear.MinMana)
                    {
                        SpellManager.W.Cast();
                    }
                }
                else
                {    //정글몹이면 - jungleclear
                     //간혹 V 키누르다 의도치 않게 정글몹에게 스킬을 사용하는 경우를 없애기위해.
                     //정글몹 콤보는 항상 평타 이후부터 시작하는걸로

                    if (Config.Modes.JungleClear.UseQ && SpellManager.Q.IsReady() && GameObjects.Player.ManaPercent > Config.Modes.JungleClear.MinMana)
                    {
                        SpellManager.Q.Cast(targetAsMinion);
                    }

                    if (Config.Modes.JungleClear.UseW && SpellManager.W.IsReady() && GameObjects.Player.ManaPercent > Config.Modes.JungleClear.MinMana)
                    {
                        SpellManager.W.Cast();
                    }
                }
                break;
            }
        }
Example #7
0
 private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Target == null)
     {
         return;
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (UseEIfResettedByAMinionBool && ObjectManager.Player.ManaPercent > EResetByAMinionMinManaSlider.Value)
         {
             if (
                 ValidTargets.Any(e =>
                                  e.Distance(ObjectManager.Player.ServerPosition) > 615 &&
                                  GetRendBuff(e).Count >= MinEnemyStacksForEMinionResetSlider.Value) &&
                 GameObjects.EnemyMinions.Any(m => IsRendKillable(m)))
             {
                 E.Cast();
             }
         }
         if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Q.IsReady())
         {
             var hero = orbwalkingActionArgs.Target as Obj_AI_Hero;
             if (hero != null)
             {
                 if (hero.IsHPBarRendered)
                 {
                     var pred = Q.GetPrediction(hero);
                     if (pred.Hitchance >= HitChance.High)
                     {
                         Q.Cast(pred.UnitPosition);
                         return;
                     }
                 }
             }
             else
             {
                 foreach (var target in ValidTargets.Where(t => t.Distance(ObjectManager.Player) < 900))
                 {
                     if (ObjectManager.Player.ManaPercent > UseQManaSlider.Value)
                     {
                         var pred = Q.GetPrediction(target);
                         if (pred.Hitchance >= HitChance.High)
                         {
                             Q.Cast(pred.UnitPosition);
                             return;
                         }
                     }
                 }
             }
         }
         if (UseQStackTransferBool && orbwalkingActionArgs.Target is Obj_AI_Minion)
         {
             var target = orbwalkingActionArgs.Target as Obj_AI_Minion;
             if (GetRendBuff(target).Count >= UseQStackTransferMinStacksSlider && target.Health < Q.GetDamage(target))
             {
                 foreach (var enemy in ValidTargets.Where(en => en.Distance(ObjectManager.Player) < 900))
                 {
                     var pred = Q.GetPrediction(enemy, false);
                     if (pred.CollisionObjects.All(co => co is Obj_AI_Minion && co.Health < Q.GetDamage(co)) && pred.CollisionObjects.Any(m => m.NetworkId == target.NetworkId))
                     {
                         Q.Cast(pred.UnitPosition);
                     }
                 }
             }
         }
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && FocusWBuffedEnemyBool)
         {
             var wMarkedEnemy =
                 ValidTargets.FirstOrDefault(
                     h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally"));
             if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget())
             {
                 Orbwalker.ForceTarget = wMarkedEnemy;
             }
         }
         if (Orbwalker.ActiveMode != OrbwalkingMode.Combo && FocusWBuffedEnemyInHarassBool)
         {
             var wMarkedEnemy =
                 ValidTargets.FirstOrDefault(
                     h => h.Distance(ObjectManager.Player.ServerPosition) < 600 && h.HasBuff("kalistacoopstrikemarkally"));
             if (wMarkedEnemy != null && wMarkedEnemy.IsValidTarget())
             {
                 Orbwalker.ForceTarget = wMarkedEnemy;
             }
         }
         if (Orbwalker.ActiveMode == OrbwalkingMode.LaneClear &&
             orbwalkingActionArgs.Target.Type != GameObjectType.obj_AI_Hero)
         {
             if (FocusWBuffedMinions)
             {
                 Orbwalker.ForceTarget =
                     GameObjects.EnemyMinions.FirstOrDefault(
                         m =>
                         m.Distance(ObjectManager.Player.ServerPosition) < 615 && m.HasBuff("kalistacoopstrikemarkally") &&
                         m.Health < ObjectManager.Player.GetAutoAttackDamage(m) + W.GetDamage(m));
             }
         }
     }
 }
Example #8
0
 private void Orbwalker_OnAction(object sender, OrbwalkingActionArgs args)
 {
     try
     {
         if (args.Type == OrbwalkingType.BeforeAttack && Menu["Key"]["LaneClear"].GetValue<MenuKeyBind>().Active && (args.Target is Obj_AI_Turret || args.Target.Type == GameObjectType.obj_AI_Minion))
         {
             if (Menu["LaneClear"]["useqlc"].GetValue<MenuBool>() && Me.ManaPercent >= Menu["LaneClear"]["laneclearmana"].GetValue<MenuSlider>() && Q.IsReady())
             {
                 Q.CastOnUnit(args.Target as Obj_AI_Minion);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
Example #9
0
        private void OnAction(object sender, OrbwalkingActionArgs args)
        {
            if (args.Type == OrbwalkingType.BeforeAttack)
            {
                //Anti Melee
                var possibleNearbyMeleeChampion =
                    ValidTargets.FirstOrDefault(
                        e => e.IsMelee && e.ServerPosition.Distance(ObjectManager.Player.ServerPosition) < 350);

                if (possibleNearbyMeleeChampion.IsValidTarget())
                {
                    if (E.IsReady() && UseEAntiMelee)
                    {
                        var pos = ObjectManager.Player.ServerPosition.Extend(possibleNearbyMeleeChampion.ServerPosition,
                            -Misc.GiveRandomInt(250, 475));
                        if (!IsDangerousPosition(pos))
                        {
                            if (pos.IsUnderEnemyTurret() && !ObjectManager.Player.IsUnderEnemyTurret())
                            {
                                return;
                            }
                            E.Cast(pos);
                        }
                    }
                }
            }
            if (args.Type == OrbwalkingType.AfterAttack)
            {
                //JungleClear
                if (args.Target is Obj_AI_Minion)
                {
                    JungleClear(args.Target);
                }
            }
        }
Example #10
0
        /// <summary>
        ///     Called on orbwalker action.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
        public static void OnAction(object sender, OrbwalkingActionArgs args)
        {
            switch (args.Type)
            {
            case OrbwalkingType.BeforeAttack:
                var isUsingFishBones = GameObjects.Player.HasBuff("JinxQ");

                switch (Variables.Orbwalker.ActiveMode)
                {
                case OrbwalkingMode.LastHit:
                case OrbwalkingMode.LaneClear:
                    const float SplashRange  = 160f;
                    var         minionTarget = args.Target as Obj_AI_Minion;
                    var         canLastHit   = Vars.Menu["spells"]["q"]["lasthit"].GetValue <MenuSliderButton>().BValue &&
                                               GameObjects.Player.ManaPercent
                                               > ManaManager.GetNeededMana(
                        Vars.W.Slot,
                        Vars.Menu["spells"]["q"]["lasthit"]);

                    var canLaneClear = Vars.Menu["spells"]["q"]["clear"].GetValue <MenuSliderButton>().BValue &&
                                       GameObjects.Player.ManaPercent
                                       > ManaManager.GetNeededMana(
                        Vars.W.Slot,
                        Vars.Menu["spells"]["q"]["lasthit"]);

                    if (Vars.Q.IsReady() && minionTarget != null)
                    {
                        var minionsInRange =
                            GameObjects.EnemyMinions.Count(m => m.Distance(minionTarget) < SplashRange);
                        if (isUsingFishBones)
                        {
                            if (minionsInRange < 3)
                            {
                                Vars.Q.Cast();
                            }
                        }
                        else
                        {
                            if (minionsInRange >= 3 &&
                                (Variables.Orbwalker.ActiveMode == OrbwalkingMode.LastHit && canLastHit ||
                                 Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear &&
                                 canLaneClear))
                            {
                                Vars.Q.Cast();
                            }
                        }
                    }
                    break;

                case OrbwalkingMode.Combo:
                    var target = Variables.Orbwalker.GetTarget() as AIHeroClient ?? Targets.Target;
                    var minSplashRangeEnemies =
                        Vars.Menu["spells"]["q"]["combo"].GetValue <MenuSliderButton>().SValue;
                    if (isUsingFishBones)
                    {
                        if (GameObjects.Player.Distance(target) < Vars.PowPow.Range &&
                            target.CountEnemyHeroesInRange(SplashRange) < minSplashRangeEnemies)
                        {
                            Vars.Q.Cast();
                        }
                    }
                    break;
                }
                break;
            }
        }
Example #11
0
        private static void Orbwalker_OnAction(object sender, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.BeforeAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (Args.Target is AIHeroClient && Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                {
                    var target = (AIHeroClient)Args.Target;

                    if (Menu["Combo"]["Q"] && target.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready"))
                    {
                        if (Menu["Combo"]["SaveMana"] && Me.Mana < R.Instance.SData.Mana + W.Instance.SData.Mana + Q.Instance.SData.Mana)
                        {
                            return;
                        }

                        Q.Cast();
                        return;
                    }
                }

                if (Args.Target is Obj_AI_Minion && Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var target = (Obj_AI_Base)Args.Target;

                    var Mobs = ObjectManager.Get <Obj_AI_Minion>().Where(x => !x.IsDead && !x.IsZombie && x.Team == GameObjectTeam.Neutral && x.IsValidTarget(Me.AttackRange)).OrderBy(x => x.MaxHealth).ToList();

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Clear"]["JCQ"].GetValue <MenuSliderButton>().BValue&& mob.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Clear"]["JCQ"].GetValue <MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            if (Args.Type == OrbwalkingType.AfterAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                {
                    var target = Variables.TargetSelector.GetTarget(Q);

                    if (Menu["Combo"]["Q"] && target.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready"))
                    {
                        if (Menu["Combo"]["SaveMana"] && Me.Mana < R.Instance.SData.Mana + W.Instance.SData.Mana + Q.Instance.SData.Mana)
                        {
                            return;
                        }

                        Q.Cast();
                        Variables.Orbwalker.ResetSwingTimer();
                        return;
                    }

                    if (Menu["Combo"]["W"] && W.IsReady() && target.IsValidTarget(Me.AttackRange))
                    {
                        var WPred = W.GetPrediction(target);

                        if (WPred.Hitchance >= HitChance.VeryHigh)
                        {
                            if (W.Cast(WPred.CastPosition))
                            {
                                Variables.Orbwalker.ResetSwingTimer();
                                return;
                            }
                        }
                    }
                }

                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var Mobs = ObjectManager.Get <Obj_AI_Minion>().Where(x => !x.IsDead && !x.IsZombie && x.Team == GameObjectTeam.Neutral && x.IsValidTarget(Me.AttackRange)).OrderBy(x => x.MaxHealth).ToList();

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Clear"]["JCQ"].GetValue <MenuSliderButton>().BValue&& mob.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Clear"]["JCQ"].GetValue <MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    Variables.Orbwalker.ResetSwingTimer();
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
Example #12
0
        private static void OnAction(object sender, OrbwalkingActionArgs e)
        {
            if (e.Type == OrbwalkingType.AfterAttack && e.Target.IsEnemy &&
                e.Target.Type == GameObjectType.obj_AI_Hero)
            {
                if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Config.Menu["combo.settings"]["combo.q"] && Spells.Q.IsReady()
                    && e.Target.IsValidTarget(777) && Config.ComboMethod.SelectedValue == "Normal")
                {
                    SpellManager.ExecuteQ(((Obj_AI_Hero)e.Target));
                }

                if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Config.Menu["combo.settings"]["combo.q"] && Spells.Q.IsReady()
                    && e.Target.IsValidTarget(777) && Config.ComboMethod.SelectedValue == "Burst" &&
                    ((Obj_AI_Hero)e.Target).GetBuffCount("vaynesilvereddebuff") >= 1)
                {
                    SpellManager.ExecuteQ(((Obj_AI_Hero)e.Target));
                }

                if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Config.Menu["activator.settings"]["use.youmuu"] && Items.HasItem(3142)
                    && Items.CanUseItem(3142) && e.Target.IsValidTarget(ObjectManager.Player.AttackRange))
                {
                    Items.UseItem(3142);
                }

                if (Orbwalker.ActiveMode == OrbwalkingMode.Combo && Config.Menu["activator.settings"]["use.botrk"] && Items.HasItem(3153)
                    && Items.CanUseItem(3153) && e.Target.IsValidTarget(550))
                {
                    if ((((Obj_AI_Hero)e.Target).Health / ((Obj_AI_Hero)e.Target).MaxHealth) < Config.Menu["activator.settings"]["botrk.enemy.hp"] && ((ObjectManager.Player.Health / ObjectManager.Player.MaxHealth) < Config.Menu["activator.settings"]["botrk.vayne.hp"]))
                    {
                        Items.UseItem(3153, ((Obj_AI_Hero)e.Target));
                    }
                }

                if (Orbwalker.ActiveMode == OrbwalkingMode.Hybrid && Config.Menu["harass.settings"]["harass.q"] && Spells.Q.IsReady()
                    && ObjectManager.Player.ManaPercent >= Config.Menu["harass.settings"]["harass.mana"] && e.Target.IsValidTarget(777)
                    && ((Obj_AI_Hero)e.Target).GetBuffCount("vaynesilvereddebuff") >= 1 && Config.HarassMenu.SelectedValue == "2W + Q")
                {
                    SpellManager.ExecuteQ(((Obj_AI_Hero)e.Target));
                }

            }

            if (e.Type == OrbwalkingType.AfterAttack && e.Target.Type == GameObjectType.obj_AI_Minion &&
                e.Target.Team == GameObjectTeam.Neutral && ObjectManager.Player.ManaPercent >= Config.Menu["jungle.settings"]["jungle.mana"]
                && Spells.Q.IsReady() && Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
            {
                Spells.Q.Cast(Game.CursorPos);
            }
        }
Example #13
0
        private static void OnAction(object sender, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.BeforeAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (InCombo)
                {
                    var target = GetTarget(GetAttackRange(Me));

                    if (Menu["Ashe_Combo"]["Q"] && CheckTarget(target) &&
                        target.IsValidTarget(GetAttackRange(Me)) &&
                        Q.IsReady() && Me.HasBuff("asheqcastready"))
                    {
                        if (Menu["Ashe_Combo"]["SaveMana"] && Me.Mana <
                            R.Instance.SData.Mana + W.Instance.SData.Mana + Q.Instance.SData.Mana)
                        {
                            return;
                        }

                        Q.Cast();
                        return;
                    }
                }

                if (Args.Target is Obj_AI_Minion && InClear)
                {
                    var Mobs = GetMobs(Me.Position, GetAttackRange(Me));

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Ashe_Clear"]["JCQ"].GetValue <MenuSliderButton>().BValue&& mob.IsValidTarget(GetAttackRange(Me)) &&
                                Q.IsReady() && Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Ashe_Clear"]["JCQ"].GetValue <MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            if (Args.Type == OrbwalkingType.AfterAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (InCombo)
                {
                    var target = GetTarget(Q);

                    if (CheckTarget(target))
                    {
                        if (Menu["Ashe_Combo"]["Q"] && target.IsValidTarget(GetAttackRange(Me)) && Q.IsReady() && Me.HasBuff("asheqcastready"))
                        {
                            if (Menu["Ashe_Combo"]["SaveMana"] && Me.Mana < R.Instance.SData.Mana + W.Instance.SData.Mana + Q.Instance.SData.Mana)
                            {
                                return;
                            }

                            Q.Cast();
                            Variables.Orbwalker.ResetSwingTimer();
                            return;
                        }

                        if (Menu["Combo"]["W"] && W.IsReady() && target.IsValidTarget(GetAttackRange(Me)))
                        {
                            var WPred = W.GetPrediction(target);

                            if (WPred.Hitchance >= HitChance.VeryHigh)
                            {
                                if (W.Cast(WPred.CastPosition))
                                {
                                    Variables.Orbwalker.ResetSwingTimer();
                                    return;
                                }
                            }
                        }
                    }
                }

                if (InClear)
                {
                    var Mobs = GetMobs(Me.Position, GetAttackRange(Me));

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Ashe_Clear"]["JCQ"].GetValue <MenuSliderButton>().BValue&&
                                mob.IsValidTarget(GetAttackRange(Me)) && Q.IsReady() &&
                                Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Ashe_Clear"]["JCQ"].GetValue <MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    Variables.Orbwalker.ResetSwingTimer();
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
Example #14
0
 private void Orbwalker_OnAction(object sender, OrbwalkingActionArgs args)
 {
     try
     {
         if (Menu["LaneClear"]["useelc"].GetValue<MenuBool>() && Me.ManaPercent >= Menu["LaneClear"]["lanejungleclearEmana"].GetValue<MenuSlider>() && E.IsReady())
         {
             E.Cast(args.Target as Obj_AI_Minion);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex);
     }
 }
Example #15
0
        private static void OnAction(object obj, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.BeforeAttack)
            {
                if (Menu["Tristana_Misc"]["Forcus1"] && (InCombo || InHarass))
                {
                    foreach (var e in GetEnemies(GetAttackRange(Me) + 300))
                    {
                        if (e != null && e.HasBuff("TristanaEChargeSound") && e.IsValidTarget(GetAttackRange(Me) + 300))
                        {
                            Variables.TargetSelector.SetTarget(e);
                        }
                    }
                }

                if (InAutoAttackRange(Args.Target) && Q.IsReady())
                {
                    if (InCombo && Args.Target is AIHeroClient)
                    {
                        var Target = Args.Target.Type == GameObjectType.AIHeroClient ? (AIHeroClient)Args.Target : null;

                        if (Target != null && !E.IsReady() && (Target.HasBuff("TristanaEChargeSound") || Target.HasBuff("TristanaECharge")) && Menu["Tristana_Combo"]["Q"])
                        {
                            Q.Cast();
                        }
                        else if (Target != null && !E.IsReady() && !(Target.HasBuff("TristanaEChargeSound") || Target.HasBuff("TristanaECharge")) && Menu["Tristana_Combo"]["Q"])
                        {
                            Q.Cast();
                        }
                        else if (Menu["Tristana_Combo"]["alwaysQ"])
                        {
                            Q.Cast();
                        }
                    }

                    if (InClear && Args.Target is Obj_AI_Minion)
                    {
                        var mobs   = GetMobs(Me.Position, 800);
                        var target = (Obj_AI_Minion)Args.Target;
                        if (mobs.Count() > 0)
                        {
                            foreach (var mob in mobs)
                            {
                                if (mob.CharData.BaseSkinName == target.CharData.BaseSkinName && Menu["Tristana_JungleClear"]["Q"] &&
                                    Me.ManaPercent >= Menu["Tristana_JungleClear"]["Mana"].GetValue <MenuSlider>().Value)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (Args.Type == OrbwalkingType.AfterAttack && InClear && (Args.Target is Obj_AI_Turret || Args.Target.Type == GameObjectType.obj_AI_Turret))
            {
                if (Menu["Tristana_LaneClear"]["E"] && E.IsReady())
                {
                    E.CastOnUnit(Args.Target as Obj_AI_Base);
                }

                var t = Args.Target as Obj_AI_Turret;

                if (Q.IsReady() && Menu["Tristana_LaneClear"]["Q"] && Me.CountEnemyHeroesInRange(1000) < 1 && (t.HasBuff("TristanaEChargeSound") || t.HasBuff("TristanaECharge")))
                {
                    Q.Cast();
                }
            }
        }
Example #16
0
        private void OnAction(object sender, OrbwalkingActionArgs e)
        {
            if (e.Type == OrbwalkingType.BeforeAttack)
            {
                if (!Q.IsReady() || !MenuQ["Auto"] || !FishBoneActive)
                    return;

                var t = e.Target as Obj_AI_Hero;

                if (t != null)
                {
                    var realDistance = GetRealDistance(t) - 50;
                    if (Combo && (realDistance < GetRealPowPowRange(t) || (Player.Mana < RMANA + 20 && Player.GetAutoAttackDamage(t) * 3 < t.Health)))
                        Q.Cast();
                    else if (Farm && MenuQ["Mix"] && (realDistance > bonusRange() || realDistance < GetRealPowPowRange(t) || Player.Mana < RMANA + EMANA + WMANA + WMANA))
                        Q.Cast();
                }

                var minion = e.Target as Obj_AI_Minion;
                if (Farm && minion != null)
                {
                    var realDistance = GetRealDistance(minion);

                    if (realDistance < GetRealPowPowRange(minion) || Player.ManaPercent < MenuFarm["Mana"])
                    {
                        Q.Cast();
                    }
                }
            }
        }
Example #17
0
File: Program.cs Project: ncmp/L-
 private static void Orbwalking_OnNonKillableMinion(OrbwalkingActionArgs args)
 {
     QLastHit((Obj_AI_Base)args.Target);
 }
Example #18
0
        private static void OnAction(object sender, OrbwalkingActionArgs args)
        {
            try
            {
                var ComboQ     = Menu["Q"]["ComboQ"].GetValue <MenuBool>().Value;
                var HarassQ    = Menu["Q"]["HarassQ"].GetValue <MenuBool>().Value;
                var LaneClearQ = Menu["Q"]["LaneClearQ"].GetValue <MenuBool>().Value;

                if (args.Type == OrbwalkingType.BeforeAttack)
                {
                    if (!(args.Target is AIHeroClient))
                    {
                        return;
                    }

                    if (!Q.IsReady())
                    {
                        return;
                    }

                    var t = (AIHeroClient)args.Target;

                    if (BigGun && t.IsValidTarget())
                    {
                        var RealDistance = GetRealDistance(t) - 50;
                        if (Combo && ComboQ)
                        {
                            if (RealDistance < (Q1Range(t)))
                            {
                                if (Player.Mana < R.Instance.SData.Mana + 20 || Player.GetAutoAttackDamage(t) * 3
                                    < t.Health)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                        else if ((LaneClear || Harass) && HarassQ)
                        {
                            if ((RealDistance > Q2Range() || RealDistance < Q1Range(t) || Player.Mana <
                                 R.Instance.SData.Mana + E.Instance.SData.Mana + W.Instance.SData.Mana + W.Instance.SData.Mana))
                            {
                                Q.Cast();
                            }
                        }
                    }
                    if (LaneClear && !BigGun && LaneClearQ)
                    {
                        if (Player.Mana > R.Instance.SData.Mana + E.Instance.SData.Mana + W.Instance.SData.Mana + 30)
                        {
                            var MinionQ = GetMinions(Player.ServerPosition, (Q2Range()));
                            foreach (var minion in MinionQ.Where(minion =>
                                                                 args.Target.NetworkId != minion.NetworkId && minion.Distance(args.Target.Position) < 200 && (5 - Q.Level)
                                                                 * Player.GetAutoAttackDamage(minion) < args.Target.Health && (5 - Q.Level) * Player.GetAutoAttackDamage(minion) < minion.Health))
                            {
                                Q.Cast();
                            }
                        }
                    }
                    if (!(Combo))
                    {
                        return;
                    }
                    if (args.Target is AIHeroClient)
                    {
                        var newTarget       = (AIHeroClient)args.Target;
                        var forceFocusEnemy = newTarget;
                        var aaRange         = Player.AttackRange * 525f + Player.BoundingRadius + 350;
                        foreach (var enemy in GameObjects.EnemyHeroes.Where(enemy => enemy.IsValidTarget(aaRange)))
                        {
                            if (enemy.Health / Player.GetAutoAttackDamage(enemy) + 1 < forceFocusEnemy.GetAutoAttackDamage(forceFocusEnemy))
                            {
                                forceFocusEnemy = enemy;
                            }
                        }
                        if (forceFocusEnemy.NetworkId != newTarget.NetworkId && Game.Time - LatFocusTime < 2)
                        {
                            args.Process = false;
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error in Before Attack Events " + ex);
            }
        }
Example #19
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 (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.IsValidTarget() && this.UseEJungleFarm)
                        {
                            if (this.EDelaySlider.Value > 0)
                            {
                                var thisEnemy = tg;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(tg);
                        }
                    }
                    if (this.UseQFarm && this.Q.IsReady())
                    {
                        if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.IsValidTarget() && !this.IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count(
                                m =>
                                    m.Position.Distance(ObjectManager.Player.Position) < 550 && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100+(Game.Ping/2)+ObjectManager.Player.AttackCastDelay*1000)) > 3) > 1 &&
                            !this.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 && !this.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;
                    }
                }
                var possibleTarget = Variables.TargetSelector.GetTarget(615, DamageType.Physical);
                if (possibleTarget != null && orbwalkingActionArgs.Target is Obj_AI_Minion &&
                    UseQBonusOnEnemiesNotCS && ObjectManager.Player.HasBuff("vaynetumblebonus"))
                {
                        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 #20
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         if (QFarm && Orbwalker.ActiveMode != OrbwalkingMode.Combo && Orbwalker.ActiveMode != OrbwalkingMode.None)
         {
             if (_lastTurretTarget != null && _lastTurretTarget.IsHPBarRendered &&
                 Q.GetDamage(_lastTurretTarget) > _lastTurretTarget.Health &&
                 _lastTurretTarget.Health > ObjectManager.Player.GetAutoAttackDamage(_lastTurretTarget))
             {
                 var pred = Q.GetPrediction(_lastTurretTarget);
                 if (!pred.CollisionObjects.Any())
                 {
                     Q.Cast(pred.UnitPosition);
                 }
             }
         }
     }
 }
Example #21
0
        private static void OnAction(object sender, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.AfterAttack)
            {
                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                {
                    var target = Variables.TargetSelector.GetTarget(W.Range, DamageType.Physical);

                    if (target != null && !target.IsDead && !target.IsZombie && target.IsHPBarRendered)
                    {
                        if (Menu["Combo"]["W"] && W.IsReady() && target.IsValidTarget(W.Range))
                        {
                            if (Menu["Combo"]["WOutRange"] && !InAutoAttackRange(target))
                            {
                                W.Cast();
                            }

                            if (Menu["Combo"]["WUlt"] && Me.HasBuff("IllaoiR"))
                            {
                                W.Cast();
                            }
                        }
                    }
                }

                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Hybrid && !Me.IsUnderEnemyTurret())
                {
                    if (Me.ManaPercent >= Menu["Harass"]["Mana"].GetValue <MenuSlider>().Value)
                    {
                        var target = Variables.TargetSelector.GetTarget(W.Range, DamageType.Physical);

                        if (target != null && !target.IsDead && !target.IsZombie && target.IsHPBarRendered)
                        {
                            if (Menu["Harass"]["W"] && W.IsReady() && target.IsValidTarget(W.Range))
                            {
                                if (Menu["Harass"]["WOutRange"] && !InAutoAttackRange(target))
                                {
                                    W.Cast();
                                }
                                else if (!Menu["Harass"]["WOutRange"])
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }
                }

                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    if (Me.ManaPercent >= Menu["JungleClear"]["Mana"].GetValue <MenuSlider>().Value)
                    {
                        var Mobs = GameObjects.Jungle.Where(x => x.IsValidTarget(Q.Range) && !GameObjects.JungleSmall.Contains(x)).ToList();

                        if (Mobs.Count() > 0)
                        {
                            if (Menu["JungleClear"]["W"] && W.IsReady() && !AutoAttack.IsAutoAttack(Me.ChampionName))
                            {
                                W.Cast();
                            }
                        }
                    }
                }
            }
        }
Example #22
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (Q.IsReady() && orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack && orbwalkingActionArgs.Target is Obj_AI_Hero && Orbwalker.ActiveMode == OrbwalkingMode.Combo && UseQCombo)
     {
         Q.Cast();
     }
 }
Example #23
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 (this.IsMinionCondemnable(tg) && GameObjects.Jungle.Any(m => m.NetworkId == tg.NetworkId) && tg.IsValidTarget() && this.UseEJungleFarm)
                        {
                            if (this.EDelaySlider.Value > 0)
                            {
                                var thisEnemy = tg;
                                DelayAction.Add(EDelaySlider.Value, () => E.CastOnUnit(thisEnemy));
                                return;
                            }
                            E.CastOnUnit(tg);
                        }
                    }
                    if (this.UseQFarm && this.Q.IsReady())
                    {
                        if (tg.CharData.BaseSkinName.Contains("SRU_") && !tg.CharData.BaseSkinName.Contains("Mini") && tg.IsValidTarget() && !this.IsDangerousPosition(Game.CursorPos))
                        {
                            Q.Cast(Game.CursorPos);
                        }
                        if (ObjectManager.Player.UnderAllyTurret() && GameObjects.EnemyMinions.Count(
                                m =>
                                m.Position.Distance(ObjectManager.Player.Position) < 550 && m.Health < ObjectManager.Player.GetAutoAttackDamage(m) && Health.GetPrediction(m, (int)(100 + (Game.Ping / 2) + ObjectManager.Player.AttackCastDelay * 1000)) > 3) > 1 &&
                            !this.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 && !this.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;
                    }
                }
                var possibleTarget = Variables.TargetSelector.GetTarget(615, DamageType.Physical);
                if (possibleTarget != null && orbwalkingActionArgs.Target is Obj_AI_Minion &&
                    UseQBonusOnEnemiesNotCS && ObjectManager.Player.HasBuff("vaynetumblebonus"))
                {
                    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 #24
0
        private static void Orbwalker_OnAction(object sender, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.BeforeAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (Args.Target is Obj_AI_Hero && Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                {
                    var target = (Obj_AI_Hero)Args.Target;

                    if (Menu["Combo"]["Q"] && target.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready"))
                    {
                        if (Menu["Combo"]["SaveMana"] && Me.Mana < R.Instance.ManaCost + W.Instance.ManaCost + Q.Instance.ManaCost)
                        {
                            return;
                        }

                        Q.Cast();
                        return;
                    }
                }

                if (Args.Target is Obj_AI_Minion && Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var target = (Obj_AI_Base)Args.Target;

                    var Mobs = ObjectManager.Get<Obj_AI_Minion>().Where(x => !x.IsDead && !x.IsZombie && x.Team == GameObjectTeam.Neutral && x.IsValidTarget(Me.AttackRange)).OrderBy(x => x.MaxHealth).ToList();

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Clear"]["JCQ"].GetValue<MenuSliderButton>().BValue && mob.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Clear"]["JCQ"].GetValue<MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    return;
                                }
                            }
                        }
                    }
                }
            }

            if (Args.Type == OrbwalkingType.AfterAttack && !Me.HasBuff("AsheQAttack"))
            {
                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.Combo)
                {
                    var target = Variables.TargetSelector.GetTarget(Q);

                    if (Menu["Combo"]["Q"] && target.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready"))
                    {
                        if (Menu["Combo"]["SaveMana"] && Me.Mana < R.Instance.ManaCost + W.Instance.ManaCost + Q.Instance.ManaCost)
                        {
                            return;
                        }

                        Q.Cast();
                        Variables.Orbwalker.ResetSwingTimer();
                        return;
                    }

                    if (Menu["Combo"]["W"] && W.IsReady() && target.IsValidTarget(Me.AttackRange))
                    {
                        var WPred = W.GetPrediction(target);

                        if (WPred.Hitchance >= HitChance.VeryHigh)
                        {
                            if (W.Cast(WPred.CastPosition))
                            {
                                Variables.Orbwalker.ResetSwingTimer();
                                return;
                            }
                        }
                    }
                }

                if (Variables.Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                {
                    var Mobs = ObjectManager.Get<Obj_AI_Minion>().Where(x => !x.IsDead && !x.IsZombie && x.Team == GameObjectTeam.Neutral && x.IsValidTarget(Me.AttackRange)).OrderBy(x => x.MaxHealth).ToList();

                    foreach (var mob in Mobs)
                    {
                        if (mob != null)
                        {
                            if (Menu["Clear"]["JCQ"].GetValue<MenuSliderButton>().BValue && mob.IsValidTarget(Me.AttackRange) && Q.IsReady() && Me.HasBuff("asheqcastready") && mob.Health > Me.GetAutoAttackDamage(mob) * 2)
                            {
                                if (Menu["Clear"]["JCQ"].GetValue<MenuSliderButton>().SValue < Me.ManaPercent)
                                {
                                    Q.Cast();
                                    Variables.Orbwalker.ResetSwingTimer();
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
Example #25
0
 private static void OnAction(object sender, OrbwalkingActionArgs args)
 {
     throw new NotImplementedException();
 }
Example #26
0
 private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (Q.IsReady())
         {
             this.QLogic(orbwalkingActionArgs.Target);
             if (UseQStackTransferBool)
             {
                 this.QLogic(orbwalkingActionArgs.Target);
             }
         }
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         if (FocusWBuffedEnemyBool)
         {
             Orbwalker.ForceTarget =
                 ValidTargets.FirstOrDefault(
                     h =>
                     h.Distance(ObjectManager.Player.ServerPosition) < 600
                     && h.HasBuff("kalistacoopstrikemarkally"));
         }
     }
 }
Example #27
0
        private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
        {
            if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
            {
                if (orbwalkingActionArgs.Target is Obj_AI_Hero)
                {
                    var target = orbwalkingActionArgs.Target as Obj_AI_Hero;
                    var distFromTargetToMe = target.Distance(ObjectManager.Player.ServerPosition);
                    if (Q.IsReady())
                    {
                        QLogic(target);
                    }
                    if (distFromTargetToMe < 350 && target.IsMelee)
                    {
                        ELogic(target);
                    }
                }
                if (orbwalkingActionArgs.Target is Obj_AI_Minion)
                {
                    if (GetJungleCampsOnCurrentMap() != null && Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
                    {
                        var targetName = (orbwalkingActionArgs.Target as Obj_AI_Minion).CharData.BaseSkinName;

                        if (!targetName.Contains("Mini") && GetJungleCampsOnCurrentMap().Contains(targetName) &&
                            UseWJungleClearMenu[targetName].GetValue<MenuBool>())
                        {
                            W.Cast();
                        }
                    }
                }
            }
        }
Example #28
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
 }
Example #29
0
        /// <summary>
        ///     Called on orbwalker action.
        /// </summary>
        /// <param name="sender">The object.</param>
        /// <param name="args">The <see cref="OrbwalkingActionArgs" /> instance containing the event data.</param>
        public static void Offensives(object sender, OrbwalkingActionArgs args)
        {
            if (!Vars.Menu["offensives"].GetValue<MenuBool>().Value
                || !Vars.Menu["keys"]["combo"].GetValue<MenuKeyBind>().Active)
            {
                return;
            }

            /// <summary>
            ///     The Bilgewater Cutlass Logic.
            /// </summary>
            if (Items.CanUseItem(3144) && Targets.Target.IsValidTarget(550f + GameObjects.Player.BoundingRadius))
            {
                Items.UseItem(3144, Targets.Target);
            }

            /// <summary>
            ///     The Blade of the Ruined King Logic.
            /// </summary>
            if (Items.CanUseItem(3153) && Targets.Target.IsValidTarget(550f + GameObjects.Player.BoundingRadius)
                && GameObjects.Player.HealthPercent <= 90)
            {
                Items.UseItem(3153, Targets.Target);
            }

            /// <summary>
            ///     The Entropy Logic.
            /// </summary>     
            if (Items.CanUseItem(3184))
            {
                Items.UseItem(3184);
            }

            /// <summary>
            ///     The Frost Queen's Claim Logic.
            /// </summary>
            if (Items.CanUseItem(3092))
            {
                if (
                    GameObjects.EnemyHeroes.Count(
                        t =>
                        t.IsValidTarget(4000f)
                        && t.CountEnemyHeroesInRange(1500f)
                        <= GameObjects.Player.CountAllyHeroesInRange(1500f) + t.CountAllyHeroesInRange(1500f) - 1) >= 1)
                {
                    Items.UseItem(3092);
                }
            }

            /// <summary>
            ///     The Hextech Gunblade Logic.
            /// </summary>
            if (Items.CanUseItem(3146) && Targets.Target.IsValidTarget(700f + GameObjects.Player.BoundingRadius))
            {
                Items.UseItem(3146, Targets.Target);
            }

            /// <summary>
            ///     The Youmuu's Ghostblade Logic.
            /// </summary>
            if (Items.CanUseItem(3142))
            {
                Items.UseItem(3142);
            }

            /// <summary>
            ///     The Hextech GLP-800 Logic.
            /// </summary>
            if (Items.CanUseItem(3030) && Targets.Target.IsValidTarget(800f + GameObjects.Player.BoundingRadius))
            {
                Items.UseItem(3030, Targets.Target.ServerPosition);
            }

            /// <summary>
            ///     The Hextech Protobelt Logic.
            /// </summary>
            if (Items.CanUseItem(3152))
            {
                foreach (var target in
                    GameObjects.EnemyHeroes.Where(
                        t =>
                        t.IsValidTarget(850f + GameObjects.Player.BoundingRadius)
                        && t.CountEnemyHeroesInRange(200f) >= 3))
                {
                    Items.UseItem(3152, target.ServerPosition);
                }
            }
        }
Example #30
0
        private static void OnAction(object sender, OrbwalkingActionArgs Args)
        {
            if (Args.Type == OrbwalkingType.BeforeAttack)
            {
                var target = GetTarget(W.Range, DamageType.Physical);

                if (InHarass && Me.HasBuff("IllaoiW") && CheckTarget(target) && Args.Target is Obj_AI_Minion)
                {
                    Args.Process = false;
                }
                else
                {
                    Args.Process = true;
                }
            }

            if (Args.Type == OrbwalkingType.AfterAttack)
            {
                if (InCombo)
                {
                    var target = GetTarget(W.Range, DamageType.Physical);

                    if (CheckTarget(target))
                    {
                        if (Menu["Illaoi_Combo"]["W"] && W.IsReady() && target.IsValidTarget(W.Range))
                        {
                            if (Menu["Illaoi_Combo"]["WOutRange"] && !InAutoAttackRange(target))
                            {
                                W.Cast();
                            }

                            if (Menu["Illaoi_Combo"]["WUlt"] && Me.HasBuff("IllaoiR"))
                            {
                                W.Cast();
                            }
                        }
                    }
                }

                if (InHarass && !Me.IsUnderEnemyTurret())
                {
                    if (Me.ManaPercent >= Menu["Illaoi_Harass"]["Mana"].GetValue <MenuSlider>().Value)
                    {
                        var target = GetTarget(W.Range, DamageType.Physical);

                        if (CheckTarget(target))
                        {
                            if (Menu["Illaoi_Harass"]["W"] && W.IsReady() && target.IsValidTarget(W.Range))
                            {
                                if (Menu["Illaoi_Harass"]["WOutRange"] && !InAutoAttackRange(target))
                                {
                                    W.Cast();
                                }
                                else if (!Menu["Illaoi_Harass"]["WOutRange"])
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }
                }

                if (InClear)
                {
                    if (Me.ManaPercent >= Menu["Illaoi_JungleClear"]["Mana"].GetValue <MenuSlider>().Value)
                    {
                        var Mobs = GetMobs(Me.Position, W.Range, true);
                        if (Mobs.Count() > 0)
                        {
                            if (Menu["Illaoi_JungleClear"]["W"] && W.IsReady() && !AutoAttack.IsAutoAttack(Me.ChampionName))
                            {
                                W.Cast();
                            }
                        }
                    }
                }
            }
        }
Example #31
0
 private void OnOrbwalkerAction(object sender, OrbwalkingActionArgs args)
 {
     if (args.Type == OrbwalkingType.BeforeAttack)
     {
         if (args.Target is Obj_AI_Hero && UseWComboBool)
         {
             W.Cast();
         }
     }
 }
Example #32
0
 private void OnAction(object sender, OrbwalkingActionArgs orbwalkingActionArgs)
 {
     if (orbwalkingActionArgs.Type == OrbwalkingType.BeforeAttack)
     {
         /*if (orbwalkingActionArgs.Target is Obj_AI_Minion && HasPassive && FocusOnHeadShotting &&
             Orbwalker.ActiveMode == OrbwalkingMode.LaneClear)
         {
             var target = orbwalkingActionArgs.Target as Obj_AI_Minion;
             if (target != null && !target.CharData.BaseSkinName.Contains("MinionSiege") && target.Health > 60)
             {
                 var tg = (Obj_AI_Hero)TargetSelector.GetTarget(715, DamageType.Physical);
                 if (tg != null && tg.IsHPBarRendered)
                 {
                     Orbwalker.ForceTarget = tg;
                     orbwalkingActionArgs.Process = false;
                 }
             }
         }*/
     }
     if (orbwalkingActionArgs.Type == OrbwalkingType.AfterAttack)
     {
         Orbwalker.ForceTarget = null;
         if (E.IsReady() && this.UseECombo)
         {
             if (!OnlyUseEOnMelees)
             {
                 var eTarget = TargetSelector.GetTarget(UseEOnEnemiesCloserThanSlider.Value, DamageType.Physical);
                 if (eTarget != null)
                 {
                     var pred = Prediction.GetPrediction(eTarget, E);
                     if (pred.Item3.Count == 0 && (int)pred.Item1 >= (int)HitChance.High && ShouldE(pred.Item2))
                     {
                         E.Cast(pred.Item2);
                     }
                 }
             }
             else
             {
                 var eTarget =
                     ValidTargets.FirstOrDefault(
                         e =>
                         e.IsMelee && e.Distance(ObjectManager.Player) < UseEOnEnemiesCloserThanSlider.Value
                         && !e.IsZombie);
                 var pred = Prediction.GetPrediction(eTarget, E);
                 if (pred.Item3.Count == 0 && (int)pred.Item1 > (int)HitChance.Medium && ShouldE(pred.Item2))
                 {
                     E.Cast(pred.Item2);
                 }
             }
         }
     }
 }