示例#1
0
        private void LogicR()
        {
            foreach (var t in HeroManager.Enemies.Where(t => t.IsValidTarget() && BallPos.Distance(Prediction.GetPrediction(t, R.Delay).CastPosition) < R.Width && BallPos.Distance(t.ServerPosition) < R.Width))
            {
                if (Program.Combo && Config.Item("Ralways" + t.ChampionName, true).GetValue <bool>())
                {
                    R.Cast();
                }

                if (Config.Item("Rks", true).GetValue <bool>())
                {
                    var comboDmg = OktwCommon.GetKsDamage(t, R);

                    if (t.IsValidTarget(Q.Range))
                    {
                        comboDmg += Q.GetDamage(t);
                    }
                    if (W.IsReady())
                    {
                        comboDmg += W.GetDamage(t);
                    }
                    if (Orbwalker.InAutoAttackRange(t))
                    {
                        comboDmg += (float)Player.GetAutoAttackDamage(t) * 2;
                    }
                    if (t.Health < comboDmg)
                    {
                        R.Cast();
                    }
                    Program.debug("ks");
                }
                if (Config.Item("Rturrent", true).GetValue <bool>() && BallPos.UnderTurret(false) && !BallPos.UnderTurret(true))
                {
                    R.Cast();
                    Program.debug("Rturrent");
                }
                if (Config.Item("Rlifesaver", true).GetValue <bool>() && Player.Health < Player.CountEnemiesInRange(800) * Player.Level * 20 && Player.Distance(BallPos) > t.Distance(Player.Position))
                {
                    R.Cast();
                    Program.debug("ls");
                }
            }

            int countEnemies = CountEnemiesInRangeDeley(BallPos, R.Width, R.Delay);

            if (countEnemies >= Config.Item("rCount", true).GetValue <Slider>().Value&& BallPos.CountEnemiesInRange(R.Width) == countEnemies)
            {
                R.Cast();
            }
        }
示例#2
0
        private void LogicW()
        {
            if (Player.Mana < RMANA + WMANA)
            {
                return;
            }

            if (HeroManager.Enemies.Any(enemy => enemy.IsValidTarget(350) && enemy.IsMoving && enemy.IsFacing(Player) && Config.Item("autoWnear", true).GetValue <bool>()))
            {
                W.Cast();
            }

            if (Program.Combo && Config.Item("autoWout", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(800, TargetSelector.DamageType.Magical);
                if (t.IsValidTarget() && !Orbwalker.InAutoAttackRange(t) && !t.IsFacing(Player))
                {
                    W.Cast();
                }
            }
        }
示例#3
0
        private void OnUpdate(EventArgs args)
        {
            if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 2 || !SebbyLib.Orbwalking.CanAttack() || !Program.Combo)
            {
                return;
            }

            var orbT = Orbwalker.GetTarget();

            if (orbT != null)
            {
                var bestTarget      = (Obj_AI_Hero)orbT;
                var hitToBestTarget = bestTarget.Health / Player.GetAutoAttackDamage(bestTarget);

                if (Config.Item("TsAa").GetValue <StringList>().SelectedIndex == 0)
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < hitToBestTarget)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                else
                {
                    foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget() && Orbwalker.InAutoAttackRange(enemy)))
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < 3)
                        {
                            bestTarget = enemy;
                            break;
                        }
                        if (Config.Item("TsAaPriority" + enemy.ChampionName).GetValue <Slider>().Value > Config.Item("TsAaPriority" + bestTarget.ChampionName).GetValue <Slider>().Value)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                if (bestTarget.NetworkId != orbT.NetworkId)
                {
                    Program.debug("force " + bestTarget.ChampionName);
                    Orbwalker.ForceTarget(bestTarget);
                }
            }
        }
示例#4
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && Config.Item("Qon" + t.ChampionName).GetValue <bool>())
            {
                if (Program.Combo && Player.Mana > RMANA + QMANA + WMANA)
                {
                    Program.CastSpell(Q, t);
                }
                else if (Program.Farm && OktwCommon.CanHarras() && Config.Item("harrasQ", true).GetValue <bool>() &&
                         Config.Item("harras" + t.ChampionName).GetValue <bool>() && Player.ManaPercent > Config.Item("QHarassMana", true).GetValue <Slider>().Value)
                {
                    Program.CastSpell(Q, t);
                }
                else if (OktwCommon.GetKsDamage(t, Q) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }

                foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                {
                    Program.CastSpell(Q, t);
                }
            }
            if (!OktwCommon.CanHarras())
            {
                return;
            }

            if (!Program.None && !Program.Combo && Player.Mana > RMANA + QMANA * 2)
            {
                var allMinions = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (Config.Item("farmQout", true).GetValue <bool>())
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && (!Orbwalker.InAutoAttackRange(minion) || (!minion.UnderTurret(true) && minion.UnderTurret()))))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 1100);
                        if (hpPred < GetQDamage(minion) * 0.9 && hpPred > minion.Health - hpPred * 2)
                        {
                            Q.Cast(minion);
                            return;
                        }
                    }
                }

                if (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range) && Orbwalker.InAutoAttackRange(minion)))
                    {
                        var hpPred = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 1100);
                        if (hpPred < GetQDamage(minion) * 0.9 && hpPred > minion.Health - hpPred * 2)
                        {
                            Q.Cast(minion);
                            return;
                        }
                    }
                }

                if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>())
                {
                    var farmPos = Q.GetCircularFarmLocation(allMinions, Q.Width);
                    if (farmPos.MinionsHit >= Config.Item("QLCminions", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(farmPos.Position);
                    }
                }
            }
        }
示例#5
0
文件: Urgot.cs 项目: s1m421/ls-tools
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

            if (!Config.Item("farmQ", true).GetValue <bool>())
            {
                return;
            }

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

            int orbTarget = 0;

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

            foreach (var minion in minions.Where(minion => orbTarget != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                {
                    return;
                }
            }

            if (Config.Item("LC", true).GetValue <bool>() && Program.LaneClear && !SebbyLib.Orbwalking.CanAttack() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();

                foreach (var minion in minions.Where(minion => Orbwalker.InAutoAttackRange(minion) && orbTarget != minion.NetworkId))
                {
                    var hpPred    = SebbyLib.HealthPrediction.GetHealthPrediction(minion, 300);
                    var dmgMinion = minion.GetAutoAttackDamage(minion);
                    var qDmg      = Q.GetDamage(minion);
                    if (hpPred < qDmg)
                    {
                        if (hpPred > dmgMinion)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                    else if (LCP)
                    {
                        if (hpPred > dmgMinion + qDmg)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }
示例#6
0
文件: Ezreal.cs 项目: s1m421/ls-tools
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = Cache.GetMinions(Player.ServerPosition, 800, MinionTeam.Neutral);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob.Position);
                }
            }

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

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

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

            if (Config.Item("farmQ", true).GetValue <bool>() && Program.LaneClear && !SebbyLib.Orbwalking.CanAttack() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value)
            {
                var LCP = Config.Item("LCP", true).GetValue <bool>();
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

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

                    var qDmg = Q.GetDamage(minion);
                    if (hpPred < qDmg && orbTarget != minion.NetworkId)
                    {
                        if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                        {
                            return;
                        }
                    }
                    else if (PT || LCP)
                    {
                        if (minion.HealthPercent > 80)
                        {
                            if (Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted)
                            {
                                return;
                            }
                        }
                    }
                }
            }
        }