Ejemplo n.º 1
0
 public static bool CanCastSpell()
 {
     return
         (!(HeroManager.Enemies.Any(x => x.IsValidTarget() && Orbwalking.InAutoAttackRange(x)) && (Orbwalking.CanAttack() || BadaoChecker.BadaoHasTiamat())) &&
          Orbwalking.CanMove(0));
 }
Ejemplo n.º 2
0
        private void Farm()
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            List <Obj_AI_Base> allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsR = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, R.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsE = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);

            var useQ = menu.Item("UseQFarm", true).GetValue <bool>();
            var useE = menu.Item("UseEFarm", true).GetValue <bool>();
            var useR = menu.Item("UseRFarm", true).GetValue <bool>();

            int hit = 0;

            if (useQ && Q.IsReady() && ShouldQ())
            {
                MinionManager.FarmLocation qPos = Q.GetLineFarmLocation(allMinionsQ);
                if (qPos.MinionsHit >= 3)
                {
                    Q.Cast(qPos.Position);
                }
            }

            if (useR & R.IsReady() && !_rFirstCreated)
            {
                MinionManager.FarmLocation rPos = R.GetCircularFarmLocation(allMinionsR);
                if (Player.Distance(rPos.Position) < R.Range)
                {
                    R.Cast(rPos.Position);
                }
            }

            if (!ShouldQ() && _qMissle != null)
            {
                if (useQ && Q.IsReady())
                {
                    hit += allMinionsQ.Count(enemy => enemy.Distance(_qMissle.Position) < 110);
                }

                if (hit >= 2 && Q.IsReady())
                {
                    Q.Cast();
                }
            }

            if (_rFirstCreated)
            {
                hit += allMinionsR.Count(enemy => enemy.Distance(_rObj.Position) < 400);

                if (hit < 2 && R.IsReady())
                {
                    R.Cast();
                }
            }

            if (useE && allMinionsE.Count > 0 && E.IsReady())
            {
                E.Cast(allMinionsE[0]);
            }
        }
Ejemplo n.º 3
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 killableTarget =
                                    HeroManager.Enemies.FirstOrDefault(
                                        x =>
                                        x.IsValidTarget(_q.ChargedMaxRange) &&
                                        x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                   TargetSelector.DamageType.Physical, _q.Range) &&
                                        _q.GetPrediction(x).Hitchance >= _q.MinHitChance);
                                if (killableTarget != null)
                                {
                                    if (_q.IsCharging)
                                    {
                                        if (killableTarget.IsValidTarget(_q.Range))
                                        {
                                            _q.Cast(killableTarget, false, true);
                                        }
                                    }
                                    else
                                    {
                                        _q.StartCharging();
                                    }
                                }
                                else
                                {
                                    if (_w.Level > 0)
                                    {
                                        var target =
                                            HeroManager.Enemies.FirstOrDefault(
                                                x =>
                                                x.IsValidTarget(_q.ChargedMaxRange) &&
                                                x.GetBuffCount("varuswdebuff") >= 3);
                                        if (target != null)
                                        {
                                            if (_q.IsCharging)
                                            {
                                                if (_q.Range >=
                                                    MenuProvider.Champion.Combo.GetSliderValue("Q Min Charge").Value)
                                                {
                                                    if (target.IsValidTarget(_q.Range))
                                                    {
                                                        _q.Cast(target, false, true);
                                                    }
                                                }
                                            }
                                            else if (MenuProvider.Champion.Combo.UseE ? !_e.IsReadyPerfectly() : true)
                                            {
                                                if (_eLastCastTime + 1500 < Environment.TickCount)
                                                {
                                                    _q.StartCharging();
                                                }
                                            }
                                        }
                                        else if (_q.IsCharging)
                                        {
                                            if (_q.Range >=
                                                MenuProvider.Champion.Combo.GetSliderValue("Q Min Charge").Value)
                                            {
                                                var target1 = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                                if (target1 != null)
                                                {
                                                    _q.Cast(target1, false, true);
                                                }
                                            }
                                        }
                                    }
                                    else
                                    {
                                        if (_q.IsCharging)
                                        {
                                            if (_q.Range >=
                                                MenuProvider.Champion.Combo.GetSliderValue("Q Min Charge").Value)
                                            {
                                                var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                                if (target != null)
                                                {
                                                    _q.Cast(target, false, true);
                                                }
                                            }
                                        }
                                        else if (TargetSelector.GetTarget(_q.ChargedMaxRange, _q.DamageType) != null)
                                        {
                                            _q.StartCharging();
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var killableTarget =
                                    HeroManager.Enemies.FirstOrDefault(
                                        x =>
                                        x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                   TargetSelector.DamageType.Physical, _e.Range));
                                if (killableTarget != null)
                                {
                                    _e.Cast(killableTarget, false, true);
                                }
                                else
                                {
                                    if (_w.Level > 0)
                                    {
                                        var target =
                                            HeroManager.Enemies.FirstOrDefault(
                                                x =>
                                                x.IsValidTarget(_e.Range) && x.GetBuffCount("varuswdebuff") >= 3);
                                        if (target != null)
                                        {
                                            _e.Cast(target, false, true);
                                        }
                                        else
                                        {
                                            _e.CastIfWillHit(_e.GetTarget(), 3, false);
                                        }
                                    }
                                    else
                                    {
                                        var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                        if (target != null)
                                        {
                                            _e.Cast(target, false, true);
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (_r.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_r.Range - 500,
                                                                      TargetSelector.DamageType.Physical);
                                if (target != null)
                                {
                                    _r.Cast(target, false, true);
                                }
                            }
                        }

                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (_q.IsReadyPerfectly())
                            {
                                if (_q.IsCharging)
                                {
                                    if (_q.Range >= _q.ChargedMaxRange)
                                    {
                                        var target = TargetSelector.GetTarget(_q.Range, _q.DamageType);
                                        if (target != null)
                                        {
                                            _q.Cast(target, false, true);
                                        }
                                    }
                                    else
                                    {
                                        var killableTarget =
                                            HeroManager.Enemies.FirstOrDefault(
                                                x =>
                                                x.IsKillableAndValidTarget(_q.GetDamage(x),
                                                                           TargetSelector.DamageType.Physical, _q.Range));
                                        if (killableTarget != null)
                                        {
                                            _q.Cast(killableTarget, false, true);
                                        }
                                    }
                                }
                                else if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                {
                                    if (TargetSelector.GetTarget(_q.ChargedMaxRange, _q.DamageType) != null)
                                    {
                                        _q.StartCharging();
                                    }
                                }
                            }
                        }

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

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

                        if (MenuProvider.Champion.Laneclear.UseE)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                            {
                                if (_e.IsReadyPerfectly())
                                {
                                    var farmLocation = _e.GetCircularFarmLocation(MinionManager.GetMinions(_e.Range));
                                    if (farmLocation.MinionsHit >= 4)
                                    {
                                        _e.Cast(farmLocation.Position);
                                    }
                                }
                            }
                        }

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

                        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) && x.GetBuffCount("varuswdebuff") >= 3);
                                    if (target != null)
                                    {
                                        _e.Cast(target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private static void OnGameUpdate(EventArgs args)
        {
            try
            {
                if (Player.IsDead)
                {
                    return;
                }
                var QTarget = TargetSelector.GetTarget(_Q.Range, TargetSelector.DamageType.True);
                var ETarget = TargetSelector.GetTarget(_E.Range, TargetSelector.DamageType.Physical);
                //var RTarget = TargetSelector.GetTarget(_R.Range, TargetSelector.DamageType.Physical);
                //var RTarget = ObjectManager.Get<Obj_AI_Hero>().OrderByDescending(x => x.Health).FirstOrDefault(x => x.IsEnemy && x.Distance(Player) < 1200);
                PoppyPassive = ObjectManager.Player.Buffs.Find(DrawFX => DrawFX.Name == "poppypassiveshield" && DrawFX.IsValidBuff());
                if (PoppyPassive != null)
                {
                    shield.ShieldMe = null;
                }

                if (Rsender.Enable == true && _R.IsReady() && _R.IsCharging && Rsender.Type == "gap")
                {
                    _R.Cast(Rsender.Sender, true);
                }
                if (Rsender.Enable == true && _R.IsReady() && _R.IsCharging && Rsender.Type == "KillSteal" && Player.Distance(Rsender.Sender) < 1200)
                {
                    _R.Cast(Rsender.Sender, true);
                }
                if (Rsender.Enable == true && _R.IsReady() && _R.IsCharging && Rsender.Type == "Combo" && Player.Distance(Rsender.Sender) < 1200)
                {
                    _R.Cast(Rsender.Sender, true);
                }

                // KillSteal
                if (_MainMenu.Item("Poppy_KUse_Q").GetValue <bool>() && QTarget != null && QTarget.Health < _Q.GetDamage(QTarget) && _Q.IsReady())
                {
                    _Q.Cast(QTarget, true);
                }
                if (_MainMenu.Item("Poppy_KUse_E").GetValue <bool>() && ETarget != null && _E.IsReady())
                {
                    var FinalPosition = ETarget.BoundingRadius + ETarget.Position.Extend(ObjectManager.Player.Position, -360);
                    if (FinalPosition.IsWall() && ETarget.Health < (_E.GetDamage(ETarget) * 2))
                    {
                        _E.Cast(ETarget, true);
                    }
                    if (ETarget.Health < _E.GetDamage(ETarget))
                    {
                        _E.Cast(ETarget, true);
                    }
                }
                if (_MainMenu.Item("Poppy_KUse_R").GetValue <bool>() && _R.IsReady() && !Rsender.Enable)
                {
                    foreach (var item in ObjectManager.Get <Obj_AI_Hero>().OrderByDescending(x => x.Health))
                    {
                        if (item.IsEnemy && !item.IsDead && item.Distance(Player) < 1200 && !_R.IsCharging && item.Health < _R.GetDamage(item))
                        {
                            _R.StartCharging();
                            Rsender.Sender = item;
                            Rsender.Enable = true;
                            Rsender.Type   = "KillSteal";
                        }
                    }
                }
                // KillSteal

                //CC
                if (_MainMenu.Item("Poppy_CC").GetValue <KeyBind>().Active)
                {
                    Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    if (_R.IsReady())
                    {
                        foreach (var item in ObjectManager.Get <Obj_AI_Hero>().OrderByDescending(x => x.IsEnemy))
                        {
                            if (item.Distance(Player) < 600 && item.Distance(Game.CursorPos) < 200)
                            {
                                if (_R.IsCharging)
                                {
                                    _R.Cast(item, true);
                                }
                                else
                                {
                                    _R.StartCharging();
                                }
                            }
                        }
                    }
                }

                if (_MainMenu.Item("CKey").GetValue <KeyBind>().Active) // Combo
                {
                    if (_MainMenu.Item("Poppy_CUse_R").GetValue <bool>() && _R.IsReady() && !Rsender.Enable)
                    {
                        if (_MainMenu.Item("Poppy_CUse_R_Enable").GetValue <bool>())
                        {
                            foreach (var item in ObjectManager.Get <Obj_AI_Hero>().OrderBy(x => x.MaxHealth))
                            {
                                if (item.IsEnemy && !item.IsDead && _MainMenu.Item("Poppy_CUse" + item.ChampionName).GetValue <bool>() && item.Distance(Player) < 1200)
                                {
                                    _R.StartCharging();
                                    Rsender.Sender = item;
                                    Rsender.Enable = true;
                                    Rsender.Type   = "Combo";
                                }
                            }
                        }
                        else
                        {
                            var RTarget = ObjectManager.Get <Obj_AI_Hero>().OrderBy(x => x.MaxHealth).FirstOrDefault(x => x.IsEnemy && x.Distance(Player) < 1200);
                            _R.StartCharging();
                            Rsender.Sender = RTarget;
                            Rsender.Enable = true;
                            Rsender.Type   = "Combo";
                        }
                    }
                    if (_MainMenu.Item("Poppy_CUse_Q").GetValue <bool>() && QTarget != null && _Q.IsReady())
                    {
                        _Q.Cast(QTarget, true);
                    }
                    //벽꿍
                    if (_MainMenu.Item("Poppy_CUse_E").GetValue <bool>() && ETarget != null && _E.IsReady())
                    {
                        var FinalPosition = ETarget.BoundingRadius + ETarget.Position.Extend(ObjectManager.Player.Position, -360);
                        if (FinalPosition.IsWall())
                        {
                            _E.Cast(ETarget, true);
                        }
                    }
                }

                if (_MainMenu.Item("LKey").GetValue <KeyBind>().Active) // LaneClear
                {
                    var MinionTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.Health);
                    foreach (var minion in MinionTarget)
                    {
                        if (_Q.IsReady() && _MainMenu.Item("Poppy_LUse_Q").GetValue <bool>() && minion != null && !Orbwalking.CanAttack() && Orbwalking.CanMove(5))
                        {
                            _Q.Cast(minion, true);
                        }
                        if (_E.IsReady() && _MainMenu.Item("Poppy_LUse_E").GetValue <bool>() && minion != null && !Orbwalking.CanAttack() && Orbwalking.CanMove(5))
                        {
                            _E.Cast(minion, true);
                        }
                    }
                }
                if (_MainMenu.Item("JKey").GetValue <KeyBind>().Active) // JungleClear
                {
                    var JungleTarget = MinionManager.GetMinions(1100, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                    foreach (var minion in JungleTarget)
                    {
                        if (_Q.IsReady() && _MainMenu.Item("Poppy_JUse_Q").GetValue <bool>() && minion != null && !Orbwalking.CanAttack() && Orbwalking.CanMove(5))
                        {
                            _Q.Cast(minion, true);
                        }
                        if (_E.IsReady() && _MainMenu.Item("Poppy_JUse_E").GetValue <bool>() && minion != null && !Orbwalking.CanAttack() && Orbwalking.CanMove(5))
                        {
                            _E.Cast(minion, true);
                        }
                    }
                }
            }
            catch (Exception)
            {
                if (NowTime() > ErrorTime)
                {
                    //Game.PrintChat(ChampName + " in FreshBooster isn't Load. Error Code 06");
                    ErrorTime = TickCount(10000);
                }
            }
        }
Ejemplo n.º 5
0
        private static void Laneclear()
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            var rangedMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range + _q.Width + 30,
                                                          MinionTypes.Ranged);
            var allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range + _q.Width + 30,
                                                       MinionTypes.All);
            var allMinionsE    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _e.Range, MinionTypes.All);
            var allMinionsR    = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _r.Range, MinionTypes.All);
            var rangedMinionsR = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _r.Range + _r.Width,
                                                          MinionTypes.Ranged);
            var useQl = _config.Item("UseQL").GetValue <bool>();
            var useEl = _config.Item("UseEL").GetValue <bool>();
            var useRl = _config.Item("UseRL").GetValue <bool>();
            var rlimL = _config.Item("RlimL").GetValue <Slider>().Value;

            if (_q.IsReady() && useQl)
            {
                var fl1 = _q.GetCircularFarmLocation(rangedMinionsQ, _q.Width);
                var fl2 = _q.GetCircularFarmLocation(allMinionsQ, _q.Width);

                if (fl1.MinionsHit >= 3)
                {
                    _q.Cast(fl1.Position);
                }
                else if (fl2.MinionsHit >= 2 || allMinionsQ.Count == 1)
                {
                    _q.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsQ)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.Q))
                        {
                            _q.Cast(minion);
                        }
                    }
                }
            }
            if (_e.IsReady() && useEl)
            {
                var fl2 = _w.GetLineFarmLocation(allMinionsE, _e.Width);

                if (fl2.MinionsHit >= 2 || allMinionsE.Count == 1)
                {
                    _e.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsE)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.E))
                        {
                            _e.Cast(minion);
                        }
                    }
                }
            }
            if (_r.IsReady() && useRl && rlimL < UltiStucks() && allMinionsR.Count > 3)
            {
                var fl1 = _w.GetLineFarmLocation(rangedMinionsR, _r.Width);
                var fl2 = _w.GetLineFarmLocation(allMinionsR, _r.Width);

                if (fl1.MinionsHit >= 3)
                {
                    _r.Cast(fl1.Position);
                }
                else if (fl2.MinionsHit >= 2 || allMinionsR.Count == 1)
                {
                    _r.Cast(fl2.Position);
                }
                else
                {
                    foreach (var minion in allMinionsR)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion) &&
                            minion.Health < 0.75 * _player.GetSpellDamage(minion, SpellSlot.R))
                        {
                            _r.Cast(minion);
                        }
                    }
                }
            }
        }
Ejemplo n.º 6
0
        static void Combo()
        {
            if (!Orbwalking.CanMove(1))
            {
                return;
            }

            if (SharpShooter.Menu.Item("comboUseQ", true).GetValue <Boolean>())
            {
                QSwitchForUnit(TargetSelector.GetTarget(GetQActiveRange + 30, TargetSelector.DamageType.Physical, true));
            }

            if (SharpShooter.Menu.Item("comboUseW", true).GetValue <Boolean>())
            {
                var Wtarget = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical, true);

                if (W.CanCast(Wtarget) && !Wtarget.IsValidTarget(DefaultRange / 3) && W.GetPrediction(Wtarget).Hitchance >= HitChance.VeryHigh)
                {
                    W.Cast(Wtarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseE", true).GetValue <Boolean>() && E.IsReady())
            {
                var Etarget = E_GetBestTarget();

                if (E.CanCast(Etarget))
                {
                    E.Cast(Etarget);
                }
            }

            if (SharpShooter.Menu.Item("comboUseR", true).GetValue <Boolean>() && R.IsReady() && WLastCastedTime + 1.0 < Game.ClockTime)
            {
                foreach (Obj_AI_Hero Rtarget in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range) && !x.IsValidTarget(DefaultRange) && !Player.HasBuffOfType(BuffType.SpellShield) && !Player.HasBuffOfType(BuffType.Invulnerability) && R.GetPrediction(x).Hitchance >= HitChance.High))
                {
                    if (R.CanCast(Rtarget))
                    {
                        var    dis        = Player.Distance(Rtarget.ServerPosition);
                        double predhealth = HealthPrediction.GetHealthPrediction(Rtarget, (int)(R.Delay + dis / R.Speed) * 1000) + Rtarget.HPRegenRate;

                        if (Rtarget.IsValidTarget(DefaultRange))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true) * 2;
                        }
                        else
                        if (Rtarget.IsValidTarget(GetQActiveRange - 50))
                        {
                            predhealth -= Player.GetAutoAttackDamage(Rtarget, true);
                        }

                        if (CollisionCheck(Player, Rtarget, R.Width))
                        {
                            if (predhealth <= R.GetDamage(Rtarget))
                            {
                                R.Cast(Rtarget);
                                break;
                            }
                        }
                        else
                        if (predhealth <= R.GetDamage(Rtarget) * 0.8)
                        {
                            foreach (Obj_AI_Hero ExplosionTarget in HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range)))
                            {
                                if (R.GetPrediction(ExplosionTarget).Hitchance >= HitChance.High && CollisionCheck(Player, ExplosionTarget, R.Width) && Rtarget.IsValidTarget(224, true, ExplosionTarget.ServerPosition))
                                {
                                    R.Cast(ExplosionTarget);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
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.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.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  = LeagueSharp.Common.Collision.GetCollision(new System.Collections.Generic.List <SharpDX.Vector3> {
                                                prediction.UnitPosition
                                            }, new PredictionInput {
                                                UseBoundingRadius = true, Unit = ObjectManager.Player, Delay = R.Delay, Speed = R.Speed, Radius = 200, CollisionObjects = new CollisionableObjects[] { 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.Cast(Target);
                                        }
                                    }
                                }
                            }
                        }

                        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  = 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);
                                    }
                                }
                            }
                        }
                    }

                    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.º 8
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Orbwalking.CanMove(20))
            {
                if (Menu.Item("CK").GetValue <KeyBind>().Active)
                {
                    var starget = TargetSelector.GetSelectedTarget();
                    if (R.IsReadyPerfectly())
                    {
                        if (starget != null && starget.Position.Distance(Player.Position) <= R.Range)
                        {
                            if (!starget.IsZombie)
                            {
                                R.Cast(starget, false, true);
                            }
                        }
                        else
                        {
                            var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                            if (target != null)
                            {
                                R.Cast(target, false, true);
                            }
                        }
                    }
                }
                switch (Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Flee:
                    break;

                case Orbwalking.OrbwalkingMode.LastHit:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("LHM").GetValue <Slider>().Value))
                    {
                        if (Menu.Item("LHE").GetValue <bool>())
                        {
                            if (E.IsReadyPerfectly())
                            {
                                if (!Menu.Item("LHN").GetValue <bool>())
                                {
                                    var target = MinionManager.GetMinions(E.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(E.GetDamage(x, 1), E.DamageType, E.Range) && IsPoisoned(x));
                                    if (target != null)
                                    {
                                        E.CastOnUnit(target);
                                    }
                                }
                                else
                                {
                                    var target = MinionManager.GetMinions(E.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(E.GetDamage(x, 1), E.DamageType, E.Range));
                                    if (target != null)
                                    {
                                        E.CastOnUnit(target);
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("HM").GetValue <Slider>().Value))
                    {
                        if (Menu.Item("HE").GetValue <bool>())
                        {
                            if (E.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(E.Range, E.DamageType);
                                if (target != null && IsPoisoned(target))
                                {
                                    E.CastOnUnit(target);
                                }
                            }
                        }

                        if (Menu.Item("HQ").GetValue <bool>())
                        {
                            if (Q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                                if (target != null)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }

                        if (Menu.Item("HW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(W.Range, W.DamageType);
                                if (target != null)
                                {
                                    W.Cast(target);
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("LCM").GetValue <Slider>().Value))
                    {
                        if (Menu.Item("LCQ").GetValue <bool>())
                        {
                            if (Q.IsReadyPerfectly())
                            {
                                var target = Q.GetCircularFarmLocation(MinionManager.GetMinions(Q.Range));
                                if (target.MinionsHit >= 1)
                                {
                                    Q.Cast(target.Position);
                                }
                            }
                        }

                        if (Menu.Item("LCW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                var target = W.GetCircularFarmLocation(MinionManager.GetMinions(W.Range));
                                if (target.MinionsHit >= 1)
                                {
                                    W.Cast(target.Position);
                                }
                            }
                        }

                        if (Menu.Item("LCE").GetValue <bool>())
                        {
                            if (E.IsReadyPerfectly())
                            {
                                var target = MinionManager.GetMinions(E.Range).FirstOrDefault(x => x.IsKillableAndValidTarget(E.GetDamage(x), E.DamageType, E.Range) && IsPoisoned(x));
                                if (target != null)
                                {
                                    E.CastOnUnit(target);
                                }
                                else
                                {
                                    var otarget = MinionManager.GetMinions(E.Range).FirstOrDefault(x => x.IsValidTarget(E.Range) && IsPoisoned(x));
                                    if (otarget != null)
                                    {
                                        E.CastOnUnit(otarget);
                                    }
                                }
                            }
                        }
                    }

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

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

                        if (Menu.Item("JCE").GetValue <bool>())
                        {
                            if (E.IsReadyPerfectly())
                            {
                                var target = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth)
                                             .FirstOrDefault(x => x.IsValidTarget(E.Range) && IsPoisoned(x));
                                if (target != null)
                                {
                                    E.CastOnUnit(target);
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (Menu.Item("CR").GetValue <bool>())
                    {
                        if (R.IsReadyPerfectly())
                        {
                            var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                            if (target != null)
                            {
                                var ctarget = HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range)).ToList();
                                var ftarget = ctarget.Where(x => x.IsFacing(Player)).ToList();

                                if (ctarget.Count >= Menu.Item("CC").GetValue <Slider>().Value || ftarget.Count >= Menu.Item("CF").GetValue <Slider>().Value)
                                {
                                    R.Cast(target, false, true);
                                }
                            }
                        }
                    }

                    if (Menu.Item("CE").GetValue <bool>())
                    {
                        if (E.IsReadyPerfectly())
                        {
                            var target = TargetSelector.GetTarget(E.Range, E.DamageType);
                            if (target != null && IsPoisoned(target))
                            {
                                E.CastOnUnit(target);
                            }
                        }
                    }

                    if (Menu.Item("CQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                            if (target != null)
                            {
                                Q.Cast(target);
                            }
                        }
                    }

                    if (Menu.Item("CW").GetValue <bool>())
                    {
                        if (W.IsReadyPerfectly())
                        {
                            var target = TargetSelector.GetTarget(W.Range, W.DamageType);
                            if (target != null)
                            {
                                W.Cast(target);
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.None:
                    break;
                }

                if (Menu.Item("RF").GetValue <KeyBind>().Active)
                {
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);

                    var target = TargetSelector.GetSelectedTarget();
                    if (target != null && Player.Position.Distance(target.Position) < R.Range + 425f)
                    {
                        if (!target.IsZombie)
                        {
                            if (Flash != SpellSlot.Unknown)
                            {
                                if (R.IsReadyPerfectly() && Flash.IsReady())
                                {
                                    R.Cast();
                                    LeagueSharp.Common.Utility.DelayAction.Add(5, () => Player.Spellbook.CastSpell(Flash, target.Position));
                                }
                            }
                        }
                    }
                }

                if (Menu.Item("HA").GetValue <KeyBind>().Active)
                {
                    if (Player.IsManaPercentOkay(Menu.Item("HM").GetValue <Slider>().Value))
                    {
                        if (Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
                        {
                            if (Q.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                                if (target != null)
                                {
                                    Q.Cast(target);
                                }
                            }
                        }
                    }
                }
            }
            KillSteal();
        }
 private static void Game_OnUpdate(EventArgs args)
 {
     if (BadaoMainVariables.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
     {
         return;
     }
     if (Utils.GameTimeTickCount - BadaoMissFortuneVariables.Rcount <= 500)
     {
         return;
     }
     if (ObjectManager.Player.IsChannelingImportantSpell())
     {
         return;
     }
     if (!BadaoMissFortuneHelper.CanJungleClearMana())
     {
         return;
     }
     // Q logic
     if (BadaoMissFortuneHelper.UseQJungleClear() && Orbwalking.CanMove(80))
     {
         foreach (Obj_AI_Minion minion in MinionManager.GetMinions(BadaoMainVariables.Q.Range,
                                                                   MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health))
         {
             if (minion.BadaoIsValidTarget())
             {
                 var Qpred      = BadaoMainVariables.Q.GetPrediction(minion);
                 var PredMinion = Prediction.GetPrediction(minion, 0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D()
                                                                                                                         / 1400 + Game.Ping / 1000));
                 Vector2 endpos1 = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                   ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 500);
                 Vector2 endpos2 = Geometry.Extend(ObjectManager.Player.Position.To2D(), PredMinion.UnitPosition.To2D(),
                                                   ObjectManager.Player.Position.To2D().Distance(PredMinion.UnitPosition.To2D()) + 150);
                 if (MinionManager.GetMinions(BadaoMainVariables.Q.Range + 500).Any(x => x.BadaoIsValidTarget() &&
                                                                                    x.NetworkId != minion.NetworkId &&
                                                                                    BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x,
                                                                                                                                         0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                               1400 + Game.Ping / 1000)).UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos1, 110)) ||
                     MinionManager.GetMinions(BadaoMainVariables.Q.Range + 150).Any(x => x.NetworkId != minion.NetworkId &&
                                                                                    BadaoChecker.BadaoInTheCone(Prediction.GetPrediction(x,
                                                                                                                                         0.25f + ObjectManager.Player.Position.To2D().Distance(Qpred.UnitPosition.To2D() /
                                                                                                                                                                                               1400 + Game.Ping / 1000)).UnitPosition.To2D(), PredMinion.UnitPosition.To2D(), endpos2, 160)))
                 {
                     if (BadaoMainVariables.Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                     {
                         goto xyz;
                     }
                 }
             }
         }
         var minionQ1 = MinionManager.GetMinions(BadaoMainVariables.Q.Range,
                                                 MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.Health).FirstOrDefault();
         {
             if (minionQ1.BadaoIsValidTarget() && BadaoMainVariables.Q.Cast(minionQ1) == Spell.CastStates.SuccessfullyCasted)
             {
                 goto xyz;
             }
         }
         xyz :;
     }
     // E logic
     if (BadaoMissFortuneHelper.UseELaneClear() && Orbwalking.CanMove(80))
     {
         var minion = MinionManager.GetMinions(BadaoMainVariables.E.Range,
                                               MinionTypes.All, MinionTeam.Neutral).OrderByDescending
                          (x => MinionManager.GetMinions(x.Position, 250).Count()).FirstOrDefault();
         if (minion.BadaoIsValidTarget())
         {
             BadaoMainVariables.E.Cast(minion);
         }
     }
 }
Ejemplo n.º 10
0
        private static void Farm(bool laneClear)
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }
            if (Config.Item("ManaSliderFarm").GetValue <Slider>().Value >
                ObjectManager.Player.Mana / ObjectManager.Player.MaxMana * 100)
            {
                return;
            }

            var rangedMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q2.Range,
                                                         MinionTypes.Ranged);
            var allMinions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q2.Range, MinionTypes.All);

            var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex;
            var useEi = Config.Item("UseEFarm").GetValue <StringList>().SelectedIndex;
            var useQ  = (laneClear && (useQi == 1 || useQi == 2)) || (!laneClear && (useQi == 0 || useQi == 2));
            var useE  = (laneClear && (useEi == 1 || useEi == 2)) || (!laneClear && (useEi == 0 || useEi == 2));

            if (laneClear)
            {
                if (Q1.IsReady() && useQ)
                {
                    var rangedLocation = Q2.GetCircularFarmLocation(rangedMinions);
                    var location       = Q2.GetCircularFarmLocation(allMinions);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 0)
                    {
                        Q2.Cast(bLocation.Position.To3D());
                    }
                }

                if (E.IsReady() && useE)
                {
                    var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2);
                    var location       = E.GetCircularFarmLocation(allMinions, E.Width * 2);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 2)
                    {
                        E.Cast(bLocation.Position.To3D());
                    }
                }
            }
            else
            {
                if (useQ && Q1.IsReady())
                {
                    foreach (var minion in allMinions)
                    {
                        if (!Orbwalking.InAutoAttackRange(minion))
                        {
                            var Qdamage = DamageLib.getDmg(minion, DamageLib.SpellType.Q) * 0.75;

                            if (Qdamage > Q1.GetHealthPrediction(minion))
                            {
                                Q2.Cast(minion);
                            }
                        }
                    }
                }

                if (E.IsReady() && useE)
                {
                    var rangedLocation = E.GetCircularFarmLocation(rangedMinions, E.Width * 2);
                    var location       = E.GetCircularFarmLocation(allMinions, E.Width * 2);

                    var bLocation = (location.MinionsHit > rangedLocation.MinionsHit + 1) ? location : rangedLocation;

                    if (bLocation.MinionsHit > 2)
                    {
                        E.Cast(bLocation.Position.To3D());
                    }
                }
            }
        }
Ejemplo n.º 11
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())
                            {
                                var QTarget = TargetSelector.GetTarget(MenuProvider.Champion.Combo.getSliderValue("Q Range").Value, Q.DamageType);
                                if (QTarget != null)
                                {
                                    Q.Cast(QTarget);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (W.isReadyPerfectly())
                            {
                                W.CastOnBestTarget();
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseR)
                        {
                            if (R.isReadyPerfectly())
                            {
                                var RKillableTarget = HeroManager.Enemies.FirstOrDefault(x => x.isKillableAndValidTarget(R.GetDamage(x), R.Range));
                                if (RKillableTarget != null)
                                {
                                    R.Cast(RKillableTarget);
                                }
                                R.CastIfWillHit(TargetSelector.GetTarget(R.Range, R.DamageType), MenuProvider.Champion.Combo.getSliderValue("Cast R if Will Hit >=").Value);
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var QTarget = TargetSelector.GetTarget(MenuProvider.Champion.Harass.getSliderValue("Q Range").Value, Q.DamageType);
                                    if (QTarget != null)
                                    {
                                        Q.Cast(QTarget);
                                    }
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseQ)
                        {
                            if (ObjectManager.Player.isManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (Q.isReadyPerfectly())
                                {
                                    var QTarget = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Neutral).FirstOrDefault(x => x.IsValidTarget(Q.Range));
                                    if (QTarget != null)
                                    {
                                        Q.Cast(QTarget);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    var QTarget = HeroManager.Enemies.OrderByDescending(x => Q.GetPrediction(x).Hitchance).FirstOrDefault(x => x.isKillableAndValidTarget(Q.GetDamage(x), Q.Range));
                    if (QTarget != null)
                    {
                        Q.Cast(QTarget);
                    }

                    var RTarget = HeroManager.Enemies.OrderByDescending(x => R.GetPrediction(x).Hitchance).FirstOrDefault(x => x.isKillableAndValidTarget(R.GetDamage(x), R.Range));
                    if (RTarget != null)
                    {
                        R.Cast(RTarget);
                    }
                }
            }
        }
Ejemplo n.º 12
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            R.Range = 500 * R.Level + 1500;

            Obj_AI_Hero vTarget;

            if (R.IsReady())
            {
                vTarget = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Physical);
                if (vTarget.IsValidTarget(R.Range) && vTarget.Health <= R.GetDamage(vTarget))
                {
                    if (GetValue <KeyBind>("UltHelp").Active)
                    {
                        R.Cast(vTarget);
                    }

                    UltTarget = vTarget.ChampionName;
                    ShowUlt   = true;
                }
                else
                {
                    ShowUlt = false;
                }
            }
            else
            {
                ShowUlt = false;
            }

            if (GetValue <KeyBind>("Dash").Active&& E.IsReady())
            {
                var pos = ObjectManager.Player.ServerPosition.To2D().Extend(Game.CursorPos.To2D(), -300).To3D();
                E.Cast(pos, true);
            }

            if (GetValue <KeyBind>("UseEQC").Active&& E.IsReady() && Q.IsReady())
            {
                vTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                if (vTarget.IsValidTarget(E.Range))
                {
                    E.Cast(vTarget);
                    Q.Cast(vTarget, false, true);
                }
            }
            // PQ you broke it D:
            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseEC");
            var useR = GetValue <bool>("UseRC");

            if (Q.IsReady() && useQ)
            {
                vTarget = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                if (vTarget != null)
                {
                    Q.Cast(vTarget, false, true);
                }
            }
            else if (E.IsReady() && useE)
            {
                vTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                if (vTarget != null && vTarget.Health <= E.GetDamage(vTarget))
                {
                    E.Cast(vTarget);
                }
            }

            if (R.IsReady() && useR)
            {
                vTarget = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Physical);
                if (vTarget != null && vTarget.Health <= R.GetDamage(vTarget) &&
                    !Orbwalking.InAutoAttackRange(vTarget))
                {
                    R.CastOnUnit(vTarget);
                }
            }
        }
Ejemplo n.º 13
0
        private static void Farm()
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            List <Obj_AI_Base> allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, Q.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsR = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, R.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);
            List <Obj_AI_Base> allMinionsE = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, E.Range,
                                                                      MinionTypes.All, MinionTeam.NotAlly);

            var useQ = menu.Item("UseQFarm").GetValue <bool>();
            var useE = menu.Item("UseEFarm").GetValue <bool>();
            var useR = menu.Item("UseRFarm").GetValue <bool>();

            int hit = 0;

            if (useQ && Q.IsReady() && !qFirstCreated)
            {
                MinionManager.FarmLocation qPos = Q.GetLineFarmLocation(allMinionsQ);
                if (qPos.MinionsHit >= 3)
                {
                    Q.Cast(qPos.Position, packets());
                }
            }

            if (useR & R.IsReady() && !rFirstCreated)
            {
                MinionManager.FarmLocation rPos = R.GetCircularFarmLocation(allMinionsR);
                if (Player.Distance(rPos.Position) < R.Range)
                {
                    R.Cast(rPos.Position);
                }
            }

            if (qFirstCreated)
            {
                if (useQ && Q.IsReady())
                {
                    foreach (Obj_AI_Base enemy in allMinionsQ)
                    {
                        if (enemy.Distance(qMissle.Position) < 110)
                        {
                            hit++;
                        }
                    }
                }

                if (hit > 2 && Q.IsReady())
                {
                    Q.Cast();
                }
            }

            if (rFirstCreated)
            {
                foreach (Obj_AI_Base enemy in allMinionsR)
                {
                    if (enemy.Distance(rObj.Position) < 400)
                    {
                        hit++;
                    }
                }

                if (hit < 2 && R.IsReady())
                {
                    R.Cast();
                }
            }

            if (useE && allMinionsE.Count > 0 && E.IsReady())
            {
                E.Cast(allMinionsE[0]);
            }
        }
Ejemplo n.º 14
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (Orbwalking.CanMove(20))
            {
                var starget = TargetSelector.GetSelectedTarget();
                switch (Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Flee:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("FM").GetValue <Slider>().Value))
                    {
                        if (E.IsReadyPerfectly())
                        {
                            if (Menu.Item("FE").GetValue <bool>())
                            {
                                E.Cast();
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.LastHit:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("LHM").GetValue <Slider>().Value))
                    {
                        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));
                                if (target != null)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }
                }
                break;

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

                        if (Menu.Item("HW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                if (starget != null && Player.Position.Distance(starget.Position) <= W.Range)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        W.Cast();
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(W.Range, W.DamageType);
                                    if (target != null)
                                    {
                                        W.Cast();
                                    }
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    if (Player.IsManaPercentOkay(Menu.Item("LCM").GetValue <Slider>().Value))
                    {
                        if (Menu.Item("LCQ").GetValue <bool>())
                        {
                            if (Q.IsReadyPerfectly())
                            {
                                var target = MinionManager.GetMinions(Q.Range).FirstOrDefault(x => x.IsValidTarget(Q.Range));
                                if (target != null)
                                {
                                    Q.Cast();
                                }
                            }
                        }

                        if (Menu.Item("LCW").GetValue <bool>())
                        {
                            if (W.IsReadyPerfectly())
                            {
                                var target = MinionManager.GetMinions(W.Range).FirstOrDefault(x => x.IsValidTarget(W.Range));
                                if (target != null)
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }

                    if (Player.IsManaPercentOkay(Menu.Item("JCM").GetValue <Slider>().Value))
                    {
                        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));
                                if (target != null)
                                {
                                    Q.Cast();
                                }
                            }
                        }

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

                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (Menu.Item("CR").GetValue <bool>())
                    {
                        if (R.IsReadyPerfectly())
                        {
                            var rc = HeroManager.Enemies.Where(x => x.IsValidTarget(R.Range)).ToList();
                            if (rc.Count >= Menu.Item("CC").GetValue <Slider>().Value)
                            {
                                if (starget != null && Player.Position.Distance(starget.Position) <= R.Range)
                                {
                                    if (!starget.IsZombie)
                                    {
                                        R.Cast(starget, false, true);
                                    }
                                }
                                else
                                {
                                    var target = TargetSelector.GetTarget(R.Range, R.DamageType);
                                    if (target != null)
                                    {
                                        R.Cast(target, false, true);
                                    }
                                }
                            }
                        }
                    }

                    if (Menu.Item("CQ").GetValue <bool>())
                    {
                        if (Q.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= Q.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    Q.Cast();
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTarget(Q.Range, Q.DamageType);
                                if (target != null)
                                {
                                    Q.Cast();
                                }
                            }
                        }
                    }

                    if (Menu.Item("CW").GetValue <bool>())
                    {
                        if (W.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= W.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    W.Cast();
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTarget(W.Range, W.DamageType);
                                if (target != null)
                                {
                                    W.Cast();
                                }
                            }
                        }
                    }

                    if (Menu.Item("CE").GetValue <bool>())
                    {
                        if (E.IsReadyPerfectly())
                        {
                            if (starget != null && Player.Position.Distance(starget.Position) <= E.Range)
                            {
                                if (!starget.IsZombie)
                                {
                                    E.Cast();
                                }
                            }
                            else
                            {
                                var target = TargetSelector.GetTarget(E.Range, E.DamageType);
                                if (target != null)
                                {
                                    E.Cast();
                                }
                            }
                        }
                    }
                }
                break;

                case Orbwalking.OrbwalkingMode.None:
                    break;
                }
            }
            Killsteal();
        }
Ejemplo n.º 15
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (!ObjectManager.Player.IsDead)
            {
                if (MenuProvider.Champion.Misc.GetBoolValue("Auto Catch Axe"))
                {
                    var bestObject =
                        _axeDropObjectDataList.Where(x => x.Object.IsValid)
                        .OrderBy(x => x.ExpireTime)
                        .FirstOrDefault(
                            x =>
                            Game.CursorPos.Distance(x.Object.Position) <=
                            MenuProvider.Champion.Misc.GetSliderValue("Axe Catch Range").Value);
                    if (bestObject != null)
                    {
                        _bestDropObject = bestObject.Object;
                        if (ObjectManager.Player.GetPath(bestObject.Object.Position).ToList().To2D().PathLength() /
                            ObjectManager.Player.MoveSpeed + Environment.TickCount >= bestObject.ExpireTime)
                        {
                            switch (MenuProvider.Orbwalker.ActiveMode)
                            {
                            case Orbwalking.OrbwalkingMode.Combo:
                                if (MenuProvider.Champion.Combo.UseW)
                                {
                                    _w.Cast();
                                }
                                break;

                            case Orbwalking.OrbwalkingMode.Mixed:
                                if (MenuProvider.Champion.Harass.UseW)
                                {
                                    _w.Cast();
                                }
                                break;
                            }
                        }

                        if (bestObject.Object.Position.Distance(ObjectManager.Player.Position) < 120)
                        {
                            if (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.None)
                            {
                                MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                            }
                        }
                        else
                        {
                            if (MenuProvider.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.None)
                            {
                                Player.IssueOrder(GameObjectOrder.MoveTo, bestObject.Object.Position);
                            }
                            else
                            {
                                MenuProvider.Orbwalker.SetOrbwalkingPoint(bestObject.Object.Position);
                            }
                        }
                    }
                    else
                    {
                        _bestDropObject = null;
                        MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                    }
                }
                else
                {
                    MenuProvider.Orbwalker.SetOrbwalkingPoint(Game.CursorPos);
                }

                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                    case Orbwalking.OrbwalkingMode.Combo:
                    {
                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                if (!ObjectManager.Player.HasBuff("dravenfurybuff"))
                                {
                                    if (HeroManager.Enemies.Any(x => x.IsValid && Orbwalking.InAutoAttackRange(x)))
                                    {
                                        _w.Cast();
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE && ObjectManager.Player.ManaPercent >= MenuProvider.Champion.Combo.GetSliderValue("Min Mana % to use E").Value)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                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) * 2,
                                                                   TargetSelector.DamageType.Physical, _r.Range));
                                if (target != null)
                                {
                                    _r.Cast(target);
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.Mixed:
                    {
                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    if (!ObjectManager.Player.HasBuff("dravenfurybuff"))
                                    {
                                        if (
                                            HeroManager.Enemies.Any(
                                                x => x.IsValid && Orbwalking.InAutoAttackRange(x)))
                                        {
                                            _w.Cast();
                                        }
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseE)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_e.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                    if (target != null)
                                    {
                                        _e.Cast(target);
                                    }
                                }
                            }
                        }
                        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 >= 3)
                                    {
                                        _e.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,
                                                                 MinionOrderTypes.MaxHealth)
                                        .FirstOrDefault(x => x.IsValidTarget(_e.Range));
                                    if (target != null)
                                    {
                                        _e.Cast(target);
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }
            }
        }
Ejemplo n.º 16
0
        private void Game_OnUpdate(EventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            _e.Range = Orbwalking.GetRealAutoAttackRange(null) + 65;
            _r.Range = Orbwalking.GetRealAutoAttackRange(null) + 65;

            if (Orbwalking.CanMove(100))
            {
                switch (MenuProvider.Orbwalker.ActiveMode)
                {
                case Orbwalking.OrbwalkingMode.Combo:
                {
                    if (MenuProvider.Champion.Combo.UseE)
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            var target =
                                HeroManager.Enemies.Where(
                                    x =>
                                    x.IsValidTarget(_e.Range) &&
                                    MenuProvider.ChampionMenuInstance.Item(
                                        "Combo.E Targets." + x.ChampionName, true).GetValue <bool>())
                                .OrderByDescending(x => TargetSelector.GetPriority(x))
                                .FirstOrDefault();
                            if (target != null)
                            {
                                _e.CastOnUnit(target);
                            }
                        }
                    }

                    if (MenuProvider.Champion.Combo.UseR)
                    {
                        if (_r.IsReadyPerfectly())
                        {
                            var target =
                                HeroManager.Enemies.OrderByDescending(x => x.Health)
                                .FirstOrDefault(
                                    x =>
                                    x.IsKillableAndValidTarget(_r.GetDamage(x),
                                                               TargetSelector.DamageType.Physical, _r.Range) &&
                                    !x.IsWillDieByTristanaE());
                            if (target != null)
                            {
                                _r.CastOnUnit(target);
                            }
                        }
                    }
                    break;
                }

                case Orbwalking.OrbwalkingMode.Mixed:
                {
                    if (MenuProvider.Champion.Harass.UseE)
                    {
                        if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_e.Range, _e.DamageType);
                                if (target != null)
                                {
                                    _e.CastOnUnit(target);
                                }
                            }
                        }
                    }
                    break;
                }

                case Orbwalking.OrbwalkingMode.LaneClear:
                {
                    //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.CastOnUnit(target);
                                }
                            }
                        }
                    }
                    break;
                }
                }
            }

            if (MenuProvider.Champion.Misc.UseKillsteal)
            {
                var target =
                    HeroManager.Enemies.OrderByDescending(x => x.Health)
                    .FirstOrDefault(
                        x =>
                        x.IsKillableAndValidTarget(_r.GetDamage(x), TargetSelector.DamageType.Physical,
                                                   _r.Range) && !x.IsWillDieByTristanaE());
                if (target != null)
                {
                    _r.CastOnUnit(target);
                }
            }
        }
Ejemplo n.º 17
0
        private static void Laneclear()
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }
            var t      = TargetSelector.GetTarget(_q1.Range, TargetSelector.DamageType.Physical);
            var minion = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range).FirstOrDefault();

            if (minion == null || minion.Name.ToLower().Contains("ward"))
            {
                return;
            }
            var minionhitq  = _config.Item("minminions").GetValue <Slider>().Value;
            var minionhitw  = _config.Item("minminionsw").GetValue <Slider>().Value;
            var useQl       = _config.Item("UseQL").GetValue <bool>();
            var useWl       = _config.Item("UseWL").GetValue <bool>();
            var useQlP      = _config.Item("UseQLP").GetValue <bool>();
            var farmminions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, _q.Range, MinionTypes.All,
                                                       MinionTeam.NotAlly);
            var minionsq = farmminions.FindAll(qminion => minion.IsValidTarget(_q.Range));
            var minionq  = minionsq.Find(minionQ => minionQ.IsValidTarget());

            if (_q.IsReady() && useQl && !HavePassivee)
            {
                foreach (var minionssq in farmminions)
                {
                    var prediction = Prediction.GetPrediction(minionssq, _q.Delay, 10);

                    var collision = _q.GetCollision(_player.Position.To2D(),
                                                    new List <Vector2> {
                        prediction.UnitPosition.To2D()
                    });
                    foreach (var collisions in collision)
                    {
                        if (collision.Count() >= minionhitq)

                        {
                            if (collision.Last().Distance(_player) - collision[0].Distance(_player) < 600 &&
                                collision[0].Distance(_player) < 500)
                            {
                                _q.Cast(collisions);
                            }
                        }
                    }
                }
            }
            if (_q.IsReady() && useQlP && !HavePassivee)
            {
                if (_q.IsReady() && t.IsValidTarget(_q1.Range) && !HavePassivee)
                {
                    ExtendedQ();
                }
            }


            if (_w.IsReady() && useWl && !HavePassivee)
            {
                if (_w.GetLineFarmLocation(farmminions).MinionsHit >= minionhitw)
                {
                    _w.Cast(minionq);
                }
            }
        }
Ejemplo n.º 18
0
        private static void LaneClear()
        {
            if (Player.IsDead || !Orbwalking.CanMove(40))
            {
                return;
            }

            var castQ  = config.Item("useQlc").GetValue <bool>();
            var castW  = config.Item("useWlc").GetValue <bool>();
            var castQh = config.Item("useQlcH").GetValue <bool>();

            var minionCount = MinionManager.GetMinions(Player.Position, q.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth);
            var qEnemies    = Utility.CountEnemiesInRange(q.Range);
            var qTarget     = TargetSelector.GetTarget(q.Range, TargetSelector.DamageType.Magical);
            var qPred       = q.GetPrediction(qTarget);

            if (minionCount.Count > 0 && castQ && qEnemies == 0)
            {
                foreach (var minion in minionCount)
                {
                    if (Player.Distance(minion) <= Player.AttackRange)
                    {
                        return;
                    }
                    if (HealthPrediction.GetHealthPrediction(
                            minion, (int)(q.Delay + (minion.Distance(Player.Position) / q.Speed))) <
                        Player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        q.Cast(minion);
                    }
                }
            }

            if (minionCount.Count > 0 && castQ && castQh && qEnemies > 0 && qPred.Hitchance == HitChance.Collision)
            {
                foreach (var minion in minionCount)
                {
                    if (Player.Distance(minion) <= Player.AttackRange)
                    {
                        return;
                    }
                    if (HealthPrediction.GetHealthPrediction(
                            minion, (int)(q.Delay + (minion.Distance(Player.Position) / q.Speed))) <
                        Player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        q.Cast(minion);
                    }
                }
            }

            if (castQh && qEnemies > 0 && qPred.Hitchance == HitChance.VeryHigh)
            {
                q.Cast(qTarget);
            }

            if (castW)
            {
                var target =
                    ObjectManager.Get <Obj_AI_Hero>()
                    .FirstOrDefault(enemy => enemy.IsValidTarget(w.Range) && enemy.HasBuff("kennenmarkofstorm"));

                if (target.IsValidTarget(w.Range))
                {
                    w.Cast(target);
                }
            }
        }
Ejemplo n.º 19
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.IsValidTarget(_q.Range))
                                {
                                    _q.SPredictionCast(target, _q.MinHitChance);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseW)
                        {
                            if (_w.IsReadyPerfectly())
                            {
                                var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                if (target != null)
                                {
                                    if (ConfigMenu.SelectedPrediction.SelectedIndex == 0)
                                    {
                                        _w.SPredictionCast(target, _w.MinHitChance);
                                    }
                                    else
                                    {
                                        _w.Cast(target, 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.GetTarget(_q.Range, _q.DamageType);
                                    if (target.IsValidTarget(_q.Range))
                                    {
                                        _q.SPredictionCast(target, _q.MinHitChance);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Harass.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var target = TargetSelector.GetTarget(_w.Range, _w.DamageType);
                                    if (target != null)
                                    {
                                        _w.Cast(target, 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 (MenuProvider.Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
                        {
                            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);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 20
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 >= HitChance.VeryHigh)
                                                        {
                                                            _q.CastOnUnit(minion);
                                                            break;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 21
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            Obj_AI_Hero t;

            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active&& ToggleActive)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                if (t != null)
                {
                    Q.Cast(t);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useW = GetValue <bool>("UseW" + (ComboActive ? "C" : "H"));

                if (Orbwalking.CanMove(100))
                {
                    if (Dfg.IsReady())
                    {
                        t = SimpleTs.GetTarget(W.Range, SimpleTs.DamageType.Magical);
                        Dfg.Cast(t);
                    }

                    if (Q.IsReady() && useQ)
                    {
                        t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                        if (t != null)
                        {
                            Q.Cast(t);
                        }
                    }

                    if (W.IsReady() && useW)
                    {
                        t = SimpleTs.GetTarget(W.Range, SimpleTs.DamageType.Physical);
                        if (t != null)
                        {
                            W.Cast(t);
                        }
                    }
                }
            }

            if (LaneClearActive)
            {
                bool useQ = GetValue <bool>("UseQL");

                if (Q.IsReady() && useQ)
                {
                    var vMinions = MinionManager.GetMinions(ObjectManager.Player.Position, Q.Range);
                    foreach (
                        Obj_AI_Base minions in
                        vMinions.Where(
                            minions => minions.Health < ObjectManager.Player.GetSpellDamage(minions, SpellSlot.Q)))
                    {
                        Q.Cast(minions);
                    }
                }
            }


            if (!R.IsReady() || !GetValue <KeyBind>("CastR").Active)
            {
                return;
            }
            t = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Physical);
            if (t != null)
            {
                R.Cast(t);
            }
        }
Ejemplo n.º 22
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady())
            {
                var activeQ = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).Level *25 + 650;
                var t       = TargetSelector.GetTarget(activeQ, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget() && ObjectManager.Player.Distance(t) > Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    if (!FishBoneActive)
                    {
                        Q.Cast();
                        Orbwalker.ForceTarget(t);
                        return;
                    }
                }
                if (!t.IsValidTarget() || ObjectManager.Player.Distance(t) < Orbwalking.GetRealAutoAttackRange(null) + 65)
                {
                    if (FishBoneActive)
                    {
                        Q.Cast();
                        return;
                    }
                }
            }

            var autoEi = GetValue <bool>("AutoEI");
            var autoEs = GetValue <bool>("AutoES");
            var autoEd = GetValue <bool>("AutoED");

            if (autoEs || autoEi || autoEd)
            {
                foreach (
                    var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(E.Range - 150)))
                {
                    if (autoEs && E.IsReady() && enemy.HasBuffOfType(BuffType.Slow))
                    {
                        var castPosition =
                            Prediction.GetPrediction(
                                new PredictionInput
                        {
                            Unit   = enemy,
                            Delay  = 0.7f,
                            Radius = 120f,
                            Speed  = 1750f,
                            Range  = 900f,
                            Type   = SkillshotType.SkillshotCircle,
                        }).CastPosition;


                        if (GetSlowEndTime(enemy) >= (Game.Time + E.Delay + 0.5f))
                        {
                            E.Cast(castPosition);
                        }
                    }

                    if (autoEi && E.IsReady() &&
                        (enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) ||
                         enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) ||
                         enemy.HasBuffOfType(BuffType.Taunt) || enemy.HasBuff("zhonyasringshield") ||
                         enemy.HasBuff("Recall")))
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.High);
                    }

                    if (autoEd && E.IsReady() && enemy.IsDashing())
                    {
                        E.CastIfHitchanceEquals(enemy, HitChance.Dashing);
                    }
                }
            }


            if (GetValue <KeyBind>("CastR").Active&& R.IsReady())
            {
                var t = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R) > t.Health)
                    {
                        //R.Cast(target);
                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                    }
                }
            }

            /*
             * if (GetValue<bool>("SwapQ") && FishBoneActive &&
             *  (LaneClearActive ||
             *   (HarassActive && TargetSelector.GetTarget(675f + QAddRange, TargetSelector.DamageType.Physical) == null)))
             * {
             *  Q.Cast();
             * }
             */

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

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

            if (useW && W.IsReady())
            {
                var t    = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                var minW = GetValue <Slider>("MinWRange").Value;

                if (t.IsValidTarget() && GetRealDistance(t) >= minW)
                {
                    if (W.Cast(t) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            /*
             * if (useQ)
             * {
             *  foreach (var t in
             *      ObjectManager.Get<Obj_AI_Hero>()
             *          .Where(t => t.IsValidTarget(GetRealPowPowRange(t) + QAddRange + 20f)))
             *  {
             *      var swapDistance = GetValue<bool>("SwapDistance");
             *      var swapAoe = GetValue<bool>("SwapAOE");
             *      var distance = GetRealDistance(t);
             *      var powPowRange = GetRealPowPowRange(t);
             *
             *      if (swapDistance && Q.IsReady())
             *      {
             *          if (distance > powPowRange && !FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *          else if (distance < powPowRange && FishBoneActive)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *
             *      if (swapAoe && Q.IsReady())
             *      {
             *          if (distance > powPowRange && PowPowStacks > 2 && !FishBoneActive && CountEnemies(t, 150) > 1)
             *          {
             *              if (Q.Cast())
             *              {
             *                  return;
             *              }
             *          }
             *      }
             *  }
             * }
             *
             */
            if (useR && R.IsReady())
            {
                var checkRok = GetValue <bool>("ROverKill");
                var minR     = GetValue <Slider>("MinRRange").Value;
                var maxR     = GetValue <Slider>("MaxRRange").Value;
                var t        = TargetSelector.GetTarget(maxR, TargetSelector.DamageType.Physical);

                if (t.IsValidTarget())
                {
                    var distance = GetRealDistance(t);

                    if (!checkRok)
                    {
                        if (ObjectManager.Player.GetSpellDamage(t, SpellSlot.R, 1) > t.Health)
                        {
                            R.CastIfHitchanceEquals(t, HitChance.High, false);
                            //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                        }
                    }
                    else if (distance > minR)
                    {
                        var aDamage     = ObjectManager.Player.GetAutoAttackDamage(t);
                        var wDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);
                        var rDamage     = ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);
                        var powPowRange = GetRealPowPowRange(t);

                        if (distance < (powPowRange + QAddRange) && !(aDamage * 3.5 > t.Health))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                            * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                        else if (distance > (powPowRange + QAddRange))
                        {
                            if (!W.IsReady() || !(wDamage > t.Health) || distance > W.Range ||
                                W.GetPrediction(t).CollisionObjects.Count > 0)
                            {
                                if (CountAlliesNearTarget(t, 500) <= 3)
                                {
                                    if (rDamage > t.Health /*&& !ObjectManager.Player.IsAutoAttacking &&
                                                            * !ObjectManager.Player.IsChanneling*/)
                                    {
                                        R.CastIfHitchanceEquals(t, HitChance.High, false);
                                        //if (R.Cast(t) == Spell.CastStates.SuccessfullyCasted) { }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 23
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.GetTarget(_w.Range, _w.DamageType);
                                if (target != null)
                                {
                                    _w.Cast(target, false, true);
                                }
                            }
                        }

                        if (MenuProvider.Champion.Combo.UseE)
                        {
                            if (_e.IsReadyPerfectly())
                            {
                                if (
                                    HeroManager.Enemies.Any(
                                        x =>
                                        x.IsValidTarget(_e.Range) &&
                                        (x.GetBuffCount("twitchdeadlyvenom") >= 6 ||
                                         x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                    TargetSelector.DamageType.Physical))))
                                {
                                    _e.Cast();
                                }
                            }
                        }
                        break;
                    }

                    case Orbwalking.OrbwalkingMode.LaneClear:
                    {
                        //Jungleclear
                        if (MenuProvider.Champion.Jungleclear.UseW)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_w.IsReadyPerfectly())
                                {
                                    var farmLocation =
                                        _w.GetCircularFarmLocation(MinionManager.GetMinions(_e.Range,
                                                                                            MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth));
                                    if (farmLocation.MinionsHit >= 1)
                                    {
                                        _w.Cast(farmLocation.Position);
                                    }
                                }
                            }
                        }

                        if (MenuProvider.Champion.Jungleclear.UseE)
                        {
                            if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                            {
                                if (_e.IsReadyPerfectly())
                                {
                                    if (
                                        MinionManager.GetMinions(_e.Range, MinionTypes.All, MinionTeam.Neutral,
                                                                 MinionOrderTypes.MaxHealth)
                                        .Any(
                                            x =>
                                            x.IsValidTarget(_e.Range) &&
                                            (x.GetBuffCount("twitchdeadlyvenom") >= 6 ||
                                             x.IsKillableAndValidTarget(_e.GetDamage(x),
                                                                        TargetSelector.DamageType.Physical))))
                                    {
                                        _e.Cast();
                                    }
                                }
                            }
                        }
                        break;
                    }
                    }
                }

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    if (
                        HeroManager.Enemies.Any(
                            x =>
                            x.IsKillableAndValidTarget(_e.GetDamage(x), TargetSelector.DamageType.Physical, _e.Range)))
                    {
                        _e.Cast();
                    }
                }

                if (MenuProvider.Champion.Misc.GetKeyBindValue("Stealth Recall").Active)
                {
                    if (_q.IsReadyPerfectly())
                    {
                        if (_recall.IsReadyPerfectly())
                        {
                            _q.Cast();
                            _recall.Cast();
                        }
                    }
                }
            }
        }
Ejemplo n.º 24
0
        private static void Farm(bool laneClear)
        {
            if (!Orbwalking.CanMove(40))
            {
                return;
            }

            var rangedMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30,
                                                          MinionTypes.Ranged);
            var allMinionsW = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range + W.Width + 30,
                                                       MinionTypes.All);

            var allMinions = MinionManager.GetMinions(Player.ServerPosition, Q.Range + Q.Width + 30, MinionTypes.All);

            var FMana    = Config.Item("ManaFarm").GetValue <Slider>().Value;
            var MPercent = Player.Mana * 100 / Player.MaxMana;

            // Spell usage
            var useQi = Config.Item("UseQFarm").GetValue <StringList>().SelectedIndex;
            var useWi = Config.Item("UseWFarm").GetValue <StringList>().SelectedIndex;
            var useEi = Config.Item("UseEFarm").GetValue <StringList>().SelectedIndex;
            var useQ  = (laneClear && MPercent >= FMana && (useQi == 1 || useQi == 2)) || (!laneClear && MPercent >= FMana && (useQi == 0 || useQi == 2));
            var useW  = (laneClear && MPercent >= FMana && (useWi == 1 || useWi == 2)) || (!laneClear && MPercent >= FMana && (useWi == 0 || useWi == 2));
            var useE  = (laneClear && MPercent >= FMana && (useEi == 1 || useEi == 2)) || (!laneClear && MPercent >= FMana && (useEi == 0 || useEi == 2));

            var fl1 = W.GetCircularFarmLocation(rangedMinionsW, W.Width);
            var fl2 = W.GetCircularFarmLocation(allMinionsW, W.Width);

            if (useQ)
            {
                foreach (var minion in allMinions)
                {
                    if (minion.IsValidTarget() &&
                        minion.Health < 0.75 * ObjectManager.Player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        Q.CastOnUnit(minion);
                    }
                }
            }
            else if (useW)
            {
                if (fl1.MinionsHit >= Config.Item("waveNumW").GetValue <Slider>().Value&& fl1.MinionsHit >= 3)
                {
                    W.Cast(fl1.Position);
                }
            }
            else if (useE)
            {
                foreach (var minion in allMinions)
                {
                    if (minion.IsValidTarget(E.Range) &&
                        minion.Health < 0.80 * ObjectManager.Player.GetSpellDamage(minion, SpellSlot.E))
                    {
                        E.Cast(minion);
                    }
                }
            }
            if (laneClear)
            {
                foreach (var minion in allMinions)
                {
                    if (useQ && minion.IsValidTarget() &&
                        minion.Health < 0.80 * ObjectManager.Player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        Q.CastOnUnit(minion);
                    }

                    if (useW)
                    {
                        if (fl1.MinionsHit >= Config.Item("waveNumW").GetValue <Slider>().Value&& fl1.MinionsHit >= 3)
                        {
                            W.Cast(fl1.Position);
                        }
                    }

                    if (useE)
                    {
                        E.Cast(minion);
                    }
                }
            }
        }
Ejemplo n.º 25
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob.Position);
                }
            }

            if (!Orbwalking.CanMove(50) || (Orbwalker.ShouldWait() && Orbwalking.CanAttack()))
            {
                return;
            }

            var minions   = Cache.GetMinions(Player.ServerPosition, Q.Range);
            int orbTarget = 0;

            if (Orbwalker.GetTarget() != null)
            {
                orbTarget = Orbwalker.GetTarget().NetworkId;
            }

            if (Config.Item("FQ", true).GetValue <bool>())
            {
                foreach (var minion in minions.Where(minion => minion.IsValidTarget() && orbTarget != minion.NetworkId && minion.HealthPercent < 70 && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
                {
                    if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (Config.Item("farmQ", true).GetValue <bool>() && !Orbwalking.CanAttack() && FarmSpells)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion)))
                {
                    var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 300);
                    if (hpPred < 20)
                    {
                        continue;
                    }

                    var qDmg = Q.GetDamage(minion);
                    if (hpPred < qDmg && orbTarget != minion.NetworkId)
                    {
                        if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                    else if (PT || LCP)
                    {
                        if (minion.HealthPercent > 80)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 26
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (R1.IsReady() && GetValue <bool>("UseRM"))
            {
                var bigRocket = HasBigRocket();
                foreach (
                    var hero in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(
                        hero =>
                        hero.IsValidTarget(bigRocket ? R2.Range : R1.Range) &&
                        R1.GetDamage(hero) * (bigRocket ? 1.5f : 1f) > hero.Health))
                {
                    if (bigRocket)
                    {
                        R2.Cast(hero, false, true);
                    }
                    else
                    {
                        R1.Cast(hero, false, true);
                    }
                }
            }

            if ((!ComboActive && !HarassActive) || !Orbwalking.CanMove(100))
            {
                return;
            }

            var useQ = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
            var useE = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
            var useR = GetValue <bool>("UseR" + (ComboActive ? "C" : "H"));
            var rLim = GetValue <Slider>("Rlim" + (ComboActive ? "C" : "H")).Value;

            if (useQ && Q.IsReady())
            {
                var t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                if (t != null)
                {
                    if (Q.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useE && E.IsReady())
            {
                var t = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                if (t != null)
                {
                    if (E.Cast(t, false, true) == Spell.CastStates.SuccessfullyCasted)
                    {
                        return;
                    }
                }
            }

            if (useR && R1.IsReady() && ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Ammo > rLim)
            {
                var bigRocket = HasBigRocket();
                var t         = SimpleTs.GetTarget(bigRocket ? R2.Range : R1.Range, SimpleTs.DamageType.Physical);
                if (t != null)
                {
                    if (bigRocket)
                    {
                        R2.Cast(t, false, true);
                    }
                    else
                    {
                        R1.Cast(t, false, true);
                    }
                }
            }
        }
Ejemplo n.º 27
0
        private void Combo()
        {
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(W.Range, LeagueSharp.Common.TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var data = Program.IncDamages.GetAllyData(player.NetworkId);

            if (config.Item("usewCC", true).GetValue <bool>() && W.IsReady() && data.AnyCC)
            {
                W.Cast(target.Position);
            }
            var closestPassive = GetClosestPassivePosition(target);

            if (closestPassive.IsValid() && config.Item("MoveToVitals", true).GetValue <bool>() &&
                Orbwalking.CanMove(300) && !EloBuddy.SDK.Orbwalker.CanAutoAttack && !player.Spellbook.IsAutoAttacking &&
                Game.CursorPos.Distance(target.Position) < 350)
            {
                orbwalker.SetMovement(false);
                EloBuddy.Player.IssueOrder(
                    GameObjectOrder.MoveTo,
                    target.Position.Extend(closestPassive, Math.Max(player.BoundingRadius + target.BoundingRadius, 100)).To3DWorld());
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && Orbwalking.CanMove(100) &&
                config.Item("useqMin", true).GetValue <Slider>().Value <= player.Distance(target) &&
                (closestPassive.IsValid() || (target.HealthPercent < 30)) && !player.Spellbook.IsAutoAttacking)
            {
                var pos = GetQpoint(target, closestPassive);
                if (pos.IsValid())
                {
                    Q.Cast(pos);
                }
                else if (target.HealthPercent < 30)
                {
                    if (
                        CheckQusage(
                            target.Position.Extend(
                                LeagueSharp.Common.Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius).To3DWorld(),
                            target))
                    {
                        Q.Cast(
                            target.Position.Extend(
                                LeagueSharp.Common.Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius));
                    }
                }
            }
            if (W.IsReady() && config.Item("usew", true).GetValue <bool>())
            {
                var killable  = (target.Distance(player) > 350f && W.GetDamage(target) > target.Health);
                var incAA     = data.ProjectileDamageTaken >= target.GetAutoAttackDamage(player) - 5;
                var dangerous = incAA && data.DamageTaken >= player.Health * 0.4f;
                if (killable || (incAA && !config.Item("usewDangerous", true).GetValue <bool>()) ||
                    (config.Item("usewDangerous", true).GetValue <bool>() && dangerous))
                {
                    W.CastIfHitchanceEquals(target, HitChance.Low);
                }
            }
            if (config.Item("useIgnite").GetValue <bool>() && hasIgnite && ComboDamage(target) > target.Health &&
                !Q.IsReady() &&
                (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) || player.HealthPercent < 15))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Ejemplo n.º 28
0
        private void Game_OnUpdate(EventArgs args)
        {
            _q2.UpdateSourcePosition(ObjectManager.Player.Pet.Position, ObjectManager.Player.Pet.Position);

            if (!ObjectManager.Player.IsDead)
            {
                if (Orbwalking.CanMove(100))
                {
                    switch (MenuProvider.Orbwalker.ActiveMode)
                    {
                        case Orbwalking.OrbwalkingMode.Combo:
                        {
                            if (MenuProvider.Champion.Combo.UseQ)
                                if (_q.IsReadyPerfectly())
                                {
                                    QLogic(false);
                                }

                            if (MenuProvider.Champion.Combo.UseW)
                                if (_w.IsReadyPerfectly())
                                {
                                    var target =
                                        HeroManager.Enemies.Where(
                                            x =>
                                                x.IsValidTarget(_w.Range) &&
                                                MenuProvider.ChampionMenuInstance.Item(
                                                    "Combo.W Targets." + x.ChampionName, true).GetValue<bool>())
                                            .OrderByDescending(x => TargetSelector.GetPriority(x))
                                            .FirstOrDefault();

                                    if (target != null)
                                    {
                                        _w.CastOnUnit(target);
                                    }
                                    else
                                    {
                                        if (_w.IsReadyPerfectly())
                                        {
                                            if (ObjectManager.Player.CountEnemiesInRange(1000f) >= 1)
                                                _w.Cast(ObjectManager.Player);
                                        }
                                    }
                                }

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

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

                            if (_r.IsReadyPerfectly())
                            {
                                foreach (var target in HeroManager.Allies.Where(x => x.IsValidTarget(_r.Range, false)))
                                {
                                    if (target.CountEnemiesInRange(350) >=
                                        MenuProvider.Champion.Combo.GetSliderValue("Use R if Will Hit (Airborne) >=")
                                            .Value)
                                        _r.CastOnUnit(target);
                                }
                            }
                            break;
                        }
                        case Orbwalking.OrbwalkingMode.Mixed:
                        {
                            if (MenuProvider.Champion.Harass.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Harass.IfMana))
                                    {
                                        QLogic(false);
                                    }

                            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.CastOnUnit(target);
                                        }
                                    }

                            break;
                        }
                        case Orbwalking.OrbwalkingMode.LaneClear:
                        {
                            //Laneclear
                            if (MenuProvider.Champion.Laneclear.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Laneclear.IfMana))
                                    {
                                        var farmLocation = _q.GetLineFarmLocation(MinionManager.GetMinions(_q.Range));

                                        if (farmLocation.MinionsHit >= 4)
                                        {
                                            _q.Cast(farmLocation.Position);
                                        }
                                    }

                            //Jungleclear
                            if (MenuProvider.Champion.Jungleclear.UseQ)
                                if (_q.IsReadyPerfectly())
                                    if (ObjectManager.Player.IsManaPercentOkay(MenuProvider.Champion.Jungleclear.IfMana))
                                    {
                                        var farmLocation =
                                            _q.GetLineFarmLocation(MinionManager.GetMinions(600, MinionTypes.All,
                                                MinionTeam.Neutral, MinionOrderTypes.MaxHealth));

                                        if (farmLocation.MinionsHit >= 1)
                                        {
                                            _q.Cast(farmLocation.Position);
                                        }
                                    }

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

                                        if (target != null)
                                        {
                                            _e.CastOnUnit(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)
                                        if (_q.IsReadyPerfectly())
                                            QLogic(false);

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

                if (MenuProvider.Champion.Misc.UseKillsteal)
                {
                    if (_q.IsReadyPerfectly())
                    {
                        QLogic(true);
                    }

                    foreach (var target in HeroManager.Enemies)
                    {
                        if (_e.IsReadyPerfectly())
                        {
                            if (target.IsKillableAndValidTarget(_e.GetDamage(target), _e.DamageType, _e.Range))
                            {
                                _e.CastOnUnit(target);
                            }
                        }
                    }
                }

                if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Auto R", true).GetValue<bool>())
                {
                    if (_r.IsReadyPerfectly())
                        if (MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.ForMe", true).GetValue<bool>())
                        {
                            if (ObjectManager.Player.HealthPercent <=
                                MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Health", true)
                                    .GetValue<Slider>()
                                    .Value)
                                if (ObjectManager.Player.CountEnemiesInRange(800f) >= 2)
                                    _r.CastOnUnit(ObjectManager.Player);
                        }

                    if (_r.IsReadyPerfectly())
                    {
                        foreach (
                            var target in
                                HeroManager.Allies.Where(
                                    x =>
                                        x.IsValidTarget(_r.Range, false) && !x.IsZombie && !x.IsMe &&
                                        x.CountEnemiesInRange(800f) >= 2 &&
                                        MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.For" + x.ChampionName, true)
                                            .GetValue<bool>() &&
                                        x.HealthPercent <
                                        MenuProvider.ChampionMenuInstance.Item("Misc.Auto R.Health", true)
                                            .GetValue<Slider>()
                                            .Value).OrderBy(x => x.Health))
                        {
                            if (_r.CastOnUnit(target))
                            {
                                break;
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 29
0
        public override void Game_OnGameUpdate(EventArgs args)
        {
            if (Q.IsReady() && GetValue <KeyBind>("UseQTH").Active)
            {
                if (ObjectManager.Player.HasBuff("Recall"))
                {
                    return;
                }
                var t = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                if (t != null)
                {
                    Q.Cast(t, false, true);
                }
            }

            if (ComboActive || HarassActive)
            {
                var useQ  = GetValue <bool>("UseQ" + (ComboActive ? "C" : "H"));
                var useE  = GetValue <bool>("UseE" + (ComboActive ? "C" : "H"));
                var useET = GetValue <bool>("UseET" + (ComboActive ? "C" : "H"));

                if (Orbwalking.CanMove(100))
                {
                    if (E.IsReady() && useE)
                    {
                        var vTarget = SimpleTs.GetTarget(E.Range, SimpleTs.DamageType.Physical);
                        if (vTarget != null && !isHePantheon(vTarget))
                        {
                            if (vTarget.Health <= E.GetDamage(vTarget) + Q.GetDamage(vTarget) * 2)
                            {
                                E.CastOnUnit(vTarget);
                            }
                            else if (!useET)
                            {
                                E.CastOnUnit(vTarget);
                            }
                            else if (!Utility.UnderTurret(vTarget))
                            {
                                E.CastOnUnit(vTarget);
                            }
                        }
                    }

                    if (Q.IsReady() && useQ)
                    {
                        var vTarget = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
                        if (vTarget != null)
                        {
                            Q.Cast(vTarget);
                        }
                    }

                    if (IsValorMode() && !E.IsReady())
                    {
                        var vTarget = SimpleTs.GetTarget(R.Range, SimpleTs.DamageType.Physical);
                        if (vTarget != null)
                        {
                            calculateValorDamage();
                            if (vTarget.Health >= ValorMinDamage && vTarget.Health <= ValorMaxDamage)
                            {
                                R.Cast();
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 30
0
 public static bool CanCastSpell(AIHeroClient target)
 {
     return
         (!(target.IsValidTarget() && Orbwalking.InAutoAttackRange(target) && (Orbwalking.CanAttack() || BadaoChecker.BadaoHasTiamat())) &&
          Orbwalking.CanMove(0));
 }