Ejemplo n.º 1
0
        private static void Combo(bool useq, bool usee)
        {
            if (useq && _q.IsReady())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(_q);
                if (qtarget.IsValidTarget(_q.Range))
                {
                    var poutput = _q.GetPrediction(qtarget);
                    if (poutput.Hitchance >= (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2)
                    {
                        if (qtarget.Distance(Me.ServerPosition) > _menu.Item("dnd").GetValue <Slider>().Value)
                        {
                            if (_menu.Item("dograb" + qtarget.ChampionName).GetValue <StringList>().SelectedIndex != 0)
                            {
                                _q.Cast(poutput.CastPosition);
                            }
                        }
                    }
                }
            }

            if (usee && _e.IsReady())
            {
                var etarget = TargetSelector.GetTarget(250, TargetSelector.DamageType.Physical);
                if (etarget.IsValidTarget(_e.Range + 100))
                {
                    if (_menu.Item("usecomboe").GetValue <bool>() && !_q.IsReady())
                    {
                        _e.CastOnUnit(Me);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private static void Combo(bool useq, bool usew, bool user)
        {
            if (useq && _q.IsReady())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(_q);
                if (qtarget.IsValidTarget())
                {
                    _q.SPredictionCast(qtarget, (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2);
                }
            }

            if (usew && _w.IsReady())
            {
                var wtarget = TargetSelector.GetTarget(_w.Range + 10, TargetSelector.DamageType.Magical);
                if (wtarget.IsValidTarget())
                {
                    if (!_menu.Item("waitfor").GetValue <bool>() || _mw * _menu.Item("calcw").GetValue <Slider>().Value >= wtarget.Health)
                    {
                        _w.SPredictionCast(wtarget, (HitChance)_menu.Item("hitchancew").GetValue <Slider>().Value + 2);
                    }
                }
            }

            if (user && _r.IsReady())
            {
                var ticks   = _menu.Item("calcw").GetValue <Slider>().Value;
                var rtarget = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
                if (rtarget.IsValidTarget() && _menu.Item("rkill").GetValue <bool>())
                {
                    if (_mr + _mq + _mw * ticks + _ma * 3 + _mi + _guise >= rtarget.Health)
                    {
                        if (rtarget.Health > _mr + _ma * 2 + _mw * 2 && !rtarget.IsZombie)
                        {
                            if (_e.IsReady())
                            {
                                _e.CastOnUnit(Me);
                            }
                            _r.Cast();
                        }
                    }

                    if (Me.CountEnemiesInRange(_r.Range) >= _menu.Item("rcount").GetValue <Slider>().Value)
                    {
                        if (_e.IsReady())
                        {
                            _e.CastOnUnit(Me);
                        }

                        _r.Cast();
                    }
                }
            }
        }
Ejemplo n.º 3
0
 private static void OnMixed()
 {
     if (MenuProvider.Champion.Harass.UseW &&
         ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana) &&
         _w.IsReadyPerfectly())
     {
         var target = TargetSelector.GetTargetNoCollision(_w);
         if (target.IsValidTarget(_w.Range))
         {
             _w.Cast(target);
         }
     }
 }
Ejemplo n.º 4
0
        private static void Game_OnUpdate(EventArgs args)
        {
            const int x = 100;
            var       y = 100;

            foreach (var buffs in
                     ObjectManager.Player.Buffs.Where(b => !b.SourceName.Equals(ObjectManager.Player.ChampionName)))
            {
                Drawing.DrawText(x, y, Color.Blue, buffs.Name + " " + buffs.SourceName);
                y += 20;
            }
            var w = SpellManager.W;

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

            foreach (var dispel in
                     Dispells.Where(
                         d =>
                         (ObjectManager.Player.HasBuff(d.BuffName) &&
                          Menu.Item("Dispel" + d.ChampionName + d.BuffName) != null &&
                          Menu.Item("Dispel" + d.ChampionName + d.BuffName).IsActive())))
            {
                var buff = ObjectManager.Player.Buffs.FirstOrDefault(b => b.Name.ToLower().Equals(dispel.BuffName));
                if (buff == null || !buff.IsValid || !buff.IsActive)
                {
                    Console.WriteLine("CONTINUE");
                    continue;
                }

                var t  = (buff.EndTime - Game.Time) * 1000f + 500 + dispel.Offset;
                var wT = w.Delay * 1000f + Game.Ping / 1.85f + 750;
                Console.WriteLine("T: {0} WT: {1}", t, wT);
                if (t < wT)
                {
                    var target = TargetSelector.GetTargetNoCollision(w);
                    Console.WriteLine("CAST DISPEL");
                    if (target != null && target.IsValidTarget(w.Range) && w.Cast(target).IsCasted())
                    {
                        return;
                    }

                    if (w.Cast(Game.CursorPos))
                    {
                        return;
                    }
                }
            }
        }
Ejemplo n.º 5
0
        public void Game_OnGameUpdate(EventArgs args)
        {
            // Check if enabled
            if (!Menu.Item("activated").GetValue <bool>())
            {
                return;
            }

            // Target selector, select our target based on collision if set by the user.
            var cc     = Menu.Item("checkCollision").GetValue <bool>();
            var target = cc ? TargetSelector.GetTargetNoCollision(Javelin) : TargetSelector.GetTarget(Javelin.Range, TargetSelector.DamageType.Magical);

            //var target = TargetSelector.GetTargetNoCollision(Javelin);
            if (!target.IsValidTarget(Javelin.Range) || !Javelin.IsReady())
            {
                return;
            }

            // Find out what kind of prediction we're using
            var mode = Menu.Item("prediction").GetValue <StringList>().SelectedIndex;

            // Calcuate if we are OOM
            var myMana = (int)((Self.Mana / Self.MaxMana) * 100);

            if (myMana < Menu.Item("manapct").GetValue <Slider>().Value)
            {
                return;
            }

            switch (mode)
            {
            default:
            case 0:     // SPrediction
                _SPrediction(target);
                break;

            case 1:     // Kurisu
                Kurisu(target);
                break;

            case 2:     // Kurisu Old
                Kurisu_Old(target);
                break;

            case 3:     // Drito
                Drito(target);
                break;
            }
        }
Ejemplo n.º 6
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);
                    }
                }
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        ///     Performs the Auto Harass
        /// </summary>
        public void AutoHarass()
        {
            if (!this.GetItemValue <bool>("com.iseries.ereal.harass.auto.autoHarass"))
            {
                return;
            }

            if (this.GetItemValue <bool>("com.iseries.ereal.harass.auto.useQ") && this.spells[SpellSlot.Q].IsReady())
            {
                var target = TargetSelector.GetTargetNoCollision(this.spells[SpellSlot.Q]);

                if (this.GetItemValue <bool>("com.iseries.ezreal.harass.auto.disable" + target.ChampionName))
                {
                    return;
                }

                if (target.IsValidTarget(this.spells[SpellSlot.Q].Range))
                {
                    var prediction = this.spells[SpellSlot.Q].GetPrediction(target);
                    if (prediction.Hitchance >= this.GetHitchance())
                    {
                        this.spells[SpellSlot.Q].Cast(prediction.CastPosition);
                    }
                }
            }

            if (this.GetItemValue <bool>("com.iseries.ereal.harass.auto.useW") && this.spells[SpellSlot.W].IsReady())
            {
                var target = TargetSelector.GetTarget(this.spells[SpellSlot.W].Range, TargetSelector.DamageType.Magical);

                if (this.GetItemValue <bool>("com.iseries.ezreal.harass.auto.disable" + target.ChampionName))
                {
                    return;
                }

                if (target.IsValidTarget(this.spells[SpellSlot.W].Range))
                {
                    var prediction = this.spells[SpellSlot.W].GetPrediction(target);
                    if (prediction.Hitchance >= this.GetHitchance())
                    {
                        this.spells[SpellSlot.W].Cast(prediction.CastPosition);
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private static void Game_OnUpdate(EventArgs args)
        {
            var w = SpellManager.W;

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

            foreach (var dispel in
                     Dispells.Where(
                         d =>
                         ObjectManager.Player.HasBuff(d.BuffName) &&
                         Menu.Item("Dispel" + d.ChampionName + d.BuffName) != null &&
                         Menu.Item("Dispel" + d.ChampionName + d.BuffName).IsActive()))
            {
                var buff = ObjectManager.Player.GetBuff(dispel.BuffName);
                if (buff == null || !buff.IsValid || !buff.IsActive)
                {
                    Console.WriteLine("CONTINUE");
                    continue;
                }

                var t  = (buff.EndTime - Game.Time) * 1000f + dispel.Offset + 250;
                var wT = w.Delay * 1000f + Game.Ping / 2f;
                Console.WriteLine("T: {0} WT: {1}", t, wT);
                if (t < wT)
                {
                    var target = TargetSelector.GetTargetNoCollision(w);
                    Console.WriteLine("CAST DISPEL");
                    if (target != null && target.IsValidTarget(w.Range) && w.Cast(target).IsCasted())
                    {
                        return;
                    }

                    if (w.Cast(Game.CursorPos))
                    {
                        return;
                    }
                }
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        ///     <c>OnHarass</c> subscribed orb walker function.
        /// </summary>
        public override void OnHarass()
        {
            if (this.GetItemValue <bool>("com.iseries.ezreal.harass.useQ") && this.spells[SpellSlot.Q].IsReady())
            {
                var target     = TargetSelector.GetTargetNoCollision(this.spells[SpellSlot.Q]);
                var prediction = this.spells[SpellSlot.Q].GetPrediction(target);
                if (prediction.Hitchance >= this.GetHitchance() && target.IsValidTarget(this.spells[SpellSlot.Q].Range))
                {
                    this.spells[SpellSlot.Q].Cast(prediction.CastPosition);
                }
            }

            if (this.GetItemValue <bool>("com.iseries.ezreal.harass.useW") && this.spells[SpellSlot.W].IsReady())
            {
                var target = TargetSelector.GetTarget(this.spells[SpellSlot.W].Range, TargetSelector.DamageType.Magical);
                if (target.IsValidTarget(this.spells[SpellSlot.W].Range))
                {
                    this.spells[SpellSlot.W].Cast(target);
                }
            }
        }
Ejemplo n.º 10
0
        private static void OnCombo()
        {
            if (MenuProvider.Champion.Combo.UseW && _w.IsReadyPerfectly())
            {
                var target = TargetSelector.GetTargetNoCollision(_w);
                if (target.IsValidTarget(_w.Range))
                {
                    _w.Cast(target);
                }
            }

            if (MenuProvider.Champion.Combo.UseR && _r.IsReadyPerfectly())
            {
                var target = TargetSelector.GetTarget(_r.Range, TargetSelector.DamageType.Magical);
                if (target != null)
                {
                    var pred = _r.GetPrediction(target, true);
                    if (pred.Hitchance >= HitChance.High)
                    {
                        if (target.IsKillableAndValidTarget(_r.GetDamage(target), TargetSelector.DamageType.Magical,
                                                            _r.Range) && !Orbwalking.InAutoAttackRange(target))
                        {
                            _r.Cast(pred.CastPosition);
                        }

                        if (target.IsValidTarget(600f))
                        {
                            _r.Cast(pred.CastPosition);
                        }

                        if (target.IsImmobileUntil() >
                            target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) / _r.Speed)
                        {
                            _r.Cast(target);
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private static void BlitzOnUpdate(EventArgs args)
        {
            // kill secure
            Secure(_menu.Item("secureq").GetValue <bool>(), _menu.Item("securee").GetValue <bool>(),
                   _menu.Item("securer").GetValue <bool>());

            if ((int)(Me.Health / Me.MaxHealth * 100) >= _menu.Item("hnd").GetValue <Slider>().Value)
            {
                // auto grab
                AutoCast(_menu.Item("qdashing").GetValue <bool>(),
                         _menu.Item("qimmobile").GetValue <bool>());

                if (_menu.Item("combokey").GetValue <KeyBind>().Active)
                {
                    Combo(_menu.Item("usecomboq").GetValue <bool>(),
                          _menu.Item("usecomboe").GetValue <bool>());
                }

                if (_menu.Item("grabkey").GetValue <KeyBind>().Active)
                {
                    if (_q.IsReady())
                    {
                        var qtarget = TargetSelector.GetTargetNoCollision(_q);
                        if (qtarget.IsValidTarget(_q.Range))
                        {
                            var poutput = _q.GetPrediction(qtarget);
                            if (poutput.Hitchance >= (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2)
                            {
                                if (qtarget.Distance(Me.ServerPosition) > _menu.Item("dnd").GetValue <Slider>().Value)
                                {
                                    _q.Cast(poutput.CastPosition);
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private static void Harass(bool useq, bool usew)
        {
            if (useq && _q.IsReady())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(_q);
                if (qtarget.IsValidTarget())
                {
                    if (Me.ManaPercent >= _menu.Item("harassmana").GetValue <Slider>().Value)
                    {
                        var poutput = _q.GetPrediction(qtarget);
                        if (poutput.Hitchance >= (HitChance)_menu.Item("hitchanceq").GetValue <Slider>().Value + 2)
                        {
                            _q.Cast(poutput.CastPosition);
                        }
                    }
                }
            }

            if (usew && _w.IsReady())
            {
                var wtarget = TargetSelector.GetTarget(_w.Range + 200, TargetSelector.DamageType.Magical);
                if (wtarget.IsValidTarget())
                {
                    if (Me.ManaPercent >= _menu.Item("harassmana").GetValue <Slider>().Value)
                    {
                        if (!_menu.Item("waitfor").GetValue <bool>() || _mw * 1 >= wtarget.Health)
                        {
                            var poutput = _w.GetPrediction(wtarget);
                            if (poutput.Hitchance >= (HitChance)_menu.Item("hitchancew").GetValue <Slider>().Value + 2)
                            {
                                _w.Cast(poutput.CastPosition);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private void Game_OnUpdate(EventArgs args)
        {
            W.Range = 565 + 110 + (W.Level * 20) + 65;
            R.Range = 900 + R.Level * 300;

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                var Target = TargetSelector.GetTargetNoCollision(Q);
                                if (Target != null)
                                {
                                    Q.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                if (HeroManager.Enemies.Any(x => x.IsValidTarget(W.Range)))
                                {
                                    W.Cast();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                E.CastOnBestTarget(0, false, true);
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") < MenuProvider.Champion.Combo.getSliderValue("R Stacks Limit").Value)
                                {
                                    R.CastOnBestTarget(0, false, true);
                                }
                                else
                                {
                                    var killableTarget = HeroManager.Enemies.FirstOrDefault(x => x.isKillableAndValidTarget(R.GetDamage(x), TargetSelector.DamageType.Magical, R.Range) && R.GetPrediction(x).Hitchance >= R.MinHitChance);
                                    if (killableTarget != null)
                                    {
                                        R.Cast(killableTarget, false, true);
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(Q);
                                    if (Target != null)
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    E.CastOnBestTarget(0, false, true);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") < MenuProvider.Champion.Harass.getSliderValue("R Stacks Limit").Value)
                                    {
                                        R.CastOnBestTarget(0, false, true);
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (E.isReadyPerfectly())
                                {
                                    var FarmLocation = E.GetLineFarmLocation(MinionManager.GetMinions(E.Range));
                                    if (FarmLocation.MinionsHit >= 4)
                                    {
                                        E.Cast(FarmLocation.Position);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseR)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (R.isReadyPerfectly())
                                {
                                    if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") < MenuProvider.Champion.Laneclear.getSliderValue("R Stacks Limit").Value)
                                    {
                                        var FarmLocation = R.GetCircularFarmLocation(MinionManager.GetMinions(R.Range));
                                        if (FarmLocation.MinionsHit >= 4)
                                        {
                                            R.Cast(FarmLocation.Position);
                                        }
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (E.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));
                                    if (Target != null)
                                    {
                                        E.Cast(Target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseR)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (R.isReadyPerfectly())
                                {
                                    if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") < MenuProvider.Champion.Jungleclear.getSliderValue("R Stacks Limit").Value)
                                    {
                                        var Target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));
                                        if (Target != null)
                                        {
                                            R.Cast(Target);
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (_hasPassive == false)
                                    {
                                        var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                        if (target != null)
                                        {
                                            _q.CastOnUnit(target);
                                        }
                                        else
                                        {
                                            var extendedTarget = TargetSelector.GetTarget(_qExtended.Range,
                                                                                          _q.DamageType);
                                            if (extendedTarget != null)
                                            {
                                                var minions =
                                                    MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                                             _q.Range, MinionTypes.All, MinionTeam.NotAlly);
                                                foreach (var minion in minions)
                                                {
                                                    var box =
                                                        new Geometry.Polygon.Rectangle(
                                                            ObjectManager.Player.ServerPosition,
                                                            ObjectManager.Player.ServerPosition.Extend(
                                                                minion.ServerPosition, _qExtended.Range),
                                                            _qExtended.Width);
                                                    var prediction = _qExtended.GetPrediction(extendedTarget);
                                                    if (box.IsInside(prediction.UnitPosition))
                                                    {
                                                        if (prediction.Hitchance >= _q.MinHitChance)
                                                        {
                                                            _q.CastOnUnit(minion);
                                                            break;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    else
                                    {
                                        var killableTarget =
                                            HeroManager.Enemies.FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                           TargetSelector.DamageType.Physical, _q.Range));
                                        if (killableTarget != null)
                                        {
                                            _q.CastOnUnit(killableTarget);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (_hasPassive == false)
                                    {
                                        if (HeroManager.Enemies.Any(x => Orbwalking.InAutoAttackRange(x)))
                                        {
                                            var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                            if (target != null)
                                            {
                                                _wNoCollision.Cast(target, false, true);
                                            }
                                        }
                                        else
                                        {
                                            var target = TargetSelector.GetTargetNoCollision(_w);
                                            if (target != null)
                                            {
                                                _w.Cast(target);
                                            }
                                        }
                                    }
                                    else
                                    {
                                        var killableTarget =
                                            HeroManager.Enemies.FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_w.GetDamage(x),
                                                                           TargetSelector.DamageType.Physical, _w.Range) &&
                                                _w.GetPrediction(x).Hitchance >= HitChance.High);
                                        if (killableTarget != null)
                                        {
                                            _w.Cast(killableTarget);
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (_hasPassive == false)
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    if (!ObjectManager.Player.IsDashing())
                                    {
                                        if (
                                            ObjectManager.Player.IsManaPercentOkay(
                                                MenuProvider.Champion.Harass.IfMana))
                                        {
                                            var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                            if (target != null)
                                            {
                                                _q.CastOnUnit(target);
                                            }
                                            else
                                            {
                                                var extendedTarget = TargetSelector.GetTarget(_qExtended.Range,
                                                                                              _q.DamageType);
                                                if (extendedTarget != null)
                                                {
                                                    var minions =
                                                        MinionManager.GetMinions(
                                                            ObjectManager.Player.ServerPosition, _q.Range,
                                                            MinionTypes.All, MinionTeam.NotAlly);
                                                    foreach (var minion in minions)
                                                    {
                                                        var box =
                                                            new Geometry.Polygon.Rectangle(
                                                                ObjectManager.Player.ServerPosition,
                                                                ObjectManager.Player.ServerPosition.Extend(
                                                                    minion.ServerPosition, _qExtended.Range),
                                                                _qExtended.Width);
                                                        var prediction = _qExtended.GetPrediction(extendedTarget);
                                                        if (box.IsInside(prediction.UnitPosition))
                                                        {
                                                            if (prediction.Hitchance >= _q.MinHitChance)
                                                            {
                                                                _q.CastOnUnit(minion);
                                                                break;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        if (_hasPassive == false)
                                        {
                                            if (HeroManager.Enemies.Any(x => Orbwalking.InAutoAttackRange(x)))
                                            {
                                                var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                                if (target != null)
                                                {
                                                    _wNoCollision.Cast(target, false, true);
                                                }
                                            }
                                            else
                                            {
                                                var target = TargetSelector.GetTargetNoCollision(_w);
                                                if (target != null)
                                                {
                                                    _w.Cast(target);
                                                }
                                            }
                                        }
                                        else
                                        {
                                            var killableTarget =
                                                HeroManager.Enemies.FirstOrDefault(
                                                    x =>
                                                    x.IsKillableAndValidTarget(_w.GetDamage(x),
                                                                               TargetSelector.DamageType.Physical, _w.Range) &&
                                                    _w.GetPrediction(x).Hitchance >= HitChance.High);
                                            if (killableTarget != null)
                                            {
                                                _w.Cast(killableTarget);
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (_hasPassive == false)
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                    if (_q.IsReadyPerfectly())
                                    {
                                        if (!ObjectManager.Player.IsDashing())
                                        {
                                            var minions =
                                                MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                                         _q.Range);
                                            foreach (var minion in minions)
                                            {
                                                var box =
                                                    new Geometry.Polygon.Rectangle(
                                                        ObjectManager.Player.ServerPosition,
                                                        ObjectManager.Player.ServerPosition.Extend(
                                                            minion.ServerPosition, _qExtended.Range),
                                                        _qExtended.Width);
                                                if (minions.Count(x => box.IsInside(x.ServerPosition)) >= 3)
                                                {
                                                    _q.CastOnUnit(minion);
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (_hasPassive == false)
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    if (_q.IsReadyPerfectly())
                                    {
                                        if (!ObjectManager.Player.IsDashing())
                                        {
                                            var target =
                                                MinionManager.GetMinions(_q.Range, MinionTypes.All,
                                                                         MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                                                .FirstOrDefault(x => x.IsValidTarget(_q.Range));
                                            if (target != null)
                                            {
                                                _q.CastOnUnit(target);
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (_hasPassive == false)
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    if (_w.IsReadyPerfectly())
                                    {
                                        if (!ObjectManager.Player.IsDashing())
                                        {
                                            var target =
                                                MinionManager.GetMinions(_w.Range, MinionTypes.All,
                                                                         MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                                                .FirstOrDefault(x => x.IsValidTarget(_w.Range));
                                            if (target != null)
                                            {
                                                _w.Cast(target);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }

                    if (MenuProvider.Champion.Harass.AutoHarass)
                    {
                        if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo &&
                            MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Mixed)
                        {
                            if (!ObjectManager.Player.IsRecalling())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    if (MenuProvider.Champion.Harass.UseQ)
                                    {
                                        var extendedTarget = TargetSelector.GetTarget(_qExtended.Range, _q.DamageType);
                                        if (extendedTarget != null)
                                        {
                                            if (ObjectManager.Player.UnderTurret(true)
                                                ? !extendedTarget.UnderTurret(true)
                                                : true)
                                            {
                                                var minions =
                                                    MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                                             _q.Range, MinionTypes.All, MinionTeam.NotAlly);
                                                foreach (var minion in minions)
                                                {
                                                    var box =
                                                        new Geometry.Polygon.Rectangle(
                                                            ObjectManager.Player.ServerPosition,
                                                            ObjectManager.Player.ServerPosition.Extend(
                                                                minion.ServerPosition, _qExtended.Range),
                                                            _qExtended.Width);
                                                    var prediction = _qExtended.GetPrediction(extendedTarget);
                                                    if (box.IsInside(prediction.UnitPosition))
                                                    {
                                                        if (prediction.Hitchance >= _q.MinHitChance)
                                                        {
                                                            _q.CastOnUnit(minion);
                                                            break;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private void Game_OnUpdate(EventArgs args)
        {
            _w.MinHitChance = MenuProvider.Champion.Misc.WSelectedHitchance;

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.CountEnemiesInRange(2000f) > 0)
                                {
                                    var target =
                                        HeroManager.Enemies.Where(
                                            x =>
                                            x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x,
                                                                                                        GetQRange)))
                                        .OrderByDescending(a => TargetSelector.GetPriority(a))
                                        .FirstOrDefault();
                                    if (target != null)
                                    {
                                        if (target.CountEnemiesInRange(200) >=
                                            MenuProvider.Champion.Combo.GetSliderValue(
                                                "Switch to Rocket If will hit enemy Number >=").Value)
                                        {
                                            QSwitch(true);
                                        }
                                        else
                                        {
                                            QSwitch(
                                                !target.IsValidTarget(
                                                    ObjectManager.Player.GetRealAutoAttackRange(target, DefaultRange)));
                                        }
                                    }
                                    else
                                    {
                                        QSwitch(true);
                                    }
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (ObjectManager.Player.CountEnemiesInRange(400f) == 0)
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTargetNoCollision(_w);
                                    if (target.IsValidTarget(_w.Range))
                                    {
                                        _w.SPredictionCast(target, _w.MinHitChance);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target =
                                    HeroManager.Enemies.Where(
                                        x =>
                                        x.IsValidTarget(600) && _e.GetPrediction(x).Hitchance >= _e.MinHitChance &&
                                        x.IsMoving)
                                    .OrderBy(x => x.Distance(ObjectManager.Player))
                                    .FirstOrDefault();
                                if (target != null)
                                {
                                    _e.Cast(target, false, true);
                                }
                                else
                                {
                                    _e.CastWithExtraTrapLogic();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                if (_wCastTime + 1060 <= Environment.TickCount)
                                {
                                    var target =
                                        HeroManager.Enemies.FirstOrDefault(
                                            x =>
                                            !x.IsZombie && x.CountAlliesInRange(500) < 2 &&
                                            HealthPrediction.GetHealthPrediction(x, 5000) > 0 &&
                                            ObjectManager.Player.Distance(x) >= GetQRange &&
                                            x.IsKillableAndValidTarget(GetRDamage(x),
                                                                       TargetSelector.DamageType.Physical, _r.Range) &&
                                            _r.GetPrediction(x).Hitchance >= HitChance.High);
                                    if (target != null)
                                    {
                                        var prediction = _r.GetPrediction(target);
                                        var collision  =
                                            Collision.GetCollision(new List <Vector3> {
                                                prediction.UnitPosition
                                            },
                                                                   new PredictionInput
                                            {
                                                UseBoundingRadius = true,
                                                Unit             = ObjectManager.Player,
                                                Delay            = _r.Delay,
                                                Speed            = _r.Speed,
                                                Radius           = 200,
                                                CollisionObjects = new[] { CollisionableObjects.Heroes }
                                            })
                                            .Any(x => x.NetworkId != target.NetworkId);
                                        if (!collision)
                                        {
                                            _r.Cast(target);
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    if (ObjectManager.Player.CountEnemiesInRange(2000f) > 0)
                                    {
                                        var target =
                                            HeroManager.Enemies.Where(
                                                x =>
                                                x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x,
                                                                                                            GetQRange)))
                                            .OrderByDescending(a => TargetSelector.GetPriority(a))
                                            .FirstOrDefault();
                                        QSwitch(
                                            !target.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(
                                                                      target, DefaultRange)));
                                    }
                                    else
                                    {
                                        QSwitch(false);
                                    }
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }
                        else
                        {
                            QSwitch(false);
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (ObjectManager.Player.CountEnemiesInRange(400f) == 0)
                                {
                                    if (_w.IsReadyPerfectly())
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_w);
                                        if (target.IsValidTarget(_w.Range))
                                        {
                                            _w.SPredictionCast(target, _w.MinHitChance);
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }
                        else
                        {
                            QSwitch(false);
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsValidTarget(600) &&
                                            _w.GetPrediction(x).Hitchance >= _w.MinHitChance);
                                    if (target != null)
                                    {
                                        _w.Cast(target);
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LastHit:
                    {
                        if (MenuProvider.Champion.Lasthit.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Lasthit.IfMana))
                                {
                                    var target =
                                        MinionManager.GetMinions(float.MaxValue)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsKillableAndValidTarget(
                                                ObjectManager.Player.GetAutoAttackDamage(x, false) +
                                                _q.GetDamage(x), TargetSelector.DamageType.Physical) &&
                                            x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x,
                                                                                                        GetQRange)) &&
                                            !x.IsValidTarget(ObjectManager.Player.GetRealAutoAttackRange(x,
                                                                                                         DefaultRange)));
                                    if (target != null)
                                    {
                                        QSwitch(true);

                                        if (Orbwalking.InAutoAttackRange(target))
                                        {
                                            MenuProvider.Orbwalker.ForceTarget(target);
                                        }
                                    }
                                    else
                                    {
                                        QSwitch(false);
                                    }
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }
                        else
                        {
                            QSwitch(false);
                        }

                        break;
                    }
                    }

                    if (MenuProvider.Champion.Misc.GetBoolValue("Auto R on Killable Target"))
                    {
                        if (_r.IsReadyPerfectly())
                        {
                            if (_wCastTime + 1060 <= Environment.TickCount)
                            {
                                var target =
                                    HeroManager.Enemies.FirstOrDefault(
                                        x =>
                                        !x.IsZombie && x.CountAlliesInRange(500) < 2 &&
                                        HealthPrediction.GetHealthPrediction(x, 5000) > 0 &&
                                        ObjectManager.Player.Distance(x) >= GetQRange &&
                                        x.IsKillableAndValidTarget(GetRDamage(x), TargetSelector.DamageType.Physical,
                                                                   _r.Range) && _r.GetPrediction(x).Hitchance >= HitChance.High);
                                if (target != null)
                                {
                                    var prediction = _r.GetPrediction(target);
                                    var collision  =
                                        Collision.GetCollision(new List <Vector3> {
                                        prediction.UnitPosition
                                    },
                                                               new PredictionInput
                                    {
                                        Unit             = ObjectManager.Player,
                                        Delay            = _r.Delay,
                                        Speed            = _r.Speed,
                                        Radius           = _r.Width,
                                        CollisionObjects = new[] { CollisionableObjects.Heroes }
                                    })
                                        .Any(x => x.NetworkId != target.NetworkId);
                                    if (!collision)
                                    {
                                        _r.Cast(target);
                                    }
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Misc.GetBoolValue("Auto E on Immobile Target"))
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            var target =
                                HeroManager.Enemies.FirstOrDefault(
                                    x => x.IsValidTarget(_e.Range) && x.IsImmobileUntil() > 0.5f);
                            if (target != null)
                            {
                                _e.Cast(target, false, true);
                            }
                        }
                    }

                    if (MenuProvider.Champion.Harass.AutoHarass)
                    {
                        if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
                        {
                            if (!ObjectManager.Player.IsRecalling())
                            {
                                if (MenuProvider.Champion.Harass.UseW)
                                {
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_w);
                                        if (target != null)
                                        {
                                            if (ObjectManager.Player.UnderTurret(true)
                                                ? !target.UnderTurret(true)
                                                : true)
                                            {
                                                _w.Cast(target);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 16
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.GetBoolValue("Attack Minion For Chasing"))
                        {
                            if (MenuProvider.Orbwalker.GetTarget() == null)
                            {
                                if (
                                    !HeroManager.Enemies.Any(
                                        x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)))
                                {
                                    var minion =
                                        MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(null) + 65,
                                                                 MinionTypes.All, MinionTeam.NotAlly)
                                        .Where(x => x.IsValidTarget())
                                        .OrderBy(x => x.Distance(ObjectManager.Player))
                                        .FirstOrDefault();
                                    if (minion != null)
                                    {
                                        Orbwalking.Orbwalk(minion, Game.CursorPos, 0f);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_q);
                                        if (target != null)
                                        {
                                            if (ObjectManager.Player.Mana - _qManaCost[_q.Level] >= 40)
                                            {
                                                _q.SPredictionCast(target, _q.MinHitChance);
                                            }
                                            else
                                            {
                                                var killableTarget =
                                                    HeroManager.Enemies.FirstOrDefault(
                                                        x =>
                                                        !Orbwalking.InAutoAttackRange(x) &&
                                                        x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                                   TargetSelector.DamageType.Physical, _q.Range) &&
                                                        _q.GetPrediction(x).Hitchance >= _q.MinHitChance);
                                                if (killableTarget != null)
                                                {
                                                    _q.Cast(killableTarget);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (
                                    HeroManager.Enemies.Any(
                                        x =>
                                        HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                        x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                   TargetSelector.DamageType.Physical, _e.Range)))
                                {
                                    _e.Cast();
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        if (_q.IsReadyPerfectly())
                                        {
                                            var target = TargetSelector.GetTargetNoCollision(_q);
                                            if (target != null)
                                            {
                                                _q.SPredictionCast(target, _q.MinHitChance);
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Lane
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.IsDashing())
                                {
                                    if (!ObjectManager.Player.IsWindingUp)
                                    {
                                        if (
                                            ObjectManager.Player.IsManaPercentOkay(
                                                MenuProvider.Champion.Laneclear.IfMana))
                                        {
                                            foreach (
                                                var killableMinion in
                                                MinionManager.GetMinions(_q.Range)
                                                .Where(
                                                    x =>
                                                    _q.GetPrediction(x).Hitchance >= _q.MinHitChance &&
                                                    x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                               TargetSelector.DamageType.Physical, _q.Range)))
                                            {
                                                var killableNumber = 0;

                                                var collisionMinions =
                                                    Collision.GetCollision(
                                                        new List <Vector3>
                                                    {
                                                        ObjectManager.Player.ServerPosition.Extend(
                                                            killableMinion.ServerPosition, _q.Range)
                                                    },
                                                        new PredictionInput
                                                    {
                                                        Unit              = ObjectManager.Player,
                                                        Delay             = _q.Delay,
                                                        Speed             = _q.Speed,
                                                        Radius            = _q.Width,
                                                        Range             = _q.Range,
                                                        CollisionObjects  = new[] { CollisionableObjects.Minions },
                                                        UseBoundingRadius = false
                                                    }
                                                        ).OrderBy(x => x.Distance(ObjectManager.Player));

                                                foreach (Obj_AI_Minion collisionMinion in collisionMinions)
                                                {
                                                    if (
                                                        collisionMinion.IsKillableAndValidTarget(
                                                            ObjectManager.Player.GetSpellDamage(collisionMinion,
                                                                                                SpellSlot.Q), TargetSelector.DamageType.Physical,
                                                            _q.Range))
                                                    {
                                                        killableNumber++;
                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }

                                                if (killableNumber >=
                                                    MenuProvider.Champion.Laneclear.GetSliderValue(
                                                        "Cast Q if Killable Minion Number >=").Value)
                                                {
                                                    if (!ObjectManager.Player.IsWindingUp)
                                                    {
                                                        _q.Cast(killableMinion.ServerPosition);
                                                        break;
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range)
                                        .Count(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical)) >=
                                        MenuProvider.Champion.Laneclear.GetSliderValue(
                                            "Cast E if Killable Minion Number >=").Value)
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }

                        //Jugnle
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    var qTarget =
                                        MinionManager.GetMinions(_q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsValidTarget(_q.Range) &&
                                            _q.GetPrediction(x).Hitchance >= HitChance.High);

                                    if (qTarget != null)
                                    {
                                        _q.Cast(qTarget);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .Any(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical)))
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }

                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Use Killsteal (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            HeroManager.Enemies.Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical,
                                                           _e.Range)))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Use Mobsteal (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral,
                                                     MinionOrderTypes.MaxHealth)
                            .Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 500) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical)))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto Steal Siege minion & Super minion (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            MinionManager.GetMinions(_e.Range)
                            .Any(
                                x =>
                                HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical) &&
                                (x.CharData.BaseSkinName.ToLower().Contains("siege") ||
                                 x.CharData.BaseSkinName.ToLower().Contains("super"))))
                        {
                            _e.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto Balista Combo (With R)"))
                {
                    if (_r.IsReadyPerfectly())
                    {
                        var myBlitzcrank =
                            HeroManager.Allies.FirstOrDefault(
                                x => !x.IsDead && x.HasBuff("kalistacoopstrikeally") && x.ChampionName == "Blitzcrank");
                        if (myBlitzcrank != null)
                        {
                            var grabTarget =
                                HeroManager.Enemies.FirstOrDefault(x => !x.IsDead && x.HasBuff("rocketgrab2"));
                            if (grabTarget != null)
                            {
                                if (ObjectManager.Player.Distance(grabTarget) > myBlitzcrank.Distance(grabTarget))
                                {
                                    _r.Cast();
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto E Harass (With E)"))
                {
                    if (_e.IsReadyPerfectly())
                    {
                        if (
                            !(MenuProvider.Champion.Misc.GetBoolValue("^ Don't do this in ComboMode") &&
                              MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo))
                        {
                            if (ObjectManager.Player.Mana - _e.ManaCost >= _e.ManaCost)
                            {
                                if (HeroManager.Enemies.Any(x => x.IsValidTarget(_e.Range) && _e.GetDamage(x) > 10))
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.NotAlly)
                                        .Any(
                                            x =>
                                            HealthPrediction.GetHealthPrediction(x, 250) > 0 &&
                                            x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                       TargetSelector.DamageType.Physical, _e.Range)))
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetBoolValue("Auto W on Dragon or Baron (With W)"))
                {
                    if (ObjectManager.Player.IsManaPercentOkay(50))
                    {
                        if (!ObjectManager.Player.IsRecalling())
                        {
                            if (ObjectManager.Player.Position.CountEnemiesInRange(1500f) <= 0)
                            {
                                if (MenuProvider.Orbwalker.GetTarget() == null)
                                {
                                    if (_w.IsReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(_baronLocation) <= _w.Range)
                                        {
                                            _w.Cast(_baronLocation);
                                        }
                                    }

                                    if (_w.IsReadyPerfectly())
                                    {
                                        if (ObjectManager.Player.Distance(_dragonLocation) <= _w.Range)
                                        {
                                            _w.Cast(_dragonLocation);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Cast W on Dragon").Active)
                {
                    if (_w.IsReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(_dragonLocation) <= _w.Range)
                        {
                            _w.Cast(_dragonLocation);
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Cast W on Baron").Active)
                {
                    if (_w.IsReadyPerfectly())
                    {
                        if (ObjectManager.Player.Distance(_baronLocation) <= _w.Range)
                        {
                            _w.Cast(_baronLocation);
                        }
                    }
                }
            }
        }
Ejemplo n.º 17
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (ObjectManager.Player.HasBuff("ryzepassivecharged") ? true : Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (!(MenuProvider.Champion.Combo.UseW && _w.IsReadyPerfectly()))
                                {
                                    if (MenuProvider.Champion.Combo.GetBoolValue("Ignore Collision"))
                                    {
                                        var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);

                                        if (target != null)
                                        {
                                            _qNoCollision.Cast(target);
                                        }
                                    }
                                    else
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_q);

                                        if (target != null)
                                        {
                                            _q.Cast(target);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);

                                if (target != null)
                                {
                                    _w.CastOnUnit(target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (!(MenuProvider.Champion.Combo.UseQ && _q.IsReadyPerfectly()))
                                {
                                    if (!(MenuProvider.Champion.Combo.UseW && _w.IsReadyPerfectly()))
                                    {
                                        var target = TargetSelector.GetTarget(_e.Range, _w.DamageType);

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(target);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                if (!(MenuProvider.Champion.Combo.UseW && _w.IsReadyPerfectly()))
                                {
                                    if (!(MenuProvider.Champion.Combo.UseE && _e.IsReadyPerfectly()))
                                    {
                                        if (ObjectManager.Player.CountEnemiesInRange(1000) >= 1)
                                        {
                                            _r.Cast();
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);

                                if (target != null)
                                {
                                    _q.Cast(target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);

                                if (target != null)
                                {
                                    _w.CastOnUnit(target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);

                                if (target != null)
                                {
                                    _e.CastOnUnit(target);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    if (
                                        MenuProvider.Champion.Laneclear.GetBoolValue(
                                            "Use Burst Laneclear if Passive is Activated") &&
                                        ObjectManager.Player.HasBuff("ryzepassivecharged"))
                                    {
                                        var target =
                                            MinionManager.GetMinions(_q.Range)
                                            .FirstOrDefault(
                                                x =>
                                                x.IsValidTarget(_q.Range) &&
                                                _q.GetPrediction(x).Hitchance >= _q.MinHitChance);

                                        if (target != null)
                                        {
                                            _q.Cast(target);
                                        }
                                    }
                                    else
                                    {
                                        var target =
                                            MinionManager.GetMinions(_q.Range)
                                            .FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                           TargetSelector.DamageType.Magical, _q.Range) &&
                                                _q.GetPrediction(x).Hitchance >= _q.MinHitChance);

                                        if (target != null)
                                        {
                                            _q.Cast(target);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    if (
                                        MenuProvider.Champion.Laneclear.GetBoolValue(
                                            "Use Burst Laneclear if Passive is Activated") &&
                                        ObjectManager.Player.HasBuff("ryzepassivecharged"))
                                    {
                                        var target =
                                            MinionManager.GetMinions(_w.Range)
                                            .FirstOrDefault(x => x.IsValidTarget(_w.Range));

                                        if (target != null)
                                        {
                                            _w.CastOnUnit(target);
                                        }
                                    }
                                    else
                                    {
                                        var target =
                                            MinionManager.GetMinions(_w.Range)
                                            .FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_w.GetDamage(x),
                                                                           TargetSelector.DamageType.Magical, _w.Range));

                                        if (target != null)
                                        {
                                            _w.CastOnUnit(target);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_e.IsReadyPerfectly())
                                {
                                    if (
                                        MenuProvider.Champion.Laneclear.GetBoolValue(
                                            "Use Burst Laneclear if Passive is Activated") &&
                                        ObjectManager.Player.HasBuff("ryzepassivecharged"))
                                    {
                                        var target =
                                            MinionManager.GetMinions(_e.Range)
                                            .FirstOrDefault(x => x.IsValidTarget(_e.Range));

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(target);
                                        }
                                    }
                                    else
                                    {
                                        var target =
                                            MinionManager.GetMinions(_e.Range)
                                            .FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                           TargetSelector.DamageType.Magical, _e.Range));

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(target);
                                        }
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(
                                            x =>
                                            x.IsValidTarget(600) &&
                                            _q.GetPrediction(x).Hitchance >= _q.MinHitChance);

                                    if (target != null)
                                    {
                                        _q.Cast(target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));

                                    if (target != null)
                                    {
                                        _w.CastOnUnit(target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_e.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));

                                    if (target != null)
                                    {
                                        _e.CastOnUnit(target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    foreach (var target in HeroManager.Enemies.Where(x => x.IsValid))
                    {
                        if (_q.IsReadyPerfectly())
                        {
                            if (target.IsKillableAndValidTarget(_q.GetDamage(target), TargetSelector.DamageType.Magical,
                                                                _q.Range))
                            {
                                _q.Cast(target);
                            }
                        }

                        if (_w.IsReadyPerfectly())
                        {
                            if (target.IsKillableAndValidTarget(_w.GetDamage(target), TargetSelector.DamageType.Magical,
                                                                _w.Range))
                            {
                                _w.CastOnUnit(target);
                            }
                        }

                        if (_e.IsReadyPerfectly())
                        {
                            if (target.IsKillableAndValidTarget(_e.GetDamage(target), TargetSelector.DamageType.Magical,
                                                                _e.Range))
                            {
                                _e.CastOnUnit(target);
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Auto Keep Passive Stacks").Active)
                {
                    if (
                        ObjectManager.Player.IsManaPercentOkay(
                            MenuProvider.Champion.Misc.GetSliderValue("^ Min Mana").Value))
                    {
                        if (!ObjectManager.Player.IsRecalling())
                        {
                            if (_q.Level > 0)
                            {
                                if (_w.Level > 0)
                                {
                                    if (_e.Level > 0)
                                    {
                                        if (_q.IsReadyPerfectly())
                                        {
                                            if (!ObjectManager.Player.HasBuff("ryzepassivecharged"))
                                            {
                                                var passive      = ObjectManager.Player.GetBuff("ryzepassivestack");
                                                var passiveCount = passive != null ? passive.Count : 0;

                                                if (passiveCount < 4)
                                                {
                                                    if (passive == null ? true : passive.EndTime - Game.Time <= 0.6)
                                                    {
                                                        var target1 = TargetSelector.GetTargetNoCollision(_q);
                                                        if (target1 != null)
                                                        {
                                                            if (_q.Cast(target1) != Spell.CastStates.SuccessfullyCasted)
                                                            {
                                                                var target2 =
                                                                    MinionManager.GetMinions(_q.Range)
                                                                    .FirstOrDefault(
                                                                        x =>
                                                                        x.IsValidTarget(_q.Range) &&
                                                                        _q.GetPrediction(x).Hitchance >=
                                                                        _q.MinHitChance);

                                                                if (target2 != null)
                                                                {
                                                                    if (_q.Cast(target2) !=
                                                                        Spell.CastStates.SuccessfullyCasted)
                                                                    {
                                                                        _q.Cast(Game.CursorPos);
                                                                    }
                                                                }
                                                                else
                                                                {
                                                                    _q.Cast(Game.CursorPos);
                                                                }
                                                            }
                                                        }
                                                        else
                                                        {
                                                            var target2 =
                                                                MinionManager.GetMinions(_q.Range)
                                                                .FirstOrDefault(
                                                                    x =>
                                                                    x.IsValidTarget(_q.Range) &&
                                                                    _q.GetPrediction(x).Hitchance >=
                                                                    _q.MinHitChance);

                                                            if (target2 != null)
                                                            {
                                                                if (_q.Cast(target2) !=
                                                                    Spell.CastStates.SuccessfullyCasted)
                                                                {
                                                                    _q.Cast(Game.CursorPos);
                                                                }
                                                            }
                                                            else
                                                            {
                                                                _q.Cast(Game.CursorPos);
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 18
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                var Target = TargetSelector.GetTargetNoCollision(W);
                                if (Target.IsValidTarget(W.Range))
                                {
                                    W.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                foreach (var Target in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range) && R.GetPrediction(x).Hitchance >= HitChance.High))
                                {
                                    //R Logics
                                    if (Target.isKillableAndValidTarget(R.GetDamage(Target), TargetSelector.DamageType.Physical, R.Range) && !Orbwalking.InAutoAttackRange(Target))
                                    {
                                        R.Cast(Target);        //killable
                                    }
                                    if (Target.IsValidTarget(600f))
                                    {
                                        R.Cast(Target);        //too close
                                    }
                                    if (Target.isImmobileUntil() > Target.ServerPosition.Distance(ObjectManager.Player.ServerPosition) / R.Speed)
                                    {
                                        R.Cast(Target);        //immobile
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(W);
                                    if (Target.IsValidTarget(W.Range))
                                    {
                                        W.Cast(Target);
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    var FarmLocation = W.GetLineFarmLocation(MinionManager.GetMinions(W.Range));
                                    if (FarmLocation.MinionsHit >= 1)
                                    {
                                        W.Cast(FarmLocation.Position);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600) && W.GetPrediction(x).Hitchance >= HitChance.High);
                                    if (Target != null)
                                    {
                                        W.Cast(Target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Auto R on immobile targets"))
                {
                    if (R.isReadyPerfectly())
                    {
                        var RTarget = HeroManager.Enemies.FirstOrDefault(x => R.GetPrediction(x).Hitchance >= HitChance.High && x.IsValidTarget(R.Range) && x.isImmobileUntil() > x.Distance(ObjectManager.Player.ServerPosition) / R.Speed);
                        if (RTarget != null)
                        {
                            R.Cast(RTarget);
                        }
                    }
                }
            }
        }
Ejemplo n.º 19
0
        private void Game_OnUpdate(EventArgs args)
        {
            W.Range = 565 + 110 + W.Level * 20;
            R.Range = 900 + R.Level * 300;

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(10))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                var Target = TargetSelector.GetTargetNoCollision(Q);
                                if (Target != null)
                                {
                                    Q.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                E.CastOnBestTarget();
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                R.CastOnBestTarget();
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(Q);
                                    if (Target != null)
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    E.CastOnBestTarget();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    R.CastOnBestTarget();
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (E.isReadyPerfectly())
                                {
                                    var FarmLocation = E.GetLineFarmLocation(MinionManager.GetMinions(E.Range));
                                    if (FarmLocation.MinionsHit >= 4)
                                    {
                                        E.Cast(FarmLocation.Position);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Laneclear.UseR)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (R.isReadyPerfectly())
                                {
                                    var FarmLocation = R.GetCircularFarmLocation(MinionManager.GetMinions(R.Range));
                                    if (FarmLocation.MinionsHit >= 4)
                                    {
                                        R.Cast(FarmLocation.Position);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (E.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(E.Range));
                                    if (Target != null)
                                    {
                                        E.Cast(Target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseR)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (R.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(R.Range, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(R.Range));
                                    if (Target != null)
                                    {
                                        R.Cast(Target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 20
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Orbwalking.CanMove(20))
            {
                var starget = TargetSelector.GetSelectedTarget();
                switch (Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Flee:
                    break;

                case Orbwalking.OrbwalkingMode.LastHit:
                {
                    if (Menu.Item("LHQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(Q.GetDamage(x), Q.DamageType, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                if (Player.Position.Distance(target.Position) > 125f)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (Menu.Item("HQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= Q.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    Q.Cast(starget);
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTargetNoCollision(Q);
                                if (target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (Player.HealthPercent >= Menu.Item("MB").GetValue <Slider>().Value)
                    {
                        if (Menu.Item("HW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                if (starget != null)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        if (Player.Position.Distance(starget.Position) <= W.Range + 20f && W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(W.Range + 20f, W.DamageType);
                                    if (target != null)
                                    {
                                        if (W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    if (Menu.Item("LCQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(Q.GetDamage(x), Q.DamageType, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                Q.Cast(target);
                            }
                        }
                    }

                    if (Menu.Item("JCQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                                         .FirstOrDefault(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                            if (target != null)
                            {
                                Q.Cast(target);
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (Menu.Item("CQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= Q.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    Q.Cast(starget);
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTargetNoCollision(Q);
                                if (target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }

                    if (Player.HealthPercent >= Menu.Item("MB").GetValue <Slider>().Value)
                    {
                        if (Menu.Item("CW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                if (starget != null)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        if (Player.Position.Distance(starget.Position) <= W.Range + 20f && W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(W.Range + 20f, W.DamageType);
                                    if (target != null)
                                    {
                                        if (W.Instance.ToggleState == 1)
                                        {
                                            W.Cast();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.None:
                    break;
                }

                if (Menu.Item("CR").GetValue <bool>())
                {
                    if (Player.HealthPercent <= Menu.Item("CH").GetValue <Slider>().Value)
                    {
                        if (R.IsReadyPerfectly())
                        {
                            R.Cast();
                        }
                    }
                }

                if (Menu.Item("MA").GetValue <bool>())
                {
                    if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                    {
                        var target = MinionManager.GetMinions(W.Range).FirstOrDefault(x => x.IsValidTarget(W.Range));
                        var t      = MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(W.Range));

                        if (target == null && t == null)
                        {
                            if (W.Instance.ToggleState != 1)
                            {
                                W.Cast();
                            }
                        }
                    }
                    else
                    {
                        if (starget != null)
                        {
                            if (starget.Position.Distance(Player.Position) >= 599.5f)
                            {
                                if (W.Instance.ToggleState != 1)
                                {
                                    W.Cast();
                                }
                            }
                        }
                        else
                        {
                            var target = TargetSelector.GetTarget(float.MaxValue, W.DamageType);
                            if (target != null)
                            {
                                if (target.Position.Distance(Player.Position) >= 599.5f)
                                {
                                    if (W.Instance.ToggleState != 1)
                                    {
                                        W.Cast();
                                    }
                                }
                            }
                            else
                            {
                                if (W.Instance.ToggleState != 1)
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }
                }
            }

            if (Player.HealthPercent < Menu.Item("MB").GetValue <Slider>().Value)
            {
                if (W.Instance.ToggleState != 1)
                {
                    W.Cast();
                }
            }

            KillSteal();
        }
Ejemplo n.º 21
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);
                 * }
                 */
            }
        }
Ejemplo n.º 22
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(10))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                QSwitchForUnit(TargetSelector.GetTarget(GetQRange, TargetSelector.DamageType.Physical));
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                var Target = TargetSelector.GetTargetNoCollision(W);
                                if (Target.IsValidTarget(W.Range))
                                {
                                    W.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                var Target = HeroManager.Enemies.Where(x => x.IsValidTarget(600) && E.GetPrediction(x).Hitchance >= E.MinHitChance && !x.IsFacing(ObjectManager.Player) && x.IsMoving).OrderBy(x => x.Distance(ObjectManager.Player)).FirstOrDefault();
                                if (Target != null)
                                {
                                    if (E.Cast(Target) != Spell.CastStates.SuccessfullyCasted)
                                    {
                                        E.CastWithExtraTrapLogic();
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                var Target = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(GetRDamage(x), R.Range) && R.GetPrediction(x).Hitchance >= HitChance.High);
                                if (Target != null)
                                {
                                    var prediction = R.GetPrediction(Target);
                                    var collision  = LeagueSharp.Common.Collision.GetCollision(new System.Collections.Generic.List <SharpDX.Vector3> {
                                            prediction.UnitPosition
                                        }, new PredictionInput {
                                            Unit = ObjectManager.Player, Delay = R.Delay, Speed = R.Speed, Radius = R.Width, CollisionObjects = new CollisionableObjects[] { CollisionableObjects.Heroes }
                                        }).Any(x => x.NetworkId != Target.NetworkId);
                                    if (!collision)
                                    {
                                        R.Cast(Target);
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    QSwitchForUnit(TargetSelector.GetTarget(GetQRange, TargetSelector.DamageType.Physical));
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(W);
                                    if (Target.IsValidTarget(W.Range))
                                    {
                                        W.Cast(Target);
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                {
                                    var Target = MenuProvider.Orbwalker.GetTarget();
                                    if (Target != null)
                                    {
                                        QSwitch(MinionManager.GetMinions(Target.Position, 200).Count() >= MenuProvider.Champion.Laneclear.getSliderValue("Switch to FISHBONES If will hit minion Number >=").Value);
                                    }
                                }
                                else
                                {
                                    QSwitch(false);
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(700, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(700) && W.GetPrediction(x).Hitchance >= W.MinHitChance);
                                    if (Target != null)
                                    {
                                        W.Cast(Target);
                                    }
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LastHit:
                    {
                        QSwitch(false);
                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 23
0
        public override void ExecuteCombo()
        {
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));

            if (E.IsReady() && useE) // Credits DZ191
            {
                var target = HeroManager.Enemies.Find(x => x.IsValidTarget(E.Range));
                if (target != null)
                {
                    if (target.HasBuffOfType(BuffType.Slow))
                    {
                        if (target.Path.Count() > 1)
                        {
                            var slowEndTime = target.GetSlowEndTime();
                            if (slowEndTime >= E.Delay + 0.5f + Game.Ping / 2f)
                            {
                                E.CastIfHitchanceGreaterOrEqual(target);
                            }
                        }
                    }

                    if (target.IsHeavilyImpaired())
                    {
                        var immobileEndTime = target.GetImpairedEndTime();
                        if (immobileEndTime >= E.Delay + 0.5f + Game.Ping / 2f)
                        {
                            E.CastIfHitchanceGreaterOrEqual(target);
                        }
                    }
                }
            }

            var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));

            if (W.IsReady() && useW)
            {
                var target = TargetSelector.GetTargetNoCollision(W);
                if (target == null)
                {
                    return;
                }
                if (!ObjectManager.Player.UnderTurret(true) || !target.UnderTurret(true))
                {
                    W.CastIfHitchanceGreaterOrEqual(target);
                }
            }

            if ((GetValue <KeyBind>("CastR").Active || GetValue <bool>("UseRC")) && R.IsReady())
            {
                if (wCastTime + 1060 <= Environment.TickCount)
                {
                    var target =
                        HeroManager.Enemies.FirstOrDefault(
                            x =>
                            !x.IsZombie && x.CountAlliesInRange(500) < 2 &&
                            HealthPrediction.GetHealthPrediction(x, 5000) > 0 &&
                            ObjectManager.Player.Distance(x) >= Orbwalking.GetRealAutoAttackRange(null) + 65 + QExtraRange &&
                            x.IsKillableAndValidTarget(GetRDamage(x), TargetSelector.DamageType.Physical, R.Range) &&
                            R.GetPrediction(x).Hitchance >= HitChance.High);
                    if (target != null)
                    {
                        var prediction = R.GetPrediction(target);
                        var collision  =
                            Collision.GetCollision(new List <Vector3> {
                            prediction.UnitPosition
                        },
                                                   new PredictionInput
                        {
                            UseBoundingRadius = true,
                            Unit             = ObjectManager.Player,
                            Delay            = R.Delay,
                            Speed            = R.Speed,
                            Radius           = 200,
                            CollisionObjects = new[] { CollisionableObjects.Heroes }
                        })
                            .Any(x => x.NetworkId != target.NetworkId);
                        if (!collision)
                        {
                            R.Cast(target);
                        }
                    }
                }
            }
            base.ExecuteCombo();
        }
Ejemplo n.º 24
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                switch (MenuProvider.Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (MenuProvider.Champion.Combo.UseQ)
                    {
                        if (Q.isReadyPerfectly())
                        {
                            if (!ObjectManager.Player.IsDashing())
                            {
                                if (!ObjectManager.Player.IsWindingUp)
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(Q);
                                    if (Target != null)
                                    {
                                        if (!E.isReadyPerfectly())
                                        {
                                            Q.Cast(Target);
                                        }
                                        else
                                        if (ObjectManager.Player.Mana - Q.ManaCost >= E.ManaCost)
                                        {
                                            Q.Cast(Target);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Combo.UseE)
                    {
                        if (E.isReadyPerfectly())
                        {
                            if (HeroManager.Enemies.Any(x => x.isKillableAndValidTarget(E.GetDamage(x))))
                            {
                                E.Cast();
                            }
                        }
                    }

                    break;
                }

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (MenuProvider.Champion.Harass.UseQ)
                    {
                        if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                        {
                            if (!ObjectManager.Player.IsDashing())
                            {
                                if (!ObjectManager.Player.IsWindingUp)
                                {
                                    if (Q.isReadyPerfectly())
                                    {
                                        Q.CastOnBestTarget();
                                    }
                                }
                            }
                        }
                    }

                    break;
                }

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    //Lane
                    if (MenuProvider.Champion.Laneclear.UseQ)
                    {
                        if (Q.isReadyPerfectly())
                        {
                            if (!ObjectManager.Player.IsDashing())
                            {
                                if (!ObjectManager.Player.IsWindingUp)
                                {
                                    if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                    {
                                        foreach (var KillableMinion in MinionManager.GetMinions(Q.Range).Where(x => Q.GetPrediction(x).Hitchance >= Q.MinHitChance && x.isKillableAndValidTarget(Damage.GetSpellDamage(ObjectManager.Player, x, SpellSlot.Q), Q.Range)))
                                        {
                                            int killableNumber = 0;

                                            var CollisionMinions =
                                                LeagueSharp.Common.Collision.GetCollision(new List <Vector3> {
                                                    ObjectManager.Player.ServerPosition.Extend(KillableMinion.ServerPosition, Q.Range)
                                                },
                                                                                          new PredictionInput
                                                {
                                                    Unit              = ObjectManager.Player,
                                                    Delay             = Q.Delay,
                                                    Speed             = Q.Speed,
                                                    Radius            = Q.Width,
                                                    Range             = Q.Range,
                                                    CollisionObjects  = new CollisionableObjects[] { CollisionableObjects.Minions },
                                                    UseBoundingRadius = false
                                                }
                                                                                          ).OrderBy(x => x.Distance(ObjectManager.Player));

                                            foreach (Obj_AI_Minion CollisionMinion in CollisionMinions)
                                            {
                                                if (CollisionMinion.isKillableAndValidTarget(Damage.GetSpellDamage(ObjectManager.Player, CollisionMinion, SpellSlot.Q), Q.Range))
                                                {
                                                    killableNumber++;
                                                }
                                                else
                                                {
                                                    break;
                                                }
                                            }

                                            if (killableNumber >= MenuProvider.Champion.Laneclear.getSliderValue("Cast Q if Killable Minion Number >=").Value)
                                            {
                                                if (!ObjectManager.Player.IsWindingUp)
                                                {
                                                    Q.Cast(KillableMinion.ServerPosition);
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Laneclear.UseE)
                    {
                        if (E.isReadyPerfectly())
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (MinionManager.GetMinions(float.MaxValue).Count(x => x.isKillableAndValidTarget(E.GetDamage(x))) >= MenuProvider.Champion.Laneclear.getSliderValue("Cast E if Killable Minion Number >=").Value)
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }

                    //Jugnle
                    if (MenuProvider.Champion.Jungleclear.UseQ)
                    {
                        if (Q.isReadyPerfectly())
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                var QTarget = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(Q.Range) && Q.GetPrediction(x).Hitchance >= HitChance.High);

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

                    if (MenuProvider.Champion.Jungleclear.UseE)
                    {
                        if (E.isReadyPerfectly())
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (MinionManager.GetMinions(float.MaxValue, MinionTypes.All, MinionTeam.Neutral).Any(x => x.isKillableAndValidTarget(E.GetDamage(x))))
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }

                    break;
                }
                }

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    if (E.isReadyPerfectly())
                    {
                        if (HeroManager.Enemies.Any(x => x.isKillableAndValidTarget(E.GetDamage(x))))
                        {
                            E.Cast();
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getBoolValue("Use Mobsteal (With E)"))
                {
                    if (E.isReadyPerfectly())
                    {
                        if (MinionManager.GetMinions(float.MaxValue, MinionTypes.All, MinionTeam.Neutral).Any(x => x.isKillableAndValidTarget(E.GetDamage(x))))
                        {
                            E.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 25
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                if (target != null)
                                {
                                    _q.Cast(target, false, true);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                if (target != null)
                                {
                                    _e.Cast();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTargetNoCollision(_r);
                                if (target != null)
                                {
                                    _r.Cast(target);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                    if (target != null)
                                    {
                                        _q.Cast(target, false, true);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseR)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_r.IsReadyPerfectly())
                                {
                                    if (_r.Instance.Ammo >
                                        MenuProvider.Champion.Harass.GetSliderValue("Keep R Stacks").Value)
                                    {
                                        var target = TargetSelector.GetTargetNoCollision(_r);
                                        if (target != null)
                                        {
                                            _r.Cast(target);
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var farmLocation = _q.GetCircularFarmLocation(MinionManager.GetMinions(_q.Range));
                                    if (farmLocation.MinionsHit >= 4)
                                    {
                                        _q.Cast(farmLocation.Position);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_q.IsReadyPerfectly())
                                {
                                    var target =
                                        MinionManager.GetMinions(_q.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(x => x.IsValidTarget(_q.Range));
                                    if (target != null)
                                    {
                                        _q.Cast(target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseR)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_r.IsReadyPerfectly())
                                {
                                    if (_r.Instance.Ammo >
                                        MenuProvider.Champion.Jungleclear.GetSliderValue("Keep R Stacks").Value)
                                    {
                                        var target =
                                            MinionManager.GetMinions(_r.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                     MinionOrderTypes.MaxHealth)
                                            .FirstOrDefault(x => x.IsValidTarget(_r.Range));
                                        if (target != null)
                                        {
                                            _r.Cast(target);
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 26
0
        private static void Obj_AI_Hero_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!Menu.Item("WSpells").IsActive() || !W.IsReady())
            {
                return;
            }

            var unit = sender as Obj_AI_Hero;

            if (unit == null || !unit.IsValid || !unit.IsEnemy)
            {
                return;
            }

            if (Menu.Item("WSmart").IsActive() &&
                (Player.HasBuff("BlackShield") || Player.HasBuff("itemmagekillerveil")))
            {
                return;
            }

            // spell handled by evade
            if (SpellDatabase.GetByName(args.SData.Name) != null)
            {
                Console.WriteLine("EVADE PROCESS SPELL RETURN");
                return;
            }

            Console.WriteLine("({0}) {1}", args.Slot, args.SData.Name);
            if (!SpellBlock.Contains(unit, args))
            {
                return;
            }

            var castUnit = unit;
            var type     = args.SData.TargettingType;

            Console.WriteLine(
                "PassiveType: {0} Range: {1} Radius: {2}", type, args.SData.CastRange, args.SData.CastRadius);
            Console.WriteLine("Distance: " + args.End.DistanceToPlayer());

            if (!unit.IsValidTarget() || Menu.Item("WMode").GetValue <StringList>().SelectedIndex == 1)
            {
                var target = TargetSelector.GetSelectedTarget();
                if (target == null || !target.IsValidTarget(W.Range))
                {
                    target = TargetSelector.GetTargetNoCollision(W);
                }

                if (target != null && target.IsValidTarget(W.Range))
                {
                    castUnit = target;
                }
            }

            if (type.IsSkillShot())
            {
                if (unit.ChampionName.Equals("Bard") && args.End.DistanceToPlayer() < 300)
                {
                    Utility.DelayAction.Add(400 + (int)(unit.Distance(Player) / 7f), () => CastW(castUnit));
                }
                else if (unit.ChampionName.Equals("Riven") && args.End.DistanceToPlayer() < 260)
                {
                    //Console.WriteLine("RIVEN");
                    CastW(castUnit);
                }
                else if (args.End.DistanceToPlayer() < 60)
                {
                    CastW(castUnit);
                }
            }
            if (type.IsTargeted() && args.Target != null)
            {
                if (!args.Target.IsMe ||
                    (args.Target.Name.Equals("Barrel") && args.Target.DistanceToPlayer() > 200 &&
                     args.Target.DistanceToPlayer() < 400))
                {
                    return;
                }

                if (Menu.Item("WTurret").IsActive() && Player.UnderTurret(true))
                {
                    return;
                }

                if (unit.ChampionName.Equals("Nautilus") ||
                    (unit.ChampionName.Equals("Caitlyn") && args.Slot.Equals(SpellSlot.R)))
                {
                    var d          = unit.DistanceToPlayer();
                    var travelTime = d / args.SData.MissileSpeed;
                    var delay      = travelTime * 1000 - W.Delay + 150;
                    //Console.WriteLine("TT: " + travelTime + " " + delay);
                    Utility.DelayAction.Add((int)delay, () => CastW(castUnit));
                    return;
                }

                CastW(castUnit);
            }
            else if (type.Equals(SpellDataTargetType.LocationAoe) && args.End.DistanceToPlayer() < args.SData.CastRadius)
            {
                // annie moving tibbers
                if (unit.ChampionName.Equals("Annie") && args.Slot.Equals(SpellSlot.R))
                {
                    return;
                }
                CastW(castUnit);
            }
            else if (type.Equals(SpellDataTargetType.Cone) && args.End.DistanceToPlayer() < args.SData.CastRadius)
            {
                CastW(castUnit);
            }
            else if (type.Equals(SpellDataTargetType.SelfAoe) || type.Equals(SpellDataTargetType.Self))
            {
                var d = args.End.Distance(Player.ServerPosition);
                var p = args.SData.CastRadius > 5000 ? args.SData.CastRange : args.SData.CastRadius;
                //Console.WriteLine(d + " " + " " + p);
                if (d < p)
                {
                    //Console.WriteLine("CAST");
                    CastW(castUnit);
                }
            }
        }
Ejemplo n.º 27
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            _w.Range = 565 + 60 + _w.Level * 30 + 65;
            _r.Range = 900 + _r.Level * 300;

            if (Orbwalking.CanMove(100))
            {
                switch (MenuProvider.Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (MenuProvider.Champion.Combo.UseQ)
                    {
                        if (_q.IsReadyPerfectly())
                        {
                            if (MenuProvider.Champion.Combo.GetBoolValue("Keep Mana For W") && _w.Level > 0
                                        ? ObjectManager.Player.Mana - _q.ManaCost >= _w.ManaCost
                                        : true)
                            {
                                var target = TargetSelector.GetTargetNoCollision(_q);
                                if (target != null)
                                {
                                    _q.Cast(target);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Combo.UseW)
                    {
                        if (_w.IsReadyPerfectly())
                        {
                            if (HeroManager.Enemies.Any(x => x.IsValidTarget(_w.Range)))
                            {
                                _w.Cast();
                            }
                        }
                    }

                    if (MenuProvider.Champion.Combo.UseE)
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            if (MenuProvider.Champion.Combo.GetBoolValue("Keep Mana For W") && _w.Level > 0
                                        ? ObjectManager.Player.Mana - _e.ManaCost >= _w.ManaCost
                                        : true)
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                if (target != null)
                                {
                                    _e.Cast(target, false, true);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Combo.UseR)
                    {
                        if (_r.IsReadyPerfectly())
                        {
                            if (MenuProvider.Champion.Combo.GetBoolValue("Keep Mana For W") && _w.Level > 0
                                        ? ObjectManager.Player.Mana - _r.ManaCost >= _w.ManaCost
                                        : true)
                            {
                                if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") <
                                    MenuProvider.Champion.Combo.GetSliderValue("R Stacks Limit").Value)
                                {
                                    var target = TargetSelector.GetTarget(_r.Range, _r.DamageType);
                                    if (target != null)
                                    {
                                        _r.Cast(target);
                                    }
                                }
                                else
                                {
                                    var killableTarget =
                                        HeroManager.Enemies.FirstOrDefault(
                                            x =>
                                            x.IsKillableAndValidTarget(_r.GetDamage(x),
                                                                       TargetSelector.DamageType.Magical, _r.Range) &&
                                            _r.GetPrediction(x).Hitchance >= _r.MinHitChance);
                                    if (killableTarget != null)
                                    {
                                        _r.Cast(killableTarget);
                                    }
                                }
                            }
                        }
                    }

                    break;
                }

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (MenuProvider.Champion.Harass.UseQ)
                    {
                        if (_q.IsReadyPerfectly())
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                var target = TargetSelector.GetTargetNoCollision(_q);
                                if (target != null)
                                {
                                    _q.Cast(target);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Harass.UseE)
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                if (target != null)
                                {
                                    _e.Cast(target, false, true);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Harass.UseR)
                    {
                        if (_r.IsReadyPerfectly())
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") <
                                    MenuProvider.Champion.Harass.GetSliderValue("R Stacks Limit").Value)
                                {
                                    var target = TargetSelector.GetTarget(_r.Range, _r.DamageType);
                                    if (target != null)
                                    {
                                        _r.Cast(target, false, true);
                                    }
                                }
                            }
                        }
                    }
                    break;
                }

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    //Laneclear
                    if (MenuProvider.Champion.Laneclear.UseE)
                    {
                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var farmLocation = _e.GetLineFarmLocation(MinionManager.GetMinions(_e.Range));
                                if (farmLocation.MinionsHit >= 4)
                                {
                                    _e.Cast(farmLocation.Position);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Laneclear.UseR)
                    {
                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") <
                                    MenuProvider.Champion.Laneclear.GetSliderValue("R Stacks Limit").Value)
                                {
                                    var farmLocation =
                                        _r.GetCircularFarmLocation(MinionManager.GetMinions(_r.Range));
                                    if (farmLocation.MinionsHit >= 4)
                                    {
                                        _r.Cast(farmLocation.Position);
                                    }
                                }
                            }
                        }
                    }

                    //Jungleclear
                    if (MenuProvider.Champion.Jungleclear.UseE)
                    {
                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target =
                                    MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                             MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));
                                if (target != null)
                                {
                                    _e.Cast(target);
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Jungleclear.UseR)
                    {
                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                if (ObjectManager.Player.GetBuffCount("kogmawlivingartillerycost") <
                                    MenuProvider.Champion.Jungleclear.GetSliderValue("R Stacks Limit").Value)
                                {
                                    var target =
                                        MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(x => x.IsValidTarget(600));
                                    if (target != null)
                                    {
                                        _r.Cast(target);
                                    }
                                }
                            }
                        }
                    }

                    break;
                }
                }
            }
        }
Ejemplo n.º 28
0
        private void Game_OnUpdate(EventArgs args)
        {
            R.Range = 1500 + (500 * R.Level);

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (MenuProvider.Champion.Combo.getBoolValue("Don't Use Q in AutoAttack Range") ? HeroManager.Enemies.Count(x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)) == 0 : true)
                                {
                                    Q.CastOnBestTarget();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                if (W.CastOnBestTarget() != Spell.CastStates.SuccessfullyCasted)
                                {
                                    W.CastWithExtraTrapLogic();
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (E.isReadyPerfectly())
                            {
                                var Target = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(E.GetDamage(x), TargetSelector.DamageType.Physical, E.Range) && E.GetPrediction(x).Hitchance >= HitChance.High);
                                if (Target != null)
                                {
                                    E.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                var Target = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(R.GetDamage(x), TargetSelector.DamageType.Physical, R.Range));
                                if (Target != null)
                                {
                                    if (ObjectManager.Player.GetEnemiesInRange(1500f).Count(x => Target.NetworkId != Target.NetworkId) == 0)
                                    {
                                        var collision = LeagueSharp.Common.Collision.GetCollision(new System.Collections.Generic.List <SharpDX.Vector3> {
                                                Target.ServerPosition
                                            }, new PredictionInput {
                                                UseBoundingRadius = true, Unit = ObjectManager.Player, Delay = 0.5f, Speed = 1500f, Radius = 200f, CollisionObjects = new CollisionableObjects[] { CollisionableObjects.Heroes }
                                            }).Any(x => x.NetworkId != Target.NetworkId);
                                        if (!collision)
                                        {
                                            R.CastOnUnit(Target);
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    Q.CastOnBestTarget(0, false, true);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.getBoolValue("Use EQ"))
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (E.isReadyPerfectly())
                                {
                                    if (Q.isReadyPerfectly())
                                    {
                                        var Target = TargetSelector.GetTargetNoCollision(E);
                                        if (Target != null)
                                        {
                                            if (E.Cast(Target) == Spell.CastStates.SuccessfullyCasted)
                                            {
                                                Q.Cast(Target);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var FarmLocation = Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range));
                                    if (FarmLocation.MinionsHit >= 4)
                                    {
                                        Q.Cast(FarmLocation.Position);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600));
                                    if (Target != null)
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }

                    if (MenuProvider.Champion.Misc.getBoolValue("Auto R on Killable Target"))
                    {
                        if (R.isReadyPerfectly())
                        {
                            var Target = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(R.GetDamage(x), TargetSelector.DamageType.Physical, R.Range));
                            if (Target != null)
                            {
                                if (ObjectManager.Player.GetEnemiesInRange(1500f).Count(x => Target.NetworkId != Target.NetworkId) == 0)
                                {
                                    var collision = LeagueSharp.Common.Collision.GetCollision(new System.Collections.Generic.List <SharpDX.Vector3> {
                                        Target.ServerPosition
                                    }, new PredictionInput {
                                        Unit = ObjectManager.Player, Delay = 0.5f, Speed = 1500f, Radius = 200f, CollisionObjects = new CollisionableObjects[] { CollisionableObjects.Heroes }
                                    }).Any(x => x.NetworkId != Target.NetworkId);
                                    if (!collision)
                                    {
                                        R.CastOnUnit(Target);
                                    }
                                }
                            }
                        }
                    }

                    if (MenuProvider.Champion.Misc.getBoolValue("Auto W on Immobile Target"))
                    {
                        if (W.isReadyPerfectly())
                        {
                            var Target = HeroManager.Enemies.FirstOrDefault(x => x.IsValidTarget(W.Range) && x.isImmobileUntil() > 0.5f);
                            if (Target != null)
                            {
                                W.Cast(Target);
                            }
                        }
                    }
                }

                if (MenuProvider.Champion.Misc.getKeyBindValue("Dash to Cursor Position (With E)").Active)
                {
                    if (E.isReadyPerfectly())
                    {
                        E.Cast(ObjectManager.Player.Position.Extend(Game.CursorPos, -(E.Range / 2)));
                    }
                }

                if (MenuProvider.Champion.Misc.getKeyBindValue("EQ Combo").Active)
                {
                    if (E.isReadyPerfectly())
                    {
                        if (Q.isReadyPerfectly())
                        {
                            var Target = HeroManager.Enemies.Where(x => x.IsValidTarget(E.Range) && x.IsValidTarget(200, true, Game.CursorPos) && E.GetPrediction(x).Hitchance >= E.MinHitChance).OrderByDescending(x => TargetSelector.GetPriority(x)).FirstOrDefault();
                            if (Target != null)
                            {
                                if (E.Cast(Target) == Spell.CastStates.SuccessfullyCasted)
                                {
                                    Q.Cast(Target, false, true);
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 29
0
        internal static void Game_OnUpdate(EventArgs args)
        {
            if (ProSeries.CanCombo())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(Q);
                if (qtarget.IsValidTarget() && Q.IsReady())
                {
                    if (ProSeries.Config.Item("usecomboq", true).GetValue <bool>())
                    {
                        Q.Cast(qtarget);
                    }
                }

                var wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (wtarget.IsValidTarget() && W.IsReady())
                {
                    if (ProSeries.Config.Item("usecombow", true).GetValue <bool>())
                    {
                        W.Cast(wtarget);
                    }
                }
            }

            if (ProSeries.CanHarass())
            {
                var qtarget = TargetSelector.GetTargetNoCollision(Q);
                if (qtarget.IsValidTarget() && Q.IsReady() && ProSeries.IsWhiteListed(qtarget))
                {
                    if (ProSeries.Config.Item("usecomboq", true).GetValue <bool>())
                    {
                        Q.Cast(qtarget);
                    }
                }

                var wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (wtarget.IsValidTarget() && W.IsReady() && ProSeries.IsWhiteListed(wtarget))
                {
                    if (ProSeries.Config.Item("useharassw", true).GetValue <bool>())
                    {
                        W.Cast(wtarget);
                    }
                }
            }

            if (Q.IsReady())
            {
                foreach (var target in ObjectManager.Get <AIHeroClient>().Where(h => h.IsValidTarget(Q.Range)))
                {
                    if (ProSeries.Config.Item("useqimm", true).GetValue <bool>())
                    {
                        Q.CastIfHitchanceEquals(target, HitChance.Immobile);
                    }

                    if (ProSeries.Config.Item("useqdash", true).GetValue <bool>())
                    {
                        Q.CastIfHitchanceEquals(target, HitChance.Dashing);
                    }
                }
            }

            if (ProSeries.CanClear())
            {
                foreach (var neutral in ProSeries.JungleMobsInRange(650))
                {
                    if (ProSeries.Config.Item("useclearq", true).GetValue <bool>())
                    {
                        Q.Cast(neutral);
                    }
                }

                foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(m => m.IsValidTarget(Q.Range)))
                {
                    if (ProSeries.Player.GetSpellDamage(minion, Q.Slot) >= minion.Health &&
                        ProSeries.Config.Item("useclearq", true).GetValue <bool>())
                    {
                        if (!minion.Name.Contains("Ward"))
                        {
                            Q.Cast(minion);
                        }
                    }
                }
            }

            if (ProSeries.Config.Item("usecombor", true).GetValue <bool>())
            {
                var maxDistance = ProSeries.Config.Item("maxrdist", true).GetValue <Slider>().Value;
                foreach (var target in ObjectManager.Get <AIHeroClient>().Where(h => h.IsValidTarget(maxDistance)))
                {
                    var aaDamage = Orbwalking.InAutoAttackRange(target)
                        ? ProSeries.Player.GetAutoAttackDamage(target, true)
                        : 0;

                    if (!target.IsZombie &&
                        target.Health - aaDamage <= ProSeries.Player.GetSpellDamage(target, SpellSlot.R))
                    {
                        R.Cast(target);
                    }
                }
            }
        }
Ejemplo n.º 30
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseQ)
                        {
                            if (Q.isReadyPerfectly())
                            {
                                var Target = TargetSelector.GetTargetNoCollision(Q);
                                if (Target.IsValidTarget(Q.Range))
                                {
                                    Q.Cast(Target);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                W.CastOnBestTarget(0, false, true);
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                if (ObjectManager.Player.CountEnemiesInRange(700) == 0)
                                {
                                    var KillableTarget = HeroManager.Enemies.FirstOrDefault(x => !Orbwalking.InAutoAttackRange(x) && x.isKillableAndValidTarget(R.GetDamage(x), TargetSelector.DamageType.Magical, R.Range) && R.GetPrediction(x).Hitchance >= R.MinHitChance);
                                    if (KillableTarget != null)
                                    {
                                        R.Cast(KillableTarget, false, true);
                                    }
                                    R.CastIfWillHit(TargetSelector.GetTarget(R.Range, R.DamageType), 3);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var Target = TargetSelector.GetTargetNoCollision(Q);
                                    if (Target.IsValidTarget(Q.Range))
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (W.isReadyPerfectly())
                                {
                                    W.CastOnBestTarget(0, false, true);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Laneclear
                        if (MenuProvider.Champion.Laneclear.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(Q.Range).OrderBy(x => x.Health).FirstOrDefault(x => x.isKillableAndValidTarget(Q.GetDamage(x), TargetSelector.DamageType.Physical, Q.Range) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                                    if (Target != null)
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }

                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var Target = MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(x => x.IsValidTarget(600) && Q.GetPrediction(x).Hitchance >= Q.MinHitChance);
                                    if (Target != null)
                                    {
                                        Q.Cast(Target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }

                    if (MenuProvider.Champion.Harass.AutoHarass)
                    {
                        if (!ObjectManager.Player.IsRecalling())
                        {
                            if (Q.isReadyPerfectly())
                            {
                                if (MenuProvider.Champion.Harass.UseQ)
                                {
                                    if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        var Target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                                        if (Target != null)
                                        {
                                            if (ObjectManager.Player.UnderTurret(true) ? !Target.UnderTurret(true) : true)
                                            {
                                                Q.Cast(Target);
                                            }
                                        }
                                    }
                                }
                            }

                            if (W.isReadyPerfectly())
                            {
                                if (MenuProvider.Champion.Harass.UseW)
                                {
                                    if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        var Target = TargetSelector.GetTarget(W.Range, W.DamageType);
                                        if (Target != null)
                                        {
                                            if (ObjectManager.Player.UnderTurret(true) ? !Target.UnderTurret(true) : true)
                                            {
                                                W.Cast(Target);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }