Example #1
0
        public void OnExecute()
        {
            if (Variables.Spells[SpellSlot.Q].IsReady() && Variables.Menu.Item("ezreal.mixed.q").GetValue <bool>())
            {
                var target = TargetSelector.GetTargetNoCollision(Variables.Spells[SpellSlot.Q]);
                if (target.IsValidTarget(Variables.Spells[SpellSlot.Q].Range))
                {
                    var prediction   = Variables.Spells[SpellSlot.Q].GetSPrediction(target);
                    var castPosition = prediction.CastPosition.Extend((Vector2)ObjectManager.Player.Position, -140);
                    if (prediction.HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.Q].Cast(castPosition);
                    }
                }
            }

            if (Variables.Spells[SpellSlot.W].IsReady() && Variables.Menu.Item("ezreal.mixed.w").GetValue <bool>() && ObjectManager.Player.ManaPercent > 35)
            {
                var wTarget = TargetSelector.GetTargetNoCollision(Variables.Spells[SpellSlot.W]);
                if (wTarget.IsValidTarget(Variables.Spells[SpellSlot.W].Range) &&
                    Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).HitChance >= MenuGenerator.GetHitchance())
                {
                    Variables.Spells[SpellSlot.W].Cast(Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).CastPosition);
                }
            }
        }
Example #2
0
        public void OnExecute()
        {
            if (Variables.Spells[SpellSlot.Q].IsReady() && getCheckBoxItem(Variables.mixedMenu, "ezreal.mixed.q"))
            {
                var target = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range, DamageType.Physical);
                if (target.LSIsValidTarget(Variables.Spells[SpellSlot.Q].Range))
                {
                    var prediction   = Variables.Spells[SpellSlot.Q].GetSPrediction(target);
                    var castPosition = prediction.CastPosition.LSExtend((Vector2)ObjectManager.Player.Position, -140);
                    if (prediction.HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.Q].Cast(castPosition);
                    }
                }
            }

            if (Variables.Spells[SpellSlot.W].IsReady() && getCheckBoxItem(Variables.mixedMenu, "ezreal.mixed.w") && ObjectManager.Player.ManaPercent > 35)
            {
                var wTarget = TargetSelector.GetTarget(Variables.Spells[SpellSlot.W].Range, DamageType.Physical);
                if (wTarget.LSIsValidTarget(Variables.Spells[SpellSlot.W].Range) &&
                    Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).HitChance >= MenuGenerator.GetHitchance())
                {
                    Variables.Spells[SpellSlot.W].Cast(Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).CastPosition);
                }
            }
        }
Example #3
0
        private static void OnMixed()
        {
            if (ObjectManager.Player.ManaPercent < Variables.Menu.Item("ezreal.mixed.mana").GetValue <Slider>().Value)
            {
                return;
            }
            if (Variables.Menu.Item("ezreal.mixed.q").GetValue <bool>() && Variables.Spells[SpellSlot.Q].IsReady())
            {
                var target = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range,
                                                      TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(Variables.Spells[SpellSlot.Q].Range) &&
                    ObjectManager.Player.Distance(target.ServerPosition) <= Variables.Spells[SpellSlot.Q].Range)
                {
                    var prediction   = Variables.Spells[SpellSlot.Q].GetSPrediction(target);
                    var castPosition = prediction.CastPosition.Extend((Vector2)ObjectManager.Player.Position, -140);
                    if (prediction.HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.Q].Cast(castPosition);
                    }
                }
            }

            if (Variables.Menu.Item("ezreal.mixed.w").GetValue <bool>() &&
                Variables.Spells[SpellSlot.W].IsReady() &&
                ObjectManager.Player.CountAlliesInRange(800f) > 1)
            {
                var target =
                    HeroManager.Allies.Where(m => m.IsValidTarget(Variables.Spells[SpellSlot.W].Range, false) &&
                                             m.TotalAttackDamage > m.TotalMagicalDamage)
                    .OrderBy(TargetSelector.GetPriority).FirstOrDefault();

                if (target != null)
                {
                    Variables.Spells[SpellSlot.W].Cast(target);
                }
                else
                {
                    var wTarget = TargetSelector.GetTargetNoCollision(Variables.Spells[SpellSlot.W]);

                    if (wTarget.IsValidTarget(Variables.Spells[SpellSlot.W].Range) &&
                        Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.W].Cast(Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).CastPosition);
                    }
                }
            }
        }
Example #4
0
        private static void OnCombo()
        {
            //Q
            if (Variables.Menu.Item("ezreal.combo.q").GetValue <bool>() && Variables.Spells[SpellSlot.Q].IsReady())
            {
                var target = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range,
                                                      TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(Variables.Spells[SpellSlot.Q].Range) &&
                    ObjectManager.Player.Distance(target.ServerPosition) <= Variables.Spells[SpellSlot.Q].Range)
                {
                    var prediction   = Variables.Spells[SpellSlot.Q].GetSPrediction(target);
                    var castPosition = prediction.CastPosition.Extend((Vector2)ObjectManager.Player.Position, -140);
                    if (prediction.HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.Q].Cast(castPosition);
                    }
                }
            }

            //W
            if (Variables.Menu.Item("ezreal.combo.w").GetValue <bool>() &&
                Variables.Spells[SpellSlot.W].IsReady() &&
                ObjectManager.Player.CountAlliesInRange(800f) > 1 &&
                ObjectManager.Player.ManaPercent > 35)
            {
                var target =
                    HeroManager.Allies.Where(m => m.IsValidTarget(Variables.Spells[SpellSlot.W].Range, false) &&
                                             m.TotalAttackDamage > m.TotalMagicalDamage)
                    .OrderBy(TargetSelector.GetPriority).FirstOrDefault();

                if (target != null)
                {
                    Variables.Spells[SpellSlot.W].Cast(target);
                }
                else
                {
                    var wTarget = TargetSelector.GetTargetNoCollision(Variables.Spells[SpellSlot.W]);

                    if (wTarget.IsValidTarget(Variables.Spells[SpellSlot.W].Range) &&
                        Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).HitChance >= MenuGenerator.GetHitchance())
                    {
                        Variables.Spells[SpellSlot.W].Cast(Variables.Spells[SpellSlot.W].GetSPrediction(wTarget).CastPosition);
                    }
                }
            }

            //TODO Beta AF
            if (Variables.Menu.Item("ezreal.misc.selfWE").GetValue <bool>() && ObjectManager.Player.CountAlliesInRange(800f) == 1 &&
                Variables.Spells[SpellSlot.W].IsReady() &&
                Variables.Spells[SpellSlot.E].IsReady() &&
                ObjectManager.Player.CountEnemiesInRange(1200f) == 1)
            {
                var extendedPosition = ObjectManager.Player.ServerPosition.Extend(
                    Game.CursorPos, Variables.Spells[SpellSlot.E].Range);

                if (extendedPosition.IsSafe(Variables.Spells[SpellSlot.E].Range) &&
                    extendedPosition.CountAlliesInRange(650f) > 0)
                {
                    Variables.Spells[SpellSlot.W].Cast(extendedPosition);
                    LeagueSharp.Common.Utility.DelayAction.Add(250, () =>
                    {
                        Variables.Spells[SpellSlot.E].Cast(extendedPosition);
                    });
                }
            }

            //R
            if (Variables.Menu.Item("ezreal.combo.r").GetValue <bool>() && Variables.Spells[SpellSlot.R].IsReady())
            {
                var target = TargetSelector.GetTarget(2300f, TargetSelector.DamageType.Physical);

                if (target.IsValidTarget(Variables.Spells[SpellSlot.R].Range) &&
                    CanExecuteTarget(target) &&
                    ObjectManager.Player.Distance(target) >= Orbwalking.GetRealAutoAttackRange(null) * 0.80f
                    &&
                    !(target.Health + 5 <
                      ObjectManager.Player.GetAutoAttackDamage(target) * 2 +
                      Variables.Spells[SpellSlot.Q].GetDamage(target)) &&
                    HeroManager.Enemies.Count(m => m.Distance(target.ServerPosition) < 200f) >= Variables.Menu.Item("ezreal.combo.r.min").GetValue <Slider>().Value)
                {
                    Variables.Spells[SpellSlot.R].SPredictionCast(
                        target, target.IsMoving ? HitChance.VeryHigh : HitChance.High);
                }

                /**
                 * var rPrediction = Variables.Spells[SpellSlot.R].GetAoeSPrediction();
                 * if (rPrediction.HitCount >= Variables.Menu.Item("ezreal.combo.r.min").GetValue<Slider>().Value)
                 * {
                 *  Variables.Spells[SpellSlot.R].Cast(rPrediction.CastPosition);
                 * }
                 */
            }
        }