Example #1
0
        private void LogicQ()
        {
            var torb = Orbwalker.GetTarget();

            if (torb == null || torb.Type != GameObjectType.AIHeroClient)
            {
                if (Config.Item("Qminion", true).GetValue <bool>())
                {
                    var t = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget())
                    {
                        var minion = Cache.GetMinions(LeagueSharp.Common.Prediction.GetPrediction(t, 0.1f).CastPosition, 300).Where(minion2 => minion2.IsValidTarget(Q.Range)).OrderBy(x => x.Distance(t)).FirstOrDefault();
                        if (minion.IsValidTarget())
                        {
                            if (t.Health < GetQdmg(t))
                            {
                                Q.CastOnUnit(minion);
                            }
                            if (Program.Combo && Player.Mana > RMANA + EMANA)
                            {
                                Q.CastOnUnit(minion);
                            }
                            else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                            {
                                Q.CastOnUnit(minion);
                            }
                        }
                    }
                }
            }
            else if (!Orbwalking.CanAttack() && !Player.Spellbook.IsAutoAttacking)
            {
                var t = torb as AIHeroClient;
                if (t.Health < GetQdmg(t) + GetWdmg(t))
                {
                    Q.CastOnUnit(t);
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Q.CastOnUnit(t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA + EMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                {
                    Q.CastOnUnit(t);
                }
            }
            if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>())
            {
                var minionList = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (minionList.Count >= Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    var minionAttack = minionList.FirstOrDefault(x => Q.GetDamage(x) > SebbyLib.HealthPrediction.GetHealthPrediction(x, 300));
                    if (minionAttack.IsValidTarget())
                    {
                        Q.CastOnUnit(minionAttack);
                    }
                }
            }
        }
Example #2
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var Qminis     = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly);
            var jungleMobQ = Qminis.Where(m => m.MaxHealth > 900).OrderByDescending(m => m.MaxHealth).FirstOrDefault();

            if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() &&
                (Qminis.Count >= config.Item("qMinHit", true).GetValue <Slider>().Value || jungleMobQ != null ||
                 (Qminis.Count(m => m.Health < Q.GetDamage(m)) > 0 && !Orbwalking.CanAttack())))
            {
                Q.Cast();
            }
            if (config.Item("usewLC", true).GetValue <bool>() && W.IsReady() &&
                (MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly).Count >=
                 config.Item("wMinHit", true).GetValue <Slider>().Value || jungleMobQ != null) &&
                Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken > 50 && player.HealthPercent < 98)
            {
                W.Cast();
            }
        }
Example #3
0
        public static void KS()
        {
            var PacketCast  = SkyLv_Taric.Menu.Item("Taric.PacketCastKS").GetValue <bool>();
            var UseIgniteKS = SkyLv_Taric.Menu.Item("Taric.UseIgniteKS").GetValue <bool>();
            var UseAAKS     = SkyLv_Taric.Menu.Item("Taric.UseAAKS").GetValue <bool>();
            var UseEKS      = SkyLv_Taric.Menu.Item("Taric.UseEKS").GetValue <bool>();

            foreach (var target in ObjectManager.Get <Obj_AI_Hero>().Where(target => !target.IsMe && !target.IsDead && target.Team != ObjectManager.Player.Team && !target.IsZombie && (SkyLv_Taric.Ignite.Slot != SpellSlot.Unknown || !target.HasBuff("summonerdot"))))
            {
                if (UseAAKS && Orbwalking.CanAttack() && Player.GetAutoAttackDamage(target) > target.Health && target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)))
                {
                    Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                }

                if (UseEKS && E.GetDamage(target) > target.Health && Player.Distance(target) <= E.Range && Player.Mana >= E.ManaCost)
                {
                    E.CastIfHitchanceEquals(target, HitChance.VeryHigh, PacketCast);
                }

                if (UseIgniteKS && SkyLv_Taric.Ignite.Slot != SpellSlot.Unknown && target.Health < Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) && Player.Distance(target) <= SkyLv_Taric.Ignite.Range)
                {
                    SkyLv_Taric.Ignite.Cast(target, PacketCast);
                }
            }
        }
Example #4
0
        private static void LastHit()
        {
            var minion = MinionManager.GetMinions(Player.ServerPosition, spells[Spells.W].Range).FirstOrDefault();

            if (minion == null)
            {
                return;
            }

            if (Player.ManaPercent < FastTrundleMenu.Menu.Item("FastTrundle.LastHit.Mana").GetValue <Slider>().Value)
            {
                return;
            }

            if (IsActive("FastTrundle.LastHit.Q") &&
                spells[Spells.Q].IsReady() &&
                minion.IsValidTarget(spells[Spells.Q].Range) &&
                minion.Health <= QDamage(minion) &&
                (minion.Health > Player.GetAutoAttackDamage(minion) ||
                 (!Player.Spellbook.IsAutoAttacking && !Orbwalking.CanAttack())))    // don't overkill with Q unless we need AA reset to get it
            {
                spells[Spells.Q].Cast();
                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, minion);
            }
        }
Example #5
0
        public void farmQ()
        {
            if (Program.LaneClear)
            {
                var mobs = MinionManager.GetMinions(Player.ServerPosition, 800, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth);
                if (mobs.Count > 0)
                {
                    var mob = mobs[0];
                    Q.Cast(mob, true);
                    return;
                }
            }

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

            var minions = MinionManager.GetMinions(Player.ServerPosition, Q.Range, MinionTypes.All, MinionTeam.Enemy, MinionOrderTypes.MaxHealth);

            foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && !Orbwalker.InAutoAttackRange(minion) && minion.Health < Q.GetDamage(minion)))
            {
                Program.CastSpell(Q, minion);
                FarmId = minion.NetworkId;
            }

            if (Program.LaneClear && !Orbwalking.CanAttack() && (Player.ManaPercent > Config.Item("Mana").GetValue <Slider>().Value || ObjectManager.Player.UnderTurret(false)))
            {
                foreach (var minion in minions.Where(minion => FarmId != minion.NetworkId && Orbwalker.InAutoAttackRange(minion) && minion.Health <Q.GetDamage(minion) * 0.8 && minion.Health> minion.FlatPhysicalDamageMod))
                {
                    Program.CastSpell(Q, minion);
                }
            }
        }
Example #6
0
        private void AutoE()
        {
            if (!E1Ready() || !E1.IsReady())
            {
                return;
            }
            if (!Program.Menu.Item("useModus_E").GetValue <bool>())
            {
                return;
            }
            var target = SimpleTs.GetTarget(E1.Range, SimpleTs.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            switch (Program.Menu.Item("useModus_Passive_E1_mode").GetValue <StringList>().SelectedIndex)
            {
            case 0:
                E1.Cast();
                break;

            case 1:
                if ((Orbwalking.CanAttack()) || (Orbwalking.CanAttack() && PassiveDown()))
                {
                    E1.Cast();
                }
                break;
            }
        }
Example #7
0
        private void LogicQ()
        {
            var torb = Orbwalker.GetTarget();

            if (torb == null || torb.Type != GameObjectType.obj_AI_Hero)
            {
                if (MainMenu.Item("Qminion", true).GetValue <bool>())
                {
                    var t = TargetSelector.GetTarget(Q.Range + 300, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget())
                    {
                        var minion = Cache.GetMinions(Prediction.GetPrediction(t, 0.1f).CastPosition, 300).Where(minion2 => minion2.IsValidTarget(Q.Range)).OrderBy(x => x.Distance(t)).FirstOrDefault();
                        if (minion.IsValidTarget())
                        {
                            if (t.Health < GetQdmg(t))
                            {
                                Q.CastOnUnit(minion);
                            }
                            if (Program.Combo && Player.Mana > RMANA + EMANA)
                            {
                                Q.CastOnUnit(minion);
                            }
                            else if (Program.Harass && MainMenu.Item("harassQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>())
                            {
                                Q.CastOnUnit(minion);
                            }
                        }
                    }
                }
            }
            else if (!Orbwalking.CanAttack() && !Player.IsWindingUp)
            {
                var t = torb as Obj_AI_Hero;
                if (t.Health < GetQdmg(t) + GetWdmg(t))
                {
                    Q.CastOnUnit(t);
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Q.CastOnUnit(t);
                }
                else if (Program.Harass && MainMenu.Item("harassQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA + EMANA && MainMenu.Item("Harass" + t.ChampionName).GetValue <bool>())
                {
                    Q.CastOnUnit(t);
                }
            }
            if (FarmSpells && MainMenu.Item("farmQ", true).GetValue <bool>())
            {
                var minionList = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (minionList.Count >= FarmMinions)
                {
                    var minionAttack = minionList.FirstOrDefault(x => Q.GetDamage(x) > HealthPrediction.GetHealthPrediction(x, 300));
                    if (minionAttack.IsValidTarget())
                    {
                        Q.CastOnUnit(minionAttack);
                    }
                }
            }
        }
Example #8
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (Q.IsReady() && config.Item("useqLC", true).GetValue <bool>())
            {
                var minions =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(
                        m =>
                        Q.CanCast(m) &&
                        (Q.GetDamage(m) > m.Health || m.Health > player.GetAutoAttackDamage(m) * 5))
                    .OrderByDescending(m => Q.GetDamage(m) > m.Health)
                    .ThenBy(m => m.Distance(player));
                foreach (var mini in minions)
                {
                    if (!Orbwalking.CanAttack() && mini.Distance(player) <= Orbwalking.GetRealAutoAttackRange(mini))
                    {
                        Q.CastOnUnit(mini);
                        return;
                    }
                    if (!player.Spellbook.IsAutoAttacking &&
                        mini.Distance(player) > Orbwalking.GetRealAutoAttackRange(mini))
                    {
                        Q.CastOnUnit(mini);
                        return;
                    }
                }
            }
        }
        public override float GetComboDamage(Obj_AI_Hero target)
        {
            float dmg = 0;

            if (Q.IsReady())
            {
                dmg += Q.GetDamage(target);
            }

            if (E.IsReady())
            {
                dmg += E.GetDamage(target);
            }

            if (R.IsReady() && target.HasBuffOfType(BuffType.Knockup))
            {
                dmg += R.GetDamage(target);
            }

            if (Botrk.IsReady())
            {
                dmg += (float)Player.GetItemDamage(target, Damage.DamageItems.Botrk);
            }

            if (Orbwalking.CanAttack())
            {
                // Include the BotRK passive
                dmg += (float)Player.GetAutoAttackDamage(target, true);
            }

            return(dmg);
        }
Example #10
0
 private void Clear()
 {
     if (player.Spellbook.IsAutoAttacking)
     {
         return;
     }
     if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() && !player.IsDashing())
     {
         var minis = MinionManager.GetMinions(player.AttackRange + 50, MinionTypes.All, MinionTeam.NotAlly);
         if (Environment.Minion.countMinionsInrange(player.Position, Q.Range) >=
             config.Item("minimumMini", true).GetValue <Slider>().Value&&
             minis.Count(m => m.Health - Q.GetDamage(m) < 50 && m.Health - Q.GetDamage(m) > 0) == 0 &&
             (!Environment.Minion.KillableMinion(player.AttackRange) || !Orbwalking.CanAttack()))
         {
             Q.Cast();
             return;
         }
     }
     if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady())
     {
         var minionsForE = MinionManager.GetMinions(
             ObjectManager.Player.ServerPosition, E.Range, MinionTypes.All, MinionTeam.NotAlly);
         MinionManager.FarmLocation bestPosition = E.GetLineFarmLocation(minionsForE);
         if (bestPosition.Position.IsValid() &&
             !player.Position.Extend(bestPosition.Position.To3D(), E.Range).UnderTurret(true) &&
             !bestPosition.Position.IsWall())
         {
             if (bestPosition.MinionsHit >= 2)
             {
                 E.Cast(bestPosition.Position);
             }
         }
     }
 }
Example #11
0
        public static void JungleKS()
        {
            if (SkyLv_Taric.Menu.Item("Taric.JungleKS").GetValue <bool>())
            {
                var UseAAJungleKS = SkyLv_Taric.Menu.Item("Taric.UseAAJungleKS").GetValue <bool>();
                var UseEJungleKS  = SkyLv_Taric.Menu.Item("Taric.UseEJungleKS").GetValue <bool>();
                var PacketCast    = SkyLv_Taric.Menu.Item("Taric.UsePacketCast").GetValue <bool>();

                if (Player.IsRecalling())
                {
                    return;
                }

                foreach (var target in ObjectManager.Get <Obj_AI_Base>().Where(target => SkyLv_Taric.Monsters.Contains(target.BaseSkinName) && !target.IsDead))
                {
                    if (UseAAJungleKS && Orbwalking.CanAttack() && Player.GetAutoAttackDamage(target) > target.Health && target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)))
                    {
                        EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, target);
                    }

                    if (UseEJungleKS && E.GetDamage(target) > target.Health && Player.Distance(target) <= E.Range && Player.Mana >= E.ManaCost)
                    {
                        E.CastIfHitchanceEquals(target, HitChance.VeryHigh, PacketCast);
                    }
                }
            }
        }
Example #12
0
        private void LogicE()
        {
            var orbTarget = Orbwalker.GetTarget() as Obj_AI_Hero;

            if (orbTarget != null)
            {
                if (!Orbwalking.CanAttack() && Orbwalking.CanMove(20))
                {
                    if (Program.Combo && Player.Mana > WMANA + EMANA)
                    {
                        E.Cast();
                        Orbwalking.ResetAutoAttackTimer();
                    }
                    else if (Program.Harass && MainMenu.Item("harassE", true).GetValue <bool>() && Player.Mana > WMANA + EMANA + QMANA)
                    {
                        E.Cast();
                        Orbwalking.ResetAutoAttackTimer();
                    }
                }
            }
            else
            {
                if (Program.Combo && Player.Mana > WMANA + EMANA && Player.CountEnemiesInRange(600) > 0)
                {
                    E.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                }
                else if (Program.Harass && MainMenu.Item("harassE", true).GetValue <bool>() && Player.Mana > WMANA + EMANA + QMANA && Player.CountEnemiesInRange(500) > 0)
                {
                    E.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                }
            }
        }
Example #13
0
        public Vector3 Execute(Obj_AI_Base target, float range, Spell spell)
        {
            if (!Orbwalking.CanMove(5) || !Orbwalking.CanAttack())
            {
                return(Vector3.Zero);
            }

            var prediction = spell.GetPrediction(target).UnitPosition;

            for (float i = 0; i < range; i += range / 5f)
            {
                var newprediction = prediction.Extend(ObjectManager.Player.ServerPosition, -i);

                if (NavMesh.GetCollisionFlags(newprediction) == CollisionFlags.Wall ||
                    NavMesh.GetCollisionFlags(newprediction) == CollisionFlags.Building ||
                    newprediction.IsWall())
                {
                    return(newprediction);
                }
            }

            var finalPosition = prediction.Extend(ObjectManager.Player.ServerPosition, -range);

            if (NavMesh.GetCollisionFlags(finalPosition) == CollisionFlags.Wall ||
                NavMesh.GetCollisionFlags(finalPosition) == CollisionFlags.Building ||
                finalPosition.IsWall())
            {
                return(finalPosition);
            }
            return(Vector3.Zero);
        }
Example #14
0
        /// <summary>
        ///     Gets the combo damage.
        /// </summary>
        /// <param name="target">The target.</param>
        /// <returns></returns>
        public override float GetComboDamage(AIHeroClient target)
        {
            float dmg = 0;

            if (this.Q.IsReady())
            {
                dmg += this.Q.GetDamage(target);
            }

            if (this.E.IsReady())
            {
                dmg += this.E.GetDamage(target);
            }

            if (this.R.IsReady() && target.HasBuffOfType(BuffType.Knockup))
            {
                dmg += this.R.GetDamage(target);
            }

            if (this.Botrk.IsReady())
            {
                dmg += (float)this.Player.GetItemDamage(target, Damage.DamageItems.Botrk);
            }

            if (Orbwalking.CanAttack())
            {
                // Include the BotRK passive
                dmg += (float)this.Player.GetAutoAttackDamage(target, true);
            }

            return(dmg);
        }
Example #15
0
        public static void useQSmart(Obj_AI_Base target)
        {
            try
            {
                if (!Q.IsReady() || target.Path.Count() == 0 || !target.IsMoving)
                {
                    return;
                }
                Vector2 nextEnemPath = target.Path[0].To2D();
                var     dist         = player.Position.To2D().Distance(target.Position.To2D());
                var     distToNext   = nextEnemPath.Distance(player.Position.To2D());
                if (distToNext <= dist)
                {
                    return;
                }
                var msDif = player.MoveSpeed - target.MoveSpeed;
                if (msDif <= 0 && !Orbwalking.InAutoAttackRange(target) && Orbwalking.CanAttack())
                {
                    Q.Cast(target);
                }

                var reachIn = dist / msDif;
                if (reachIn > 4)
                {
                    Q.Cast(target);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #16
0
 private static void Game_OnUpdate(EventArgs args)
 {
     if (!BadaoGangplankVariables.FleeKey.GetValue <KeyBind>().Active)
     {
         return;
     }
     Orbwalking.Orbwalk(null, Game.CursorPos);
     if (BadaoMainVariables.Q.IsReady())
     {
         foreach (var barrel in BadaoGangplankBarrels.QableBarrels())
         {
             if (BadaoMainVariables.Q.Cast(barrel.Bottle) == Spell.CastStates.SuccessfullyCasted)
             {
                 return;
             }
         }
     }
     if (Orbwalking.CanAttack())
     {
         foreach (var barrel in BadaoGangplankBarrels.AttackableBarrels())
         {
             Orbwalking.Attack = false;
             Orbwalking.Move   = false;
             LeagueSharp.Common.Utility.DelayAction.Add(100 + Game.Ping, () =>
             {
                 Orbwalking.Attack = true;
                 Orbwalking.Move   = true;
             });
             if (EloBuddy.Player.IssueOrder(GameObjectOrder.AttackUnit, barrel.Bottle))
             {
                 return;
             }
         }
     }
 }
Example #17
0
        public static void Harass()
        {
            var target = TargetSelector.GetTarget(360, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }

            if (Spells.Q.IsReady() && Spells.W.IsReady() && Qstack == 1)
            {
                BackgroundData.CastQ(target);
            }

            if (Spells.W.IsReady() && BackgroundData.InRange(target))
            {
                BackgroundData.CastW(target);
            }

            if (!Spells.Q.IsReady() ||
                !Spells.E.IsReady() ||
                Qstack != 3 ||
                Orbwalking.CanAttack() ||
                !Orbwalking.CanMove(5))
            {
                return;
            }

            Spells.E.Cast(Game.CursorPos);

            Utility.DelayAction.Add(190, () => Spells.Q.Cast(target.Position));
        }
Example #18
0
        private static void Wlogic()
        {
            var t = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

            if (t.IsValidTarget() && WValidRange(t))
            {
                if (Config.Item("Wks").GetValue <bool>() && GetKsDamage(t, W) > t.Health && ValidUlt(t))
                {
                    CastSpell(W, t);
                }

                if (Combo && Config.Item("Wcombo").GetValue <bool>() && Player.ManaPercent > Config.Item("WmanaCombo").GetValue <Slider>().Value)
                {
                    CastSpell(W, t);
                }
                else if (Farm && Orbwalking.CanAttack() && !Player.IsWindingUp && Config.Item("Wharass").GetValue <bool>() && Player.ManaPercent > Config.Item("WmanaHarass").GetValue <Slider>().Value)
                {
                    if (Config.Item("Wts").GetValue <StringList>().SelectedIndex == 0)
                    {
                        if (Config.Item("haras" + t.ChampionName).GetValue <bool>())
                        {
                            CastSpell(W, t);
                        }
                    }
                    else
                    {
                        foreach (var enemy in Enemies.Where(enemy => enemy.IsValidTarget(W.Range) && WValidRange(t) && Config.Item("haras" + enemy.ChampionName).GetValue <bool>()))
                        {
                            CastSpell(W, enemy);
                        }
                    }
                }
            }
        }
Example #19
0
 public static void UpdateCombo()
 {
     //Q dash
     if (Q.IsReady() && Q1Combo)
     {
         var target = TargetSelect(Q.Range);
         if (target != null && !Orbwalking.InAutoAttackRange(target) && Orbwalking.CanMove(90))
         {
             Q.Cast(target);
         }
     }
     //W
     if (W.IsReady() && WCombo && !Player.HasBuff("TalonRStealth"))
     {
         var target = TargetSelect(W.Range);
         if (target != null && Orbwalking.CanMove(90) && !(Orbwalking.CanAttack() && Orbwalking.InAutoAttackRange(target)))
         {
             W.Cast(target);
         }
     }
     //R1
     if (R1IsReady() && RCombo)
     {
         var target = TargetSelect(R.Range);
         if (target != null && Orbwalking.CanMove(90) && (Orbwalking.InAutoAttackRange(target) || Q.IsReady()))
         {
             R.Cast();
         }
     }
 }
Example #20
0
        private void LogicE()
        {
            if (Program.Combo && Player.IsWindingUp)
            {
                return;
            }
            if (MainMenu.Item("autoE", true).GetValue <bool>())
            {
                var t = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
                if (t.IsValidTarget())
                {
                    var positionT = Player.ServerPosition - (t.Position - Player.ServerPosition);

                    if (Player.Position.Extend(positionT, 400).CountEnemiesInRange(700) < 2 && Orbwalking.CanMove(0) && !Orbwalking.CanAttack())
                    {
                        var eDmg = E.GetDamage(t);
                        var qDmg = Q.GetDamage(t);
                        if (MainMenu.Item("EQks", true).GetValue <bool>() && qDmg + eDmg + Player.GetAutoAttackDamage(t) > t.Health && Player.Mana > EMANA + QMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q FINISH");
                        }
                        else if ((Program.Harass || Program.Combo) && MainMenu.Item("harrasEQ", true).GetValue <bool>() && Player.Mana > EMANA + QMANA + RMANA)
                        {
                            Program.CastSpell(E, t);
                            Program.debug("E + Q Harras");
                        }
                    }

                    if (Player.Mana > RMANA + EMANA)
                    {
                        if (MainMenu.Item("Ehitchance", true).GetValue <bool>())
                        {
                            if ((Orbwalking.CanMove(0) && !Orbwalking.CanAttack()) || t.IsDashing())
                            {
                                E.CastIfHitchanceEquals(t, HitChance.Dashing);
                            }
                        }
                        if (Player.Health < Player.MaxHealth * 0.3)
                        {
                            if (GetRealDistance(t) < 500)
                            {
                                E.Cast(t, true);
                            }
                            if (Player.CountEnemiesInRange(250) > 0)
                            {
                                E.Cast(t, true);
                            }
                        }
                    }
                }
            }
            if (MainMenu.Item("useE", true).GetValue <KeyBind>().Active)
            {
                var position = Player.ServerPosition - (Game.CursorPos - Player.ServerPosition);
                E.Cast(position, true);
            }
        }
Example #21
0
        /// <summary>
        ///     Does the combo.
        /// </summary>
        private static void DoCombo()
        {
            var useQ         = GetValue <bool>("UseQCombo");
            var useE         = GetValue <bool>("UseECombo");
            var useEPeel     = GetValue <bool>("EPeel");
            var qIntoE       = GetValue <bool>("QIntoE");
            var useR         = GetValue <bool>("UseRCombo");
            var useREnemies  = GetValue <Slider>("RComboEnemies").Value;
            var useEFinisher = GetValue <bool>("EKS");

            var target = TargetSelector.GetTarget(
                Orbwalking.GetRealAutoAttackRange(Player) + 300,
                TargetSelector.DamageType.Physical);

            if (!target.IsValidTarget())
            {
                return;
            }

            if (qIntoE && Q.IsReady() && E.IsReady() && !CanCondemnStun(target, default(Vector3), false))
            {
                var predictedPosition = Player.ServerPosition.Extend(Game.CursorPos, Q.Range);

                if (predictedPosition.Distance(target.ServerPosition) < E.Range &&
                    CanCondemnStun(target, predictedPosition))
                {
                    Q.Cast(predictedPosition);
                    Utility.DelayAction.Add((int)(Q.Delay * 1000 + Game.Ping / 2f), () => E.Cast(target));
                }
            }

            if (Q.IsReady() && useQ && !Orbwalking.CanAttack() &&
                Player.Distance(target) > Orbwalking.GetRealAutoAttackRange(Player))
            {
                Q.Cast(target.Position);
            }

            if (useE && E.IsReady() && CanCondemnStun(target))
            {
                E.Cast(target);
            }

            if (useEPeel && E.IsReady() && !Player.IsFacing(target))
            {
                E.Cast(target);
            }

            if (useR && R.IsReady() && Player.CountEnemiesInRange(1000) >= useREnemies)
            {
                R.Cast();
            }

            if (useEFinisher && E.IsReady() && Player.GetSpellDamage(target, SpellSlot.E) > target.Health)
            {
                E.Cast(target);
            }
        }
Example #22
0
        private void LastHitQ(bool auto = false)
        {
            if (!Q.IsReady())
            {
                return;
            }
            var minions =
                MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                .Where(
                    m =>
                    m.Distance(player) < Q.Range);
            var objAiBases = minions as Obj_AI_Base[] ?? minions.ToArray();

            if (objAiBases.Any())
            {
                Obj_AI_Base target = null;
                foreach (var minion in objAiBases)
                {
                    float minPHP = HealthPrediction.GetHealthPrediction(minion,
                                                                        (int)(player.Distance(minion) / Q.Speed));
                    if (minPHP <= 0 || minPHP > Q.GetDamage(minion))
                    {
                        continue;
                    }
                    var collision = Q.GetCollision(
                        player.Position.To2D(), new List <Vector2>()
                    {
                        player.Position.Extend(minion.Position, Q.Range).To2D()
                    }, 70f);
                    if (collision.Count <= 2 || collision[0].NetworkId == minion.NetworkId || collision[1].NetworkId == minion.NetworkId)
                    {
                        if (collision.Count == 1)
                        {
                            Q.Cast(minion);
                        }
                        else
                        {
                            var other = collision.FirstOrDefault(c => c.NetworkId != minion.NetworkId);
                            if (other != null &&
                                (player.GetAutoAttackDamage(other) * 2 > other.Health - Q.GetDamage(other)) &&
                                HealthPrediction.GetHealthPrediction(minion, 1500) > 0 &&
                                Q.GetDamage(other) < other.Health)
                            {
                                if (Orbwalking.CanAttack())
                                {
                                    player.IssueOrder(GameObjectOrder.AutoAttack, other);
                                }
                            }
                            else
                            {
                                Q.Cast(minion);
                            }
                        }
                    }
                }
            }
        }
Example #23
0
        private void LogicQ()
        {
            var torb = Orbwalker.GetTarget();

            if (torb == null || torb.Type != GameObjectType.obj_AI_Hero)
            {
                if (Config.Item("Qminion", true).GetValue <bool>())
                {
                    var t = TargetSelector.GetTarget(Q.Range + 400, TargetSelector.DamageType.Physical);
                    if (t.IsValidTarget())
                    {
                        var minion = Cache.GetMinions(Prediction.GetPrediction(t, 0.4f).CastPosition, 350).Where(minion2 => minion2.IsValidTarget(Q.Range)).FirstOrDefault();
                        if (minion.IsValidTarget())
                        {
                            if (t.Health < GetQdmg(t))
                            {
                                Q.CastOnUnit(minion);
                            }
                            if (Program.Combo && Player.Mana > RMANA + EMANA)
                            {
                                Q.CastOnUnit(minion);
                            }
                            else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + EMANA + WMANA + EMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                            {
                                Q.CastOnUnit(minion);
                            }
                        }
                    }
                }
            }
            else if (!Orbwalking.CanAttack() && !Player.IsWindingUp)
            {
                var t = torb as Obj_AI_Hero;
                if (t.Health < GetQdmg(t) + GetWdmg(t))
                {
                    Q.CastOnUnit(t);
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA)
                {
                    Q.CastOnUnit(t);
                }
                else if (Program.Farm && Config.Item("harrasQ", true).GetValue <bool>() && Player.Mana > RMANA + QMANA + WMANA + EMANA && Config.Item("harras" + t.ChampionName).GetValue <bool>())
                {
                    Q.CastOnUnit(t);
                }
            }
            if (Program.LaneClear && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value&& Config.Item("farmQ", true).GetValue <bool>())
            {
                var minionList = Cache.GetMinions(Player.ServerPosition, Q.Range);

                if (minionList.Count > Config.Item("LCminions", true).GetValue <Slider>().Value)
                {
                    Q.CastOnUnit(minionList[0]);
                }
            }
        }
Example #24
0
        public static void LaneClearLogic()
        {
            var PacketCast = SkyLv_Jax.Menu.Item("Jax.UsePacketCast").GetValue <bool>();

            var useQ = SkyLv_Jax.Menu.Item("Jax.UseQLaneClear").GetValue <bool>();
            var useW = SkyLv_Jax.Menu.Item("Jax.UseWLaneClear").GetValue <bool>();
            var useE = SkyLv_Jax.Menu.Item("Jax.UseELaneClear").GetValue <bool>();

            var MiniManaQ = SkyLv_Jax.Menu.Item("Jax.QMiniManaLaneClear").GetValue <Slider>().Value;
            var MiniManaW = SkyLv_Jax.Menu.Item("Jax.WMiniManaLaneClear").GetValue <Slider>().Value;
            var MiniManaE = SkyLv_Jax.Menu.Item("Jax.EMiniManaLaneClear").GetValue <Slider>().Value;

            var EMiniHitLaneClear = SkyLv_Jax.Menu.Item("Jax.EMiniHitLaneClear").GetValue <Slider>().Value;

            var Minion = MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.Enemy).FirstOrDefault();

            if (Minion.IsValidTarget() && SkyLv_Jax.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                if (SkyLv_Jax.Menu.Item("Jax.SafeLaneClear").GetValue <bool>() && Player.CountEnemiesInRange(1500) > 0)
                {
                    return;
                }

                if (useQ && Player.ManaPercent > MiniManaQ && Q.IsReady())
                {
                    if (Minion.IsValidTarget(Q.Range) && Q.GetDamage(Minion) > Minion.Health)
                    {
                        Q.Cast(Minion, PacketCast);
                    }
                }

                if (useE && Player.ManaPercent > MiniManaE && E.IsReady() && CustomLib.EnemyMinionInPlayerRange(E.Range) >= EMiniHitLaneClear && !CustomLib.iSJaxEActive())
                {
                    if (Minion.IsValidTarget(E.Range))
                    {
                        E.Cast(PacketCast);
                    }
                }

                if (useE && CustomLib.EnemyMinionInPlayerRange(E.Range) >= EMiniHitLaneClear && CustomLib.iSJaxEActive())
                {
                    if (Minion.IsValidTarget(E.Range))
                    {
                        E.Cast(PacketCast);
                    }
                }

                if (useW && W.IsReady() && Player.Mana >= W.ManaCost)
                {
                    if (Minion.IsValidTarget() && Orbwalking.CanAttack())
                    {
                        W.Cast(PacketCast);
                    }
                }
            }
        }
Example #25
0
File: Ezreal.cs Project: ncmp/L-
        public static bool ShouldCast()
        {
            if ((!Orbwalking.CanAttack(-150) && !Orbwalking.CanAttack() && Orbwalking.CanMove(0) && !ObjectManager.Player.Spellbook.IsCastingSpell) || GetAATarget() == null)
            {
                return(true);
            }


            return(false);
        }
Example #26
0
        private void AfterAttack(AttackableUnit unit, AttackableUnit targetO)
        {
            if (!(targetO is AIHeroClient))
            {
                return;
            }
            AIHeroClient   targ             = (AIHeroClient)targetO;
            List <Vector3> passivePositions = GetPassivePositions(targetO);
            bool           rapid            = player.GetAutoAttackDamage(targ) * 3 + ComboDamage(targ) > targ.Health ||
                                              (player.Health < targ.Health && player.Health < player.MaxHealth / 2);

            if (unit.IsMe && E.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                (config.Item("usee", true).GetValue <bool>() ||
                 (unit.IsMe && config.Item("RapidAttack", true).GetValue <KeyBind>().Active || rapid)) &&
                !Orbwalking.CanAttack())
            {
                E.Cast();
            }
            if (unit.IsMe && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && Q.IsReady() &&
                (config.Item("RapidAttack", true).GetValue <KeyBind>().Active || rapid) && !Orbwalking.CanAttack() &&
                passivePositions.Any())
            {
                var passive = GetClosestPassivePosition(targ);
                var pos     = GetQpoint(targ, passive);
                if (pos.IsValid())
                {
                    Q.Cast(pos);
                }
                else
                {
                    var pos2 = GetQpoint(targ, Prediction.GetPrediction(targ, 2).UnitPosition);
                    if (pos2.IsValid())
                    {
                        Q.Cast(pos2);
                    }
                }
            }
            if (unit.IsMe)
            {
                var          pos    = GetClosestPassivePosition(targetO);
                AIHeroClient target = DrawHelper.GetBetterTarget(W.Range, TargetSelector.DamageType.Physical);
                if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && targetO.NetworkId == target.NetworkId &&
                    R.IsReady() && R.CanCast(target) &&
                    HealthPrediction.GetHealthPrediction(target, 1000) > player.GetAutoAttackDamage(target) &&
                    ComboDamage(target) + player.GetAutoAttackDamage(target) * 5 > target.Health &&
                    ((config.Item("userally", true).GetValue <Slider>().Value <=
                      HeroManager.Allies.Count(
                          a => a.IsValid && !a.IsDead && a.Distance(target) < 600 && a.HealthPercent < 90) &&
                      config.Item("usertf", true).GetValue <bool>()) ||
                     (player.HealthPercent < 75 && config.Item("user", true).GetValue <bool>())))
                {
                    R.CastOnUnit(target);
                }
            }
        }
Example #27
0
 public static bool CanHarras()
 {
     if (!Player.IsWindingUp && Orbwalking.CanAttack())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #28
0
        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())
                    {
                        MinionManager.FarmLocation 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 #29
0
        private void LastHitQ()
        {
            if (!Q.IsReady())
            {
                return;
            }
            if (config.Item("useqLC", true).GetValue <bool>() || config.Item("useqLH", true).GetValue <bool>())
            {
                var minions =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(
                        m =>
                        m.Health > 5 &&
                        m.Health <
                        (orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.LastHit
                                    ? Q.GetDamage(m)
                                    : Q.GetDamage(m) * config.Item("qLHDamage", true).GetValue <Slider>().Value / 100) &&
                        Q.CanCast(m) &&
                        HealthPrediction.GetHealthPrediction(m, (int)(m.Distance(player) / Q.Speed * 1000)) > 0);
                if (minions != null && LastAttackedminiMinion != null)
                {
                    foreach (var minion in
                             minions.Where(
                                 m =>
                                 m.NetworkId != LastAttackedminiMinion.NetworkId ||
                                 (m.NetworkId == LastAttackedminiMinion.NetworkId &&
                                  Utils.GameTimeTickCount - LastAttackedminiMinionTime > 700)))
                    {
                        if (minion.Team == GameObjectTeam.Neutral && minion.CountAlliesInRange(500) > 0 &&
                            minion.NetworkId != LastAttackedminiMinion.NetworkId)
                        {
                            continue;
                        }

                        if (minion.Distance(player) <= player.AttackRange && !Orbwalking.CanAttack() &&
                            Orbwalking.CanMove(100))
                        {
                            if (Q.Cast(minion).IsCasted())
                            {
                                //Orbwalking.Orbwalker.AddToBlackList(minion.NetworkId);
                            }
                        }
                        else if (minion.Distance(player) > player.AttackRange)
                        {
                            if (Q.Cast(minion).IsCasted())
                            {
                                //Orbwalking.Orbwalker.AddToBlackList(minion.NetworkId);
                            }
                        }
                    }
                }
            }
        }
Example #30
0
        private void LogicQ()
        {
            var t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (t.IsValidTarget() && Config.Item("Qon" + t.ChampionName).GetValue <bool>())
            {
                if (Q.GetDamage(t) > t.Health)
                {
                    Program.CastSpell(Q, t);
                }
                if (Program.Combo && Player.Mana > RMANA + QMANA + WMANA)
                {
                    Program.CastSpell(Q, t);
                }
                if (Program.Farm && Orbwalking.CanAttack() && !Player.IsWindingUp && 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);
                }
                foreach (var enemy in Program.Enemies.Where(enemy => enemy.IsValidTarget(Q.Range) && !OktwCommon.CanMove(enemy)))
                {
                    Program.CastSpell(Q, t);
                }
            }

            if (!Player.IsWindingUp && !Program.None && !Program.Combo && Player.Mana > RMANA + QMANA * 2)
            {
                var allMinions = MinionManager.GetMinions(Player.ServerPosition, Q.Range);
                if (Config.Item("farmQout", true).GetValue <bool>())
                {
                    foreach (var minion in allMinions.Where(minion => minion.IsValidTarget(Q.Range)))
                    {
                        if (!Orbwalker.InAutoAttackRange(minion) || (Program.LaneClear && Config.Item("farmQ", true).GetValue <bool>() && Player.ManaPercent > Config.Item("Mana", true).GetValue <Slider>().Value) || (!minion.UnderTurret(true) && minion.UnderTurret()))
                        {
                            var hpPred = HealthPrediction.GetHealthPrediction(minion, 1000);
                            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);
                    }
                }
            }
        }