Exemple #1
0
        internal static void Harass()
        {
            var target = TargetSelector.GetTarget(Spells.R.Range, DamageType.Magical);

            if (target == null || !target.IsValidTarget(Spells.Q.Range) ||
                Player.Instance.ManaPercent < Config.GetSliderValue(Config.Harass, "manaToHarass"))
            {
                return;
            }

            if (Config.IsChecked(Config.Harass, "useQInHarass") && Spells.Q.IsReady() &&
                !target.HasBuffOfType(BuffType.Poison) &&
                (Orbwalker.LastHitMinion == null && !Orbwalker.IsAutoAttacking))
            {
                var qPred = Spells.Q.GetPrediction(target);
                if (qPred.HitChancePercent >= 90)
                {
                    Spells.Q.Cast(qPred.CastPosition);
                }
            }

            if (Config.IsChecked(Config.Harass, "useWInHarass") && Spells.W.IsReady() &&
                target.IsValidTarget(Spells.W.Range) &&
                (Orbwalker.LastHitMinion == null && !Orbwalker.IsAutoAttacking))
            {
                if (Config.IsChecked(Config.Harass, "harassWonlyCD"))
                {
                    if (!Spells.Q.IsReady() && (Spells.QCasted - Game.Time) < -0.5f &&
                        !target.HasBuffOfType(BuffType.Poison))
                    {
                        var wPred = Spells.W.GetPrediction(target);
                        if (wPred.CastPosition.Distance(Player.Instance.Position) >= Spells.WMinRange &&
                            wPred.HitChancePercent >= 85)
                        {
                            Spells.W.Cast(wPred.CastPosition);
                        }
                    }
                }
                else
                {
                    var wPred = Spells.W.GetPrediction(target);
                    if (wPred.HitChancePercent >= 85)
                    {
                        Spells.W.Cast(wPred.CastPosition);
                    }
                }
            }

            if (Config.IsChecked(Config.Harass, "useEInHarass") && Spells.E.IsReady() &&
                target.IsValidTarget(Spells.E.Range) &&
                (!Config.IsChecked(Config.Harass, "harassEonP") || target.HasBuffOfType(BuffType.Poison)))
            {
                if (Config.IsChecked(Config.Harass, "humanEInHarass"))
                {
                    var delay = Computed.RandomDelay(Config.GetSliderValue(Config.Misc, "humanDelay"));
                    Core.DelayAction(() => Spells.E.Cast(target), delay);
                }
                else
                {
                    Spells.E.Cast(target);
                }
            }
        }
Exemple #2
0
        public static void Combo()
        {
            var target = TargetSelector.GetTarget(Spells.R.Range + 250, DamageType.Magical);

            if (target == null)
            {
                return;
            }

            if (Config.IsChecked(Config.Combo, "useRInCombo") && Spells.R.IsReady())
            {
                var enemiesAroundTarget =
                    EntityManager.Heroes.Enemies.Count(
                        en => en.Distance(target.Position) <= 1000 && en.Name != target.Name);
                if (Config.IsChecked(Config.Combo, "comboFlashR") && target.IsFacing(Player.Instance) &&
                    (target.Distance(Player.Instance) > Spells.R.Range &&
                     target.Distance(Player.Instance) <= Spells.R.Range + 400) &&
                    (Spells.Flash != null && Spells.Flash.IsReady) &&
                    Computed.ComboDmg(target) * Spells.ComboDmgMod > target.Health &&
                    enemiesAroundTarget <= Config.GetSliderValue(Config.Combo, "maxEnFlash"))
                {
                    Spells.FlashR = true;
                    var relPos = target.Position.Shorten(Player.Instance.Position, -300);
                    Spells.R.Cast(relPos);
                    Core.DelayAction(
                        () => Player.CastSpell(Spells.Flash.Slot, target.Position),
                        Mainframe.RDelay.Next(300, 400));
                }

                var countFace =
                    EntityManager.Heroes.Enemies.Count(
                        h => h.IsValidTarget(Spells.R.Range) && h.IsFacing(Player.Instance));
                if (countFace >= Config.GetSliderValue(Config.Combo, "comboMinR") &&
                    target.IsValidTarget(Spells.R.Range))
                {
                    Spells.R.Cast(target);
                }
            }

            if (Config.IsChecked(Config.Combo, "useQInCombo") && Spells.Q.IsReady() &&
                !target.HasBuffOfType(BuffType.Poison))
            {
                var qPred = Spells.Q.GetPrediction(target);
                if (qPred.HitChancePercent >= 85)
                {
                    Spells.Q.Cast(qPred.CastPosition);
                }
            }

            if (Config.IsChecked(Config.Combo, "useWInCombo") && Spells.W.IsReady() &&
                target.IsValidTarget(Spells.W.Range))
            {
                if (Config.IsChecked(Config.Combo, "comboWonlyCD"))
                {
                    if (!Spells.Q.IsReady() && (Spells.QCasted - Game.Time) < -0.5f &&
                        !target.HasBuffOfType(BuffType.Poison))
                    {
                        var wPred = Spells.W.GetPrediction(target);
                        if (wPred.CastPosition.Distance(Player.Instance.Position) >= Spells.WMinRange &&
                            wPred.HitChancePercent >= 85)
                        {
                            Spells.W.Cast(wPred.CastPosition);
                        }
                    }
                }
                else
                {
                    var wPred = Spells.W.GetPrediction(target);
                    if (wPred.CastPosition.Distance(Player.Instance.Position) >= Spells.WMinRange &&
                        !wPred.CastPosition.IsWall() && wPred.HitChancePercent >= 85)
                    {
                        Spells.W.Cast(wPred.CastPosition);
                    }
                }
            }

            if (Config.IsChecked(Config.Combo, "useEInCombo") && Spells.E.IsReady() &&
                target.IsValidTarget(Spells.E.Range) &&
                (!Config.IsChecked(Config.Combo, "comboEonP") || target.HasBuffOfType(BuffType.Poison)))
            {
                if (Config.IsChecked(Config.Combo, "humanEInCombo"))
                {
                    var delay = Computed.RandomDelay(Config.GetSliderValue(Config.Misc, "humanDelay"));
                    Core.DelayAction(() => Spells.E.Cast(target), delay);
                }
                else
                {
                    Spells.E.Cast(target);
                }
            }
        }