Пример #1
0
        private static void Jungle()
        {
            if (Program.LaneClear && Player.Mana > RMANA + WMANA + WMANA)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 700, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    if (Range)
                    {
                        if (Q.IsReady() && getCheckBoxItem(farmMenu, "jungleQ"))
                        {
                            Q.Cast(mob.ServerPosition);
                            return;
                        }
                        if (W.IsReady() && getCheckBoxItem(farmMenu, "jungleE"))
                        {
                            if (Orbwalking.InAutoAttackRange(mob))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (getCheckBoxItem(farmMenu, "jungleR"))
                        {
                            R.Cast();
                        }
                    }
                    else
                    {
                        if (Q2.IsReady() && getCheckBoxItem(farmMenu, "jungleQm") && mob.LSIsValidTarget(Q2.Range))
                        {
                            Q2.Cast(mob);
                            return;
                        }

                        if (W2.IsReady() && getCheckBoxItem(farmMenu, "jungleWm"))
                        {
                            if (mob.LSIsValidTarget(300))
                            {
                                W.Cast();
                            }
                            return;
                        }
                        if (E2.IsReady() && getCheckBoxItem(farmMenu, "jungleEm") && mob.LSIsValidTarget(E2.Range))
                        {
                            if (mob.LSIsValidTarget(E2.Range))
                            {
                                E2.Cast(mob);
                            }
                            return;
                        }
                        if (getCheckBoxItem(farmMenu, "jungleR"))
                        {
                            R.Cast();
                        }
                    }
                }
            }
        }
Пример #2
0
        private static void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, DamageType.Magical);

            if (t.LSIsValidTarget())
            {
                var wDmg = OktwCommon.GetKsDamage(t, W);
                if (wDmg > t.Health)
                {
                    W.Cast(t, true, true);
                }
                else if (wDmg + Q.GetDamage(t) > t.Health && Player.Mana > QMANA + WMANA + RMANA)
                {
                    W.Cast(t, true, true);
                }
                else if (Program.Combo && Player.Mana > RMANA + WMANA + QMANA)
                {
                    if (!Orbwalking.InAutoAttackRange(t) || Player.CountEnemiesInRange(300) > 0 ||
                        t.CountEnemiesInRange(250) > 1 || Player.HealthPercent < 50)
                    {
                        W.Cast(t, true, true);
                    }
                    else if (Player.Mana > RMANA + WMANA + QMANA + EMANA)
                    {
                        foreach (
                            var enemy in
                            Program.Enemies.Where(
                                enemy => enemy.LSIsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            W.Cast(enemy, true, true);
                        }
                    }
                }
            }
        }
Пример #3
0
        private static void LogicE()
        {
            foreach (
                var enemy in
                Program.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && enemy.HasBuff("TwitchDeadlyVenom")))
            {
                if (getCheckBoxItem(eMenu, "Eks") && E.GetDamage(enemy) > enemy.Health)
                {
                    Program.debug("DUPAAA1");
                    E.Cast();
                }

                if (Player.Mana > RMANA + EMANA)
                {
                    var buffNum = getEBuffCount(enemy);
                    if (getCheckBoxItem(eMenu, "5e") && buffNum == 6)
                    {
                        Program.debug("DUPAAA2");
                        E.Cast();
                    }

                    var buffTime = OktwCommon.GetPassiveTime(enemy, "twitchdeadlyvenom");
                    if (!Orbwalking.InAutoAttackRange(enemy) && (Player.ServerPosition.LSDistance(enemy.ServerPosition) > 950 || buffTime < 1) && 0 < getSliderItem(eMenu, "countE") && buffNum >= getSliderItem(eMenu, "countE"))
                    {
                        Program.debug("DUPAAA3 " + buffTime);
                        E.Cast();
                    }
                }
            }
            JungleE();
        }
Пример #4
0
        private static void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                var qDmg = OktwCommon.GetKsDamage(t, Q) * 1.9;
                if (Orbwalking.InAutoAttackRange(t))
                {
                    qDmg = qDmg + Player.GetAutoAttackDamage(t) * 3;
                }
                if (qDmg > t.Health)
                {
                    Q.Cast(t, true);
                }
                else if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && getCheckBoxItem(wMenu, "haras" + t.ChampionName) && !Player.UnderTurret(true))
                {
                    if (Player.Mana > Player.MaxMana * 0.9)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (ObjectManager.Player.Mana > RMANA + WMANA + QMANA + QMANA)
                    {
                        Program.CastSpell(Qc, t);
                    }
                    else if (Player.Mana > RMANA + WMANA + QMANA + QMANA)
                    {
                        Q.CastIfWillHit(t, 2, true);
                        if (Program.LaneClear)
                        {
                            Program.CastSpell(Q, t);
                        }
                    }
                }
                if (Player.Mana > RMANA + WMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > getSliderItem(farmMenu, "Mana") &&
                     getCheckBoxItem(farmMenu, "farmQ") && Player.Mana > RMANA + QMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit >= getSliderItem(farmMenu, "LCminions"))
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Пример #5
0
        private static void LogicQ()
        {
            if (SebbyLib.Program.Combo && Orbwalker.IsAutoAttacking)
            {
                return;
            }
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (t.IsValidTarget(Q.Range))
            {
                if (GetRealDistance(t) > bonusRange() + 250 && !Orbwalking.InAutoAttackRange(t) &&
                    OktwCommon.GetKsDamage(t, Q) > t.Health && Player.CountEnemiesInRange(400) == 0)
                {
                    SebbyLib.Program.CastSpell(Q, t);
                    SebbyLib.Program.debug("Q KS");
                }
                else if (SebbyLib.Program.Combo && Player.Mana > RMANA + QMANA + EMANA + 10 &&
                         Player.CountEnemiesInRange(bonusRange() + 100 + t.BoundingRadius) == 0 &&
                         !getCheckBoxItem(qMenu, "autoQ"))
                {
                    SebbyLib.Program.CastSpell(Q, t);
                }
                if ((SebbyLib.Program.Combo || SebbyLib.Program.Farm) && Player.Mana > RMANA + QMANA &&
                    Player.CountEnemiesInRange(400) == 0)
                {
                    foreach (
                        var enemy in
                        SebbyLib.Program.Enemies.Where(
                            enemy =>
                            enemy.IsValidTarget(Q.Range) &&
                            (!OktwCommon.CanMove(enemy) || enemy.HasBuff("caitlynyordletrapinternal"))))
                    {
                        Q.Cast(enemy, true);
                    }
                    if (Player.CountEnemiesInRange(bonusRange()) == 0 && OktwCommon.CanHarras())
                    {
                        if (t.HasBuffOfType(BuffType.Slow))
                        {
                            Q.Cast(t);
                        }

                        Q.CastIfWillHit(t, 2, true);
                    }
                }
            }
            else if (SebbyLib.Program.LaneClear && Player.ManaPercent > getSliderItem(farmMenu, "Mana") &&
                     getCheckBoxItem(farmMenu, "farmQ") && Player.Mana > RMANA + QMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > getSliderItem(farmMenu, "LCminions"))
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Пример #6
0
        private static void LogicQ()
        {
            if (Program.Farm && !FishBoneActive && !Orbwalker.IsAutoAttacking && Orbwalker.LastTarget == null &&
                Orbwalking.CanAttack() && getCheckBoxItem(farmMenu, "farmQout") &&
                Player.Mana > RMANA + WMANA + EMANA + 10)
            {
                foreach (var minion in Cache.GetMinions(Player.Position, bonusRange() + 30).Where(minion => !Orbwalking.InAutoAttackRange(minion) && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetHealthPrediction(minion, 400);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForcedTarget = minion;
                        Q.Cast();
                        return;
                    }
                }
            }

            var t = TargetSelector.GetTarget(bonusRange() + 60, DamageType.Physical);

            if (t.LSIsValidTarget())
            {
                if (!FishBoneActive && (!Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) > 2) && Orbwalker.LastTarget == null)
                {
                    var distance = GetRealDistance(t);
                    if (Program.Combo && (Player.Mana > RMANA + WMANA + 10 || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Program.Farm && !Orbwalker.IsAutoAttacking && Orbwalking.CanAttack() && getCheckBoxItem(qMenu, "Qharras") && !ObjectManager.Player.UnderTurret(true) && Player.Mana > RMANA + WMANA + EMANA + 20 && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Program.Combo && Player.Mana > RMANA + WMANA + 20 && Player.CountEnemiesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.Mana < RMANA + WMANA + 20)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.CountEnemiesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && (Program.Farm || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)))
            {
                Q.Cast();
            }
            Orbwalker.ForcedTarget = null;
        }
Пример #7
0
        private static void LogicR()
        {
            foreach (
                var target in
                Program.Enemies.Where(target => target.LSIsValidTarget(R1.Range) && OktwCommon.ValidUlt(target) && target.IsVisible && target.IsHPBarRendered))
            {
                double rDmg = OktwCommon.GetKsDamage(target, R);

                if (rDmg < target.Health)
                {
                    continue;
                }

                if (getCheckBoxItem(rMenu, "overkillR") && target.Health < Player.Health)
                {
                    if (Orbwalking.InAutoAttackRange(target))
                    {
                        continue;
                    }
                    if (target.CountAlliesInRange(400) > 0)
                    {
                        continue;
                    }
                }

                var rDmg2 = rDmg * 0.8;

                if (target.LSIsValidTarget(R.Range) && !OktwCommon.IsSpellHeroCollision(target, R) && rDmg > target.Health)
                {
                    Program.CastSpell(R, target);
                    Program.debug("Rdmg");
                }
                else if (rDmg2 > target.Health)
                {
                    if (!OktwCommon.IsSpellHeroCollision(target, R1))
                    {
                        Program.CastSpell(R1, target);
                        Program.debug("Rdmg2");
                    }
                    else if (target.LSIsValidTarget(1200))
                    {
                        Program.CastSpell(R1, target);
                        Program.debug("Rdmg2 collision");
                    }
                }
            }
        }
Пример #8
0
        private static void LogicE()
        {
            var t            = TargetSelector.GetTarget(1300, DamageType.Physical);
            var dashPosition = Player.Position.Extend(Game.CursorPos, E.Range);

            if (Program.Enemies.Any(target => target.IsValidTarget(300) && target.IsMelee))
            {
                var dashPos = Dash.CastDash(true);
                if (!dashPos.IsZero)
                {
                    E.Cast(dashPos);
                }
            }

            if (t.IsValidTarget() && Player.HealthPercent > 40 && !Player.UnderTurret(true) &&
                (Game.Time - OverKill > 0.3) && dashPosition.CountEnemiesInRange(900) < 3)
            {
                if (t.Distance(Game.CursorPos) + 300 < t.Position.Distance(Player.Position) &&
                    !Orbwalking.InAutoAttackRange(t))
                {
                    var dmgCombo = 0f;

                    if (t.IsValidTarget(950))
                    {
                        dmgCombo = Player.GetAutoAttackDamage(t) + E.GetDamage(t);
                    }

                    if (Q.IsReady() && Player.Mana > QMANA + EMANA &&
                        Q.WillHit(dashPosition.To3D(), Q.GetPrediction(t).UnitPosition))
                    {
                        dmgCombo = Q.GetDamage(t);
                    }

                    if (W.IsReady() && Player.Mana > QMANA + EMANA + WMANA)
                    {
                        dmgCombo += W.GetDamage(t);
                    }

                    if (dmgCombo > t.Health && OktwCommon.ValidUlt(t))
                    {
                        E.Cast(dashPosition);
                        OverKill = Game.Time;
                        Program.debug("E ks combo");
                    }
                }
            }
        }
Пример #9
0
        private static void LogicR()
        {
            var t = TargetSelector.GetTarget(R.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (!Orbwalking.InAutoAttackRange(t) && getCheckBoxItem(rMenu, "Rks") &&
                    Player.GetAutoAttackDamage(t) * 4 > t.Health)
                {
                    R.Cast();
                }

                if (t.CountEnemiesInRange(450) >= getSliderItem(rMenu, "countR") && 0 != getSliderItem(rMenu, "countR"))
                {
                    R.Cast();
                }
            }
        }
Пример #10
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Orbwalking.InAutoAttackRange(t) && t.HasBuff("quinnw"))
                {
                    return;
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + WMANA && Config.Item("harrasQ", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>() && OktwCommon.CanHarras())
                {
                    Program.CastSpell(Q, t);
                }
                else if (OktwCommon.GetKsDamage(t, Q) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                if (!Program.None && Player.Mana > RMANA + QMANA + EMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA)
            {
                var minionList   = MinionManager.GetMinions(Player.ServerPosition, Q.Range - 150, MinionTypes.All);
                var farmPosition = Q.GetCircularFarmLocation(minionList, 150);
                if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Пример #11
0
        private static void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > WMANA + RMANA + EMANA &&
                    (Player.GetAutoAttackDamage(t) * 2 < t.Health || !Orbwalking.InAutoAttackRange(t)))
                {
                    Program.CastSpell(W, t);
                }
                else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA + EMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
        }
Пример #12
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            if (getKeyBindItem(rMenu, "disableBlock"))
            {
                Orbwalker.DisableAttacking = false;
                Orbwalker.DisableMovement  = false;

                OktwCommon.blockSpells = false;
                OktwCommon.blockAttack = false;
                OktwCommon.blockMove   = false;
                return;
            }
            if (Player.IsChannelingImportantSpell() || Game.Time - RCastTime < 0.3)
            {
                if (getCheckBoxItem(rMenu, "forceBlockMove"))
                {
                    OktwCommon.blockMove   = true;
                    OktwCommon.blockAttack = true;
                    OktwCommon.blockSpells = true;
                }

                Orbwalker.DisableAttacking = true;
                Orbwalker.DisableMovement  = true;

                Program.debug("cast R");
                return;
            }
            Orbwalker.DisableAttacking = false;
            Orbwalker.DisableMovement  = false;
            if (getCheckBoxItem(rMenu, "forceBlockMove"))
            {
                OktwCommon.blockAttack = false;
                OktwCommon.blockMove   = false;
                OktwCommon.blockSpells = false;
            }
            if (R.IsReady() && getKeyBindItem(rMenu, "useR"))
            {
                var t = TargetSelector.GetTarget(R.Range, DamageType.Physical);
                if (t.IsValidTarget(R.Range))
                {
                    R.Cast(t, true, true);
                    RCastTime = Game.Time;
                    return;
                }
            }

            if (getCheckBoxItem(miscMenu, "newTarget"))
            {
                var orbT = Orbwalker.LastTarget;

                AIHeroClient t2 = null;

                if (orbT is AIHeroClient)
                {
                    t2 = (AIHeroClient)orbT;
                }

                if (t2.IsValidTarget() && t2.NetworkId == LastAttackId)
                {
                    var ta = ObjectManager.Get <AIHeroClient>()
                             .FirstOrDefault(enemy => enemy.IsValidTarget() && Orbwalking.InAutoAttackRange(enemy) &&
                                             (enemy.NetworkId != LastAttackId || enemy.Health < Player.GetAutoAttackDamage(enemy) * 2));

                    if (ta != null)
                    {
                        Orbwalker.ForcedTarget = ta;
                    }
                }
            }

            if (Program.LagFree(1))
            {
                SetMana();
                Jungle();
            }

            if (Program.LagFree(2) && !Orbwalker.IsAutoAttacking && Q.IsReady() && getCheckBoxItem(qMenu, "autoQ"))
            {
                LogicQ();
            }

            if (Program.LagFree(3) && !Orbwalker.IsAutoAttacking && E.IsReady() && getCheckBoxItem(eMenu, "autoE"))
            {
                LogicE();
            }

            if (Program.LagFree(4) && !Orbwalker.IsAutoAttacking && R.IsReady() && getCheckBoxItem(rMenu, "autoR"))
            {
                LogicR();
            }
        }
Пример #13
0
        private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Target.Type == GameObjectType.obj_AI_Hero && Config.Item("focusP", true).GetValue <bool>() && args.Target.HealthPercent > 40)
            {
                var orbTarget = args.Target as Obj_AI_Hero;
                if (!orbTarget.HasBuff("quinnw"))
                {
                    var best = Program.Enemies.FirstOrDefault(enemy => enemy.IsValidTarget() && Orbwalking.InAutoAttackRange(enemy) && enemy.HasBuff("quinnw"));
                    if (best != null)
                    {
                        Orbwalker.ForceTarget(best);
                    }
                }
            }
            else if (Program.LaneClear && args.Target.Type == GameObjectType.obj_AI_Minion && Config.Item("farmP", true).GetValue <bool>())
            {
                var bestMinion = MinionManager.GetMinions(Player.Position, Player.AttackRange).FirstOrDefault(minion => minion.IsValidTarget() && Orbwalking.InAutoAttackRange(minion) && minion.HasBuff("quinnw"));

                if (bestMinion != null)
                {
                    Orbwalker.ForceTarget(bestMinion);
                }
            }
        }
Пример #14
0
        public bool ShouldWaitForMinion(float delay)
        {
            var minionListAA = ObjectManager.Get <Obj_AI_Minion>().Where(minion => minion.IsValidTarget() &&
                                                                         minion.Team != GameObjectTeam.Neutral && Orbwalking.InAutoAttackRange(minion) && MinionManager.IsMinion(minion, false));

            var minionsAlly = ObjectManager.Get <Obj_AI_Minion>().Where(minion => !minion.IsDead &&
                                                                        minion.IsAlly && minion.Distance(Player) < 600 && MinionManager.IsMinion(minion, false));

            int countAlly = minionsAlly.Count();

            if (minionListAA.Count() == 1 && countAlly > 3 && minionListAA.Any(x => x.Health < Player.TotalAttackDamage * 2))
            {
                return(true);
            }

            if (countAlly > 2 && minionListAA.Any(x => x.IsMoving && x.Health < Player.TotalAttackDamage * 2))
            {
                return(true);
            }

            var   t = (int)(Player.AttackCastDelay * 1000) - 20 + 1000 * (int)Math.Max(0, 500) / (int)Orbwalking.GetMyProjectileSpeed();
            float laneClearDelay = delay * 1000 + t;

            return
                (ObjectManager.Get <Obj_AI_Minion>()
                 .Any(
                     minion =>
                     minion.IsValidTarget() && minion.Team != GameObjectTeam.Neutral &&
                     Orbwalking.InAutoAttackRange(minion) && MinionManager.IsMinion(minion, false) &&
                     HealthPrediction.LaneClearHealthPrediction(minion, (int)(laneClearDelay), 0) <= Player.GetAutoAttackDamage(minion)));
        }