Ejemplo n.º 1
0
        private static void LogicQ()
        {
            if (Program.Combo || Program.Farm)
            {
                foreach (
                    var enemy in
                    Program.Enemies.Where(
                        enemy => enemy.IsValidTarget(Q2.Range) && enemy.HasBuff("urgotcorrosivedebuff")))
                {
                    if (W.IsReady() && (Player.Mana > WMANA + QMANA * 4 || Q.GetDamage(enemy) * 3 > enemy.Health) &&
                        getCheckBoxItem(w, "autoW"))
                    {
                        W.Cast();
                        Program.debug("W");
                    }
                    Program.debug("E");
                    Q2.Cast(enemy.ServerPosition);
                    return;
                }
            }

            var t = TargetSelector.GetTarget(Q.Range, DamageType.Physical);

            if (Player.CountEnemiesInRange(Q.Range - 200) > 0)
            {
                t = TargetSelector.GetTarget(Q.Range - 200, DamageType.Physical);
            }

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + WMANA && OktwCommon.CanHarras())
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(
                            enemy =>
                            enemy.IsValidTarget(Q.Range) && getCheckBoxItem(harass, "harras" + t.NetworkId)))
                    {
                        Program.CastSpell(Q, enemy);
                    }
                }
                else if (OktwCommon.GetKsDamage(t, Q) * 2 > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                if (!Program.None && Player.Mana > RMANA + QMANA)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void LogicQ()
        {
            if (Program.LagFree(1))
            {
                bool cc     = !Program.None && Player.Mana > RMANA + QMANA + EMANA;
                bool harass = Program.Farm && Player.ManaPercent > Config.Item("HarassMana", true).GetValue <Slider>().Value&& OktwCommon.CanHarras();
                bool combo  = Program.Combo && Player.Mana > RMANA + QMANA;
                foreach (var t in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range)).OrderBy(t => t.Health))
                {
                    var qDmg = OktwCommon.GetKsDamage(t, Q);
                    var wDmg = W.GetDamage(t);
                    if (qDmg + wDmg > t.Health)
                    {
                        Program.CastSpell(Q, t);
                        OverKill = Game.Time;
                        return;
                    }

                    if (cc && !OktwCommon.CanMove(t))
                    {
                        Q.Cast(t);
                    }

                    if (combo)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (harass && Config.Item("haras" + t.ChampionName).GetValue <bool>())
                    {
                        Program.CastSpell(Q, t);
                    }
                }
            }
            else if (Program.LagFree(2))
            {
                if (Farm && Player.Mana > RMANA + EMANA + WMANA + QMANA * 3)
                {
                    farmQ();
                    lag = Game.Time;
                }
                else if (Config.Item("stack", true).GetValue <bool>() && Utils.TickCount - Q.LastCastAttemptT > 4000 && !Player.HasBuff("Recall") && Player.Mana > Player.MaxMana * 0.95 && Program.None && (Items.HasItem(Tear) || Items.HasItem(Manamune)))
                {
                    Q.Cast(Player.Position.Extend(Game.CursorPos, 500));
                }
            }
        }
Ejemplo n.º 3
0
        private void LogicR()
        {
            if (Player.UnderTurret(true) && Config.Item("Rturrent", true).GetValue <bool>())
            {
                return;
            }

            if (Config.Item("autoR", true).GetValue <bool>() && Player.CountEnemiesInRange(800) == 0 && Game.Time - OverKill > 0.6)
            {
                R.Range = Config.Item("MaxRangeR", true).GetValue <Slider>().Value;
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    double predictedHealth = target.Health - OktwCommon.GetIncomingDamage(target);

                    if (Config.Item("Rcc", true).GetValue <bool>() && target.IsValidTarget(Q.Range + E.Range) && target.Health < Player.MaxHealth && !OktwCommon.CanMove(target))
                    {
                        R.Cast(target, true, true);
                    }

                    double Rdmg = R.GetDamage(target);

                    if (Rdmg > predictedHealth)
                    {
                        Rdmg = getRdmg(target);
                    }

                    if (Rdmg > predictedHealth && target.CountAlliesInRange(500) == 0 && Player.Distance(target) > Config.Item("MinRangeR", true).GetValue <Slider>().Value)
                    {
                        Program.CastSpell(R, target);
                        Program.debug("R normal");
                    }
                    if (Program.Combo && Player.CountEnemiesInRange(1200) == 0)
                    {
                        R.CastIfWillHit(target, Config.Item("Raoe", true).GetValue <Slider>().Value, true);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        private void Drawing_OnDraw(EventArgs args)
        {
            if (Config.Item("notif", true).GetValue <bool>())
            {
                if (Player.HasBuff("sivirwmarker"))
                {
                    var color    = System.Drawing.Color.Yellow;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "sivirwmarker");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("W:  " + String.Format("{0:0.0}", buffTime), Player.Position, 175, color);
                }
                if (Player.HasBuff("SivirE"))
                {
                    var color    = System.Drawing.Color.Aqua;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "SivirE");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("E:  " + String.Format("{0:0.0}", buffTime), Player.Position, 200, color);
                }
                if (Player.HasBuff("SivirR"))
                {
                    var color    = System.Drawing.Color.GreenYellow;
                    var buffTime = OktwCommon.GetPassiveTime(Player, "SivirR");
                    if (buffTime < 1)
                    {
                        color = System.Drawing.Color.Red;
                    }
                    drawText2("R:  " + String.Format("{0:0.0}", buffTime), Player.Position, 225, color);
                }
            }

            if (Config.Item("qRange", true).GetValue <bool>())
            {
                if (Config.Item("onlyRdy", true).GetValue <bool>())
                {
                    if (Q.IsReady())
                    {
                        Utility.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                    }
                }
                else
                {
                    Utility.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 1, 1);
                }
            }

            if (Config.Item("noti", true).GetValue <bool>())
            {
                var target = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical);
                if (target.IsValidTarget())
                {
                    if (Q.GetDamage(target) * 2 > target.Health)
                    {
                        Render.Circle.DrawCircle(target.ServerPosition, 200, System.Drawing.Color.Red);
                        Drawing.DrawText(Drawing.Width * 0.1f, Drawing.Height * 0.4f, System.Drawing.Color.Red, "Q kill: " + target.ChampionName + " have: " + target.Health + "hp");
                    }
                }
            }
        }
Ejemplo n.º 5
0
 private void LogicQ()
 {
     if (Sheen())
     {
         var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
         if (t.IsValidTargetLS())
         {
             var qDmg = OktwCommon.GetKsDamage(t, Q);
             var eDmg = E.GetDamage(t);
             if (t.IsValidTargetLS(W.Range) && qDmg + eDmg > t.Health)
             {
                 Program.CastSpell(Q, t);
             }
             else if (Program.Combo && Player.Mana > RMANA + QMANA * 2 + EMANA)
             {
                 Program.CastSpell(Q, t);
             }
             else if ((Program.Farm && Player.Mana > RMANA + EMANA + QMANA * 2 + WMANA) && Config.Item("harrasQ", true).GetValue <bool>() && !Player.UnderTurret(true))
             {
                 Program.CastSpell(Q, t);
             }
             else if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + QMANA + EMANA)
             {
                 foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(Q.Range) && !OktwCommon.CanMove(enemy)))
                 {
                     Q.Cast(enemy, true);
                 }
             }
         }
     }
 }
Ejemplo n.º 6
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                var step = t.Distance(Player) / 20;
                for (var i = 0; i < 20; i++)
                {
                    var p = Player.Position.Extend(t.Position, step * i);
                    if (p.IsWall())
                    {
                        return;
                    }
                }

                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("haras" + t.ChampionName).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + QMANA + QMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else
                {
                    var qDmg = OktwCommon.GetKsDamage(t, Q);
                    var rDmg = R.GetDamage(t);
                    if (qDmg > t.Health)
                    {
                        Q.Cast(t, true);
                        OverKill = Game.Time;
                        Program.debug("Q ks");
                    }
                    else if (qDmg + rDmg > t.Health && R.IsReady() && Player.Mana > RMANA + QMANA)
                    {
                        Program.CastSpell(Q, t);
                        if (Config.Item("fastR", true).GetValue <bool>() && rDmg < t.Health)
                        {
                            Program.CastSpell(R, t);
                        }
                        Program.debug("Q + R ks");
                    }
                }

                if (!Program.None && Player.Mana > RMANA + QMANA + EMANA)
                {
                    foreach (var enemy in HeroManager.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 allMinionsQ = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var Qfarm       = Q.GetLineFarmLocation(allMinionsQ, Q.Width);
                if (Qfarm.MinionsHit > 2)
                {
                    Q.Cast(Qfarm.Position);
                }
            }
        }
Ejemplo n.º 7
0
        private void LogicR()
        {
            foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(R1.Range) && OktwCommon.ValidUlt(target)))
            {
                double rDmg = OktwCommon.GetKsDamage(target, R);

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

                if (Config.Item("overkillR", true).GetValue <bool>() && target.Health < Player.Health)
                {
                    if (SebbyLib.Orbwalking.InAutoAttackRange(target))
                    {
                        continue;
                    }
                    if (target.CountAlliesInRange(400) > 0)
                    {
                        continue;
                    }
                }

                double rDmg2 = rDmg * 0.8;

                if (target.IsValidTarget(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.IsValidTarget(1200))
                    {
                        Program.CastSpell(R1, target);
                        Program.debug("Rdmg2 collision");
                    }
                }
            }
        }
Ejemplo n.º 8
0
        private void LogicW()
        {
            if (Player.Mana > RMANA + WMANA)
            {
                if (Program.Combo)
                {
                    return;
                }
                if (Config.Item("autoW", true).GetValue <bool>())
                {
                    foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy) && !enemy.HasBuff("caitlynyordletrapinternal")))
                    {
                        if (Utils.TickCount - W.LastCastAttemptT > 1000)
                        {
                            W.Cast(enemy);
                            LastW = enemy;
                        }
                        else if (LastW.NetworkId != enemy.NetworkId)
                        {
                            W.Cast(enemy);
                            LastW = enemy;
                        }
                    }
                }

                if (Config.Item("telE", true).GetValue <bool>())
                {
                    var trapPos = OktwCommon.GetTrapPos(W.Range);
                    if (!trapPos.IsZero)
                    {
                        W.Cast(trapPos);
                    }
                }
                if ((int)(Game.Time * 10) % 2 == 0 && Config.Item("bushW2", true).GetValue <bool>())
                {
                    if (Player.Spellbook.GetSpell(SpellSlot.W).Ammo == new int[] { 0, 3, 3, 4, 4, 5 }[W.Level] && Player.CountEnemiesInRange(1000) == 0)
                    {
                        var points = OktwCommon.CirclePoints(8, W.Range, Player.Position);
                        foreach (var point in points)
                        {
                            if (NavMesh.IsWallOfGrass(point, 0) || point.UnderTurret(true))
                            {
                                if (!OktwCommon.CirclePoints(8, 150, point).Any(x => x.IsWall()))
                                {
                                    W.Cast(point);
                                    return;
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        private void LogicQ()
        {
            if (Program.Combo && Player.IsWindingUp)
            {
                return;
            }
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget(Q.Range))
            {
                if (GetRealDistance(t) > bonusRange() + 250 && !SebbyLib.Orbwalking.InAutoAttackRange(t) && OktwCommon.GetKsDamage(t, Q) > t.Health && Player.CountEnemiesInRange(400) == 0)
                {
                    Program.CastSpell(Q, t);
                    Program.debug("Q KS");
                }
                else if (Program.Combo && Player.Mana > RMANA + QMANA + EMANA + 10 && Player.CountEnemiesInRange(bonusRange() + 100 + t.BoundingRadius) == 0 && !Config.Item("autoQ", true).GetValue <bool>())
                {
                    Program.CastSpell(Q, t);
                }
                if ((Program.Combo || Program.Farm) && Player.Mana > RMANA + QMANA && Player.CountEnemiesInRange(400) == 0)
                {
                    foreach (var enemy in HeroManager.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) && Config.Item("Qslow", true).GetValue <bool>())
                        {
                            Q.Cast(t);
                        }
                        if (Config.Item("Qaoe", true).GetValue <bool>())
                        {
                            Q.CastIfWillHit(t, 2, 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   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 10
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > EMANA + QMANA - 10)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Config.Item("haras" + t.ChampionName).GetValue <bool>() && Player.Mana > RMANA + EMANA + QMANA + WMANA && OktwCommon.CanHarras())
                {
                    Program.CastSpell(Q, t);
                }
                else
                {
                    var qDmg = OktwCommon.GetKsDamage(t, Q);
                    var eDmg = E.GetDamage(t);
                    if (qDmg > t.Health)
                    {
                        Program.CastSpell(Q, t);
                    }
                    else if (qDmg + eDmg > t.Health && Player.Mana > QMANA + WMANA)
                    {
                        Program.CastSpell(Q, t);
                    }
                }
                if (!Program.None && Player.Mana > RMANA + EMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        Q.Cast(enemy, true);
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private void LogicR()
        {
            bool cast = false;

            if (Player.UnderTurret(true) && Config.Item("Rturrent", true).GetValue <bool>())
            {
                return;
            }


            foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(R.Range) && Player.Distance(target.Position) > Config.Item("Rrange", true).GetValue <Slider>().Value&& target.CountEnemiesInRange(Config.Item("Rcol", true).GetValue <Slider>().Value) == 1 && target.CountAlliesInRange(500) == 0 && OktwCommon.ValidUlt(target)))
            {
                if (OktwCommon.GetKsDamage(target, R) > target.Health)
                {
                    cast = true;
                    PredictionOutput output    = R.GetPrediction(target);
                    Vector2          direction = output.CastPosition.To2D() - Player.Position.To2D();
                    direction.Normalize();
                    List <Obj_AI_Hero> enemies = HeroManager.Enemies.Where(x => x.IsValidTarget()).ToList();
                    foreach (var enemy in enemies)
                    {
                        if (enemy.SkinName == target.SkinName || !cast)
                        {
                            continue;
                        }
                        PredictionOutput prediction        = R.GetPrediction(enemy);
                        Vector3          predictedPosition = prediction.CastPosition;
                        Vector3          v      = output.CastPosition - Player.ServerPosition;
                        Vector3          w      = predictedPosition - Player.ServerPosition;
                        double           c1     = Vector3.Dot(w, v);
                        double           c2     = Vector3.Dot(v, v);
                        double           b      = c1 / c2;
                        Vector3          pb     = Player.ServerPosition + ((float)b * v);
                        float            length = Vector3.Distance(predictedPosition, pb);
                        if (length < (Config.Item("Rcol", true).GetValue <Slider>().Value + enemy.BoundingRadius) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition))
                        {
                            cast = false;
                        }
                    }
                    if (cast)
                    {
                        R.CastOnUnit(target);
                    }
                }
            }
        }
Ejemplo n.º 12
0
        private static void LogicR()
        {
            if (Player.UnderTurret(true) && getCheckBoxItem(rMenu, "Rturrent"))
            {
                return;
            }
            if (Game.Time - WCastTime > 0.9 && getCheckBoxItem(rMenu, "autoR"))
            {
                foreach (
                    var target in
                    Program.Enemies.Where(target => target.LSIsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    var predictedHealth = target.Health - OktwCommon.GetIncomingDamage(target);
                    var Rdmg            = R.GetDamage(target, 1);

                    if (Rdmg > predictedHealth && !OktwCommon.IsSpellHeroCollision(target, R) &&
                        GetRealDistance(target) > bonusRange() + 200)
                    {
                        if (GetRealDistance(target) > bonusRange() + 300 + target.BoundingRadius &&
                            target.CountAlliesInRange(600) == 0 && Player.CountEnemiesInRange(400) == 0)
                        {
                            castR(target);
                        }
                        else if (target.CountEnemiesInRange(200) > 2)
                        {
                            R.Cast(target, true, true);
                        }
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private static void LogicE()
        {
            if (Player.Mana > RMANA + EMANA && getCheckBoxItem(eMenu, "autoE") && Game.Time - grabTime > 1)
            {
                foreach (
                    var enemy in
                    Program.Enemies.Where(enemy => enemy.LSIsValidTarget(E.Range) && !OktwCommon.CanMove(enemy)))
                {
                    E.Cast(enemy.Position);
                    return;
                }
                if (!Program.LagFree(1))
                {
                    return;
                }

                if (getCheckBoxItem(eMenu, "telE"))
                {
                    foreach (
                        var Object in
                        ObjectManager.Get <Obj_AI_Base>()
                        .Where(
                            Obj =>
                            Obj.IsEnemy && Obj.LSDistance(Player.ServerPosition) < E.Range &&
                            (Obj.HasBuff("teleport_target") || Obj.HasBuff("Pantheon_GrandSkyfall_Jump"))))
                    {
                        E.Cast(Object.Position);
                    }
                }

                if (Program.Combo && Player.IsMoving && getCheckBoxItem(eMenu, "comboE") &&
                    Player.Mana > RMANA + EMANA + WMANA)
                {
                    var t = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                    if (t.LSIsValidTarget(E.Range) && E.GetPrediction(t).CastPosition.LSDistance(t.Position) > 200 &&
                        (int)E.GetPrediction(t).Hitchance == 5)
                    {
                        E.CastIfWillHit(t, 2);
                        if (t.HasBuffOfType(BuffType.Slow))
                        {
                            Program.CastSpell(E, t);
                        }
                        else
                        {
                            if (E.GetPrediction(t).CastPosition.LSDistance(t.Position) > 200)
                            {
                                if (Player.Position.LSDistance(t.ServerPosition) > Player.Position.LSDistance(t.Position))
                                {
                                    if (t.Position.LSDistance(Player.ServerPosition) <
                                        t.Position.LSDistance(Player.Position))
                                    {
                                        Program.CastSpell(E, t);
                                    }
                                }
                                else
                                {
                                    if (t.Position.LSDistance(Player.ServerPosition) >
                                        t.Position.LSDistance(Player.Position))
                                    {
                                        Program.CastSpell(E, t);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private static void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, DamageType.Physical);

            if (t.LSIsValidTarget())
            {
                foreach (
                    var enemy in
                    Program.Enemies.Where(
                        enemy => enemy.LSIsValidTarget(W.Range) && enemy.LSDistance(Player) > bonusRange()))
                {
                    var comboDmg = OktwCommon.GetKsDamage(enemy, W);
                    if (R.IsReady() && Player.Mana > RMANA + WMANA + 20)
                    {
                        comboDmg += R.GetDamage(enemy, 1);
                    }
                    if (comboDmg > enemy.Health && OktwCommon.ValidUlt(enemy))
                    {
                        Program.CastSpell(W, enemy);
                        return;
                    }
                }


                if (Player.CountEnemiesInRange(bonusRange()) == 0)
                {
                    if (Program.Combo && Player.Mana > RMANA + WMANA + 10)
                    {
                        foreach (
                            var enemy in
                            Program.Enemies.Where(
                                enemy => enemy.LSIsValidTarget(W.Range) && GetRealDistance(enemy) > bonusRange())
                            .OrderBy(enemy => enemy.Health))
                        {
                            Program.CastSpell(W, enemy);
                        }
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + WMANA + WMANA + 40 && OktwCommon.CanHarras())
                    {
                        foreach (
                            var enemy in
                            Program.Enemies.Where(
                                enemy =>
                                enemy.LSIsValidTarget(W.Range) &&
                                getCheckBoxItem(wMenu, "haras" + enemy.NetworkId)))
                        {
                            Program.CastSpell(W, enemy);
                        }
                    }
                }

                if (!Program.None && Player.Mana > RMANA + WMANA &&
                    Player.CountEnemiesInRange(GetRealPowPowRange(t)) == 0)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(enemy => enemy.LSIsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (Config.Item("sup").GetValue <bool>() && (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit))
            {
                if (((Obj_AI_Base)Orbwalker.GetTarget()).IsMinion)
                {
                    args.Process = false;
                }
            }

            if (Program.Combo && !Config.Item("AACombo").GetValue <bool>())
            {
                var t = args.Target as Obj_AI_Hero;
                args.Process = false;
                if ((Player.GetAutoAttackDamage(t) * 2 > t.Health || Player.Mana < RMANA || !OktwCommon.CanMove(t)))
                {
                    args.Process = true;
                }
            }
        }
Ejemplo n.º 16
0
        private void afterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if (target.Type == GameObjectType.obj_AI_Hero)
            {
                var t = target as Obj_AI_Hero;
                if (E.IsReady() && Config.Item("autoE", true).GetValue <bool>() && t.IsValidTarget(E.Range) && t.CountEnemiesInRange(800) < 3)
                {
                    if (Program.Combo && Player.Mana > RMANA + EMANA)
                    {
                        E.Cast(t);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + QMANA + WMANA && Config.Item("harrasE", true).GetValue <bool>() && Config.Item("harras" + t.ChampionName).GetValue <bool>() && OktwCommon.CanHarras())
                    {
                        E.Cast(t);
                    }
                    else if (OktwCommon.GetKsDamage(t, E) > t.Health)
                    {
                        E.Cast(t);
                    }
                }
                if (Q.IsReady() && t.IsValidTarget(Q.Range))
                {
                    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);
                        }
                    }
                }
            }
            Jungle();
        }
Ejemplo n.º 17
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (ObjectManager.Player.HasBuff("Recall"))
            {
                return;
            }



            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target.IsValidTarget() && (Program.Farm || Config.Item("stun" + target.ChampionName).GetValue <bool>() || !HaveStun))
            {
                if (!HaveTibers && R.IsReady())
                {
                    if (Program.Combo && HaveStun && target.CountEnemiesInRange(400) > 1)
                    {
                        R.Cast(target, true, true);
                    }
                    else if (Config.Item("rCount").GetValue <Slider>().Value > 0 && Config.Item("rCount").GetValue <Slider>().Value <= target.CountEnemiesInRange(300))
                    {
                        R.Cast(target, true, true);
                    }
                    else if (Program.Combo && !W.IsReady() && !Q.IsReady() &&
                             Q.GetDamage(target) < target.Health &&
                             (target.CountEnemiesInRange(400) > 1 || R.GetDamage(target) + Q.GetDamage(target) > target.Health))
                    {
                        R.Cast(target, true, true);
                    }
                    else if (Program.Combo && Q.GetDamage(target) < target.Health && !OktwCommon.CanMove(target))
                    {
                        R.Cast(target, true, true);
                    }
                }
                if (W.IsReady() && (Program.Farm || Program.Combo))
                {
                    if (Program.Combo && HaveStun && target.CountEnemiesInRange(250) > 1)
                    {
                        W.Cast(target, true, true);
                    }
                    else if (!Q.IsReady())
                    {
                        W.Cast(target, true, true);
                    }
                    else if (target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Charm) ||
                             target.HasBuffOfType(BuffType.Fear) || target.HasBuffOfType(BuffType.Taunt))
                    {
                        W.Cast(target, true, true);
                    }
                }
                if (Q.IsReady() && (Program.Farm || Program.Combo))
                {
                    if (HaveStun && Program.Combo && target.CountEnemiesInRange(400) > 1 && (W.IsReady() || R.IsReady()))
                    {
                        return;
                    }
                    else
                    {
                        Q.Cast(target, true);
                    }
                }
            }
            if (Program.LagFree(1))
            {
                if (Config.Item("sup").GetValue <bool>())
                {
                    if (Q.IsReady() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && Player.Mana > RMANA + QMANA)
                    {
                        farmQ();
                    }
                }
                else
                {
                    if (Q.IsReady() && (!HaveStun || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear) && (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit || Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear))
                    {
                        farmQ();
                    }
                }
            }

            if (Program.LagFree(2))
            {
                SetMana();
                if (Config.Item("autoE").GetValue <bool>() && E.IsReady() && !HaveStun && Player.Mana > RMANA + EMANA + QMANA + WMANA && Orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LaneClear)
                {
                    E.Cast();
                }

                if (W.IsReady() && Player.InFountain() && !HaveStun)
                {
                    W.Cast(ObjectManager.Player, true, true);
                }
            }
            if (Program.LagFree(3))
            {
                if (Config.Item("tibers").GetValue <bool>() && HaveTibers)
                {
                    var BestEnemy = TargetSelector.GetTarget(2000, TargetSelector.DamageType.Magical);
                    if (BestEnemy.IsValidTarget(2000) && Game.Time - TibbersTimer > 2)
                    {
                        Player.IssueOrder(GameObjectOrder.MovePet, BestEnemy.Position);
                        R.CastOnUnit(BestEnemy);
                        TibbersTimer = Game.Time;
                    }
                }
                else
                {
                    Tibbers = null;
                }
            }
        }
Ejemplo n.º 18
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (SebbyLib.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   = Cache.GetMinions(Player.ServerPosition, Q.Range - 150);
                var farmPosition = Q.GetCircularFarmLocation(minionList, 150);
                if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 19
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                var wDmg = OktwCommon.GetKsDamage(t, W);
                if (wDmg > t.Health)
                {
                    W.Cast(t, true, true);
                    return;
                }
                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 (!SebbyLib.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 HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            W.Cast(enemy, true, true);
                        }
                    }
                }
            }
        }
Ejemplo n.º 20
0
        private void Survival()
        {
            if (Player.HealthPercent < 60 && (Seraph.IsReady() || Zhonya.IsReady() || CanUse(barrier)))
            {
                var dmg    = OktwCommon.GetIncomingDamage(Player, 1);
                var enemys = Player.CountEnemiesInRange(800);
                if (dmg > 0 || enemys > 0)
                {
                    if (CanUse(barrier) && getCheckBoxItem("Barrier"))
                    {
                        var value = 95 + Player.Level * 20;
                        if (dmg > value && Player.HealthPercent < 50)
                        {
                            Player.Spellbook.CastSpell(barrier, Player);
                        }
                        else if (Player.Health - dmg < enemys * Player.Level * 20)
                        {
                            Player.Spellbook.CastSpell(barrier, Player);
                        }
                        else if (Player.Health - dmg < Player.Level * 10)
                        {
                            Seraph.Cast();
                        }
                    }

                    if (Seraph.IsReady() && getCheckBoxItem("Seraph"))
                    {
                        var value = Player.Mana * 0.2 + 150;
                        if (dmg > value && Player.HealthPercent < 50)
                        {
                            Seraph.Cast();
                        }
                        else if (Player.Health - dmg < enemys * Player.Level * 20)
                        {
                            Seraph.Cast();
                        }
                        else if (Player.Health - dmg < Player.Level * 10)
                        {
                            Seraph.Cast();
                        }
                    }

                    if (Zhonya.IsReady() && getCheckBoxItem("Zhonya"))
                    {
                        if (dmg > Player.Level * 35)
                        {
                            Zhonya.Cast();
                        }
                        else if (Player.Health - dmg < enemys * Player.Level * 20)
                        {
                            Zhonya.Cast();
                        }
                        else if (Player.Health - dmg < Player.Level * 10)
                        {
                            Zhonya.Cast();
                        }
                    }
                }
            }


            if (!Solari.IsReady() && !FaceOfTheMountain.IsReady() && !CanUse(heal))
            {
                return;
            }

            foreach (
                var ally in
                Program.Allies.Where(
                    ally =>
                    ally.IsValid && !ally.IsDead && ally.HealthPercent < 50 &&
                    Player.Distance(ally.ServerPosition) < 700))
            {
                var dmg    = OktwCommon.GetIncomingDamage(ally, 1);
                var enemys = ally.CountEnemiesInRange(700);
                if (dmg == 0 && enemys == 0)
                {
                    continue;
                }

                if (CanUse(heal) && getCheckBoxItem("Heal"))
                {
                    if (!getCheckBoxItem("AllyHeal") && !ally.IsMe)
                    {
                        return;
                    }

                    if (ally.Health - dmg < enemys * ally.Level * 15)
                    {
                        Player.Spellbook.CastSpell(heal, ally);
                    }
                    else if (ally.Health - dmg < ally.Level * 10)
                    {
                        Player.Spellbook.CastSpell(heal, ally);
                    }
                }

                if (getCheckBoxItem("Solari") && Solari.IsReady() && Player.Distance(ally.ServerPosition) < Solari.Range)
                {
                    var value = 75 + 15 * Player.Level;
                    if (dmg > value && Player.HealthPercent < 50)
                    {
                        Solari.Cast();
                    }
                    else if (ally.Health - dmg < enemys * ally.Level * 15)
                    {
                        Solari.Cast();
                    }
                    else if (ally.Health - dmg < ally.Level * 10)
                    {
                        Solari.Cast();
                    }
                }

                if (getCheckBoxItem("FaceOfTheMountain") && FaceOfTheMountain.IsReady() &&
                    Player.Distance(ally.ServerPosition) < FaceOfTheMountain.Range)
                {
                    var value = 0.1 * Player.MaxHealth;
                    if (dmg > value && Player.HealthPercent < 50)
                    {
                        FaceOfTheMountain.Cast(ally);
                    }
                    else if (ally.Health - dmg < enemys * ally.Level * 15)
                    {
                        FaceOfTheMountain.Cast(ally);
                    }
                    else if (ally.Health - dmg < ally.Level * 10)
                    {
                        FaceOfTheMountain.Cast(ally);
                    }
                }
            }
        }
Ejemplo n.º 21
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget())
            {
                missileManager.Target = t;
                var qDmg = OktwCommon.GetKsDamage(t, Q) * 1.9;
                if (SebbyLib.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 && Config.Item("haras" + t.ChampionName).GetValue <bool>() && !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 HeroManager.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   = Cache.GetMinions(Player.ServerPosition, Q.Range);
                var farmPosition = Q.GetLineFarmLocation(minionList, Q.Width);
                if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 22
0
        private void Offensive()
        {
            if (Botrk.IsReady() && getCheckBoxItem("Botrk"))
            {
                var t = TargetSelector.GetTarget(Botrk.Range, DamageType.Physical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("BotrkKS") &&
                        Player.CalcDamage(t, DamageType.Physical, t.MaxHealth * 0.1) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkLS") &&
                        Player.Health < Player.MaxHealth * 0.5 - OktwCommon.GetIncomingDamage(Player))
                    {
                        Botrk.Cast(t);
                    }
                    if (getCheckBoxItem("BotrkCombo") && Program.Combo)
                    {
                        Botrk.Cast(t);
                    }
                }
            }

            if (Hextech.IsReady() && getCheckBoxItem("Hextech"))
            {
                var t = TargetSelector.GetTarget(Hextech.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("HextechKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 150 + Player.FlatMagicDamageMod * 0.4) >
                        t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Hextech.Cast(t);
                    }
                    if (getCheckBoxItem("HextechCombo") && Program.Combo)
                    {
                        Hextech.Cast(t);
                    }
                }
            }

            if (Program.Combo && FrostQueen.IsReady() && getCheckBoxItem("FrostQueen") &&
                Player.CountEnemiesInRange(800) > 0)
            {
                FrostQueen.Cast();
            }

            if (Cutlass.IsReady() && getCheckBoxItem("Cutlass"))
            {
                var t = TargetSelector.GetTarget(Cutlass.Range, DamageType.Magical);
                if (t.IsValidTarget())
                {
                    if (getCheckBoxItem("CutlassKS") &&
                        Player.CalcDamage(t, DamageType.Magical, 100) > t.Health - OktwCommon.GetIncomingDamage(t))
                    {
                        Cutlass.Cast(t);
                    }
                    if (getCheckBoxItem("CutlassCombo") && Program.Combo)
                    {
                        Cutlass.Cast(t);
                    }
                }
            }

            if (Youmuus.IsReady() && getCheckBoxItem("Youmuus"))
            {
                var t = Orbwalker.LastTarget;

                if (t.IsValidTarget() && t is AIHeroClient)
                {
                    if (getCheckBoxItem("YoumuusKS") && t.Health < Player.MaxHealth)
                    {
                        Youmuus.Cast();
                    }
                    if (getCheckBoxItem("YoumuusCombo") && Program.Combo)
                    {
                        Youmuus.Cast();
                    }
                }
            }

            if (getCheckBoxItem("Hydra"))
            {
                if (Hydra.IsReady() && Player.CountEnemiesInRange(Hydra.Range) > 0)
                {
                    Hydra.Cast();
                }
                else if (Hydra2.IsReady() && Player.CountEnemiesInRange(Hydra2.Range) > 0)
                {
                    Hydra2.Cast();
                }
            }
        }
Ejemplo n.º 23
0
        private void LogicR()
        {
            if (Config.Item("autoR", true).GetValue <bool>() && Sheen())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

                if (target.IsValidTargetLS(R.Range) && target.HealthPercent < Config.Item("RmaxHp", true).GetValue <Slider>().Value&& OktwCommon.ValidUlt(target))
                {
                    if (Config.Item("Raa", true).GetValue <bool>() && LeagueSharp.Common.Orbwalking.InAutoAttackRange(target))
                    {
                        return;
                    }

                    var harasStack = Config.Item("harasStack", true).GetValue <Slider>().Value;
                    var comboStack = Config.Item("comboStack", true).GetValue <Slider>().Value;
                    var countR     = GetRStacks();

                    var Rdmg = R.GetDamage(target);
                    Rdmg = Rdmg + target.CountAlliesInRange(500) * Rdmg;

                    if (R.GetDamage(target) > target.Health - OktwCommon.GetIncomingDamage(target))
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Combo && Rdmg * 2 > target.Health && Player.Mana > RMANA * 3)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (countR < comboStack + 2 && Player.Mana > RMANA * 3)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(R.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            R.Cast(enemy, true);
                        }
                    }

                    if (target.HasBuffOfType(BuffType.Slow) && Config.Item("Rslow", true).GetValue <bool>() && countR < comboStack + 1 && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Combo && countR < comboStack && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Farm && countR < harasStack && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                }
            }
        }
Ejemplo n.º 24
0
        private static void PositionHelper()
        {
            if (Player.ChampionName == "Draven" || !Config.Item("positioningAssistant").GetValue <bool>() || AIOmode == 2)
            {
                return;
            }

            if (Player.IsMelee)
            {
                Orbwalker.SetOrbwalkingPoint(new Vector3());
                return;
            }

            foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsMelee && enemy.IsValidTarget(dodgeRange) && enemy.IsFacing(Player) && Config.Item("posAssistant" + enemy.ChampionName).GetValue <bool>()))
            {
                var points = OktwCommon.CirclePoints(20, 250, Player.Position);

                if (Player.FlatMagicDamageMod > Player.FlatPhysicalDamageMod)
                {
                    OktwCommon.blockAttack = true;
                }


                Vector3 bestPoint = Vector3.Zero;

                foreach (var point in points)
                {
                    if (point.IsWall() || point.UnderTurret(true))
                    {
                        Orbwalker.SetOrbwalkingPoint(new Vector3());
                        return;
                    }

                    if (enemy.Distance(point) > dodgeRange && (bestPoint == Vector3.Zero || Game.CursorPos.Distance(point) < Game.CursorPos.Distance(bestPoint)))
                    {
                        bestPoint = point;
                    }
                }

                if (enemy.Distance(bestPoint) > dodgeRange)
                {
                    Orbwalker.SetOrbwalkingPoint(bestPoint);
                }
                else
                {
                    var fastPoint = enemy.ServerPosition.Extend(Player.ServerPosition, dodgeRange);
                    if (fastPoint.CountEnemiesInRange(dodgeRange) <= Player.CountEnemiesInRange(dodgeRange))
                    {
                        Orbwalker.SetOrbwalkingPoint(fastPoint);
                    }
                }

                dodgeTime = Game.Time;
                return;
            }

            Orbwalker.SetOrbwalkingPoint(new Vector3());
            if (OktwCommon.blockAttack == true)
            {
                OktwCommon.blockAttack = false;
            }
        }
Ejemplo n.º 25
0
        private void LogicE()
        {
            if (Sheen())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTargetLS())
                {
                    var qDmg = Q.GetDamage(t);
                    var eDmg = OktwCommon.GetKsDamage(t, E);
                    if (eDmg > t.Health)
                    {
                        Program.CastSpell(E, t);
                    }
                    else if (eDmg + qDmg > t.Health && Q.IsReady())
                    {
                        Program.CastSpell(E, t);
                    }
                    else if (Program.Combo && ObjectManager.Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(E, t);
                    }
                    else if (Program.Farm && Config.Item("HarrasE", true).GetValue <bool>() && Player.Mana > RMANA + WMANA + EMANA + QMANA + EMANA)
                    {
                        Program.CastSpell(E, t);
                    }
                    else if ((Program.Combo || Program.Farm) && ObjectManager.Player.Mana > RMANA + WMANA + EMANA)
                    {
                        foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTargetLS(E.Range) && !OktwCommon.CanMove(enemy)))
                        {
                            E.Cast(enemy, true);
                        }
                    }
                }
                else if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA)
                {
                    var minionList   = Cache.GetMinions(Player.ServerPosition, E.Range);
                    var farmPosition = E.GetLineFarmLocation(minionList, E.Width);

                    if (farmPosition.MinionsHit >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                    {
                        E.Cast(farmPosition.Position);
                    }
                }
            }
        }
Ejemplo n.º 26
0
        public static void CastSpell(Spell QWER, Obj_AI_Base target)
        {
            int       predIndex = 0;
            HitChance hitchance = HitChance.Low;

            if (QWER.Slot == SpellSlot.Q)
            {
                predIndex = Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("QHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.W)
            {
                predIndex = Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("WHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.E)
            {
                predIndex = Config.Item("Epred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("EHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }
            else if (QWER.Slot == SpellSlot.R)
            {
                predIndex = Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex;
                if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 0)
                {
                    hitchance = HitChance.VeryHigh;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 1)
                {
                    hitchance = HitChance.High;
                }
                else if (Config.Item("RHitChance", true).GetValue <StringList>().SelectedIndex == 2)
                {
                    hitchance = HitChance.Medium;
                }
            }


            if (predIndex == 4)
            {
                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    Core.PredictionAio.CCast(QWER, target, hitchance);
                }
                else if (QWER.Type == SkillshotType.SkillshotLine)
                {
                    Core.PredictionAio.LCast(QWER, target, hitchance);
                }
                else
                {
                    QWER.Cast(target);
                }
            }

            if (predIndex == 3)
            {
                SebbyLib.Movement.SkillshotType CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    //CoreType2 = SebbyLib.Movement.SkillshotType.SkillshotCircle;
                    //aoe2 = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                {
                    aoe2 = true;
                }

                var predInput2 = new SebbyLib.Movement.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Movement.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                {
                    return;
                }

                if ((int)hitchance == 6)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Movement.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
            }
            else if (predIndex == 1)
            {
                SebbyLib.Prediction.SkillshotType CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotLine;
                bool aoe2 = false;

                if (QWER.Type == SkillshotType.SkillshotCircle)
                {
                    CoreType2 = SebbyLib.Prediction.SkillshotType.SkillshotCircle;
                    aoe2      = true;
                }

                if (QWER.Width > 80 && !QWER.Collision)
                {
                    aoe2 = true;
                }

                var predInput2 = new SebbyLib.Prediction.PredictionInput
                {
                    Aoe       = aoe2,
                    Collision = QWER.Collision,
                    Speed     = QWER.Speed,
                    Delay     = QWER.Delay,
                    Range     = QWER.Range,
                    From      = Player.ServerPosition,
                    Radius    = QWER.Width,
                    Unit      = target,
                    Type      = CoreType2
                };
                var poutput2 = SebbyLib.Prediction.Prediction.GetPrediction(predInput2);

                //var poutput2 = QWER.GetPrediction(target);

                if (QWER.Speed != float.MaxValue && OktwCommon.CollisionYasuo(Player.ServerPosition, poutput2.CastPosition))
                {
                    return;
                }

                if ((int)hitchance == 6)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.VeryHigh)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                    else if (predInput2.Aoe && poutput2.AoeTargetsHitCount > 1 && poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 5)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.High)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                else if ((int)hitchance == 4)
                {
                    if (poutput2.Hitchance >= SebbyLib.Prediction.HitChance.Medium)
                    {
                        QWER.Cast(poutput2.CastPosition);
                    }
                }
                if (Game.Time - DrawSpellTime > 0.5)
                {
                    DrawSpell     = QWER;
                    DrawSpellTime = Game.Time;
                }
                DrawSpellPos = poutput2;
            }
            else if (predIndex == 0)
            {
                QWER.CastIfHitchanceEquals(target, hitchance);
            }
            else if (predIndex == 2)
            {
                if (target is Obj_AI_Hero && target.IsValid)
                {
                    var t = target as Obj_AI_Hero;
                    QWER.SPredictionCast(t, hitchance);
                }
                else
                {
                    QWER.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
Ejemplo n.º 27
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget())
            {
                if (Program.Combo && Player.Mana > RMANA + WMANA + EMANA)
                {
                    Program.CastSpell(W, t);
                }
                else if (Program.Farm && Config.Item("harrasW", true).GetValue <bool>() && Config.Item("haras" + t.ChampionName).GetValue <bool>() && (Player.Mana > Player.MaxMana * 0.8 || Config.Item("apEz", true).GetValue <bool>()) && Player.ManaPercent > Config.Item("HarassMana", true).GetValue <Slider>().Value&& OktwCommon.CanHarras())
                {
                    Program.CastSpell(W, t);
                }
                else
                {
                    var qDmg = Q.GetDamage(t);
                    var wDmg = OktwCommon.GetKsDamage(t, W);
                    if (wDmg > t.Health)
                    {
                        Program.CastSpell(W, t);
                        OverKill = Game.Time;
                    }
                    else if (wDmg + qDmg > t.Health && Q.IsReady())
                    {
                        Program.CastSpell(W, t);
                    }
                }

                if (!Program.None && Player.Mana > RMANA + WMANA + EMANA)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                    {
                        W.Cast(enemy, true);
                    }
                }
            }
        }
Ejemplo n.º 28
0
        private static void OnDraw(EventArgs args)
        {
            if (!SPredictionLoad && (int)Game.Time % 2 == 0 && (Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex == 2 || Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex == 2 ||
                                                                Config.Item("Epred", true).GetValue <StringList>().SelectedIndex == 2 || Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex == 2))
            {
                drawText("PRESS F5 TO LOAD SPREDICTION", Player.Position, System.Drawing.Color.Yellow, -300);
            }

            if (Program.AIOmode != 2 && spellFarmTimer + 1 > Game.Time && Config.Item("showNot").GetValue <bool>() && Config.Item("spellFarm") != null)
            {
                if (Config.Item("spellFarm").GetValue <bool>())
                {
                    DrawFontTextScreen(TextBold, "SPELLS FARM ON", Drawing.Width * 0.5f, Drawing.Height * 0.4f, Color.GreenYellow);
                }
                else
                {
                    DrawFontTextScreen(TextBold, "SPELLS FARM OFF", Drawing.Width * 0.5f, Drawing.Height * 0.4f, Color.OrangeRed);
                }
            }

            if (AIOmode == 1 || Config.Item("disableDraws").GetValue <bool>())
            {
                return;
            }

            if (Game.Time - dodgeTime < 0.01 && (int)(Game.Time * 10) % 2 == 0 && !Player.IsMelee && Config.Item("positioningAssistant").GetValue <bool>() && Config.Item("positioningAssistantDraw").GetValue <bool>())
            {
                Render.Circle.DrawCircle(Player.Position, dodgeRange, System.Drawing.Color.DimGray, 1);
                drawText("Anti-Melle Positioning Assistant", Player.Position, System.Drawing.Color.Gray);
            }

            if (Game.Time - DrawSpellTime < 0.5 && Config.Item("debugPred").GetValue <bool>() && (Config.Item("Qpred", true).GetValue <StringList>().SelectedIndex == 1 || Config.Item("Wpred", true).GetValue <StringList>().SelectedIndex == 1 ||
                                                                                                  Config.Item("Epred", true).GetValue <StringList>().SelectedIndex == 1 || Config.Item("Rpred", true).GetValue <StringList>().SelectedIndex == 1))
            {
                if (DrawSpell.Type == SkillshotType.SkillshotLine)
                {
                    OktwCommon.DrawLineRectangle(DrawSpellPos.CastPosition, Player.Position, (int)DrawSpell.Width, 1, System.Drawing.Color.DimGray);
                }
                if (DrawSpell.Type == SkillshotType.SkillshotCircle)
                {
                    Render.Circle.DrawCircle(DrawSpellPos.CastPosition, DrawSpell.Width, System.Drawing.Color.DimGray, 1);
                }

                drawText("Aiming " + DrawSpellPos.Hitchance, Player.Position.Extend(DrawSpellPos.CastPosition, 400), System.Drawing.Color.Gray);
            }

            if (AIOmode != 1 && Config.Item("timer").GetValue <bool>() && jungler != null)
            {
                if (jungler == Player)
                {
                    drawText("Jungler not detected", Player.Position, System.Drawing.Color.Yellow, 100);
                }
                else if (jungler.IsDead)
                {
                    drawText("Jungler dead " + timer, Player.Position, System.Drawing.Color.Cyan, 100);
                }
                else if (jungler.IsVisible)
                {
                    drawText("Jungler visable " + timer, Player.Position, System.Drawing.Color.GreenYellow, 100);
                }
                else
                {
                    if (timer > 0)
                    {
                        drawText("Jungler in jungle " + timer, Player.Position, System.Drawing.Color.Orange, 100);
                    }
                    else if ((int)(Game.Time * 10) % 2 == 0)
                    {
                        drawText("BE CAREFUL " + timer, Player.Position, System.Drawing.Color.OrangeRed, 100);
                    }
                    if (Game.Time - JungleTime >= 1)
                    {
                        timer      = timer - 1;
                        JungleTime = Game.Time;
                    }
                }
            }
        }
Ejemplo n.º 29
0
        private static void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, DamageType.Physical);

            if (t.IsValidTarget())
            {
                if (!getCheckBoxItem(wMenu, "autoWcc") && !Q.IsReady())
                {
                    if (W.GetDamage(t) > t.Health)
                    {
                        Program.CastSpell(W, t);
                    }
                    else if (Program.Combo && Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(W, t);
                    }
                }

                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 > getSliderItem(farmMenu, "Mana") && getCheckBoxItem(farmMenu, "farmW") && Player.Mana > RMANA + WMANA)
            {
                var minionList   = Cache.GetMinions(Player.ServerPosition, W.Range);
                var farmPosition = W.GetCircularFarmLocation(minionList, W.Width);

                if (farmPosition.MinionsHit > getSliderItem(farmMenu, "LCminions"))
                {
                    W.Cast(farmPosition.Position);
                }
            }
        }
Ejemplo n.º 30
0
        private void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
            if (t.IsValidTarget())
            {
 
                foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && enemy.Distance(Player) > bonusRange()))
                {
                    var comboDmg = OktwCommon.GetKsDamage(enemy, W);
                    if (R.IsReady() && Player.Mana > RMANA + WMANA + 20)
                    {
                        comboDmg += R.GetDamage(enemy, 1);
                    }
                    if (comboDmg > enemy.Health && OktwCommon.ValidUlt(enemy))
                    {
                        Program.CastSpell(W, enemy);
                        return;
                    }
                }
                

                if (Player.CountEnemiesInRange(bonusRange()) == 0)
                {
                    if (Program.Combo && Player.Mana > RMANA + WMANA + 10)
                    {
                        foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && GetRealDistance(enemy) > bonusRange() ).OrderBy(enemy => enemy.Health))
                            Program.CastSpell(W, enemy);
                    }
                    else if (Program.Farm && Player.Mana > RMANA + EMANA + WMANA + WMANA + 40 && OktwCommon.CanHarras())
                    {
                        foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && Config.Item("haras" + enemy.ChampionName).GetValue<bool>()))
                            Program.CastSpell(W, enemy);
                    }
                }
                if (!Program.None && Player.Mana > RMANA + WMANA && Player.CountEnemiesInRange(GetRealPowPowRange(t)) == 0)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && !OktwCommon.CanMove(enemy)))
                        W.Cast(enemy, true);
                }
            }
        }