Exemplo n.º 1
0
 private void Game_OnGameUpdate(EventArgs args)
 {
     switch (orbwalker.ActiveMode)
     {
         case Orbwalking.OrbwalkingMode.Combo:
             Combo();
             break;
         case Orbwalking.OrbwalkingMode.Mixed:
             Harass();
             break;
         case Orbwalking.OrbwalkingMode.LaneClear:
             Clear();
             break;
         case Orbwalking.OrbwalkingMode.LastHit:
             Lasthit();
             break;
         default:
             break;
     }
     Jungle.CastSmite(config.Item("useSmite").GetValue<KeyBind>().Active);
     if (config.Item("EzAutoQ", true).GetValue<KeyBind>().Active && Q.IsReady() &&
         config.Item("EzminmanaaQ", true).GetValue<Slider>().Value < player.ManaPercent &&
         orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo && Orbwalking.CanMove(100))
     {
         Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
         if (target != null && Q.CanCast(target) && target.IsValidTarget())
         {
             Q.CastIfHitchanceEquals(
                 target, CombatHelper.GetHitChance(config.Item("qHit", true).GetValue<Slider>().Value),
                 config.Item("packets").GetValue<bool>());
         }
     }
 }
Exemplo n.º 2
0
 private void FlashCombo()
 {
     if (R.IsReady() && player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready)
     {
         var points = CombatHelper.PointsAroundTheTarget(player.Position, 425);
         var best   =
             points.Where(
                 p =>
                 !p.IsWall() && p.Distance(player.Position) > 200 && p.Distance(player.Position) < 425 &&
                 p.IsValid() && p.CountEnemiesInRange(R.Range) > 0 &&
                 config.Item("Rminflash", true).GetValue <Slider>().Value <=
                 p.CountEnemiesInRange(R.Range - 150))
             .OrderByDescending(p => p.CountEnemiesInRange(R.Range - 100))
             .FirstOrDefault();
         if (best.CountEnemiesInRange(R.Range - 150) > player.CountEnemiesInRange(R.Range) &&
             CombatHelper.CheckInterrupt(best, R.Range))
         {
             player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), best);
             Utility.DelayAction.Add(50, () => { R.Cast(); });
             justR = true;
             Utility.DelayAction.Add(200, () => justR = false);
             orbwalker.SetAttack(false);
             orbwalker.SetMovement(false);
             return;
         }
     }
     if (!rActive && Orbwalking.CanMove(100))
     {
         if (!justR)
         {
             Orbwalking.MoveTo(Game.CursorPos, 80f);
             Combo();
         }
     }
 }
Exemplo n.º 3
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var closestPassive = GetClosestPassivePosition(target);

            if (closestPassive.IsValid() && config.Item("MoveToVitals", true).GetValue <bool>() &&
                Orbwalking.CanMove(100) && Game.CursorPos.Distance(target.Position) < 350)
            {
                //orbwalker.SetMovement(false);
                player.IssueOrder(
                    GameObjectOrder.MoveTo,
                    target.Position.Extend(closestPassive, Math.Max(player.BoundingRadius + target.BoundingRadius, 100)));
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && Orbwalking.CanMove(100) &&
                config.Item("useqMin", true).GetValue <Slider>().Value <= player.Distance(target) &&
                (closestPassive.IsValid() || (target.HealthPercent < 30)))
            {
                var pos = GetQpoint(target, closestPassive);
                if (pos.IsValid())
                {
                    Q.Cast(pos, config.Item("packets").GetValue <bool>());
                }
                else if (target.HealthPercent < 30)
                {
                    if (
                        CheckQusage(
                            target.Position.Extend(
                                Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius),
                            target))
                    {
                        Q.Cast(
                            target.Position.Extend(
                                Prediction.GetPrediction(target, player.Distance(target) / 1600).UnitPosition, Qradius),
                            config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && target.Distance(player) > 350f &&
                W.GetDamage(target) > target.Health)
            {
                W.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() && hasIgnite && ComboDamage(target) > target.Health &&
                !Q.IsReady() &&
                (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) || player.HealthPercent < 15))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 4
0
 private void handeQ(Obj_AI_Hero target, HitChance hitChance)
 {
     if (player.Distance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !Orbwalking.CanAttack() &&
         Orbwalking.CanMove(100) && target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
     {
         if (Program.IsSPrediction)
         {
             Q.SPredictionCast(target, hitChance);
         }
         else
         {
             Q.CastIfHitchanceEquals(target, hitChance, config.Item("packets").GetValue <bool>());
         }
     }
     else if (player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
     {
         if (Program.IsSPrediction)
         {
             Q.SPredictionCast(target, hitChance);
         }
         else
         {
             Q.CastIfHitchanceEquals(target, hitChance, config.Item("packets").GetValue <bool>());
         }
     }
 }
Exemplo n.º 5
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 (Orbwalking.CanMove(100) && !player.IsWindingUp &&
                        mini.Distance(player) > Orbwalking.GetRealAutoAttackRange(mini))
                    {
                        Q.CastOnUnit(mini);
                        return;
                    }
                }
            }
        }
Exemplo n.º 6
0
        private static void LasthitQ()
        {
            if (config.Item("autoqwithe").GetValue <bool>() &&
                !(currEnergy - player.Spellbook.GetSpell(SpellSlot.Q).ManaCost > getEenergy()))
            {
                return;
            }
            var allMinions = MinionManager.GetMinions(player.ServerPosition, Q.Range);

            if (config.Item("autoqls").GetValue <bool>() && Q.IsReady() && Orbwalking.CanMove(100))
            {
                foreach (var minion in allMinions)
                {
                    if (minion.IsValidTarget() &&
                        HealthPrediction.GetHealthPrediction(
                            minion, (int)(player.Distance(minion.Position) * 1000 / 1400)) <
                        player.GetSpellDamage(minion, SpellSlot.Q))
                    {
                        Q.CastOnUnit(minion);
                        currEnergy -= player.Spellbook.GetSpell(SpellSlot.Q).ManaCost;
                        return;
                    }
                }
            }
        }
Exemplo n.º 7
0
        private void LastHitQ()
        {
            var targetQ =
                MinionManager.GetMinions(Q.Range)
                .Where(m => m.Health > 5 &&
                       m.IsEnemy && m.Health < Q.GetDamage(m) && Q.CanCast(m) &&
                       HealthPrediction.GetHealthPrediction(m, (int)((player.Distance(m) / Q.Speed * 1000) + Q.Delay)) > 0);

            if (targetQ.Any() && LastAttackedminiMinion != null)
            {
                foreach (var target in
                         targetQ.Where(
                             m =>
                             m.NetworkId != LastAttackedminiMinion.NetworkId ||
                             (m.NetworkId == LastAttackedminiMinion.NetworkId &&
                              Utils.GameTimeTickCount - LastAttackedminiMinionTime > 700)))
                {
                    if (target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target) && !Orbwalking.CanAttack() &&
                        Orbwalking.CanMove(100))
                    {
                        Q.Cast(target, config.Item("packets").GetValue <bool>());
                    }
                    else if (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target))
                    {
                        Q.Cast(target, config.Item("packets").GetValue <bool>());
                    }
                }
            }
        }
Exemplo n.º 8
0
        private void Combo(Obj_AI_Hero target)
        {
            if (target == null)
            {
                return;
            }
            var   cmbDmg = ComboDamage(target);
            float dist   = (float)(Q.Range + player.MoveSpeed * 2.5);

            if ((config.Item("WaitForStealth", true).GetValue <bool>() && ShacoStealth && cmbDmg < target.Health) ||
                !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, cmbDmg);
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() &&
                Game.CursorPos.Distance(target.Position) < 250 && target.Distance(player) < dist &&
                (target.Distance(player) >= config.Item("useqMin", true).GetValue <Slider>().Value ||
                 (cmbDmg > target.Health && player.CountEnemiesInRange(2000) == 1)))
            {
                if (target.Distance(player) < Q.Range)
                {
                    Q.Cast(Prediction.GetPrediction(target, 0.5f).UnitPosition);
                }
                else
                {
                    if (!CheckWalls(target) || Environment.Map.GetPath(player, target.Position) < dist)
                    {
                        Q.Cast(
                            player.Position.Extend(target.Position, Q.Range));
                    }
                }
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && !target.UnderTurret(true) &&
                target.Health > cmbDmg && player.Distance(target) < W.Range)
            {
                HandleW(target);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                E.CastOnUnit(target);
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && !ShacoClone && target.HealthPercent < 75 &&
                cmbDmg < target.Health && target.HealthPercent > cmbDmg && target.HealthPercent > 25)
            {
                R.Cast();
            }
            if (config.Item("useIgnite").GetValue <bool>() &&
                player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 9
0
        private void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical, true);

            if (config.Item("useeH", true).GetValue <bool>() && E.CanCast(target) && E.IsReady() && !player.IsWindingUp &&
                Orbwalking.CanMove(100))
            {
                CastEtarget(target);
            }
        }
Exemplo n.º 10
0
        private static void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target != null && Q.IsReady() && config.Item("harassq", true).GetValue <bool>() &&
                Orbwalking.CanMove(100))
            {
                HandleQ(target);
            }
        }
Exemplo n.º 11
0
        private static void Combo()
        {
            var         minHit = config.Item("useemin", true).GetValue <Slider>().Value;
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range + 400, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var useE = config.Item("usee", true).GetValue <bool>() && E.IsReady() &&
                       player.Distance(target.Position) < E.Range;

            if (useE)
            {
                if (minHit > 1)
                {
                    CastEmin(target, minHit);
                }
                else if ((player.Distance(target.Position) > Orbwalking.GetRealAutoAttackRange(target) ||
                          player.HealthPercent < 45 || player.CountEnemiesInRange(1000) == 1) &&
                         E.GetPrediction(target).Hitchance >= HitChance.High)
                {
                    CastETarget(target);
                }
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target) && !Q.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.IsReady() && config.Item("useq", true).GetValue <bool>() && Orbwalking.CanMove(100))
            {
                HandleQ(target);
            }
            if (config.Item("usew", true).GetValue <bool>())
            {
                foreach (var ally in HeroManager.Allies.Where(a => a.Distance(blade) < bladeRadius))
                {
                    var data = Program.IncDamages.GetAllyData(ally.NetworkId);
                    if (data.AADamageTaken >= target.GetAutoAttackDamage(ally) - 10)
                    {
                        W.Cast();
                    }
                }
            }
        }
Exemplo n.º 12
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);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 13
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical, true);

            if (target == null || target.IsInvulnerable || target.MagicImmune)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  data      = Program.IncDamages.GetAllyData(player.NetworkId);
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() &&
                ignitedmg > HealthPrediction.GetHealthPrediction(target, 700) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) + 25 || player.HealthPercent < 30) &&
                !justE)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.CanCast(target) && config.Item("useq", true).GetValue <bool>() &&
                (data.IsAboutToDie || player.HealthPercent < 20 && data.AnyCC) && !R.IsReady() &&
                (!player.HasBuff("UndyingRage") || CombatHelper.GetBuffTime(player.GetBuff("UndyingRage")) < 0.4f) &&
                !justR)
            {
                Q.Cast(config.Item("packets").GetValue <bool>());
            }

            if (E.IsReady() && config.Item("usee", true).GetValue <bool>() && !player.IsWindingUp &&
                Orbwalking.CanMove(100))
            {
                if (!config.Item("useeLimited", true).GetValue <bool>() ||
                    Orbwalking.GetRealAutoAttackRange(target) + 25 < player.Distance(target))
                {
                    CastEtarget(target);
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && !Orbwalking.CanAttack() &&
                Orbwalking.CanMove(100))
            {
                W.Cast();
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && data.IsAboutToDie)
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
        }
Exemplo n.º 14
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical, true);

            if (player.IsWindingUp || target == null || !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target))
            {
                CastQ(target);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) &&
                (((E.GetDamage(target) > target.Health) || player.HealthPercent > 25) ||
                 Program.IncDamages.GetAllyData(player.NetworkId).IsAboutToDie))
            {
                E.Cast(target);
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() &&
                player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) + 50)
            {
                W.Cast();
            }
            if (config.Item("userCCed", true).GetValue <bool>() && R.IsReady() && CombatHelper.IsCCed(player))
            {
                R.Cast();
            }
            if (config.Item("userbeforeCCed", true).GetValue <bool>() && R.IsReady() &&
                Program.IncDamages.GetAllyData(player.NetworkId).AnyCC)
            {
                R.Cast();
            }
            if (config.Item("gotoAxe", true).GetValue <bool>())
            {
                GotoAxe(target.Position);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() &&
                ignitedmg > HealthPrediction.GetHealthPrediction(target, 1000) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) + 25)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 15
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;
            var   buff = Jungle.GetNearest(player.Position);

            if (buff != null && config.Item("useeLCsteal", true).GetValue <bool>() && E.IsReady())
            {
                var dmg = new double[] { 50, 65, 80, 95, 110 }[E.Level] +0.75 * player.FlatMagicDamageMod +
                Math.Min(300, new double[] { 6, 6.5, 7, 7.5, 8 }[E.Level] / 100 * buff.MaxHealth);
                if (E.CanCast(buff) && Damage.CalcDamage(player, buff, Damage.DamageType.Magical, dmg) > buff.Health)
                {
                    E.CastOnUnit(buff);
                }
            }
            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var pos  = Prediction.GetPrediction(player, 1);
            var coll = Qp.GetCollision(
                player.Position.To2D(),
                new List <Vector2>
            {
                player.Position.Extend(pos.UnitPosition, player.Distance(pos.CastPosition) * -1).To2D()
            });

            if ((coll.Count > 0 || Environment.Minion.countMinionsInrange(player.Position, 250f) > 0) &&
                config.Item("useqLC", true).GetValue <bool>())
            {
                CastQ();
            }
            if (config.Item("moveLC", true).GetValue <bool>() && player.CountEnemiesInRange(1000) < 1 &&
                Orbwalking.CanMove(100) && player.Mana > 30 && !player.IsWindingUp)
            {
                var mini =
                    MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(m => !m.HasBuff("poisontrailtarget") && !m.UnderTurret(true))
                    .OrderBy(m => m.Distance(player))
                    .FirstOrDefault();

                if (mini != null && !Environment.Minion.KillableMinion(player.AttackRange))
                {
                    player.IssueOrder(
                        GameObjectOrder.MoveTo, player.Position.Extend(mini.Position, player.Distance(mini) + 100));
                    Orbwalking.Attack = false;
                    Orbwalking.Move   = false;
                }
            }
        }
Exemplo n.º 16
0
        private void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Physical, true);
            float       perc   = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || target == null)
            {
                return;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Orbwalking.CanMove(100) && !player.IsWindingUp &&
                Q.CanCast(target))
            {
                Q.CastOnUnit(target);
            }
        }
Exemplo n.º 17
0
        private static void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);
            float       perc   = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || target == null)
            {
                return;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Q.IsReady() && Q.CanCast(target) &&
                Orbwalking.CanMove(100) && target.Distance(player) < Q.Range &&
                (player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) || !Orbwalking.CanAttack()))
            {
                Q.CastIfHitchanceEquals(target, HitChance.High);
            }
        }
Exemplo n.º 18
0
        private void handleWEnemyHero(Obj_AI_Hero target)
        {
            if (target.GetBuffCount("TahmKenchPDebuffCounter") == 3 && !CombatHelper.CheckCriticalBuffs(target) &&
                !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Snare) && !Q.CanCast(target) &&
                !justQ)
            {
                orbwalker.SetMovement(false);
                if (Orbwalking.CanMove(100) && Game.CursorPos.Distance(target.Position) < 300)
                {
                    player.IssueOrder(GameObjectOrder.MoveTo, target.Position.Extend(player.Position, 100));
                }

                lastWtarget = Team.Enemy;
                W.CastOnUnit(target, true);
            }
        }
Exemplo n.º 19
0
        private void Combo()
        {
            Obj_AI_Hero target = DrawHelper.GetBetterTarget(1500, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var combodmg = ComboDamage(target);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, combodmg);
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  wPred     = W.GetPrediction(target);

            if (config.Item("usew", true).GetValue <bool>() && W.CanCast(target) &&
                (wPred.Hitchance >= HitChance.High || target.HasBuffOfType(BuffType.Slow)) &&
                (!config.Item("usee", true).GetValue <bool>() || (!E.IsReady() && !justE)))
            {
                W.Cast(wPred.CastPosition);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.IsReady())
            {
                CastE(target);
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && R.CanCast(target) &&
                target.HealthPercent < config.Item("userHp", true).GetValue <Slider>().Value&&
                ((!Orbwalking.CanAttack() && Orbwalking.CanMove(100)) ||
                 !config.Item("useronlyMelee", true).GetValue <bool>()))
            {
                R.CastOnUnit(target);
            }
            if (config.Item("useIgnite").GetValue <bool>() && combodmg > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.IsReady() && config.Item("useq2", true).GetValue <bool>() && CanQ2)
            {
                Q.Cast();
            }
        }
Exemplo n.º 20
0
 private void Clear()
 {
     float perc = config.Item("minmana").GetValue<Slider>().Value / 100f;
     if (player.Mana < player.MaxMana * perc)
     {
         return;
     }
     MinionManager.FarmLocation bestPositionE =
         E.GetLineFarmLocation(MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly));
     var qMinions = Environment.Minion.countMinionsInrange(player.Position, Q.Range);
     if (config.Item("useeLC").GetValue<bool>() && E.IsReady() &&
         bestPositionE.MinionsHit > config.Item("ehitLC").GetValue<Slider>().Value)
     {
         E.Cast(bestPositionE.Position, config.Item("packets").GetValue<bool>());
     }
     if (config.Item("useqLC").GetValue<bool>() && Q.IsReady() &&
         qMinions >= config.Item("qhitLC").GetValue<Slider>().Value && Orbwalking.CanMove(100))
     {
         Q.Cast(config.Item("packets").GetValue<bool>());
     }
 }
Exemplo n.º 21
0
        private void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical, true);

            if (config.Item("useeH", true).GetValue <bool>() && target != null && E.CanCast(target) &&
                !player.IsWindingUp && Orbwalking.CanMove(100))
            {
                E.Cast(target);
            }
            if (config.Item("gotoAxeH", true).GetValue <bool>() && target != null)
            {
                GotoAxe(target.Position);
            }
            float perc = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc || player.IsWindingUp || target == null || !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Q.IsReady())
            {
                CastQ(target);
            }
        }
Exemplo n.º 22
0
        private static void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            var cmbdmg = ComboDamage(target);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            bool hasFlash = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) == SpellState.Ready;

            if (config.Item("usee", true).GetValue <bool>() && E.IsReady())
            {
                if (config.Item("useewall", true).GetValue <bool>())
                {
                    var   bestpos = CombatHelper.bestVectorToPoppyFlash2(target);
                    float damage  =
                        (float)
                        (ComboDamage(target) +
                         Damage.CalcDamage(
                             player, target, Damage.DamageType.Magical,
                             (eSecond[E.Level - 1] + 0.8f * player.FlatMagicDamageMod)) +
                         (player.GetAutoAttackDamage(target) * 4));
                    float damageno = (float)(ComboDamage(target) + (player.GetAutoAttackDamage(target) * 4));
                    if (config.Item("useeflash", true).GetValue <bool>() && hasFlash && !CheckWalls(player, target) &&
                        damage > target.Health && target.Health > damageno &&
                        CombatHelper.bestVectorToPoppyFlash(target).IsValid())
                    {
                        player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), bestpos);
                        Utility.DelayAction.Add(
                            100, () => E.CastOnUnit(target));
                    }
                    if (E.CanCast(target) &&
                        (CheckWalls(player, target) ||
                         target.Health < E.GetDamage(target) + player.GetAutoAttackDamage(target, true)))
                    {
                        E.CastOnUnit(target);
                    }
                    if (E.CanCast(target) && Q.IsReady() && Q.Instance.ManaCost + E.Instance.ManaCost > player.Mana &&
                        target.Health <
                        E.GetDamage(target) + Q.GetDamage(target) + player.GetAutoAttackDamage(target, true))
                    {
                        E.CastOnUnit(target);
                    }
                }
                else
                {
                    if (E.CanCast(target))
                    {
                        E.CastOnUnit(target);
                    }
                }
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && Q.CanCast(target) &&
                Orbwalking.CanMove(100) && target.Distance(player) < Q.Range &&
                (player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) || !Orbwalking.CanAttack()))
            {
                Q.CastIfHitchanceEquals(target, HitChance.High);
            }

            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready &&
                             config.Item("useIgnite").GetValue <bool>();
            var ignitedmg = hasIgnite ? (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) : 0f;

            if (ignitedmg > target.Health && hasIgnite && !E.CanCast(target) && !Q.CanCast(target) &&
                (player.Distance(target) > Q.Range || player.HealthPercent < 30))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (config.Item("userindanger", true).GetValue <bool>() && R.IsReady() &&
                ((player.CountEnemiesInRange(800) >= 2 &&
                  player.CountEnemiesInRange(800) > player.CountAlliesInRange(1500) + 1 && player.HealthPercent < 60) ||
                 (player.Health < target.Health && player.HealthPercent < 40 &&
                  player.CountAlliesInRange(1000) + 1 < player.CountEnemiesInRange(1000))))
            {
                var targ =
                    HeroManager.Enemies.Where(
                        e =>
                        e.IsValidTarget() && R.CanCast(e) &&
                        (player.HealthPercent < 60 || e.CountEnemiesInRange(300) > 2) &&
                        HeroManager.Enemies.Count(h => h.Distance(e) < 400 && e.HealthPercent < 35) == 0 &&
                        R.GetPrediction(e).CastPosition.Distance(player.Position) < R.ChargedMaxRange)
                    .OrderByDescending(e => R.GetPrediction(e).CastPosition.CountEnemiesInRange(400))
                    .ThenByDescending(e => e.Distance(target))
                    .FirstOrDefault();
                if (R.Range > 1300 && targ == null)
                {
                    targ =
                        HeroManager.Enemies.Where(
                            e =>
                            e.IsValidTarget() && R.CanCast(e) &&
                            R.GetPrediction(e).CastPosition.Distance(player.Position) < R.ChargedMaxRange)
                        .OrderByDescending(e => R.GetPrediction(e).CastPosition.CountEnemiesInRange(400))
                        .ThenByDescending(e => e.Distance(target))
                        .FirstOrDefault();
                }
                if (!R.IsCharging && targ != null)
                {
                    R.StartCharging();
                }
                if (R.IsCharging && targ != null && R.CanCast(targ) && R.Range > 1000 && R.Range > targ.Distance(player))
                {
                    R.CastIfHitchanceEquals(targ, HitChance.Medium);
                }
                if (R.IsCharging && targ != null && R.Range < 1000)
                {
                    return;
                }
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && player.Distance(target) < 1400 &&
                !target.UnderTurret(true))
            {
                var cond = ((Rdmg(target) < target.Health && ignitedmg + Rdmg(target) > target.Health &&
                             player.Distance(target) < 600) ||
                            (target.Distance(player) > E.Range && Rdmg(target) > target.Health &&
                             target.Distance(player) < 1100));
                if (!R.IsCharging && cond && !Q.IsReady() && player.HealthPercent < 40)
                {
                    R.StartCharging();
                    if (hasIgnite && cmbdmg > target.Health && cmbdmg - Rdmg(target) < target.Health)
                    {
                        if (!target.HasBuff("summonerdot"))
                        {
                            player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
                        }
                    }
                }
                if (R.IsCharging && R.CanCast(target) && R.Range > target.Distance(player) && cond)
                {
                    R.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
        }
Exemplo n.º 23
0
        private void Combo(Obj_AI_Hero target)
        {
            if (target == null)
            {
                return;
            }
            var   cmbDmg = ComboDamage(target);
            float dist   = (float)(Q.Range + player.MoveSpeed * 2.5);

            if (ShacoClone && !GhostDelay && config.Item("useClone", true).GetValue <bool>())
            {
                var Gtarget = TargetSelector.GetTarget(dist, TargetSelector.DamageType.Physical);
                switch (config.Item("ghostTarget", true).GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    Gtarget = TargetSelector.GetTarget(GhostRange, TargetSelector.DamageType.Physical);
                    break;

                case 1:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => i.Health)
                        .FirstOrDefault();
                    break;

                case 2:
                    Gtarget =
                        ObjectManager.Get <Obj_AI_Hero>()
                        .Where(i => i.IsEnemy && !i.IsDead && player.Distance(i) <= GhostRange)
                        .OrderBy(i => player.Distance(i))
                        .FirstOrDefault();
                    break;

                default:
                    break;
                }
                var clone = ObjectManager.Get <Obj_AI_Minion>().FirstOrDefault(m => m.Name == player.Name && !m.IsMe);
                if (clone != null && (System.Environment.TickCount - cloneTime > 16500f || clone.HealthPercent < 10) &&
                    !clone.IsWindingUp)
                {
                    var pos =
                        CombatHelper.PointsAroundTheTarget(clone.Position, 600)
                        .OrderByDescending(p => p.CountEnemiesInRange(250))
                        .ThenBy(p => Environment.Minion.countMinionsInrange(p, 250))
                        .FirstOrDefault();
                    if (pos.IsValid())
                    {
                        R.Cast(pos, config.Item("packets").GetValue <bool>());
                    }
                }
                if (clone != null && Gtarget.IsValid && !clone.IsWindingUp)
                {
                    if (CanCloneAttack(clone) || player.HealthPercent < 25)
                    {
                        R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                    }
                    else
                    {
                        var prediction = Prediction.GetPrediction(Gtarget, 2);
                        R.Cast(
                            target.Position.Extend(prediction.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget)),
                            config.Item("packets").GetValue <bool>());
                    }

                    GhostDelay = true;
                    Utility.DelayAction.Add(200, () => GhostDelay = false);
                }
            }
            if ((config.Item("WaitForStealth", true).GetValue <bool>() && ShacoStealth && cmbDmg < target.Health) ||
                !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, cmbDmg);
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() &&
                Game.CursorPos.Distance(target.Position) < 250 && target.Distance(player) < dist &&
                (target.Distance(player) >= config.Item("useqMin", true).GetValue <Slider>().Value ||
                 (cmbDmg > target.Health && player.CountEnemiesInRange(2000) == 1)))
            {
                if (target.Distance(player) < Q.Range)
                {
                    Q.Cast(target.Position, config.Item("packets").GetValue <bool>());
                }
                else
                {
                    if (!CheckWalls(target) || Environment.Map.GetPath(player, target.Position) < dist)
                    {
                        Q.Cast(
                            player.Position.Extend(target.Position, Q.Range), config.Item("packets").GetValue <bool>());
                    }
                }
            }
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && !target.UnderTurret(true) &&
                target.Health > cmbDmg && player.Distance(target) < W.Range)
            {
                HandleW(target);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                E.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && !ShacoClone && target.HealthPercent < 75 &&
                cmbDmg < target.Health && target.HealthPercent > cmbDmg && target.HealthPercent > 25)
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("useIgnite").GetValue <bool>() &&
                player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite) > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 24
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            orbwalker.SetMovement(true);
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                Harass();
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                Clear();
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                LastHit();
                break;

            default:
                break;
            }
            if (target == null)
            {
                return;
            }
            if (player.HasBuff("KennenShurikenStorm") &&
                config.Item("Minhelath", true).GetValue <Slider>().Value > player.Health / player.MaxHealth * 100)
            {
                if (Items.HasItem(ItemHandler.Wooglet.Id) && Items.CanUseItem(ItemHandler.Wooglet.Id))
                {
                    ItemHandler.Wooglet.Cast();
                }
                if (Items.HasItem(ItemHandler.Zhonya.Id) && Items.CanUseItem(ItemHandler.Zhonya.Id))
                {
                    ItemHandler.Zhonya.Cast();
                }
            }
            if (config.Item("autoq", true).GetValue <bool>())
            {
                if (Q.CanCast(target) && !target.IsDashing() &&
                    (MarkOfStorm(target) > 1 || (MarkOfStorm(target) > 0 && player.Distance(target) < W.Range)))
                {
                    Q.Cast(target, config.Item("packets").GetValue <bool>());
                }
            }
            if (config.Item("autow", true).GetValue <bool>() && W.IsReady() && MarkOfStorm(target) > 1)
            {
                if (player.Distance(target) < W.Range)
                {
                    W.Cast(config.Item("packets").GetValue <bool>());
                }
            }
            if (config.Item("KenAutoQ", true).GetValue <KeyBind>().Active&& Q.IsReady() &&
                config.Item("KenminmanaaQ", true).GetValue <Slider>().Value < player.ManaPercent &&
                orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo && Orbwalking.CanMove(100))
            {
                if (target != null && Q.CanCast(target) && target.IsValidTarget())
                {
                    Q.CastIfHitchanceEquals(
                        target, CombatHelper.GetHitChance(config.Item("qHit", true).GetValue <Slider>().Value),
                        config.Item("packets").GetValue <bool>());
                }
            }
        }
Exemplo n.º 25
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (player.HasBuff("KennenLightningRush") && player.Health > target.Health && target.UnderTurret(true))
            {
                orbwalker.SetMovement(false);
                player.IssueOrder(GameObjectOrder.MoveTo, target);
            }
            bool hasIgnite   = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  combodamage = ComboDamage(target);
            var  ignitedmg   = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !Q.CanCast(target) && !W.IsReady())
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }

            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && Orbwalking.CanMove(100) &&
                !target.IsDashing())
            {
                Q.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && W.Range > player.Distance(target) &&
                MarkOfStorm(target) > 0)
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usee", true).GetValue <bool>() && !target.UnderTurret(true) && E.IsReady() &&
                (player.Distance(target) < 80 ||
                 (!player.HasBuff("KennenLightningRush") && !Q.CanCast(target) &&
                  config.Item("useemin", true).GetValue <Slider>().Value < player.Health / player.MaxHealth * 100 &&
                  MarkOfStorm(target) > 0 &&
                  CombatHelper.IsPossibleToReachHim(target, 1f, new float[5] {
                2f, 2f, 2f, 2f, 2f
            }[Q.Level - 1]))))
            {
                E.Cast(config.Item("packets").GetValue <bool>());
            }

            if (R.IsReady() && !player.HasBuffOfType(BuffType.Snare) &&
                (config.Item("user", true).GetValue <Slider>().Value <=
                 player.CountEnemiesInRange(config.Item("userrange", true).GetValue <Slider>().Value) ||
                 (config.Item("usertarget", true).GetValue <bool>() &&
                  combodamage + player.GetAutoAttackDamage(target) * 3 > target.Health && !Q.CanCast(target) &&
                  player.Distance(target) < config.Item("userrange", true).GetValue <Slider>().Value)))
            {
                R.Cast(config.Item("packets").GetValue <bool>());
            }
        }
Exemplo n.º 26
0
        private void Harass()
        {
            if (config.Item("useqLH", true).GetValue <bool>() && Q.IsReady())
            {
                LastHitQ();
            }
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("useqLC", true).GetValue <bool>() && Q.CanCast(target) && Orbwalking.CanMove(100) &&
                !target.IsDashing())
            {
                Q.Cast(target, config.Item("packets").GetValue <bool>());
            }
            if (config.Item("usewLC", true).GetValue <bool>() && W.IsReady() && W.Range < player.Distance(target) &&
                target.HasBuff("kennenmarkofstorm"))
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }
        }
Exemplo n.º 27
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, true);

            if (player.IsWindingUp || target == null || !Orbwalking.CanMove(100))
            {
                return;
            }
            if (config.Item("usee", true).GetValue <bool>() &&
                player.Distance(target) < config.Item("useeRange", true).GetValue <Slider>().Value&& E.IsReady())
            {
                var pos = GetVectorE(target);
                if (player.Distance(pos) < E.Range)
                {
                    E.Cast(pos);
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() &&
                (!target.UnderTurret(true) || player.UnderTurret(true)))
            {
                var pos = player.Position.Extend(Prediction.GetPrediction(target, 700).UnitPosition, W.Range / 2);
                if (player.Distance(pos) < W.Range)
                {
                    W.Cast(pos);
                }
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady())
            {
                Obj_AI_Hero targetR = null;
                switch (config.Item("userTarget", true).GetValue <StringList>().SelectedIndex)
                {
                case 0:
                    targetR =
                        HeroManager.Enemies.Where(e => e.IsValidTarget(R.Range))
                        .OrderByDescending(e => (e.Armor + e.FlatMagicReduction))
                        .FirstOrDefault();
                    break;

                case 1:
                    targetR = target.IsValidTarget(R.Range) ? target : null;
                    break;
                }

                if (targetR != null)
                {
                    var userTime = config.Item("userTime", true).GetValue <StringList>().SelectedIndex;
                    if (userTime == 0 || userTime == 2)
                    {
                        if (player.CountEnemiesInRange(R.Range) >= 2)
                        {
                            R.Cast(targetR);
                        }
                    }
                    if (userTime == 1 || userTime == 2)
                    {
                        var data = Program.IncDamages.GetAllyData(player.NetworkId);
                        if (data.DamageTaken > player.Health * 0.4 || data.IsAboutToDie ||
                            (player.HealthPercent < 60 && target.HealthPercent < 60 &&
                             player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target)))
                        {
                            R.Cast(targetR);
                        }
                    }
                }
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() &&
                ignitedmg > HealthPrediction.GetHealthPrediction(target, 1000) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                ((player.HealthPercent < 35) ||
                 (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) + 25)))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 28
0
        private void Combo()
        {
            Obj_AI_Hero target = DrawHelper.GetBetterTarget(W.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            if (config.Item("RunFOTT", true).GetValue <bool>() &&
                (!config.Item("RunFOTTHP", true).GetValue <bool>() ||
                 (config.Item("RunFOTTHP", true).GetValue <bool>() && player.Health > target.Health)))
            {
                Vector3 pos;
                if (target.IsMoving)
                {
                    var rand = new Random();
                    if (ChaseFix)
                    {
                        pos = target.Position.Extend(
                            Prediction.GetPrediction(target, 0.6f).UnitPosition, rand.Next(480, 550));
                    }
                    else
                    {
                        var positions = CombatHelper.PointsAroundTheTargetOuterRing(target.ServerPosition, 130, 16);
                        pos = positions[rand.Next(positions.Count)];
                    }
                    if (player.Distance(pos) < 90)
                    {
                        if (!ChaseFix)
                        {
                            ChaseFix = true;
                        }
                        else
                        {
                            ChaseFix = false;
                        }
                    }
                }
                else
                {
                    pos = Vector3.Zero;
                }
                if (Orbwalking.CanMove(100))
                {
                    if (player.Distance(pos) > 40 && pos.IsValid())
                    {
                        Orbwalking.Move   = false;
                        Orbwalking.Attack = false;
                        player.IssueOrder(GameObjectOrder.MoveTo, pos);
                    }
                }
            }
            var qTarget =
                HeroManager.Enemies.FirstOrDefault(
                    enemy =>
                    enemy.IsValidTarget() && enemy.Distance(player) < 200 &&
                    CombatHelper.IsFacing(enemy, player.Position, 90f) &&
                    !CombatHelper.IsFacing(player, enemy.Position, 90f) && player.IsMoving && enemy.IsMoving);

            if (config.Item("useq", true).GetValue <bool>() &&
                (qTarget != null || target.HasBuff("poisontrailtarget") || player.Distance(target) <= 500))
            {
                CastQ();
            }
            if (config.Item("usew", true).GetValue <bool>() && !config.Item("WwithE", true).GetValue <bool>() &&
                W.IsReady() && W.CanCast(target))
            {
                var tarPered = W.GetPrediction(target);
                if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                    tarPered.Hitchance >= HitChance.VeryHigh)
                {
                    W.Cast(tarPered.CastPosition);
                }
            }
            if (R.IsReady() && config.Item("user", true).GetValue <bool>() &&
                (((config.Item("rUnderHealt", true).GetValue <Slider>().Value > player.HealthPercent &&
                   0 < player.CountEnemiesInRange(750)) ||
                  config.Item("rMinEnemy", true).GetValue <Slider>().Value <= player.CountEnemiesInRange(750)) &&
                 (!config.Item("rkeepManaE", true).GetValue <bool>() ||
                  (config.Item("rkeepManaE", true).GetValue <bool>() &&
                   player.Mana - R.Instance.ManaCost > E.Instance.ManaCost))))
            {
                R.Cast();
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() && ignitedmg > target.Health && hasIgnite)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            var blockOrb = false;
            var throwPos = target.Position.Extend(player.Position, 500);

            if (config.Item("usee", true).GetValue <bool>() && E.IsReady() &&
                ((throwPos.CountAlliesInRange(700) > target.CountAlliesInRange(700) &&
                  HeroManager.Allies.FirstOrDefault(a => a.Distance(throwPos) < 700 && a.HealthPercent < 25) == null) ||
                 W.GetDamage(target) > target.Health || !target.HasBuff("poisontrailtarget") ||
                 config.Item("WwithE", true).GetValue <bool>()))
            {
                var pos = Prediction.GetPrediction(target, W.Delay / 2)
                          .UnitPosition.Extend(player.Position, 515 + player.Distance(target.Position));
                if (config.Item("WwithE", true).GetValue <bool>() && E.CanCast(target) && W.IsReady() &&
                    player.Mana > E.Instance.ManaCost + W.Instance.ManaCost + 15 && !pos.IsWall() &&
                    target.Health > E.GetDamage(target) + Q.GetDamage(target))
                {
                    W.Cast(pos);
                    return;
                }
                if (E.CanCast(target))
                {
                    E.CastOnUnit(target);
                }
                else if (target.Distance(player) < E.Range + 100)
                {
                    blockOrb = true;
                }
            }
            if (blockOrb)
            {
                Orbwalking.Attack = false;
            }
        }
Exemplo n.º 29
0
        private void Clear()
        {
            var target = Jungle.GetNearest(player.Position, GetTargetRange());

            if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() && !E.IsCharging)
            {
                if (target != null && Q.CanCast(target))
                {
                    Q.Cast(target.Position, config.Item("packets").GetValue <bool>());
                }
                else
                {
                    MinionManager.FarmLocation bestPositionQ =
                        Q.GetLineFarmLocation(MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly));
                    if (bestPositionQ.MinionsHit >= config.Item("qMinHit", true).GetValue <Slider>().Value)
                    {
                        Q.Cast(bestPositionQ.Position, config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (config.Item("usewLC", true).GetValue <bool>() && W.IsReady() && !E.IsCharging)
            {
                if (target != null && target.Distance(player) < W.Range)
                {
                    W.Cast(config.Item("packets").GetValue <bool>());
                }
                else
                {
                    if (Environment.Minion.countMinionsInrange(player.Position, W.Range) >=
                        config.Item("wMinHit", true).GetValue <Slider>().Value)
                    {
                        W.Cast(config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (config.Item("collectBlobs", true).GetValue <bool>() && !E.IsCharging)
            {
                var blob =
                    ObjectManager.Get <Obj_AI_Base>()
                    .Where(
                        o =>
                        !o.IsDead && o.IsValid && o.Name == "BlobDrop" && o.Team == player.Team &&
                        o.Distance(player) < Orbwalking.GetRealAutoAttackRange(player))
                    .OrderBy(o => o.Distance(player))
                    .FirstOrDefault();
                if (blob != null && Orbwalking.CanMove(300) && !Orbwalking.CanAttack() && !player.IsWindingUp)
                {
                    orbwalker.SetMovement(false);
                    player.IssueOrder(GameObjectOrder.MoveTo, blob.Position);
                }
            }
            if (config.Item("useeLC", true).GetValue <bool>() && E.IsReady())
            {
                if (target != null && target.IsValidTarget())
                {
                    CastE(target);
                }
                else
                {
                    MinionManager.FarmLocation bestPositionE =
                        E.GetCircularFarmLocation(
                            MinionManager.GetMinions(eRanges[E.Level - 1], MinionTypes.All, MinionTeam.NotAlly));
                    var castPos = Vector3.Zero;
                    if (bestPositionE.MinionsHit < config.Item("eMinHit", true).GetValue <Slider>().Value&&
                        farmPos.IsValid())
                    {
                        castPos = farmPos;
                    }
                    if (bestPositionE.MinionsHit >= config.Item("eMinHit", true).GetValue <Slider>().Value)
                    {
                        castPos = bestPositionE.Position.To3D();
                    }
                    if (castPos.IsValid())
                    {
                        farmPos = bestPositionE.Position.To3D();
                        Utility.DelayAction.Add(5000, () => { farmPos = Vector3.Zero; });
                        CastE(castPos);
                    }
                }
            }
        }
Exemplo n.º 30
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(
                E.Range, TargetSelector.DamageType.Physical, true, HeroManager.Enemies.Where(h => h.IsInvulnerable));

            if (target == null)
            {
                return;
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite", true).GetValue <bool>() &&
                ignitedmg > HealthPrediction.GetHealthPrediction(target, 700) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) && !Q.IsReady() && !justQ)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (config.Item("usew", true).GetValue <Slider>().Value > player.HealthPercent &&
                player.CountEnemiesInRange(500) > 0)
            {
                W.Cast();
            }
            if (R.IsReady() && config.Item("user", true).GetValue <bool>())
            {
                var Rtarget =
                    HeroManager.Enemies.FirstOrDefault(e => e.HealthPercent < 50 && e.CountAlliesInRange(660) > 0);
                if (Rtarget != null)
                {
                    R.CastIfWillHit(Rtarget, config.Item("Rmin", true).GetValue <Slider>().Value);
                }
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target), config.Item("AutoW", true).GetValue <bool>());
            }
            var barrels =
                GetBarrels()
                .Where(
                    o =>
                    o.IsValid && !o.IsDead && o.Distance(player) < 1600 && o.SkinName == "GangplankBarrel" &&
                    o.GetBuff("gangplankebarrellife").Caster.IsMe)
                .ToList();

            if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && config.Item("usee", true).GetValue <bool>() &&
                E.IsReady() && Orbwalking.CanMove(100) && !justE)
            {
                var Qbarrels = GetBarrels().Where(o => o.Distance(player) < Q.Range && KillableBarrel(o));
                foreach (var Qbarrel in Qbarrels)
                {
                    if (Qbarrel.Distance(target) < BarrelExplosionRange)
                    {
                        continue;
                    }
                    var point =
                        GetBarrelPoints(Qbarrel.Position)
                        .Where(
                            p =>
                            p.IsValid() && !p.IsWall() && p.Distance(player.Position) < E.Range &&
                            p.Distance(Prediction.GetPrediction(target, GetQTime(Qbarrel)).UnitPosition) <
                            BarrelExplosionRange && Qbarrel.Distance(p) < BarrelConnectionRange &&
                            savedBarrels.Count(b => b.barrel.Position.Distance(p) < BarrelExplosionRange) < 1)
                        .OrderBy(p => p.Distance(target.Position))
                        .FirstOrDefault();
                    if (point != null)
                    {
                        E.Cast(point);
                        Utility.DelayAction.Add(1, () => Q.CastOnUnit(Qbarrel));
                        return;
                    }
                }
            }
            var meleeRangeBarrel =
                barrels.FirstOrDefault(
                    b =>
                    (b.Health < 2 || (b.Health == 2 && Q.IsReady())) &&
                    b.Distance(player) < Orbwalking.GetAutoAttackRange(player, b) &&
                    b.CountEnemiesInRange(BarrelExplosionRange) > 0);

            if (meleeRangeBarrel != null && Orbwalking.CanMove(100))
            {
                player.IssueOrder(GameObjectOrder.AutoAttack, meleeRangeBarrel);
            }
            if (Q.IsReady())
            {
                if (barrels.Any())
                {
                    var detoneateTargetBarrels = barrels.Where(b => b.Distance(player) < Q.Range);
                    if (config.Item("detoneateTarget", true).GetValue <bool>())
                    {
                        if (detoneateTargetBarrels.Any())
                        {
                            foreach (var detoneateTargetBarrel in detoneateTargetBarrels)
                            {
                                if (!KillableBarrel(detoneateTargetBarrel))
                                {
                                    continue;
                                }
                                if (
                                    detoneateTargetBarrel.Distance(
                                        Prediction.GetPrediction(target, GetQTime(detoneateTargetBarrel)).UnitPosition) <
                                    BarrelExplosionRange &&
                                    target.Distance(detoneateTargetBarrel.Position) < BarrelExplosionRange)
                                {
                                    Q.CastOnUnit(detoneateTargetBarrel, config.Item("packets").GetValue <bool>());
                                    return;
                                }
                                var detoneateTargetBarrelSeconds =
                                    barrels.Where(b => b.Distance(detoneateTargetBarrel) < BarrelConnectionRange);
                                if (detoneateTargetBarrelSeconds.Any())
                                {
                                    foreach (var detoneateTargetBarrelSecond in detoneateTargetBarrelSeconds)
                                    {
                                        if (
                                            detoneateTargetBarrelSecond.Distance(
                                                Prediction.GetPrediction(
                                                    target, GetQTime(detoneateTargetBarrel) + 0.15f).UnitPosition) <
                                            BarrelExplosionRange &&
                                            target.Distance(detoneateTargetBarrelSecond.Position) < BarrelExplosionRange)
                                        {
                                            Q.CastOnUnit(detoneateTargetBarrel, config.Item("packets").GetValue <bool>());
                                            return;
                                        }
                                    }
                                }
                            }
                        }

                        if (config.Item("detoneateTargets", true).GetValue <Slider>().Value > 1)
                        {
                            var enemies =
                                HeroManager.Enemies.Where(e => e.IsValidTarget() && e.Distance(player) < 600)
                                .Select(e => Prediction.GetPrediction(e, 0.25f));
                            var enemies2 =
                                HeroManager.Enemies.Where(e => e.IsValidTarget() && e.Distance(player) < 600)
                                .Select(e => Prediction.GetPrediction(e, 0.35f));
                            if (detoneateTargetBarrels.Any())
                            {
                                foreach (var detoneateTargetBarrel in detoneateTargetBarrels)
                                {
                                    if (!KillableBarrel(detoneateTargetBarrel))
                                    {
                                        continue;
                                    }
                                    var enemyCount =
                                        enemies.Count(
                                            e =>
                                            e.UnitPosition.Distance(detoneateTargetBarrel.Position) <
                                            BarrelExplosionRange);
                                    if (enemyCount >= config.Item("detoneateTargets", true).GetValue <Slider>().Value&&
                                        detoneateTargetBarrel.CountEnemiesInRange(BarrelExplosionRange) >=
                                        config.Item("detoneateTargets", true).GetValue <Slider>().Value)
                                    {
                                        Q.CastOnUnit(detoneateTargetBarrel, config.Item("packets").GetValue <bool>());
                                        return;
                                    }
                                    var detoneateTargetBarrelSeconds =
                                        barrels.Where(b => b.Distance(detoneateTargetBarrel) < BarrelConnectionRange);
                                    if (detoneateTargetBarrelSeconds.Any())
                                    {
                                        foreach (var detoneateTargetBarrelSecond in detoneateTargetBarrelSeconds)
                                        {
                                            if (enemyCount +
                                                enemies2.Count(
                                                    e =>
                                                    e.UnitPosition.Distance(detoneateTargetBarrelSecond.Position) <
                                                    BarrelExplosionRange) >=
                                                config.Item("detoneateTargets", true).GetValue <Slider>().Value&&
                                                detoneateTargetBarrelSecond.CountEnemiesInRange(BarrelExplosionRange) >=
                                                config.Item("detoneateTargets", true).GetValue <Slider>().Value)
                                            {
                                                Q.CastOnUnit(
                                                    detoneateTargetBarrel, config.Item("packets").GetValue <bool>());
                                                return;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && Orbwalking.CanMove(100) && !justE)
                {
                    CastQonHero(target, barrels);
                }
            }
        }