Example #1
0
 public static bool CanHarras()
 {
     if (!Player.UnderTurret(true) && (!ShouldWait() || !Orbwalking.CanAttack()))
     {
         return(true);
     }
     return(false);
 }
Example #2
0
        private void OnUpdate(EventArgs args)
        {
            if (getSliderItem("TsAa") == 2 || !Orbwalking.CanAttack() || !Program.Combo)
            {
                return;
            }

            var orbT = Orbwalker.LastTarget;

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

                if (getSliderItem("TsAa") == 0)
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(
                            enemy => enemy.IsValidTarget() && LeagueSharp.Common.Orbwalking.InAutoAttackRange(enemy))
                        )
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < hitToBestTarget)
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                else
                {
                    foreach (
                        var enemy in
                        Program.Enemies.Where(
                            enemy => enemy.IsValidTarget() && LeagueSharp.Common.Orbwalking.InAutoAttackRange(enemy))
                        )
                    {
                        if (enemy.Health / Player.GetAutoAttackDamage(enemy) < 3)
                        {
                            bestTarget = enemy;
                            break;
                        }
                        if (getSliderItem("TsAaPriority" + enemy.ChampionName) >
                            getSliderItem("TsAaPriority" + bestTarget.ChampionName))
                        {
                            bestTarget = enemy;
                        }
                    }
                }
                if (bestTarget.NetworkId != orbT.NetworkId)
                {
                    Program.debug("force " + bestTarget.ChampionName);
                    Orbwalker.ForcedTarget = bestTarget;
                }
            }
        }
Example #3
0
        private static void LogicQ()
        {
            if (Program.Farm && !FishBoneActive && !Orbwalker.IsAutoAttacking && Orbwalker.LastTarget == null &&
                Orbwalking.CanAttack() && getCheckBoxItem(farmMenu, "farmQout") &&
                Player.Mana > RMANA + WMANA + EMANA + 10)
            {
                foreach (var minion in Cache.GetMinions(Player.Position, bonusRange() + 30).Where(minion => !Orbwalking.InAutoAttackRange(minion) && GetRealPowPowRange(minion) < GetRealDistance(minion) && bonusRange() < GetRealDistance(minion)))
                {
                    var hpPred = HealthPrediction.GetHealthPrediction(minion, 400);
                    if (hpPred < Player.GetAutoAttackDamage(minion) * 1.1 && hpPred > 5)
                    {
                        Orbwalker.ForcedTarget = minion;
                        Q.Cast();
                        return;
                    }
                }
            }

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

            if (t.LSIsValidTarget())
            {
                if (!FishBoneActive && (!Orbwalking.InAutoAttackRange(t) || t.CountEnemiesInRange(250) > 2) && Orbwalker.LastTarget == null)
                {
                    var distance = GetRealDistance(t);
                    if (Program.Combo && (Player.Mana > RMANA + WMANA + 10 || Player.GetAutoAttackDamage(t) * 3 > t.Health))
                    {
                        Q.Cast();
                    }
                    else if (Program.Farm && !Orbwalker.IsAutoAttacking && Orbwalking.CanAttack() && getCheckBoxItem(qMenu, "Qharras") && !ObjectManager.Player.UnderTurret(true) && Player.Mana > RMANA + WMANA + EMANA + 20 && distance < bonusRange() + t.BoundingRadius + Player.BoundingRadius)
                    {
                        Q.Cast();
                    }
                }
            }
            else if (!FishBoneActive && Program.Combo && Player.Mana > RMANA + WMANA + 20 && Player.CountEnemiesInRange(2000) > 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.Mana < RMANA + WMANA + 20)
            {
                Q.Cast();
            }
            else if (FishBoneActive && Program.Combo && Player.CountEnemiesInRange(2000) == 0)
            {
                Q.Cast();
            }
            else if (FishBoneActive && (Program.Farm || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit)))
            {
                Q.Cast();
            }
            Orbwalker.ForcedTarget = null;
        }
Example #4
0
 private static bool ShouldWait()
 {
     if (!Orbwalking.CanAttack())
     {
         return(false);
     }
     else
     {
         return
             (MinionManager.GetMinions(Player.AttackRange + 300).Any(minion =>
                                                                     minion.IsValidTarget() && minion.HealthPercent < 60 && HealthPrediction.LaneClearHealthPrediction(minion, 400, 50) <= Player.GetAutoAttackDamage(minion)));
     }
 }
Example #5
0
 private static void farmE()
 {
     if (SebbyLib.Program.LaneClear && getCheckBoxItem(FarmMenu, "farmE") && Player.Mana > QMANA + EMANA + WMANA &&
         !Orbwalking.CanAttack() && Player.ManaPercent > getSliderItem(FarmMenu, "Mana"))
     {
         var minions = Cache.GetMinions(Player.ServerPosition, E.Range);
         foreach (var minion in minions.Where(minion => minion.Health > Player.GetAutoAttackDamage(minion)))
         {
             var eDmg = E.GetDamage(minion) * 2;
             if (minion.Health < eDmg && minion.HasBuff("chilled"))
             {
                 E.Cast(minion);
             }
         }
     }
 }
Example #6
0
        public static void farmQ()
        {
            if (Program.LaneClear && getCheckBoxItem(farmMenu, "farmQ") && Player.ManaPercent > getSliderItem(farmMenu, "Mana"))
            {
                var mobs = EntityManager.MinionsAndMonsters.EnemyMinions.Where(x => x.IsInRange(Player, Q.Range));
                if (mobs != null)
                {
                    if (mobs.Count() > 0)
                    {
                        var mob = mobs.FirstOrDefault();
                        Q.Cast(mob.Position);
                    }
                }

                var monster = EntityManager.MinionsAndMonsters.Monsters.Where(x => x.IsInRange(Player, Q.Range));
                if (monster != null)
                {
                    if (monster.Count() > 0)
                    {
                        var monsters = monster.FirstOrDefault();
                        Q.Cast(monsters.Position);
                    }
                }
            }

            var minions   = EntityManager.MinionsAndMonsters.EnemyMinions.Where(x => x.IsInRange(Player, Q.Range));
            var orbTarget = 0;

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

            if (getCheckBoxItem(farmMenu, "FQ"))
            {
                if (minions.Where(minion => minion.IsValidTarget() && orbTarget != minion.NetworkId && minion.HealthPercent < 70 && !LeagueSharp.Common.Orbwalking.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)).Any(minion => Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted))
                {
                    Console.WriteLine("2");
                    return;
                }
            }

            if (getCheckBoxItem(farmMenu, "farmQ") && Program.LaneClear && !Orbwalking.CanAttack() && Player.ManaPercent > getSliderItem(farmMenu, "Mana"))
            {
                var LCP = getCheckBoxItem(farmMenu, "LCP");
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

                foreach (var minion in minions.Where(LeagueSharp.Common.Orbwalking.InAutoAttackRange))
                {
                    var hpPred = 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;
                            }
                        }
                    }
                }
            }
        }
Example #7
0
        public static 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 (!getCheckBoxItem(farm, "farmQ"))
            {
                return;
            }

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

            var orbTarget = 0;

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

            if (minions.Where(
                    minion =>
                    orbTarget != minion.NetworkId && !ObjectManager.Player.IsInAutoAttackRange(minion) &&
                    minion.Health < Q.GetDamage(minion)).Any(minion => Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted))
            {
                return;
            }

            if (getCheckBoxItem(farm, "LC") && Program.LaneClear && !Orbwalking.CanAttack() &&
                Player.ManaPercent > getSliderItem(farm, "Mana"))
            {
                var LCP = getCheckBoxItem(farm, "LCP");

                foreach (
                    var minion in
                    minions.Where(
                        minion => ObjectManager.Player.IsInAutoAttackRange(minion) && orbTarget != minion.NetworkId)
                    )
                {
                    var hpPred    = 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;
                            }
                        }
                    }
                }
            }
        }
Example #8
0
        public static 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);
            var orbTarget = 0;

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

            if (getCheckBoxItem(farmMenu, "FQ"))
            {
                if (minions.Where(minion => minion.IsValidTarget() && orbTarget != minion.NetworkId && minion.HealthPercent < 70 && !LeagueSharp.Common.Orbwalking.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)).Any(minion => Q.Cast(minion) == Spell.CastStates.SuccessfullyCasted))
                {
                    return;
                }
            }

            if (getCheckBoxItem(farmMenu, "farmQ") && Program.LaneClear && !Orbwalking.CanAttack() &&
                Player.ManaPercent > getSliderItem(farmMenu, "Mana"))
            {
                var LCP = getCheckBoxItem(farmMenu, "LCP");
                var PT  = Game.Time - GetPassiveTime() > -1.5 || !E.IsReady();

                foreach (var minion in minions.Where(LeagueSharp.Common.Orbwalking.InAutoAttackRange))
                {
                    var hpPred = 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;
                            }
                        }
                    }
                }
            }
        }
Example #9
0
        private static void JungleClear()
        {
            var JungleMinions = MinionManager.GetMinions(Player.ServerPosition, W.Range, MinionTypes.All,
                                                         MinionTeam.Neutral, MinionOrderTypes.MaxHealth);

            if (JungleMinions.Count >= 1)
            {
                foreach (var Mob in JungleMinions)
                {
                    if (Human())
                    {
                        if (Option_Item("Jungle R") && R.IsReady())
                        {
                            if (!Q.IsReady() && !W.IsReady())
                            {
                                if (((_spideQcd == 0) && (_spideWcd <= 1.8f)) || (_humaQcd >= 1.2f))
                                {
                                    R.Cast(true);
                                }
                            }
                        }

                        if (Player.ManaPercent >= Option.Item("JMana").GetValue <Slider>().Value)
                        {
                            if (Option_Item("Human Jungle W") && W.IsReady())
                            {
                                var Mobs = W.GetCircularFarmLocation(JungleMinions);
                                if (JungleMinions.Count == 4)
                                {
                                    if (Mobs.MinionsHit >= 3)
                                    {
                                        W.Cast(Mobs.Position, true);
                                    }
                                }
                                if (JungleMinions.Count == 3)
                                {
                                    if (Mobs.MinionsHit >= 2)
                                    {
                                        W.Cast(Mobs.Position, true);
                                    }
                                }
                                ;
                                if (JungleMinions.Count <= 2)
                                {
                                    W.Cast(Mob.Position, true);
                                }

                                if (JungleMinions.Count == 0)
                                {
                                    return;
                                }
                            }

                            if (Option_Item("Human Jungle Q") && Q.IsReady())
                            {
                                Q.CastOnUnit(Mob, true);
                            }
                        }
                    }

                    if (Spider())
                    {
                        if (Option_Item("Jungle R") && R.IsReady())
                        {
                            if (!Q2.IsReady() && !W2.IsReady() && !Player.HasBuff("EliseSpiderW") &&
                                (Player.ManaPercent >= Option.Item("JMana").GetValue <Slider>().Value))
                            {
                                if ((_humaQcd <= 0f) && (_humaWcd <= 1.5f) &&
                                    ((_spideQcd >= 1.4f) || (_spideWcd >= 1.8f)) &&
                                    (((JungleMinions.Count == 1) && (Mob.Health >= Q.GetDamage(Mob))) ||
                                     (Mob.Health >= W.GetDamage(Mob))))
                                {
                                    R.Cast(true);
                                }
                            }
                        }

                        if (Option_Item("Spider Jungle Q") && Q.IsReady())
                        {
                            Q.CastOnUnit(Mob, true);
                        }

                        if (Option_Item("Spider Jugnle W") && W2.IsReady())
                        {
                            var JungleMinion = MinionManager.GetMinions(Player.ServerPosition, 150, MinionTypes.All,
                                                                        MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                            if (!Orbwalking.CanAttack() && Orbwalking.CanMove(10))
                            {
                                if (JungleMinion != null)
                                {
                                    W2.Cast(true);
                                }
                            }
                        }
                    }
                }
            }

            if (JungleMinions == null)
            {
                return;
            }
        }
Example #10
0
        private static void LaneClear()
        {
            var Minions = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, W.Range, MinionTypes.All,
                                                   MinionTeam.NotAlly);

            if (Minions != null)
            {
                if (Human() && (Player.ManaPercent >= Option.Item("LMana").GetValue <Slider>().Value))
                {
                    if (Option_Item("Human Lane W") && W.IsReady())
                    {
                        var farmLocation = W.GetLineFarmLocation(Minions);
                        if (farmLocation.MinionsHit >= 3)
                        {
                            W.Cast(farmLocation.Position, true);
                        }
                    }

                    if (Option_Item("Human Lane Q") && Q.IsReady())
                    {
                        var Minion = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                                     .Where(x => x.Health < W.GetDamage(x))
                                     .OrderByDescending(x => x.MaxHealth)
                                     .ThenByDescending(x => x.Distance(Player))
                                     .FirstOrDefault();
                        if (Minion != null)
                        {
                            Q.Cast(Minion, true);
                        }
                    }
                }
                if (Spider())
                {
                    if (Option_Item("Spider Lane Q") && Q2.IsReady())
                    {
                        var Minion = MinionManager.GetMinions(Q2.Range, MinionTypes.All, MinionTeam.NotAlly)
                                     .Where(x => x.Health < W.GetDamage(x))
                                     .OrderByDescending(x => x.MaxHealth)
                                     .ThenByDescending(x => x.Distance(Player))
                                     .FirstOrDefault();
                        if (Minion != null)
                        {
                            Q2.Cast(Minion, true);
                        }
                    }

                    if (Option_Item("Spider Lane W") && W2.IsReady())
                    {
                        var Minion = MinionManager.GetMinions(ObjectManager.Player.ServerPosition, 150, MinionTypes.All,
                                                              MinionTeam.NotAlly);
                        if (!Orbwalking.CanAttack() && Orbwalking.CanMove(10) && (Minion != null))
                        {
                            W2.Cast(true);
                        }
                    }
                }
            }
            if (Minions == null)
            {
                return;
            }
        }
Example #11
0
 public static bool CanHarras()
 {
     if (!Player.IsWindingUp && !Player.UnderTurret(true) && Orbwalking.CanMove(50) && (!ShouldWait() || !Orbwalking.CanAttack()))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }