Esempio n. 1
0
        private static void WUsage()
        {
            // W Usage
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var Qdamage = Q.GetDamage(t);
                var Wdamage = OktwCommon.GetKsDamage(t, W) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                if (Wdamage > t.Health)
                {
                    SebbySpell(W, t);
                }
                else if (Wdamage + Qdamage > t.Health && Player.ManaPercentage() > Q.ManaCost + E.ManaCost)
                {
                    SebbySpell(W, t);
                }

                if (Player.Mana > RManaC + W.ManaCost)
                {
                    var enemystunned = HeroManager.Enemies.Find(enemy => enemy.IsValidTarget(W.Range) && enemy.HasBuff("stun") || enemy.IsStunned && Menu.Item("PrioritizeStunned").GetValue <bool>());
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SebbySpell(W, enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SebbySpell(W, t);
                    }
                }
            }
        }
Esempio n. 2
0
        private static void EUsage()
        {
            // E Usage
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                // If in Combo Mode
                if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo && Player.Mana > RManaC + E.ManaCost)
                {
                    E.CastOnUnit(t);
                }
                else
                {
                    // If there's a chance to KS/Get :kappa: a kill.
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if (wDmg + eDmg > t.Health && Player.Mana > W.ManaCost + E.ManaCost)
                    {
                        E.CastOnUnit(t);
                        W.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                    }
                }
            }
        }
Esempio n. 3
0
        private static void WUsage()
        {
            // W Usage
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var Qdamage = Q.GetDamage(t);
                var Wdamage = OktwCommon.GetKsDamage(t, W) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                if (Wdamage > t.Health)
                {
                    W.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                }
                else if (Wdamage + Qdamage > t.Health && Player.ManaPercentage() > Q.ManaCost + E.ManaCost)
                {
                    W.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                }

                if (Player.Mana > RManaC + W.ManaCost)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range)))
                    {
                        W.CastIfHitchanceEquals(t, HitChance.VeryHigh);
                    }
                }
            }
        }
Esempio n. 4
0
        private void LogicE()
        {
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var eDmg = E.GetDamage(t) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                var wDmg = W.GetDamage(t);

                if (eDmg > t.Health)
                {
                    E.CastOnUnit(t);
                }
                else if (W.IsReady() && wDmg + eDmg > t.Health && Player.Mana > WMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else if (R.IsReady() && W.IsReady() && wDmg + eDmg + R.GetDamage(t) > t.Health && Player.Mana > WMANA + EMANA + RMANA)
                {
                    E.CastOnUnit(t);
                }
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else if (Program.Farm && Config.Item("harrasE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmE", true).GetValue <bool>())
            {
                var allMinions = MinionManager.GetMinions(Player.ServerPosition, E.Range);
                if (allMinions.Count >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(E.Range) && minion.Health < E.GetDamage(minion) && !minion.HasBuff("AlZaharMaleficVisions")))
                    {
                        E.CastOnUnit(minion);
                    }
                }
            }
            else if (Program.Farm && Player.Mana > RMANA + EMANA + WMANA + EMANA && Config.Item("harrasEminion", true).GetValue <bool>())
            {
                var te = TargetSelector.GetTarget(E.Range + 400, TargetSelector.DamageType.Magical);
                if (te.IsValidTarget())
                {
                    var allMinions = MinionManager.GetMinions(Player.ServerPosition, E.Range);
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(E.Range) && minion.Health < E.GetDamage(minion) && te.Distance(minion.Position) < 500 && !minion.HasBuff("AlZaharMaleficVisions")))
                    {
                        E.CastOnUnit(minion);
                    }
                }
            }
        }
Esempio n. 5
0
        private void LogicQ()
        {
            var t  = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            var t2 = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && t2.IsValidTarget() && t == t2 && !(Config.Item("separate", true).GetValue <bool>() && Program.LaneClear))
            {
                if (Q.IsCharging)
                {
                    if (OktwCommon.GetPassiveTime(Player, "XerathArcanopulseChargeUp") < 2 || t.IsValidTarget(W.Range))
                    {
                        Q.Cast(Q.GetPrediction(t).CastPosition);
                    }
                    else
                    {
                        Program.CastSpell(Q, t);
                    }
                    return;
                }
                else if (t.IsValidTarget(Q.Range - 300))
                {
                    if (t.Health < Q.GetDamage(t) + OktwCommon.GetEchoLudenDamage(t))
                    {
                        Q.StartCharging();
                    }
                    else if (Program.Combo && Player.Mana > EMANA + QMANA)
                    {
                        Q.StartCharging();
                    }
                    else if (t.IsValidTarget(1200) && Program.Farm && Player.Mana > RMANA + EMANA + QMANA + QMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && OktwCommon.CanHarras())
                    {
                        Q.StartCharging();
                    }
                    else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + WMANA)
                    {
                        foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            Q.StartCharging();
                        }
                    }
                }
            }
            else if (Program.LaneClear && Q.Range > 1000 && Player.CountEnemiesInRange(1450) == 0 && (Q.IsCharging || (Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA)))
            {
                var allMinionsQ = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value || (Q.IsCharging && Qfarm.MinionsHit > 0))
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Esempio n. 6
0
        private void LogicE()
        {
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else if (Program.Harass && MainMenu.Item("harassE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>())
                {
                    E.CastOnUnit(t);
                }
                else
                {
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if (wDmg + eDmg > t.Health && Player.Mana > WMANA + EMANA)
                    {
                        E.CastOnUnit(t);
                    }
                }
            }
            else
            {
                if (MainMenu.Item("minionE", true).GetValue <bool>())
                {
                    if ((Program.Combo && Player.Mana > RMANA + EMANA) || (Program.Harass && MainMenu.Item("harassE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA))
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.CountEnemiesInRange(300) > 0 && minion.HasBuff("brandablaze")))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                    if (FarmSpells && MainMenu.Item("farmE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA)
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.HasBuff("brandablaze") && CountMinionsInRange(400, minion.Position) >= FarmMinions))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                }
            }
        }
Esempio n. 7
0
        private void LogicE()
        {
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else if (Program.Farm && Config.Item("harrasE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else
                {
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if (wDmg + eDmg > t.Health && Player.Mana > WMANA + EMANA)
                    {
                        E.CastOnUnit(t);
                    }
                }
            }
            else
            {
                if (Config.Item("minionE", true).GetValue <bool>())
                {
                    if ((Program.Combo && Player.Mana > RMANA + EMANA) || (Program.Farm && Config.Item("harrasE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA))
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.CountEnemiesInRange(300) > 0 && minion.HasBuff("brandablaze")))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                    if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA)
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.HasBuff("brandablaze") && CountMinionsInRange(400, minion.Position) >= Config.Item("LCminions", true).GetValue <Slider>().Value))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                }
            }
        }
Esempio n. 8
0
        private static void LogicE()
        {
            var t = TargetSelector.GetTarget(E.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else if (Program.Farm && getCheckBoxItem(eMenu, "harrasE") && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    E.CastOnUnit(t);
                }
                else
                {
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if (wDmg + eDmg > t.Health && Player.Mana > WMANA + EMANA)
                    {
                        E.CastOnUnit(t);
                    }
                }
            }
            else
            {
                if (getCheckBoxItem(eMenu, "minionE"))
                {
                    if ((Program.Combo && Player.Mana > RMANA + EMANA) || (Program.Farm && getCheckBoxItem(eMenu, "harrasE") && Player.Mana > RMANA + EMANA))
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.CountEnemiesInRange(300) > 0 && minion.HasBuff("brandablaze")))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                    if (Program.LaneClear && Player.ManaPercent > getSliderItem(farmMenu, "Mana") && getCheckBoxItem(farmMenu, "farmE") && Player.Mana > RMANA + EMANA)
                    {
                        foreach (var minion in Cache.GetMinions(Player.Position, E.Range).Where(minion => minion.IsValidTarget(E.Range) && minion.HasBuff("brandablaze") && CountMinionsInRange(400, minion.Position) >= getSliderItem(farmMenu, "LCminions")))
                        {
                            E.CastOnUnit(minion);
                        }
                    }
                }
            }
        }
Esempio n. 9
0
        private static void LogicE()
        {
            foreach (
                var enemy in
                Program.Enemies.Where(
                    enemy =>
                    enemy.IsValidTarget(E.Range) &&
                    E.GetDamage(enemy) + Q.GetDamage(enemy) + W.GetDamage(enemy) +
                    OktwCommon.GetEchoLudenDamage(enemy) > enemy.Health))
            {
                Program.CastSpell(E, enemy);
            }
            var t = Orbwalker.LastTarget as AIHeroClient;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(E.Range, DamageType.Magical);
            }
            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA && getCheckBoxItem(EMenu, "Eon" + t.NetworkId))
                {
                    Program.CastSpell(E, t);
                }
                else if (Program.Farm && getCheckBoxItem(EMenu, "harrasE") &&
                         getCheckBoxItem(harassMenu, "harras" + t.NetworkId) &&
                         Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                else if (OktwCommon.GetKsDamage(t, E) > t.Health)
                {
                    Program.CastSpell(E, t);
                }
                if (Player.Mana > RMANA + EMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(
                            enemy =>
                            enemy.IsValidTarget(E.Range) && !OktwCommon.CanMove(enemy) &&
                            getCheckBoxItem(EMenu, "Eon" + enemy.NetworkId)))
                    {
                        E.Cast(enemy);
                    }
                }
            }
        }
Esempio n. 10
0
        private static void LogicR()
        {
            R.Range = R.Level == 3 ? 750 : 675;

            var Rcombo = getCheckBoxItem(r, "Rcombo");

            foreach (
                var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(R.Range) && OktwCommon.ValidUlt(enemy)))
            {
                var Rmode = getBoxItem(r, "Rmode" + enemy.ChampionName);

                if (Rmode == 2)
                {
                    continue;
                }
                if (Rmode == 1)
                {
                    R.Cast(enemy);
                }

                var comboDMG = OktwCommon.GetKsDamage(enemy, R);
                comboDMG += R.GetDamage(enemy, 1) * (R.Instance.Ammo - 3);
                comboDMG += OktwCommon.GetEchoLudenDamage(enemy);

                if (Rcombo)
                {
                    if (Q.IsReady() && enemy.IsValidTarget(600))
                    {
                        comboDMG += Q.GetDamage(enemy);
                    }

                    if (E.IsReady())
                    {
                        comboDMG += E.GetDamage(enemy);
                    }

                    if (W.IsReady())
                    {
                        comboDMG += W.GetDamage(enemy);
                    }
                }

                if (enemy.Health < comboDMG)
                {
                    R.Cast(enemy);
                }
            }
        }
Esempio n. 11
0
        private void LogicR()
        {
            R.Range = R.Level == 3 ? 750 : 675;

            bool Rcombo = Config.Item("Rcombo", true).GetValue <bool>();

            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(R.Range) && OktwCommon.ValidUlt(enemy)))
            {
                int Rmode = Config.Item("Rmode" + enemy.ChampionName, true).GetValue <StringList>().SelectedIndex;

                if (Rmode == 2)
                {
                    continue;
                }
                else if (Rmode == 1)
                {
                    R.Cast(enemy);
                }

                var comboDMG = OktwCommon.GetKsDamage(enemy, R);
                comboDMG += (R.GetDamage(enemy, 1) * (R.Instance.Ammo - 3));
                comboDMG += OktwCommon.GetEchoLudenDamage(enemy);
                comboDMG += GetThunderLordDamage(enemy);

                if (Rcombo)
                {
                    if (Q.IsReady() && enemy.IsValidTarget(600))
                    {
                        comboDMG += Q.GetDamage(enemy);
                    }

                    if (E.IsReady())
                    {
                        comboDMG += E.GetDamage(enemy);
                    }

                    if (W.IsReady())
                    {
                        comboDMG += W.GetDamage(enemy);
                    }
                }

                if (enemy.Health < comboDMG)
                {
                    R.Cast(enemy);
                }
            }
        }
Esempio n. 12
0
        private void LogicR()
        {
            R.Range = R.Level == 3 ? 750 : 675;

            bool Rcombo = rMenu["Rcombo"].Cast <CheckBox>().CurrentValue;

            foreach (var enemy in Program.Enemies.Where(enemy => enemy.LSIsValidTarget(R.Range) && OktwCommon.ValidUlt(enemy)))
            {
                int Rmode = rMenu["Rmode" + enemy.ChampionName].Cast <ComboBox>().CurrentValue;

                if (Rmode == 2)
                {
                    continue;
                }
                else if (Rmode == 1)
                {
                    R.Cast(enemy);
                }

                var comboDMG = OktwCommon.GetKsDamage(enemy, R);
                comboDMG += (R.GetDamage(enemy, 1) * (R.Instance.Ammo - 3));
                comboDMG += OktwCommon.GetEchoLudenDamage(enemy);

                if (Rcombo)
                {
                    if (Q.IsReady() && enemy.LSIsValidTarget(600))
                    {
                        comboDMG += Q.GetDamage(enemy);
                    }

                    if (E.IsReady())
                    {
                        comboDMG += E.GetDamage(enemy);
                    }

                    if (W.IsReady())
                    {
                        comboDMG += W.GetDamage(enemy);
                    }
                }

                if (enemy.Health < comboDMG)
                {
                    R.Cast(enemy);
                }
            }
        }
Esempio n. 13
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                var qDmg = Q.GetDamage(t) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                var wDmg = W.GetDamage(t);

                if (qDmg > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                if (!t.HasBuff("brandablaze") && Config.Item("QAblazed", true).GetValue <bool>())
                {
                    var otherEnemy = t;

                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                    {
                        t = enemy;
                    }

                    if (otherEnemy == t && !LogicQuse(t))
                    {
                        return;
                    }
                }

                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(Q, t);
                }

                if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
        }
Esempio n. 14
0
        private static void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Magical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                if (EMissile == null || !EMissile.IsValid)
                {
                    if (Program.Combo && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + WMANA + QMANA + QMANA &&
                             getCheckBoxItem(QMenu, "harrasQ") && getCheckBoxItem(harassMenu, "harras" + t.NetworkId) &&
                             OktwCommon.CanHarras())
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Q.GetDamage(t) * 2 + OktwCommon.GetEchoLudenDamage(t) >
                             t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Q.Cast(t, true);
                    }
                }
                if (!Program.None && Player.Mana > RMANA + WMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
            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);
                }
            }
        }
Esempio n. 15
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (OktwCommon.GetKsDamage(t, Q) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                if (!t.HasBuff("brandablaze") && MainMenu.Item("QAblazed", true).GetValue <bool>())
                {
                    var otherEnemy = t;

                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                    {
                        t = enemy;
                    }

                    if (otherEnemy == t && !LogicQuse(t))
                    {
                        return;
                    }
                }

                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Harass && MainMenu.Item("harassQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>())
                {
                    Program.CastSpell(Q, t);
                }

                if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
        }
Esempio n. 16
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var qDmg = Q.GetDamage(t) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);

                if (qDmg > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                if (R.IsReady() && t.IsValidTarget(R.Range))
                {
                    return;
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(Q, t);
                }

                if (Player.Mana > RMANA + QMANA)
                {
                    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>())
            {
                var allMinions = MinionManager.GetMinions(Player.ServerPosition, Q.Range);
                var farmPos    = Q.GetCircularFarmLocation(allMinions, 150);
                if (farmPos.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPos.Position);
                }
            }
        }
Esempio n. 17
0
        private static void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (OktwCommon.GetKsDamage(t, Q) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                if (!t.HasBuff("brandablaze") && getCheckBoxItem(qMenu, "QAblazed"))
                {
                    var otherEnemy = t;

                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                    {
                        t = enemy;
                    }

                    if (otherEnemy == t && !LogicQuse(t))
                    {
                        return;
                    }
                }

                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && getCheckBoxItem(qMenu, "harrasQ") && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(Q, t);
                }

                if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy);
                    }
                }
            }
        }
Esempio n. 18
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                var qDmg = Q.GetDamage(t);
                var wDmg = W.GetDamage(t) + OktwCommon.GetEchoLudenDamage(t);

                if (wDmg > t.Health)
                {
                    Program.CastSpell(W, t);
                }
                else if (wDmg + qDmg > t.Health && Player.Mana > WMANA + QMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if (Program.Combo && Player.Mana > RMANA + WMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if (Program.Farm && Config.Item("harrasW", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>() && !Player.UnderTurret(true) && (Player.Mana > Player.MaxMana * 0.8 || W.Level > Q.Level) && Player.Mana > RMANA + WMANA + EMANA + QMANA + WMANA && OktwCommon.CanHarras())
                {
                    Program.CastSpell(W, t);
                }
                else if ((Program.Combo || Program.Farm))
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
            else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmW", true).GetValue <bool>() && Player.Mana > RMANA + WMANA)
            {
                var minionList   = MinionManager.GetMinions(Player.ServerPosition, W.Range, MinionTypes.All);
                var farmPosition = W.GetLineFarmLocation(minionList, W.Width);

                if (farmPosition.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    W.Cast(farmPosition.Position);
                }
            }
        }
Esempio n. 19
0
        private static void QUsage()
        {
            var m = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (!m.IsValidTarget())
            {
                return;
            }
            // Q Improvement + KS Below
            if (OktwCommon.GetKsDamage(m, Q) + BonusDmg(m) + OktwCommon.GetEchoLudenDamage(m) > m.Health)
            {
                Q.CastIfHitchanceEquals(m, HitChance.High);
            }

            if (m.HasBuff("brandablaze") && Menu.Item("QAblazedEnemy").GetValue <bool>())
            {
                var spreadTarget = m;

                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                {
                    m = enemy;
                }

                if (spreadTarget == m && !LogQUse(m))
                {
                    return;
                }
            }

            if (Orbwalker.ActiveMode == SebbyLib.Orbwalking.OrbwalkingMode.Combo && !W.IsReady() && Player.ManaPercentage() > RManaC + Q.ManaCost)
            {
                Q.CastIfHitchanceEquals(m, HitChance.High);
            }

            if (Player.Mana > RManaC + Q.ManaCost)
            {
                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range)))
                {
                    Q.CastIfHitchanceEquals(m, HitChance.High);
                }
            }
        }
Esempio n. 20
0
        private void EUsage()
        {
            // E Usage
            var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) && (Player.Mana > RManaC + E.ManaCost))
                {
                    var enemystunned =
                        HeroManager.Enemies.Find(
                            enemy =>
                            (enemy.IsValidTarget(E.Range) && enemy.HasBuff("stun")) ||
                            (enemy.IsStunned && Config.PrioritizeStunned.GetValue <bool>()));
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        E.CastOnUnit(enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(t);
                        E.CastOnUnit(t);
                    }
                }
                else
                {
                    // If there's a chance to KS/Get :kappa: a kill.
                    var eDmg = OktwCommon.GetKsDamage(t, E) + BonusDmg(t) + OktwCommon.GetEchoLudenDamage(t);
                    var wDmg = W.GetDamage(t);
                    if (eDmg > t.Health)
                    {
                        E.CastOnUnit(t);
                    }
                    else if ((wDmg + eDmg > t.Health) && (Player.Mana > W.ManaCost + E.ManaCost))
                    {
                        E.CastOnUnit(t);
                        SpellCast.SebbySpellMain(W, t);
                    }
                }
            }
        }
Esempio n. 21
0
File: Ahri.cs Progetto: koyvn/hay
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                if (EMissile == null || !EMissile.IsValid)
                {
                    if (Program.Combo && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + WMANA + QMANA + QMANA && Config.Item("harassQ", true).GetValue <bool>() && Config.Item("Harass" + t.ChampionName).GetValue <bool>() && OktwCommon.CanHarras())
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Q.GetDamage(t) * 2 + OktwCommon.GetEchoLudenDamage(t) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Q.Cast(t, true);
                    }
                }
                if (!Program.None && Player.Mana > RMANA + WMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
            else if (FarmSpells && Config.Item("farmQ", true).GetValue <bool>())
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit >= FarmMinions)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Esempio n. 22
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                Qtarget = t;
                if (EMissile == null || !EMissile.IsValid)
                {
                    if (Q.GetDamage(t) * 2 + OktwCommon.GetEchoLudenDamage(t) > t.Health)
                    {
                        Q.Cast(t, true);
                    }
                    else if (Program.Combo && ObjectManager.Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + WMANA + QMANA + QMANA && Config.Item("harrasQ", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                    {
                        Program.CastSpell(Q, t);
                    }
                }
                if (Player.Mana > RMANA + QMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
            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, MinionTypes.All);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Esempio n. 23
0
        private static void LogicE()
        {
            foreach (
                var enemy in
                Program.Enemies.Where(
                    enemy =>
                    enemy.LSIsValidTarget(E.Range) &&
                    E.GetDamage(enemy) + OktwCommon.GetKsDamage(enemy, Q) + W.GetDamage(enemy) +
                    OktwCommon.GetEchoLudenDamage(enemy) > enemy.Health))
            {
                Program.CastSpell(E, enemy);
            }
            var t = Orbwalker.LastTarget as AIHeroClient;

            if (!t.LSIsValidTarget())
            {
                t = TargetSelector.GetTarget(E.Range, DamageType.Magical);
            }
            if (t.LSIsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                if (Program.Farm && OktwCommon.CanHarras() && getCheckBoxItem(eMenu, "harrasE") &&
                    Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                foreach (
                    var enemy in
                    Program.Enemies.Where(enemy => enemy.LSIsValidTarget(E.Range) && !OktwCommon.CanMove(enemy)))
                {
                    E.Cast(enemy);
                }
            }
        }
Esempio n. 24
0
        private void RUsage()
        {
            // Massive Thanks to Sebby for the time saved instead of writing it from scratch, instead I 'stole' it from him :feelsbadman:
            var bounceRange = 430;
            var t2          = TargetSelector.GetTarget(R.Range + bounceRange, TargetSelector.DamageType.Magical);

            if (t2.IsValidTarget(R.Range) &&
                (t2.CountEnemiesInRange(bounceRange) >= Config.NearbyREnemies.GetValue <Slider>().Value) &&
                (Config.NearbyREnemies.GetValue <Slider>().Value > 0))
            {
                R.Cast(t2);
            }

            if (t2.IsValidTarget() && OktwCommon.ValidUlt(t2))
            {
                if ((t2.CountAlliesInRange(550) == 0) || (Player.HealthPercent < 50) ||
                    (t2.CountEnemiesInRange(bounceRange) > 1))
                {
                    var prepos = R.GetPrediction(t2).CastPosition;
                    var dmgR   = R.GetDamage(t2);

                    if (t2.Health < dmgR * 3)
                    {
                        var totalDmg    = dmgR;
                        var minionCount = CountMinionsInRange(bounceRange, prepos);

                        if (t2.IsValidTarget(R.Range))
                        {
                            if (prepos.CountEnemiesInRange(bounceRange) > 1)
                            {
                                if (minionCount > 2)
                                {
                                    totalDmg = dmgR * 2;
                                }
                                else
                                {
                                    totalDmg = dmgR * 3;
                                }
                            }
                            else if (minionCount > 0)
                            {
                                totalDmg = dmgR * 2;
                            }

                            if (W.IsReady())
                            {
                                totalDmg += W.GetDamage(t2);
                            }

                            if (E.IsReady())
                            {
                                totalDmg += E.GetDamage(t2);
                            }

                            if (Q.IsReady())
                            {
                                totalDmg += Q.GetDamage(t2);
                            }

                            totalDmg += BonusDmg(t2);
                            totalDmg += OktwCommon.GetEchoLudenDamage(t2);

                            // Hex
                            if (Items.HasItem(3155, t2))
                            {
                                totalDmg = totalDmg - 250;
                            }

                            // MoM
                            if (Items.HasItem(3156, t2))
                            {
                                totalDmg = totalDmg - 300;
                            }

                            if ((totalDmg > t2.Health - OktwCommon.GetIncomingDamage(t2)) &&
                                (Player.GetAutoAttackDamage(t2) * 2 < t2.Health))
                            {
                                R.CastOnUnit(t2);
                            }
                        }
                        else if (t2.Health - OktwCommon.GetIncomingDamage(t2) < dmgR * 2 + BonusDmg(t2))
                        {
                            if (Player.CountEnemiesInRange(R.Range) > 0)
                            {
                                foreach (
                                    var t in
                                    HeroManager.Enemies.Where(
                                        enemy => enemy.IsValidTarget(R.Range) && (enemy.Distance(prepos) < bounceRange))
                                    )
                                {
                                    R.CastOnUnit(t);
                                }
                            }
                            else
                            {
                                var minions = Cache.GetMinions(Player.Position, R.Range);
                                foreach (
                                    var minion in
                                    minions.Where(
                                        minion =>
                                        minion.IsValidTarget(R.Range) && (minion.Distance(prepos) < bounceRange))
                                    )
                                {
                                    R.CastOnUnit(minion);
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 25
0
        private void QUsage()
        {
            var m = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (!m.IsValidTarget())
            {
                return;
            }
            // Q Improvement + KS Below
            if (OktwCommon.GetKsDamage(m, Q) + BonusDmg(m) + OktwCommon.GetEchoLudenDamage(m) > m.Health)
            {
                SpellCast.SebbySpellMain(Q, m);
            }
            if (Config.QAblazedEnemy.GetValue <bool>() && m.HasBuff("brandablaze"))
            {
                foreach (
                    var enemy in
                    HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze")))
                {
                    SpellCast.SebbySpellMain(Q, enemy);
                }
            }
            else
            {
                if (m.HasBuff("brandablaze") && Config.QAblazedEnemy.GetValue <bool>())
                {
                    var spreadTarget = m;

                    foreach (
                        var enemy in
                        HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && enemy.HasBuff("brandablaze"))
                        )
                    {
                        m = enemy;
                    }

                    if ((spreadTarget == m) && !LogQUse(m))
                    {
                        return;
                    }
                }

                if ((Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo) && !W.IsReady() &&
                    (Player.ManaPercent > RManaC + Q.ManaCost))
                {
                    var enemystunned =
                        HeroManager.Enemies.Find(
                            enemy =>
                            (enemy.IsValidTarget(Q.Range) && enemy.HasBuff("stun")) ||
                            (enemy.IsStunned && Config.PrioritizeStunned.GetValue <bool>()));
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SpellCast.SebbySpellMain(Q, enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(m);
                        SpellCast.SebbySpellMain(Q, m);
                    }
                }
                if (Player.Mana > RManaC + Q.ManaCost)
                {
                    var enemystunned =
                        HeroManager.Enemies.Find(
                            enemy =>
                            (enemy.IsValidTarget(Q.Range) && enemy.HasBuff("stun")) ||
                            (enemy.IsStunned && Config.PrioritizeStunned.GetValue <bool>()));
                    if (enemystunned != null)
                    {
                        Orbwalker.ForceTarget(enemystunned);
                        SpellCast.SebbySpellMain(Q, enemystunned);
                    }
                    else
                    {
                        Orbwalker.ForceTarget(m);
                        SpellCast.SebbySpellMain(Q, m);
                    }
                }
            }
        }
Esempio n. 26
0
        private void LogicR()
        {
            var bounceRange = 430;
            var t2          = TargetSelector.GetTarget(R.Range + bounceRange, TargetSelector.DamageType.Magical);

            if (t2.IsValidTarget(R.Range) && t2.CountEnemiesInRange(bounceRange) >= Config.Item("rCount", true).GetValue <Slider>().Value&& Config.Item("rCount", true).GetValue <Slider>().Value > 0)
            {
                R.Cast(t2);
            }

            if (t2.IsValidTarget() && OktwCommon.ValidUlt(t2))
            {
                if (t2.CountAlliesInRange(550) == 0 || Player.HealthPercent < 50 || t2.CountEnemiesInRange(bounceRange) > 1)
                {
                    var prepos = R.GetPrediction(t2).CastPosition;
                    var dmgR   = R.GetDamage(t2);

                    if (t2.Health < dmgR * 3)
                    {
                        var totalDmg    = dmgR;
                        var minionCount = CountMinionsInRange(bounceRange, prepos);

                        if (t2.IsValidTarget(R.Range))
                        {
                            if (prepos.CountEnemiesInRange(bounceRange) > 1)
                            {
                                if (minionCount > 2)
                                {
                                    totalDmg = dmgR * 2;
                                }
                                else
                                {
                                    totalDmg = dmgR * 3;
                                }
                            }
                            else if (minionCount > 0)
                            {
                                totalDmg = dmgR * 2;
                            }

                            if (W.IsReady())
                            {
                                totalDmg += W.GetDamage(t2);
                            }

                            if (E.IsReady())
                            {
                                totalDmg += E.GetDamage(t2);
                            }

                            if (Q.IsReady())
                            {
                                totalDmg += Q.GetDamage(t2);
                            }

                            totalDmg += BonusDmg(t2);
                            totalDmg += OktwCommon.GetEchoLudenDamage(t2);

                            if (Items.HasItem(3155, t2))
                            {
                                totalDmg = totalDmg - 250;
                            }

                            if (Items.HasItem(3156, t2))
                            {
                                totalDmg = totalDmg - 400;
                            }

                            if (totalDmg > t2.Health - OktwCommon.GetIncomingDamage(t2) && Player.GetAutoAttackDamage(t2) * 2 < t2.Health)
                            {
                                R.CastOnUnit(t2);
                            }
                        }
                        else if (t2.Health - OktwCommon.GetIncomingDamage(t2) < dmgR * 2 + BonusDmg(t2))
                        {
                            if (Player.CountEnemiesInRange(R.Range) > 0)
                            {
                                foreach (var t in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(R.Range) && enemy.Distance(prepos) < bounceRange))
                                {
                                    R.CastOnUnit(t);
                                }
                            }
                            else
                            {
                                var minions = Cache.GetMinions(Player.Position, R.Range);
                                foreach (var minion in minions.Where(minion => minion.IsValidTarget(R.Range) && minion.Distance(prepos) < bounceRange))
                                {
                                    R.CastOnUnit(minion);
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 27
0
File: Ahri.cs Progetto: koyvn/hay
        private void LogicE()
        {
            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && E.GetDamage(enemy) + Q.GetDamage(enemy) + W.GetDamage(enemy) + OktwCommon.GetEchoLudenDamage(enemy) > enemy.Health))
            {
                Program.CastSpell(E, enemy);
            }
            var t = Orbwalker.GetTarget() as AIHeroClient;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
            }
            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA && Config.Item("Eon" + t.ChampionName, true).GetValue <bool>())
                {
                    Program.CastSpell(E, t);
                }
                else if (Program.Farm && Config.Item("harassE", true).GetValue <bool>() && Config.Item("Harass" + t.ChampionName).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                else if (OktwCommon.GetKsDamage(t, E) > t.Health)
                {
                    Program.CastSpell(E, t);
                }
                if (Player.Mana > RMANA + EMANA)
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && !OktwCommon.CanMove(enemy) && Config.Item("Eon" + enemy.ChampionName, true).GetValue <bool>()))
                    {
                        E.Cast(enemy);
                    }
                }
            }
        }
Esempio n. 28
0
        private static void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }

            if (Player.IsChannelingImportantSpell() || (Game.Time - Rtime < 2.5) || Player.HasBuff("malzaharrsound"))
            {
                Orbwalker.SetAttack(false);
                Orbwalker.SetMovement(false);
                return;
            }
            Orbwalker.SetAttack(true);
            Orbwalker.SetMovement(true);
            if (E.IsReady() && Menu.Item("ksE").GetValue <bool>())
            {
                foreach (
                    var h in
                    HeroManager.Enemies.Where(
                        h =>
                        h.IsValidTarget(E.Range) &&
                        (h.Health < OktwCommon.GetKsDamage(h, E) + OktwCommon.GetEchoLudenDamage(h))))
                {
                    E.Cast(h);
                }
            }
            if (Q.IsReady() && Menu.Item("ksQ").GetValue <bool>())
            {
                foreach (
                    var h in
                    HeroManager.Enemies.Where(
                        h =>
                        h.IsValidTarget(Q.Range) &&
                        (h.Health < OktwCommon.GetKsDamage(h, Q) + OktwCommon.GetEchoLudenDamage(h))))
                {
                    SebbySpell(Q, h);
                }
            }
            //Combo
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (Menu.Item("DontAAInCombo").GetValue <bool>())
                {
                    Orbwalker.SetAttack(false);
                }
                else
                {
                    Orbwalker.SetAttack(true);
                }
                Combo();
            }
            //Burst
            if (Menu.Item("oneshot").GetValue <KeyBind>().Active)
            {
                Oneshot();
            }
            //Lane
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                JungleClear();
                Lane();
            }
            //AutoHarass
            if (Menu.Item("autoharassenabled").GetValue <bool>())
            {
                AutoHarass();
            }
        }
Esempio n. 29
0
        private void OnUpdate(EventArgs args)
        {
            if (Player.IsDead || Player.IsRecalling())
            {
                return;
            }

            if (Player.IsChannelingImportantSpell() || (Game.Time - Rtime < 2.5) ||
                Player.HasBuff("malzaharrsound"))
            {
                Orbwalker.SetAttack(false);
                Orbwalker.SetMovement(false);
                return;
            }
            Orbwalker.SetAttack(true);
            Orbwalker.SetMovement(true);

            //new Activator().SeraphUsage();
            //new Activator().ProHexGLPUsage();
            if (E.IsReady() && Config.ksE.GetValue <bool>())
            {
                foreach (
                    var h in
                    HeroManager.Enemies.Where(
                        h =>
                        h.IsValidTarget(E.Range) &&
                        (h.Health < OktwCommon.GetKsDamage(h, E) + OktwCommon.GetEchoLudenDamage(h))))
                {
                    E.Cast(h);
                }
            }

            if (Q.IsReady() && Config.ksQ.GetValue <bool>())
            {
                foreach (
                    var h in
                    HeroManager.Enemies.Where(
                        h =>
                        h.IsValidTarget(Q.Range) &&
                        (h.Health < OktwCommon.GetKsDamage(h, Q) + OktwCommon.GetEchoLudenDamage(h))))
                {
                    SpellCast.SebbySpellMain(Q, h);
                }
            }

            // Combo
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (Config.DontAAInCombo.GetValue <bool>())
                {
                    Orbwalker.SetAttack(false);
                }
                else
                {
                    Orbwalker.SetAttack(true);
                }

                Combo();
            }

            // Burst
            if (Config.oneshot.GetValue <KeyBind>().Active)
            {
                Oneshot();
            }

            // Lane
            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                Lane();
            }

            // AutoHarass
            AutoHarass();
        }
Esempio n. 30
0
        private void LogicE()
        {
            foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && E.GetDamage(enemy) + OktwCommon.GetKsDamage(enemy, Q) + W.GetDamage(enemy) + OktwCommon.GetEchoLudenDamage(enemy) > enemy.Health))
            {
                Program.CastSpell(E, enemy);
            }
            var t = Orbwalker.GetTarget() as Obj_AI_Hero;

            if (!t.IsValidTarget())
            {
                t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
            }
            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                if (Program.Farm && OktwCommon.CanHarras() && Config.Item("harrasE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA)
                {
                    Program.CastSpell(E, t);
                }
                foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(E.Range) && !OktwCommon.CanMove(enemy)))
                {
                    E.Cast(enemy);
                }
            }
        }