Пример #1
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = Menu.Item(Menu.Name + ".combo.r").GetValue <bool>() && R.IsReady();

            if (useW)
            {
                WLogic();
            }
            if (ShouldUseSpells())
            {
                if (useQ)
                {
                    Casting.SkillShot(Q, Q.GetHitChance("combo"));
                }

                if (useE)
                {
                    Casting.SkillShot(E, E.GetHitChance("combo"));
                }
                if (useR && ResourceManager.Check("combo-r") &&
                    Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
                {
                    var target = TargetSelector.GetTarget(R);
                    if (target != null &&
                        Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
                    {
                        Casting.SkillShot(R, R.GetHitChance("combo"));
                    }
                }
            }
        }
Пример #2
0
        protected override void Harass()
        {
            var q = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>();
            var w = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>();

            if (w && W.IsReady())
            {
                var target = TargetSelector.GetTarget(W, false);
                if (target != null)
                {
                    var best = GetBestCard(target, "harass");
                    if (best.Any())
                    {
                        Cards.Select(best);
                    }
                }
            }
            if (ResourceManager.Check("harass") && q && Q.IsReady())
            {
                var target = TargetSelector.GetTarget(Q, false);
                if (target != null)
                {
                    {
                        var best = BestQPosition(
                            target, GameObjects.EnemyHeroes.Select(e => e as Obj_AI_Base).ToList(),
                            Q.GetHitChance("harass"));
                        if (!best.Item2.Equals(Vector3.Zero) && best.Item1 >= 1)
                        {
                            Q.Cast(best.Item2);
                        }
                    }
                }
            }
        }
Пример #3
0
        private void QLogic(HitChance hitChance)
        {
            var target = TargetSelector.GetTarget(Q);

            if (target != null)
            {
                var prediction = CPrediction.Line(Q, target, hitChance);
                if (prediction.TotalHits <= 0 || prediction.CastPosition.Equals(Vector3.Zero) ||
                    SpellCollision(Q, target) && !Orbwalking.InAutoAttackRange(target))
                {
                    var newTarget = TargetSelector.GetTarget(
                        Q, true, default(Vector3), new List <Obj_AI_Hero> {
                        target
                    });
                    if (newTarget != null && !SpellCollision(Q, newTarget))
                    {
                        prediction = CPrediction.Line(Q, newTarget, hitChance);
                    }
                }
                if (prediction.TotalHits > 0 && !prediction.CastPosition.Equals(Vector3.Zero))
                {
                    Q.Cast(prediction.CastPosition);
                }
            }
        }
Пример #4
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>();
            var r = Ultimate.IsActive(UltimateModeType.Combo);

            if (q && Q.IsReady())
            {
                QLogic();
            }
            if (e && E.IsReady())
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null)
                {
                    ELogic(target, E.GetHitChance("combo"));
                }
            }
            if (r && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target))
                    {
                        RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo"));
                    }
                }
            }
        }
Пример #5
0
        /// <summary>
        /// Explode powder kegs in harass
        /// </summary>
        /// <param name="useParrley">if set to <c>true</c> [use useParrley].</param>
        private void HarassExplodePowderKegs(bool useParrley)
        {
            if (!Q.IsReady())
            {
                return;
            }

            var target = TargetSelector.GetTarget(MaxRange);

            if (target == null)
            {
                return;
            }

            var powderKeg = FindClosestPowderKeg(target.Position, useParrley, true);

            if (powderKeg != null)
            {
                if (useParrley)
                {
                    Casting.TargetSkill(powderKeg.Minion, Q);
                }
                else
                {
                    Orbwalker.ForceTarget(powderKeg.Minion);
                }
            }
        }
Пример #6
0
 protected override void Flee()
 {
     if (Menu.Item(Menu.Name + ".flee.w").GetValue <bool>())
     {
         if (W.IsReady() || Cards.Status == SelectStatus.Ready)
         {
             var target = TargetSelector.GetTarget(W, false);
             if (target != null)
             {
                 var best = GetBestCard(target, "flee");
                 if (best.Any())
                 {
                     Cards.Select(best);
                     Orbwalker.ForceTarget(target);
                 }
             }
         }
         if (Player.CanAttack && (Cards.Has(CardColor.Red) || Cards.Has(CardColor.Gold)))
         {
             var target =
                 GameObjects.EnemyHeroes.Where(e => Orbwalking.InAutoAttackRange(e) && e.IsValidTarget())
                 .OrderBy(e => e.Distance(Player))
                 .FirstOrDefault();
             if (target != null)
             {
                 Player.IssueOrder(GameObjectOrder.AttackUnit, target);
             }
         }
     }
 }
Пример #7
0
 protected override void Harass()
 {
     if (ManaManager.Check("harass"))
     {
         var useQ = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady();
         var useW = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady();
         if (useQ)
         {
             Casting.SkillShot(Q, Q.GetHitChance("harass"));
         }
         if (useW)
         {
             WLogic();
         }
     }
     if (ManaManager.Check("harass-r"))
     {
         var useR = Menu.Item(Menu.Name + ".harass.r").GetValue <bool>() && R.IsReady();
         if (useR && Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
         {
             var target = TargetSelector.GetTarget(R);
             if (target != null &&
                 (Player.FlatMagicDamageMod > 50 ||
                  !GameObjects.Enemy.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e))))
             {
                 Casting.SkillShot(R, R.GetHitChance("harass"));
             }
         }
     }
 }
Пример #8
0
        /// <summary>
        /// Casts a powder keg for the best target
        /// </summary>
        /// <param name="minEStacks">The minimum stacks we should leave.</param>
        /// <param name="useParrley">if set to [true] use parrley to find best barrel locations</param>
        private void CastPowderKeg(int minEStacks, bool useParrley)
        {
            if (E.Instance.Ammo <= minEStacks)
            {
                return;
            }

            if (_lastPowderKegTracker != null)
            {
                if (!_lastPowderKegTracker.Ready)
                {
                    return;
                }
            }

            var target = TargetSelector.GetTarget(MaxRange);

            if (target == null)
            {
                return;
            }

            var bestPosition = GetBestPowderKegPosition(target, useParrley);

            if (bestPosition != default(Vector3))
            {
                E.Cast(bestPosition);
            }
        }
Пример #9
0
        protected override void Combo()
        {
            var single = false;
            var q      = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var e      = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady() &&
                         ResourceManager.Check("combo-e");
            var r = Ultimate.IsActive(UltimateModeType.Combo) && R.IsReady();

            var rTarget = TargetSelector.GetTarget(R);

            if (r)
            {
                if (!RLogic(UltimateModeType.Combo, rTarget))
                {
                    RLogicSingle(UltimateModeType.Combo);
                    single = true;
                }
            }
            if (q)
            {
                Casting.TargetSkill(Q);
            }
            if (e)
            {
                if (GetEHits().Item1 > 0)
                {
                    E.Cast();
                }
            }

            ItemsSummonersLogic(rTarget, single);
        }
Пример #10
0
        /// <summary>
        /// Combo.
        /// </summary>
        protected override void Combo()
        {
            var useQ       = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>();
            var useE       = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>();
            var useParrley = Menu.Item(Menu.Name + ".combo.q-e").GetValue <bool>();

            ComboExplodePowderKegs(useParrley);

            if (useQ)
            {
                var target = TargetSelector.GetTarget(Q.Range);
                if (target != null)
                {
                    var hasPowderKegsNear = _powderKegs.Any(k => k.Minion.Distance(target) <= PowderKegLinkRadius + PowderKegExplosionRadius);
                    if (!hasPowderKegsNear)
                    {
                        Casting.TargetSkill(target, Q);
                    }
                }
            }

            if (useE)
            {
                var minEStacks = Menu.Item(Menu.Name + ".combo.e-stacks").GetValue <Slider>().Value;
                CastPowderKeg(minEStacks, useParrley);
            }
        }
Пример #11
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady() && HealthManager.Check("combo-e");
            var r = UltimateManager.Combo() && R.IsReady();

            var rTarget = TargetSelector.GetTarget(R);

            if (r)
            {
                if (!RLogic(rTarget, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, q, e))
                {
                    if (Menu.Item(Menu.Name + ".ultimate.combo.single").GetValue <bool>())
                    {
                        RLogicSingle(q, e);
                    }
                }
            }
            if (q)
            {
                Casting.TargetSkill(Q);
            }
            if (e)
            {
                if (GetEHits().Item1 > 0)
                {
                    E.Cast();
                }
            }
            if (rTarget != null && CalcComboDamage(rTarget, q, e, r) > rTarget.Health)
            {
                ItemManager.UseComboItems(rTarget);
                SummonerManager.UseComboSummoners(rTarget);
            }
        }
Пример #12
0
        protected override void OnPostUpdate()
        {
            if (UltimateManager.Assisted() && R.IsReady())
            {
                if (Menu.Item(Menu.Name + ".ultimate.assisted.move-cursor").GetValue <bool>())
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }

                if (
                    !RLogic(
                        TargetSelector.GetTarget(R),
                        Menu.Item(Menu.Name + ".ultimate.assisted.min").GetValue <Slider>().Value,
                        Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady()))
                {
                    RLogicSingle(Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady());
                }
            }

            if (UltimateManager.Auto() && R.IsReady())
            {
                if (
                    !RLogic(
                        TargetSelector.GetTarget(R),
                        Menu.Item(Menu.Name + ".ultimate.auto.min").GetValue <Slider>().Value,
                        Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady(), UltimateModeType.Auto))
                {
                    RLogicSingle(Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady());
                }
            }
        }
Пример #13
0
 protected override void Harass()
 {
     if (ResourceManager.Check("harass"))
     {
         var useQ = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady();
         var useW = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady();
         if (useQ)
         {
             Casting.SkillShot(Q, Q.GetHitChance("harass"));
         }
         if (useW)
         {
             WLogic();
         }
     }
     if (ResourceManager.Check("harass-r"))
     {
         var useR = Menu.Item(Menu.Name + ".harass.r").GetValue <bool>() && R.IsReady();
         if (useR && Menu.Item(Menu.Name + ".miscellaneous.r-max").GetValue <Slider>().Value > GetRBuffCount())
         {
             var target = TargetSelector.GetTarget(R);
             if (target != null && (Player.FlatMagicDamageMod > 50 || ShouldUseR()))
             {
                 Casting.SkillShot(R, R.GetHitChance("harass"));
             }
         }
     }
 }
Пример #14
0
        protected override void Combo()
        {
            var q = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>();
            var e = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>();
            var r = Ultimate.IsActive(UltimateModeType.Combo);

            if (e && !Q.IsCharging && E.IsReady())
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null)
                {
                    var stacks = W.Level == 0 &&
                                 Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value > 0;
                    if (Menu.Item(Menu.Name + ".combo.e-settings.always").GetValue <bool>() || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.e-settings.stacks").GetValue <Slider>().Value ||
                        E.IsKillable(target) ||
                        CPrediction.Circle(E, target, E.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.e-settings.min").GetValue <Slider>().Value)
                    {
                        ELogic(target, E.GetHitChance("combo"));
                    }
                }
            }
            if (q && Q.IsReady())
            {
                var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
                if (target != null)
                {
                    var stacks = W.Level == 0 &&
                                 Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value > 0;
                    if (Q.IsCharging || Menu.Item(Menu.Name + ".combo.q-settings.always").GetValue <bool>() ||
                        target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks ||
                        GetWStacks(target) >= Menu.Item(Menu.Name + ".combo.q-settings.stacks").GetValue <Slider>().Value ||
                        CPrediction.Line(Q, target, Q.GetHitChance("combo")).TotalHits >=
                        Menu.Item(Menu.Name + ".combo.q-settings.min").GetValue <Slider>().Value || Q.IsKillable(target))
                    {
                        QLogic(
                            target, Q.GetHitChance("combo"),
                            Menu.Item(Menu.Name + ".combo.q-settings.fast-cast-min").GetValue <Slider>().Value);
                    }
                }
            }
            if (r && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, R.GetHitChance("combo"), target))
                    {
                        RLogicSingle(UltimateModeType.Combo, R.GetHitChance("combo"));
                    }
                }
            }
        }
Пример #15
0
        protected override void OnPostUpdate()
        {
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit && !Player.Spellbook.IsAutoAttacking &&
                Menu.Item(Menu.Name + ".lasthit.q").GetValue <bool>() && Q.IsReady())
            {
                var m =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        e =>
                        e.HealthPercent <= 75 &&
                        (_lastAaMinion == null || e.NetworkId != _lastAaMinion.NetworkId ||
                         Game.Time > _lastAaMinionEndTime) &&
                        HealthPrediction.GetHealthPrediction(e, (int)(Q.Delay * 1000f)) < Q.GetDamage(e));
                if (m != null)
                {
                    Casting.TargetSkill(m, Q);
                }
            }

            if (Ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (Ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos);
                }
                var target = TargetSelector.GetTarget(R);
                if (target != null && !RLogic(UltimateModeType.Assisted, target))
                {
                    RLogicSingle(UltimateModeType.Assisted);
                }
            }

            if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null && !RLogic(UltimateModeType.Auto, target))
                {
                    RLogicSingle(UltimateModeType.Auto);
                }
            }

            if (Menu.Item(Menu.Name + ".miscellaneous.e-auto").GetValue <bool>() && E.IsReady() &&
                ResourceManager.Check("auto-e") && !Player.IsRecalling() && !Player.InFountain())
            {
                var buff = GetEBuff();
                if (buff == null || buff.EndTime - Game.Time <= Game.Ping / 2000f + 0.5f)
                {
                    E.Cast();
                }
            }
        }
Пример #16
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = _ultimate.IsActive(UltimateModeType.Combo) && R.IsReady();

            if (useR)
            {
                var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                if (target != null)
                {
                    if (!RLogic(UltimateModeType.Combo, target))
                    {
                        RLogicSingle(UltimateModeType.Combo);
                    }
                }
            }
            if (useE)
            {
                var target = TargetSelector.GetTarget((E.Range + Player.AttackRange) * 0.9f, E.DamageType);
                if (target != null)
                {
                    var pos = Menu.Item(Menu.Name + ".combo.e-mode").GetValue <StringList>().SelectedIndex == 0
                        ? Utils.GetDashPosition(
                        E, target, Menu.Item(Menu.Name + ".combo.e-safety").GetValue <Slider>().Value)
                        : Player.Position.Extend(
                        Game.CursorPos, Math.Min(E.Range, Player.Position.Distance(Game.CursorPos)));
                    if (!pos.Equals(Vector3.Zero) && !pos.IsUnderTurret(false))
                    {
                        E.Cast(pos);
                    }
                }
            }
            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }
            if (useW)
            {
                var target = TargetSelector.GetTarget(W);
                var best   = CPrediction.Circle(W, target, W.GetHitChance("combo"));
                if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero))
                {
                    W.Cast(best.CastPosition);
                }
            }
        }
Пример #17
0
        protected override void Combo()
        {
            var useQ = Menu.Item(Menu.Name + ".combo.q").GetValue <bool>() && Q.IsReady();
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = UltimateManager.Combo() && R.IsReady();

            if (useQ)
            {
                Casting.SkillShot(Q, Q.GetHitChance("combo"));
            }
            if (useW)
            {
                var target = TargetSelector.GetTarget(W);
                var best   = CPrediction.Circle(W, target, W.GetHitChance("combo"));
                if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero))
                {
                    W.Cast(best.CastPosition);
                }
            }
            if (useE)
            {
                var target = TargetSelector.GetTarget((E.Range + Player.AttackRange) * 0.9f, E.DamageType);
                if (target != null)
                {
                    var pos = Player.Position.Extend(Game.CursorPos, E.Range);
                    if (!pos.UnderTurret(true))
                    {
                        E.Cast(pos);
                    }
                }
            }
            if (useR)
            {
                var target = TargetSelector.GetTarget(R);
                if (target != null && Orbwalking.InAutoAttackRange(target))
                {
                    if (!RLogic(target, Menu.Item(Menu.Name + ".ultimate.combo.min").GetValue <Slider>().Value, useQ))
                    {
                        if (Menu.Item(Menu.Name + ".ultimate.combo.single").GetValue <bool>())
                        {
                            RLogicSingle(useQ);
                        }
                    }
                }
            }
        }
Пример #18
0
 protected override void Harass()
 {
     if (!ResourceManager.Check("harass") && !Q.IsCharging)
     {
         return;
     }
     if (Menu.Item(Menu.Name + ".harass.e").GetValue <bool>() && !Q.IsCharging && E.IsReady())
     {
         var target = TargetSelector.GetTarget(E);
         if (target != null)
         {
             var stacks = W.Level == 0 &&
                          Menu.Item(Menu.Name + ".harass.e-settings.stacks").GetValue <Slider>().Value > 0;
             if (Menu.Item(Menu.Name + ".harass.e-settings.always").GetValue <bool>() || stacks ||
                 GetWStacks(target) >=
                 Menu.Item(Menu.Name + ".harass.e-settings.stacks").GetValue <Slider>().Value ||
                 E.IsKillable(target) ||
                 CPrediction.Circle(E, target, E.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".combo.e-settings.min").GetValue <Slider>().Value)
             {
                 ELogic(target, E.GetHitChance("harass"));
             }
         }
     }
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady())
     {
         var target = TargetSelector.GetTarget((Q.ChargedMaxRange + Q.Width) * 1.1f, Q.DamageType);
         if (target != null)
         {
             var stacks = W.Level == 0 &&
                          Menu.Item(Menu.Name + ".harass.q-settings.stacks").GetValue <Slider>().Value > 0;
             if (Q.IsCharging || Menu.Item(Menu.Name + ".harass.q-settings.always").GetValue <bool>() ||
                 target.Distance(Player) > Orbwalking.GetRealAutoAttackRange(target) * 1.2f || stacks ||
                 GetWStacks(target) >=
                 Menu.Item(Menu.Name + ".harass.q-settings.stacks").GetValue <Slider>().Value ||
                 Q.IsKillable(target) ||
                 CPrediction.Line(Q, target, Q.GetHitChance("harass")).TotalHits >=
                 Menu.Item(Menu.Name + ".harass.q-settings.min").GetValue <Slider>().Value)
             {
                 QLogic(
                     target, Q.GetHitChance("harass"),
                     Menu.Item(Menu.Name + ".harass.q-settings.fast-cast-min").GetValue <Slider>().Value);
             }
         }
     }
 }
Пример #19
0
        /// <summary>
        /// Harass.
        /// </summary>
        protected override void Harass()
        {
            if (!ResourceManager.Check("harass"))
            {
                return;
            }

            var useQ        = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>();
            var useQLastHit = Menu.Item(Menu.Name + ".harass.q-lasthit").GetValue <bool>();
            var useE        = Menu.Item(Menu.Name + ".harass.e").GetValue <bool>();
            var useParrley  = Menu.Item(Menu.Name + ".harass.q-e").GetValue <bool>();

            if (useQLastHit)
            {
                var minion = Orbwalker.GetTarget(Q.Range) as Obj_AI_Minion;
                if (minion != null && Player.GetAutoAttackDamage(minion, true) >= minion.Health)
                {
                    Casting.TargetSkill(minion, Q);
                }
            }

            HarassExplodePowderKegs(useParrley);

            if (useQ)
            {
                var target = TargetSelector.GetTarget(Q.Range);
                if (target != null)
                {
                    var hasPowderKegsNear = _powderKegs.Any(k => k.Minion.Distance(target) <= PowderKegLinkRadius + PowderKegExplosionRadius);
                    if (!hasPowderKegsNear)
                    {
                        Casting.TargetSkill(target, Q);
                    }
                }
            }

            if (useE)
            {
                var minEStacks = Menu.Item(Menu.Name + ".harass.e-stacks").GetValue <Slider>().Value;
                CastPowderKeg(minEStacks, useParrley);
            }
        }
Пример #20
0
 public static bool Check(string uniqueId, Spell spell, Obj_AI_Hero hero)
 {
     try
     {
         if (hero == null || !Enabled(uniqueId))
         {
             return(true);
         }
         var bestTarget = TargetSelector.GetTarget(spell);
         if (bestTarget == null || hero.NetworkId.Equals(bestTarget.NetworkId))
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return(false);
 }
Пример #21
0
        /// <summary>
        /// Harass
        /// </summary>
        protected override void Harass()
        {
            var useW = Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady();

            if (ResourceManager.Check("harass-w") && useW)
            {
                Casting.SkillShot(W, W.GetHitChance("harass"));
            }

            var target = TargetSelector.GetTarget(GetFishbonesRange(), DamageType.Physical);

            if (target.IsValidTarget())
            {
                var fishbones = FishbonesComboHarassLogic(target);
                if (fishbones != null)
                {
                    Orbwalker.ForceTarget(fishbones.Item2);
                }
            }
        }
Пример #22
0
        /// <summary>
        /// Post update
        /// </summary>
        protected override void OnPostUpdate()
        {
            // Assisted Ultimate
            if (_ultimateManager.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (_ultimateManager.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }

                if (!CastUltimate(UltimateModeType.Assisted, TargetSelector.GetTarget(R)))
                {
                    CastUltimateSingle(UltimateModeType.Assisted);
                }
            }

            // Auto Ultimate
            if (_ultimateManager.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                if (!CastUltimate(UltimateModeType.Auto, TargetSelector.GetTarget(R)))
                {
                    CastUltimateSingle(UltimateModeType.Auto);
                }
            }

            // E Immobile targets
            if (HeroListManager.Enabled("e-immobile") && E.IsReady())
            {
                var target = GameObjects.EnemyHeroes.FirstOrDefault(t =>
                                                                    t.IsValidTarget(E.Range) &&
                                                                    HeroListManager.Check("e-immobile", t) &&
                                                                    BestTargetOnlyManager.Check("e-immobile", E, t) &&
                                                                    Utils.IsImmobile(t)
                                                                    );

                if (target != null)
                {
                    E.Cast(target);
                }
            }
        }
Пример #23
0
        private void QLogic(HitChance hitChance)
        {
            var target = TargetSelector.GetTarget(Q);

            if (target != null)
            {
                var prediction = CPrediction.Line(Q, target, hitChance, false);
                if (prediction.TotalHits >= 1)
                {
                    var firstHit = prediction.Hits.OrderBy(h => h.Distance(Player)).FirstOrDefault();
                    if (firstHit != null && !Utils.IsWallBetween(Player.Position, firstHit.Position))
                    {
                        if (!GameObjects.EnemyHeroes.Any(e => e.IsValidTarget() && Orbwalking.InAutoAttackRange(e)) ||
                            IsReloading() || Q.IsKillable(target) || prediction.TotalHits >= 2)
                        {
                            Q.Cast(prediction.CastPosition);
                        }
                    }
                }
            }
        }
Пример #24
0
        /// <summary>
        /// Combo
        /// </summary>
        protected override void Combo()
        {
            var useW = Menu.Item(Menu.Name + ".combo.w").GetValue <bool>() && W.IsReady();
            var useE = Menu.Item(Menu.Name + ".combo.e").GetValue <bool>() && E.IsReady();
            var useR = _ultimateManager.IsActive(UltimateModeType.Combo) && R.IsReady();

            Obj_AI_Hero target;

            if (useR)
            {
                target = TargetSelector.GetTarget(R.Range, R.DamageType);
                if (target.IsValidTarget())
                {
                    if (!CastUltimate(UltimateModeType.Combo, target))
                    {
                        CastUltimateSingle(UltimateModeType.Combo);
                    }
                }
            }

            if (useW)
            {
                Casting.SkillShot(W, W.GetHitChance("combo"));
            }

            if (useE)
            {
                Casting.SkillShot(E, E.GetHitChance("combo"));
            }

            target = TargetSelector.GetTarget(GetFishbonesRange(), DamageType.Physical);
            if (target.IsValidTarget())
            {
                var fishbones = FishbonesComboHarassLogic(target);
                if (fishbones != null)
                {
                    Orbwalker.ForceTarget(fishbones.Item2);
                }
            }
        }
Пример #25
0
 protected void ItemsSummonersLogic(AIHeroClient ultimateTarget, bool single = true)
 {
     try
     {
         var range = Math.Max(
             600,
             Math.Max(
                 SummonerManager.SummonerSpells.Where(s => s.CastType == CastType.Target).Max(s => s.Range),
                 ItemManager.Items.Where(
                     i => i.EffectFlags.HasFlag(EffectFlags.Damage) && i.Flags.HasFlag(ItemFlags.Offensive))
                 .Max(i => i.Range)));
         if (ultimateTarget == null || Ultimate == null || !ultimateTarget.IsValidTarget(range))
         {
             var target = TargetSelector.GetTarget(range);
             if (target != null)
             {
                 if (ItemManager.CalculateComboDamage(target) + SummonerManager.CalculateComboDamage(target) >
                     target.Health)
                 {
                     ItemManager.UseComboItems(target);
                     SummonerManager.UseComboSummoners(target);
                 }
             }
         }
         else
         {
             if (Ultimate.GetDamage(ultimateTarget, UltimateModeType.Combo, single ? 1 : 5) >
                 ultimateTarget.Health)
             {
                 ItemManager.UseComboItems(ultimateTarget);
                 SummonerManager.UseComboSummoners(ultimateTarget);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Пример #26
0
        protected override void Harass()
        {
            if (!ResourceManager.Check("harass"))
            {
                return;
            }
            var q = Menu.Item(Menu.Name + ".harass.q").GetValue <bool>();
            var e = Menu.Item(Menu.Name + ".harass.e").GetValue <bool>();

            if (q && Q.IsReady())
            {
                QLogic();
            }
            if (e && E.IsReady())
            {
                var target = TargetSelector.GetTarget(E);
                if (target != null)
                {
                    ELogic(target, E.GetHitChance("harass"));
                }
            }
        }
Пример #27
0
 private void OnAntiGapcloserEnemyGapcloser(ActiveGapcloser args)
 {
     try
     {
         if (!args.Sender.IsEnemy)
         {
             return;
         }
         if (HeroListManager.Check("q-gapcloser", args.Sender) && args.End.Distance(Player.Position) < Q.Range &&
             Q.IsReady())
         {
             var target = TargetSelector.GetTarget(Q.Range * 0.85f, Q.DamageType);
             if (target == null || args.Sender.NetworkId.Equals(target.NetworkId))
             {
                 Q.Cast(args.End);
             }
         }
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
 }
Пример #28
0
 protected override void Harass()
 {
     if (!ResourceManager.Check("harass"))
     {
         return;
     }
     if (Menu.Item(Menu.Name + ".harass.q").GetValue <bool>() && Q.IsReady())
     {
         QLogic(Q.GetHitChance("harass"));
     }
     if (Menu.Item(Menu.Name + ".harass.w").GetValue <bool>() && W.IsReady())
     {
         var target = TargetSelector.GetTarget(W);
         if (target != null)
         {
             var best = CPrediction.Line(W, target, W.GetHitChance("harass"));
             if (best.TotalHits > 0 && !best.CastPosition.Equals(Vector3.Zero))
             {
                 W.Cast(best.CastPosition);
             }
         }
     }
 }
Пример #29
0
        protected override void OnPostUpdate()
        {
            if (Ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (Ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos, Orbwalker.HoldAreaRadius);
                }

                if (!RLogic(UltimateModeType.Assisted, R.GetHitChance("combo"), TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Assisted, R.GetHitChance("combo"));
                }
            }

            if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                if (!RLogic(UltimateModeType.Auto, R.GetHitChance("combo"), TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Auto, R.GetHitChance("combo"));
                }
            }
        }
Пример #30
0
        protected override void OnPostUpdate()
        {
            if (Ultimate.IsActive(UltimateModeType.Assisted) && R.IsReady())
            {
                if (Ultimate.ShouldMove(UltimateModeType.Assisted))
                {
                    Orbwalking.MoveTo(Game.CursorPos);
                }

                if (!RLogic(UltimateModeType.Assisted, TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Assisted);
                }
            }

            if (Ultimate.IsActive(UltimateModeType.Auto) && R.IsReady())
            {
                if (!RLogic(UltimateModeType.Auto, TargetSelector.GetTarget(R)))
                {
                    RLogicSingle(UltimateModeType.Auto);
                }
            }
        }