コード例 #1
0
ファイル: Ezreal.cs プロジェクト: yashine59fr/Port
        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 HeroManager.Enemies.Where(target => target.IsValidTargetLS(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    double predictedHealth = target.Health - OktwCommon.GetIncomingDamage(target);

                    if (Config.Item("Rcc", true).GetValue <bool>() && target.IsValidTargetLS(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);
                    }
                }
            }
        }
コード例 #2
0
        private void LogicR()
        {
            if (Game.Time - WCastTime > 0.9 && Config.Item("autoR", true).GetValue <bool>())
            {
                bool cast = false;
                foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    float predictedHealth = target.Health + target.HPRegenRate * 2;
                    var   Rdmg            = R.GetDamage(target, 1);

                    if (Rdmg > predictedHealth)
                    {
                        cast = true;
                        PredictionOutput output    = R.GetPrediction(target);
                        Vector2          direction = output.CastPosition.To2D() - Player.Position.To2D();
                        direction.Normalize();
                        List <Obj_AI_Hero> enemies = Program.Enemies.Where(x => x.IsEnemy && 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 < (R.Width + 150 + enemy.BoundingRadius / 2) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition))
                            {
                                cast = false;
                            }
                        }

                        if (cast && GetRealDistance(target) > bonusRange() + 300 + target.BoundingRadius && target.CountAlliesInRange(600) == 0 && Player.CountEnemiesInRange(400) == 0)
                        {
                            castR(target);
                        }
                        else if (cast && target.CountEnemiesInRange(200) > 2 && GetRealDistance(target) > bonusRange() + 200 + target.BoundingRadius)
                        {
                            R.Cast(target, true, true);
                        }
                    }
                }
            }
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: chienhao10/PortAIO
        private static void LogicW()
        {
            var t = TargetSelector.GetTarget(W.Range, 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) &&
                                getCheckBoxItem(wMenu, "haras" + enemy.ChampionName)))
                        {
                            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);
                    }
                }
            }
        }
コード例 #4
0
ファイル: Kalista.cs プロジェクト: sadnecc/LeagueRepo
        private void LogicE()
        {
            var  countE     = Config.Item("countE", true).GetValue <Slider>().Value;
            bool eBigMinion = Config.Item("minionE", true).GetValue <bool>();
            int  count      = 0;
            int  outRange   = 0;


            var minions = Cache.GetMinions(Player.ServerPosition, E.Range - 50);

            foreach (var minion in minions.Where(minion => minion.IsValidTarget(E.Range) && minion.HealthPercent < 80))
            {
                var eDmg = E.GetDamage(minion);
                if (minion.Health < eDmg - minion.HPRegenRate && eDmg > 0)
                {
                    if (GetPassiveTime(minion) > 0.5 && HealthPrediction.GetHealthPrediction(minion, 300, 50) > minion.GetAutoAttackDamage(minion))
                    {
                        count++;
                        if (!Orbwalking.InAutoAttackRange(minion))
                        {
                            outRange++;
                        }
                        if (eBigMinion)
                        {
                            var minionName = minion.BaseSkinName.ToLower();
                            if (minionName.Contains("siege") || minionName.Contains("super"))
                            {
                                outRange++;
                            }
                        }
                    }
                }
            }

            bool near700 = Player.CountEnemiesInRange(700) == 0;

            foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(E.Range) && target.HasBuff("kalistaexpungemarker") && OktwCommon.ValidUlt(target)))
            {
                var eDmg = GetEdmg(target);
                if (target.Health < eDmg)
                {
                    CastE();
                }
                if (0 < eDmg && count > 0 && Config.Item("Ekillmin", true).GetValue <bool>())
                {
                    CastE();
                }
                if (GetEStacks(target) >= countE && (GetPassiveTime(target) < 1 || near700) && Player.Mana > RMANA + EMANA)
                {
                    CastE();
                }
            }

            if (Program.Farm && count > 0 && Config.Item("farmE", true).GetValue <bool>())
            {
                if (outRange > 0)
                {
                    CastE();
                }
                if ((count >= Config.Item("farmEcount", true).GetValue <Slider>().Value || ((Player.UnderTurret(false) && !Player.UnderTurret(true)) && Player.Mana > RMANA + QMANA + EMANA)))
                {
                    CastE();
                }
            }
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: sadnecc/CHportcn
        private void LogicR()
        {
            bool cast = false;

            if (Player.UnderTurret(true) && getCheckBoxItem(rMenu, "Rturrent"))
            {
                return;
            }


            foreach (var target in Program.Enemies.Where(target => target.LSIsValidTarget(R.Range) && Player.LSDistance(target.Position) > getSliderItem(rMenu, "Rrange") && target.LSCountEnemiesInRange(getSliderItem(rMenu, "Rcol")) == 1 && target.CountAlliesInRange(500) == 0 && OktwCommon.ValidUlt(target)))
            {
                if (target.Health < R.GetDamage(target) * 0.6f)
                {
                    cast = true;
                    PredictionOutput output    = R.GetPrediction(target);
                    Vector2          direction = output.CastPosition.LSTo2D() - Player.Position.LSTo2D();
                    direction.Normalize();
                    List <AIHeroClient> enemies = Program.Enemies.Where(x => x.LSIsValidTarget()).ToList();
                    foreach (var enemy in enemies)
                    {
                        if (enemy.BaseSkinName == target.BaseSkinName || !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 < (getSliderItem(rMenu, "Rcol") + enemy.BoundingRadius) && Player.LSDistance(predictedPosition) < Player.LSDistance(target.ServerPosition))
                        {
                            cast = false;
                        }
                    }
                    if (cast)
                    {
                        R.CastOnUnit(target);
                    }
                }
            }
        }
コード例 #6
0
        private void LogicR()
        {
            if (Player.UnderTurret(true) && rMenu["Rturrent"].Cast <CheckBox>().CurrentValue)
            {
                return;
            }
            if (Game.Time - WCastTime > 0.9 && rMenu["autoR"].Cast <CheckBox>().CurrentValue)
            {
                foreach (var target in HeroManager.Enemies.Where(target => target.LSIsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    if (!target.IsVisible || !target.IsHPBarRendered)
                    {
                        return;
                    }
                    var predictedHealth = target.Health - OktwCommon.GetIncomingDamage(target);
                    var Rdmg            = RDamage(target);

                    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.LSCountEnemiesInRange(200) > 2)
                        {
                            R.Cast(target, true, true);
                        }
                    }
                }
            }
        }
コード例 #7
0
 private void LogicR()
 {
     if (Config.Item("autoR", true).GetValue <bool>())
     {
         bool cast = false;
         foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
         {
             if (Config.Item("autoRinter", true).GetValue <bool>() && target.IsChannelingImportantSpell())
             {
                 R.Cast(target);
             }
             if (target.CountEnemiesInRange(250) > 2 && Config.Item("autoRaoe", true).GetValue <bool>() && Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
             {
                 Program.CastSpell(R, target);
             }
             if (OktwCommon.GetKsDamage(target, R) > target.Health - OktwCommon.GetIncomingDamage(target) && target.CountAlliesInRange(600) == 0 && target.Distance(Player.Position) > 1000)
             {
                 cast = true;
                 PredictionOutput output    = R.GetPrediction(target);
                 Vector2          direction = output.CastPosition.To2D() - Player.Position.To2D();
                 direction.Normalize();
                 List <Obj_AI_Hero> enemies = Program.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 < (R.Width + 150 + enemy.BoundingRadius / 2) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition))
                     {
                         cast = false;
                     }
                 }
                 if (cast)
                 {
                     Program.CastSpell(R, target);
                 }
             }
         }
     }
     foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(R.Range) && !OktwCommon.ValidUlt(enemy)))
     {
         if (Player.Health < Player.MaxHealth * 0.4 && enemy.IsValidTarget(270) && enemy.IsMelee && Config.Item("GapCloser" + enemy.ChampionName).GetValue <bool>())
         {
             R.Cast(enemy);
             Program.debug("R Meele");
         }
     }
 }
コード例 #8
0
ファイル: Caitlyn.cs プロジェクト: happymaj00r/Port
        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 <AIHeroClient> enemies = HeroManager.Enemies.Where(x => x.IsValidTarget()).ToList();
                    foreach (var enemy in enemies)
                    {
                        if (enemy.BaseSkinName == target.BaseSkinName || !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);
                    }
                }
            }
        }
コード例 #9
0
        private void LogicR()
        {
            bool cast = false;

            foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target) && target.CountEnemiesInRange(500) == 1 && target.CountAlliesInRange(500) == 0))
            {
                if (OktwCommon.GetKsDamage(target, R) > target.Health && GetRealDistance(target) > bonusRange() + 400 + target.BoundingRadius)
                {
                    cast = true;
                    PredictionOutput output    = R.GetPrediction(target);
                    Vector2          direction = output.CastPosition.To2D() - Player.Position.To2D();
                    direction.Normalize();
                    List <Obj_AI_Hero> enemies = Program.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 < (400 + enemy.BoundingRadius) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition))
                        {
                            cast = false;
                        }
                    }
                    if (cast)
                    {
                        R.CastOnUnit(target);
                    }
                }
            }
        }
コード例 #10
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (Player.HasBuff("Recall"))
            {
                return;
            }

            HaveStun = Player.HasBuff("pyromania_particle");

            SetMana();

            if (R.IsReady() && (Program.LagFree(1) || Program.LagFree(3)) && !HaveTibers)
            {
                var realRange = R.Range;

                if (flash.IsReady())
                {
                    realRange = FR.Range;
                }

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

                        if (Rmode == 2)
                        {
                            continue;
                        }

                        var poutput  = R.GetPrediction(enemy, true);
                        var aoeCount = poutput.AoeTargetsHitCount;

                        if (Rmode == 1)
                        {
                            R.Cast(poutput.CastPosition);
                        }

                        if (Rmode == 3 && HaveStun)
                        {
                            R.Cast(poutput.CastPosition);
                        }

                        if (aoeCount >= Config.Item("rCount", true).GetValue <Slider>().Value&& Config.Item("rCount", true).GetValue <Slider>().Value > 0)
                        {
                            R.Cast(poutput.CastPosition);
                        }
                        else if (Program.Combo && HaveStun && Config.Item("autoRcombo", true).GetValue <bool>())
                        {
                            R.Cast(poutput.CastPosition);
                        }
                        else if (Config.Item("autoRks", true).GetValue <bool>())
                        {
                            var comboDmg = OktwCommon.GetKsDamage(enemy, R);

                            if (W.IsReady() && RMANA + WMANA < Player.Mana)
                            {
                                comboDmg += W.GetDamage(enemy);
                            }

                            if (Q.IsReady() && RMANA + WMANA + QMANA < Player.Mana)
                            {
                                comboDmg += Q.GetDamage(enemy);
                            }

                            if (enemy.Health < comboDmg)
                            {
                                R.Cast(poutput.CastPosition);
                            }
                        }
                    }
                    else if (HaveStun && flash.IsReady())
                    {
                        var poutputFlas   = FR.GetPrediction(enemy, true);
                        var aoeCountFlash = poutputFlas.AoeTargetsHitCount;
                        if (HaveStun && aoeCountFlash >= Config.Item("rCountFlash", true).GetValue <Slider>().Value&& Config.Item("rCountFlash", true).GetValue <Slider>().Value > 0)
                        {
                            Player.Spellbook.CastSpell(flash, poutputFlas.CastPosition);
                            R.Cast(poutputFlas.CastPosition);
                        }
                    }
                }
            }

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

            if (t.IsValidTarget() && Program.LagFree(2))
            {
                if (Q.IsReady() && Config.Item("autoQ", true).GetValue <bool>())
                {
                    if (Program.Combo && RMANA + WMANA < Player.Mana)
                    {
                        Q.Cast(t);
                    }
                    else if (Program.Farm && RMANA + WMANA + QMANA < Player.Mana && Config.Item("harrasQ", true).GetValue <bool>())
                    {
                        Q.Cast(t);
                    }
                    else
                    {
                        var qDmg = OktwCommon.GetKsDamage(t, Q);
                        var wDmg = W.GetDamage(t);
                        if (qDmg > t.Health)
                        {
                            Q.Cast(t);
                        }
                        else if (qDmg + wDmg > t.Health && Player.Mana > QMANA + WMANA)
                        {
                            Q.Cast(t);
                        }
                    }
                }
                if (W.IsReady() && Config.Item("autoW", true).GetValue <bool>() && t.IsValidTarget(W.Range))
                {
                    var poutput  = W.GetPrediction(t, true);
                    var aoeCount = poutput.AoeTargetsHitCount;

                    if (Program.Combo && RMANA + WMANA < Player.Mana)
                    {
                        W.Cast(poutput.CastPosition);
                    }
                    else if (Program.Farm && RMANA + WMANA + QMANA < Player.Mana && Config.Item("harrasW", true).GetValue <bool>())
                    {
                        W.Cast(poutput.CastPosition);
                    }
                    else
                    {
                        var wDmg = OktwCommon.GetKsDamage(t, W);
                        var qDmg = Q.GetDamage(t);
                        if (wDmg > t.Health)
                        {
                            W.Cast(poutput.CastPosition);
                        }
                        else if (qDmg + wDmg > t.Health && Player.Mana > QMANA + WMANA)
                        {
                            W.Cast(poutput.CastPosition);
                        }
                    }
                }
            }
            else if (Q.IsReady() || W.IsReady())
            {
                if (Config.Item("farmQ", true).GetValue <bool>())
                {
                    if (Config.Item("supportMode", true).GetValue <bool>())
                    {
                        if (Program.LaneClear && Player.Mana > RMANA + QMANA)
                        {
                            farm();
                        }
                    }
                    else
                    {
                        if ((!HaveStun || Program.LaneClear) && Program.Farm)
                        {
                            farm();
                        }
                    }
                }
            }

            if (Program.LagFree(3))
            {
                if (!HaveStun)
                {
                    if (E.IsReady() && !Program.LaneClear && Config.Item("autoE", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + QMANA + WMANA)
                    {
                        E.Cast();
                    }
                    else if (W.IsReady() && Player.InFountain())
                    {
                        W.Cast(Player.Position);
                    }
                }
                if (R.IsReady())
                {
                    if (Config.Item("tibers", true).GetValue <bool>() && HaveTibers && Tibbers != null && Tibbers.IsValid)
                    {
                        var enemy = HeroManager.Enemies.Where(x => x.IsValidTarget() && Tibbers.Distance(x.Position) < 1000 && !x.UnderTurret(true)).OrderBy(x => x.Distance(Tibbers)).FirstOrDefault();
                        if (enemy != null)
                        {
                            if (Tibbers.Distance(enemy.Position) > 200)
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, enemy);
                            }
                            else
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, enemy);
                            }
                        }
                        else
                        {
                            var annieTarget = Orbwalker.GetTarget() as Obj_AI_Base;
                            if (annieTarget != null)
                            {
                                if (Tibbers.Distance(annieTarget.Position) > 200)
                                {
                                    EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, annieTarget);
                                }
                                else
                                {
                                    EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, annieTarget);
                                }
                            }
                            else if (Tibbers.UnderTurret(true))
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.MovePet, Player);
                            }
                        }
                    }
                    else
                    {
                        Tibbers = null;
                    }
                }
            }
        }
コード例 #11
0
ファイル: Urgot.cs プロジェクト: Burbb/Portaio
 private static void LogicR()
 {
     R.Range = 400 + 150 * R.Level;
     if (Player.UnderTurret(false) && !ObjectManager.Player.UnderTurret(true) &&
         Player.HealthPercent >= getSliderItem(r, "Rhp") && getCheckBoxItem(r, "autoR"))
     {
         foreach (
             var target in
             Program.Enemies.Where(target => target.LSIsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
         {
             if (target.CountEnemiesInRange(700) < 2 + Player.CountAlliesInRange(700))
             {
                 R.Cast(target);
             }
         }
     }
 }
コード例 #12
0
ファイル: KogMaw.cs プロジェクト: psyd4rk/LeagueRepo
        private void LogicR()
        {
            if (Config.Item("autoR", true).GetValue <bool>() && Sheen())
            {
                R.Range = 800 + 300 * ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level;
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
                if (target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target))
                {
                    if (Config.Item("Raa", true).GetValue <bool>() && Orbwalking.InAutoAttackRange(target))
                    {
                        return;
                    }

                    double Rdmg = R.GetDamage(target) + (R.GetDamage(target) * target.CountAlliesInRange(500));
                    // Overkill protection
                    if (target.Health < R.GetDamage(target) * target.CountAlliesInRange(500) * 0.2)
                    {
                        Rdmg = 0;
                    }

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

                    if (R.GetDamage(target) > target.Health)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Combo && Rdmg * 2 > target.Health && ObjectManager.Player.Mana > RMANA * 3)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (GetRStacks() < comboStack + 2 && ObjectManager.Player.Mana > RMANA * 3)
                    {
                        foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.IsValidTarget(R.Range)))
                        {
                            if (!OktwCommon.CanMove(enemy))
                            {
                                R.Cast(enemy, true);
                            }
                            else
                            {
                                R.CastIfHitchanceEquals(enemy, HitChance.Immobile, true);
                            }
                        }
                    }

                    if (target.HasBuffOfType(BuffType.Slow) && Config.Item("Rslow", true).GetValue <bool>() && GetRStacks() < comboStack + 1 && ObjectManager.Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Combo && GetRStacks() < comboStack && ObjectManager.Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                    else if (Program.Farm && GetRStacks() < harasStack && ObjectManager.Player.Mana > RMANA + WMANA + EMANA + QMANA)
                    {
                        Program.CastSpell(R, target);
                    }
                }
            }
        }
コード例 #13
0
        private void LogicR()
        {
            bool   cast        = false;
            double secoundDmgR = 0.80;

            foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R1.Range) && OktwCommon.ValidUlt(target)))
            {
                float  predictedHealth = target.Health + target.HPRegenRate;
                double Rdmg            = OktwCommon.GetKsDamage(target, R);
                var    collisionTarget = target;
                cast = true;
                PredictionOutput output    = R.GetPrediction(target);
                Vector2          direction = output.CastPosition.To2D() - Player.Position.To2D();
                direction.Normalize();
                List <Obj_AI_Hero> enemies = ObjectManager.Get <Obj_AI_Hero>().Where(x => x.IsEnemy && 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 < (120 + enemy.BoundingRadius) && Player.Distance(predictedPosition) < Player.Distance(target.ServerPosition))
                    {
                        cast            = false;
                        collisionTarget = enemy;
                    }
                }
                if (cast &&
                    Rdmg > predictedHealth &&
                    target.IsValidTarget(R.Range) &&
                    (!Orbwalking.InAutoAttackRange(target) || ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.6))
                {
                    Program.CastSpell(R, target);
                    Program.debug("Rdmg");
                }
                else if (cast &&
                         Rdmg * secoundDmgR > predictedHealth &&
                         target.IsValidTarget(R1.Range) &&
                         target.CountAlliesInRange(300) == 0 && (!Orbwalking.InAutoAttackRange(target) || ObjectManager.Player.Health < ObjectManager.Player.MaxHealth * 0.6))
                {
                    Program.CastSpell(R, target);
                    Program.debug("Rdmg 0.7");
                }
                else if (!cast && Rdmg * secoundDmgR > predictedHealth && target.IsValidTarget(Player.Distance(collisionTarget.Position) + 700))
                {
                    Program.CastSpell(R, target);
                    Program.debug("Rdmg 0.7 collision");
                }
                else if (cast && Config.Item("fastR", true).GetValue <bool>() && Rdmg > predictedHealth && Orbwalking.InAutoAttackRange(target) && Program.Combo)
                {
                    Program.CastSpell(R, target);
                    Program.debug("R fast");
                }
            }
        }
コード例 #14
0
ファイル: Ashe.cs プロジェクト: thsdngur/LeagueRepo
        private void LogicR()
        {
            if (Config.Item("autoR", true).GetValue <bool>())
            {
                foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTarget(2000) && OktwCommon.ValidUlt(target)))
                {
                    var rDmg = OktwCommon.GetKsDamage(target, R);
                    if (Program.Combo && target.CountEnemiesInRange(250) > 2 && Config.Item("autoRaoe", true).GetValue <bool>() && target.IsValidTarget(1500))
                    {
                        Program.CastSpell(R, target);
                    }
                    if (Program.Combo && target.IsValidTarget(W.Range) && Config.Item("Rkscombo", true).GetValue <bool>() && Player.GetAutoAttackDamage(target) * 5 + rDmg + W.GetDamage(target) > target.Health && target.HasBuffOfType(BuffType.Slow) && !OktwCommon.IsSpellHeroCollision(target, R))
                    {
                        Program.CastSpell(R, target);
                    }
                    if (rDmg > target.Health && target.CountAlliesInRange(600) == 0 && target.Distance(Player.Position) > 1000)
                    {
                        if (!OktwCommon.IsSpellHeroCollision(target, R))
                        {
                            Program.CastSpell(R, target);
                        }
                    }
                }
            }

            if (Player.HealthPercent < 50)
            {
                foreach (var enemy in HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(300) && enemy.IsMelee && Config.Item("GapCloser" + enemy.ChampionName).GetValue <bool>() && !OktwCommon.ValidUlt(enemy)))
                {
                    R.Cast(enemy);
                    Program.debug("R Meele");
                }
            }
        }
コード例 #15
0
 private void LogicR()
 {
     if (Config.Item("autoR", true).GetValue <bool>() && Player.CountEnemiesInRange(800) == 0 && (Game.Time - OverKill > 0.6))
     {
         foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
         {
             float  predictedHealth = target.Health + target.HPRegenRate * 2;
             double Rdmg            = R.GetDamage(target);
             if (Rdmg > predictedHealth)
             {
                 Rdmg = getRdmg(target);
             }
             var qDmg = Q.GetDamage(target);
             var wDmg = W.GetDamage(target);
             if (Rdmg > predictedHealth && target.CountAlliesInRange(400) == 0)
             {
                 castR(target);
                 Program.debug("R normal");
             }
             if (!OktwCommon.CanMove(target) && Config.Item("Rcc", true).GetValue <bool>() &&
                 target.IsValidTarget(Q.Range + E.Range) && Rdmg + qDmg * 4 > predictedHealth)
             {
                 R.CastIfWillHit(target, 2, true);
                 R.Cast(target, true);
             }
             else if (Program.Combo && Config.Item("Raoe", true).GetValue <bool>())
             {
                 R.CastIfWillHit(target, 3, true);
             }
             else if (target.IsValidTarget(Q.Range + E.Range) && Rdmg + qDmg + wDmg > predictedHealth && Program.Combo && Config.Item("Raoe", true).GetValue <bool>())
             {
                 R.CastIfWillHit(target, 2, true);
             }
         }
     }
 }
コード例 #16
0
ファイル: KogMaw.cs プロジェクト: s1m421/ls-tools
        private void LogicR()
        {
            if (Config.Item("autoR", true).GetValue <bool>() && Sheen())
            {
                var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

                if (target.IsValidTarget(R.Range) && target.HealthPercent < Config.Item("RmaxHp", true).GetValue <Slider>().Value&& OktwCommon.ValidUlt(target))
                {
                    if (Config.Item("Raa", true).GetValue <bool>() && SebbyLib.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 Program.Enemies.Where(enemy => enemy.IsValidTarget(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);
                    }
                }
            }
        }
コード例 #17
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);
                        }
                    }
                }
            }
        }
コード例 #18
0
        private void LogicR()
        {
            foreach (var target in HeroManager.Enemies.Where(target => target.IsValidTargetLS(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 (EloBuddy.Player.Instance.IsInAutoAttackRange(target))
                    {
                        continue;
                    }
                    if (target.CountAlliesInRange(400) > 0)
                    {
                        continue;
                    }
                }

                double rDmg2 = rDmg * 0.8;

                if (target.IsValidTargetLS(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.IsValidTargetLS(1200))
                    {
                        Program.CastSpell(R1, target);
                        Program.debug("Rdmg2 collision");
                    }
                }
            }
        }
コード例 #19
0
 private void LogicR()
 {
     R.Range = 400 + 150 * R.Level;
     if (Player.UnderTurret(false) && !ObjectManager.Player.UnderTurret(true) && Player.HealthPercent >= Config.Item("Rhp", true).GetValue <Slider>().Value&& Config.Item("autoR", true).GetValue <bool>())
     {
         foreach (var target in Program.Enemies.Where(target => target.IsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
         {
             if (target.CountEnemiesInRange(700) < 2 + Player.CountAlliesInRange(700))
             {
                 R.Cast(target);
             }
         }
     }
 }
コード例 #20
0
ファイル: Program.cs プロジェクト: Burbb/Portaio
        private static void LogicR()
        {
            if (Player.UnderTurret(true) && getCheckBoxItem(rMenu, "Rturrent"))
            {
                return;
            }

            if (getSliderItem(rMenu, "MinRangeR") > getSliderItem(rMenu, "MaxRangeR"))
            {
                Chat.Print("R Logic can not be used because MinRange for R is greater than Max Range.");
                return;
            }

            if (getCheckBoxItem(rMenu, "autoR") && Player.CountEnemiesInRange(800) == 0 && Game.Time - OverKill > 0.6)
            {
                R.Range = getSliderItem(rMenu, "MaxRangeR");
                foreach (
                    var target in
                    Program.Enemies.Where(target => target.LSIsValidTarget(R.Range) && OktwCommon.ValidUlt(target)))
                {
                    var predictedHealth = target.Health - OktwCommon.GetIncomingDamage(target);

                    if (getCheckBoxItem(rMenu, "Rcc") && target.LSIsValidTarget(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.LSDistance(target) > getSliderItem(rMenu, "MinRangeR"))
                    {
                        Program.CastSpell(R, target);
                        Program.debug("R normal");
                    }
                    if (Program.Combo && Player.CountEnemiesInRange(1200) == 0)
                    {
                        R.CastIfWillHit(target, getSliderItem(rMenu, "Raoe"), true);
                    }
                }
            }
        }
コード例 #21
0
ファイル: MissFortune.cs プロジェクト: psyd4rk/LeagueRepo
        private void LogicR()
        {
            var t = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget(R.Range))
            {
                var rDmg = R.GetDamage(t) + (W.GetDamage(t) * 4);

                if (Player.CountEnemiesInRange(700) == 0 && t.CountAlliesInRange(400) == 0 && OktwCommon.ValidUlt(t))
                {
                    var tDis = Player.Distance(t.ServerPosition);
                    if (rDmg * 7 > t.Health && tDis < 800)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    else if (rDmg * 6 > t.Health && tDis < 900)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    else if (rDmg * 5 > t.Health && tDis < 1000)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    else if (rDmg * 4 > t.Health && tDis < 1100)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    else if (rDmg * 3 > t.Health && tDis < 1200)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    else if (rDmg > t.Health && tDis < 1300)
                    {
                        R.Cast(t, true, true);
                        RCastTime = Game.Time;
                    }
                    return;
                }
                else if (rDmg * 8 > t.Health && t.CountEnemiesInRange(300) > 2 && Player.CountEnemiesInRange(700) == 0)
                {
                    R.Cast(t, true, true);
                    RCastTime = Game.Time;
                    return;
                }
                else if (rDmg * 8 > t.Health && !OktwCommon.CanMove(t) && Player.CountEnemiesInRange(600) == 0)
                {
                    R.Cast(t, true, true);
                    RCastTime = Game.Time;
                    return;
                }
            }
        }