Esempio n. 1
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>());
         }
     }
 }
Esempio n. 2
0
        private void Combo()
        {
            foreach (var b in player.Buffs)
            {
                Console.WriteLine(b.Name);
            }
            Obj_AI_Hero target = TargetSelector.GetTarget(1000, TargetSelector.DamageType.Physical, true);

            if (target == null)
            {
                return;
            }
            if (player.HasBuff("hecarimrampspeed") &&
                player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
            {
                orbwalker.SetAttack(false);
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target))
            {
                Q.Cast();
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsInRange(target) &&
                Program.IncDamages.GetAllyData(player.NetworkId).DamageTaken > 50 && player.HealthPercent < 98)
            {
                W.Cast();
            }
            if (config.Item("usee", true).GetValue <bool>() &&
                player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target) + 50 &&
                player.Distance(target) < config.Item("useeRange", true).GetValue <Slider>().Value&& E.IsReady())
            {
                E.Cast();
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && R.CanCast(target))
            {
                if (config.Item("useRbeforeCC", true).GetValue <bool>() &&
                    Program.IncDamages.GetAllyData(player.NetworkId).AnyCC)
                {
                    R.CastIfHitchanceEquals(target, HitChance.High);
                }
                var rPred = Prediction.GetPrediction(target, R.Delay, R.Width, R.Speed);
                if (rPred.AoeTargetsHitCount >= config.Item("useRMinHit", true).GetValue <Slider>().Value)
                {
                    R.Cast(rPred.CastPosition);
                }
            }
            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 > target.Health && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                ((player.HealthPercent < 35) ||
                 (target.Distance(player) > Orbwalking.GetRealAutoAttackRange(target) + 25)))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Esempio n. 3
0
        private void Clear()
        {
            if (Q.IsReady())
            {
                useQ();
            }
            if (NasusQ && player.CountEnemiesInRange(Orbwalking.GetRealAutoAttackRange(player)) == 0)
            {
                var minion =
                    MinionManager.GetMinions(
                        Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(m => m.Health > 5 && m.Health < Q.GetDamage(m) + player.GetAutoAttackDamage(m));
                orbwalker.ForceTarget(minion);
            }
            float perc = config.Item("minmana").GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            MinionManager.FarmLocation bestPositionE =
                E.GetCircularFarmLocation(MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly), 400f);
            if (config.Item("useeLC").GetValue <bool>() && Q.IsReady() &&
                bestPositionE.MinionsHit >= config.Item("ehitLC").GetValue <Slider>().Value)
            {
                E.Cast(bestPositionE.Position, config.Item("packets").GetValue <bool>());
            }
        }
Esempio n. 4
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;
                    }
                }
            }
        }
Esempio n. 5
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);
            }
        }
Esempio n. 6
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>());
                    }
                }
            }
        }
Esempio n. 7
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical, 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 && !justQ)
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.CanCast(target) && config.Item("useq", true).GetValue <bool>() && !player.IsWindingUp &&
                !data.IncSkillShot)
            {
                Q.CastOnUnit(target, config.Item("packets").GetValue <bool>());
            }
            var cmbdmg = ComboDamage(target) + ItemHandler.GetItemsDamage(target);

            if (E.IsReady() && config.Item("usee", true).GetValue <bool>() && !player.IsWindingUp)
            {
                if (config.Item("useedmg", true).GetValue <bool>() &&
                    data.ProjectileDamageTaken > target.GetAutoAttackDamage(player, true) + 10)
                {
                    CastE(target, data);
                }
                if (config.Item("useeaa", true).GetValue <bool>() &&
                    data.AADamageTaken < target.GetAutoAttackDamage(player, true) + 10 &&
                    !SpellDatabase.AnyReadyCC(player.Position, 700, true))
                {
                    CastE(target, data);
                }
                if (cmbdmg > target.Health && target.Distance(player) > E.Range * 1.8f)
                {
                    CastE(target, data);
                }
            }
            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && player.IsWindingUp)
            {
                W.Cast();
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady() && player.IsWindingUp &&
                cmbdmg * 1.6 + player.GetAutoAttackDamage(target, true) * 5 > target.Health &&
                (target.Health > R.GetDamage(target) * 1.4f || player.HealthPercent < 40))
            {
                CastR(target);
            }
        }
Esempio n. 8
0
 private void InitNocturne()
 {
     P = new Spell(SpellSlot.Q, 1000);
     P.SetSkillshot(
         3000, Orbwalking.GetRealAutoAttackRange(player) + 50, 3000, false, SkillshotType.SkillshotCircle);
     Q = new Spell(SpellSlot.Q, 1150);
     Q.SetSkillshot(0.25f, 60f, 1350, false, SkillshotType.SkillshotLine);
     W = new Spell(SpellSlot.W);
     E = new Spell(SpellSlot.E, 400);
     R = new Spell(SpellSlot.R, rRanges[0]);
 }
Esempio n. 9
0
        private void useQ()
        {
            var minions =
                MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.NotAlly)
                .FirstOrDefault(m => m.Health > 5 && m.Health < Q.GetDamage(m) + player.GetAutoAttackDamage(m));

            if (minions != null)
            {
                Q.Cast(config.Item("packets").GetValue <bool>());
            }
        }
Esempio n. 10
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();
                    }
                }
            }
        }
Esempio n. 11
0
        private void CastEtarget(Obj_AI_Hero target)
        {
            var pred = E.GetPrediction(target);
            var pos  = target.Position.Extend(pred.CastPosition, Orbwalking.GetRealAutoAttackRange(target));
            var poly = CombatHelper.GetPoly(pred.CastPosition, player.Distance(pos), E.Width);

            if (pred.Hitchance >= HitChance.High && poly.IsInside(pred.UnitPosition) &&
                poly.IsInside(target.ServerPosition))
            {
                E.Cast(pos, config.Item("packets").GetValue <bool>());
            }
        }
Esempio n. 12
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);
            }
        }
Esempio 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>());
            }
        }
Esempio n. 14
0
        private static void HandleQ(Obj_AI_Hero target)
        {
            Q.UpdateSourcePosition(blade);
            var pred = Q.GetPrediction(target);
            var poly = CombatHelper.GetPoly(blade.Extend(player.Position, 30), player.Distance(blade), 150);

            if (((pred.Hitchance >= HitChance.VeryHigh && poly.IsInside(pred.UnitPosition)) ||
                 (target.Distance(blade) < 100) || (target.Distance(blade) < 500 && poly.IsInside(target.Position)) ||
                 player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) || player.IsWindingUp) &&
                CheckQDef())
            {
                Q.Cast();
            }
        }
Esempio n. 15
0
        private void moveClone()
        {
            var Gtarget = TargetSelector.GetTarget(2200, 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 && Gtarget != null && Gtarget.IsValid && !clone.IsWindingUp)
            {
                if (CanCloneAttack(clone))
                {
                    R.CastOnUnit(Gtarget, config.Item("packets").GetValue <bool>());
                }
                else if (player.HealthPercent > 25)
                {
                    var prediction = Prediction.GetPrediction(Gtarget, 2);
                    R.Cast(
                        Gtarget.Position.Extend(prediction.UnitPosition, Orbwalking.GetRealAutoAttackRange(Gtarget)),
                        config.Item("packets").GetValue <bool>());
                }

                GhostDelay = true;
                Utility.DelayAction.Add(200, () => GhostDelay = false);
            }
        }
Esempio n. 16
0
        private void useQ()
        {
            var minions =
                MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.NotAlly)
                .FirstOrDefault(
                    m =>
                    m.Health > 5 &&
                    HealthPrediction.LaneClearHealthPrediction(m, 1000) <
                    Q.GetDamage(m) + player.GetAutoAttackDamage(m));

            if (minions != null)
            {
                Q.Cast();
            }
        }
Esempio 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);
            }
        }
Esempio n. 18
0
        private void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);
            float       perc   = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            if (target == null)
            {
                return;
            }
            if (config.Item("useqH", true).GetValue <bool>() && Q.IsReady())
            {
                var miniPred =
                    MinionManager.GetMinions(
                        Orbwalking.GetRealAutoAttackRange(player), MinionTypes.All, MinionTeam.NotAlly)
                    .FirstOrDefault(
                        minion =>
                        minion.Health > 5 &&
                        HealthPrediction.GetHealthPrediction(
                            minion,
                            (int)(player.AttackCastDelay * 1000) - 100 + Game.Ping / 2 +
                            1000 * (int)player.Distance(minion) / (int)Orbwalking.GetMyProjectileSpeed()) < 0);
                var priortarg = orbwalker.GetTarget();
                var canHArass = priortarg != null && !(priortarg is Obj_AI_Hero);
                if (canHArass || (!canHArass && miniPred == null))
                {
                    var targQ = Q.GetPrediction(target);
                    if (Q.Range - 100 > targQ.CastPosition.Distance(player.Position) &&
                        targQ.Hitchance >= HitChance.High)
                    {
                        Q.Cast(targQ.CastPosition, config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (config.Item("usewH", true).GetValue <bool>() && W.IsReady())
            {
                var tarPered = W.GetPrediction(target);
                if (W.Range - 80 > tarPered.CastPosition.Distance(player.Position) &&
                    tarPered.Hitchance >= HitChance.High)
                {
                    W.Cast(tarPered.CastPosition, config.Item("packets").GetValue <bool>());
                }
            }
        }
Esempio n. 19
0
        private static void FlashCombo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(EFlash.Range, TargetSelector.DamageType.Magical);

            if (target != null && E.IsReady() && E.ManaCost < player.Mana &&
                player.Distance(target.Position) < EFlash.Range && player.Distance(target.Position) > 480 &&
                !((getPosToEflash(target.Position)).IsWall()))
            {
                var pred          = EFlash.GetPrediction(target);
                var poly          = CombatHelper.GetPolyFromVector(getPosToEflash(target.Position), pred.UnitPosition, E.Width);
                var enemiesBehind =
                    HeroManager.Enemies.Count(
                        e =>
                        e.NetworkId != target.NetworkId && e.IsValidTarget(E.Range) &&
                        (poly.IsInside(E.GetPrediction(e).UnitPosition) || poly.IsInside(e.Position)) &&
                        e.Position.Distance(player.Position) > player.Distance(pred.UnitPosition));
                if (pred.Hitchance >= HitChance.High)
                {
                    Utility.DelayAction.Add(
                        30, () =>
                    {
                        if (enemiesBehind > 0)
                        {
                            E.Cast(
                                player.ServerPosition.Extend(pred.CastPosition, E.Range),
                                config.Item("packets").GetValue <bool>());
                        }
                        else
                        {
                            E.Cast(
                                player.ServerPosition.Extend(
                                    pred.CastPosition,
                                    player.Distance(pred.CastPosition) + Orbwalking.GetRealAutoAttackRange(target)),
                                config.Item("packets").GetValue <bool>());
                        }
                    });
                    player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), getPosToEflash(target.Position));
                }
            }
            ItemHandler.UseItems(target, config);
            Orbwalking.MoveTo(Game.CursorPos);
        }
Esempio n. 20
0
        private Vector3 GetVectorE(Obj_AI_Hero target)
        {
            var pos  = Vector3.Zero;
            var pred = Prediction.GetPrediction(target, 0.28f);

            if (!target.IsMoving)
            {
                return(pos);
            }
            var distW  = E.Width / 2 + target.BoundingRadius;
            var points = CombatHelper.PointsAroundTheTarget(pred.UnitPosition, distW);
            var walls  =
                points.Where(p => p.IsWall() && player.Distance(target) > target.BoundingRadius)
                .OrderBy(p => p.Distance(pred.UnitPosition));
            var wall = walls.FirstOrDefault();

            if (wall.IsValid() && wall.Distance(target.Position) < 350 &&
                walls.Any(w => w.Distance(target.Position) < distW))
            {
                pos = wall.Extend(pred.UnitPosition, (target.BoundingRadius + distW));
            }
            if (config.Item("useeWall", true).GetValue <bool>())
            {
                return(pos);
            }
            if (pred.Hitchance < HitChance.Medium || target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target))
            {
                return(pos);
            }
            if (pred.UnitPosition.Distance(player.Position) > player.Distance(target))
            {
                var dist    = target.BoundingRadius + E.Width;
                var predPos = pred.UnitPosition;
                if (target.Distance(predPos) < dist)
                {
                    predPos = target.Position.Extend(predPos, dist);
                }
                pos = predPos.Extend(target.Position, -dist);
            }
            return(pos);
        }
Esempio n. 21
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(900, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config);
            }
            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 &&
                player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Esempio n. 22
0
        private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            Obj_AI_Hero t = TargetSelector.GetTarget(1100, TargetSelector.DamageType.Physical, true);

            if (!unit.IsMe || !W.IsReady() || !target.IsValidTarget() || !target.IsEnemy)
            {
                return;
            }
            if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && target is Obj_AI_Hero &&
                config.Item("usew", true).GetValue <bool>() && t != null && target.NetworkId == t.NetworkId)
            {
                W.Cast();
                Orbwalking.ResetAutoAttackTimer();
            }
            if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && !(target is Obj_AI_Hero) &&
                config.Item("usewLC", true).GetValue <bool>() &&
                MinionManager.GetMinions(Orbwalking.GetRealAutoAttackRange(target), MinionTypes.All, MinionTeam.NotAlly)
                .Count(m => m.Health > player.GetAutoAttackDamage((Obj_AI_Base)target, true)) > 0)
            {
                W.Cast();
                Orbwalking.ResetAutoAttackTimer();
            }
        }
Esempio n. 23
0
        private void Harass()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            switch (config.Item("useCH", true).GetValue <StringList>().SelectedIndex)
            {
            case 1:
                if (Q.IsReady() && E.IsReady() && lastE.Equals(0) && fury && !rene)
                {
                    if (config.Item("donteqwebtower", true).GetValue <bool>() &&
                        player.Position.Extend(target.Position, E.Range).UnderTurret(true))
                    {
                        return;
                    }
                    var closeGapTarget =
                        MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly)
                        .Where(i => i.Distance(target.ServerPosition) < Q.Range - 40)
                        .OrderByDescending(i => Environment.Minion.countMinionsInrange(i.Position, Q.Range))
                        .FirstOrDefault();
                    if (closeGapTarget != null)
                    {
                        lastEpos = player.ServerPosition;
                        Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(closeGapTarget.Position, config.Item("packets").GetValue <bool>());
                        lastE = System.Environment.TickCount;
                        return;
                    }
                    else
                    {
                        lastEpos = player.ServerPosition;
                        Utility.DelayAction.Add(4100, () => lastEpos = new Vector3());
                        E.Cast(target.Position, config.Item("packets").GetValue <bool>());
                        lastE = System.Environment.TickCount;
                        return;
                    }
                }
                if (player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    orbwalker.ForceTarget(target);
                }
                return;

                break;

            case 0:
                if (Q.IsReady() && W.IsReady() && !rene && E.CanCast(target))
                {
                    if (config.Item("donteqwebtower", true).GetValue <bool>() &&
                        player.Position.Extend(target.Position, E.Range).UnderTurret(true))
                    {
                        return;
                    }
                    if (E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>()))
                    {
                        lastE = System.Environment.TickCount;
                    }
                }
                if (rene && E.CanCast(target) && !lastE.Equals(0) && System.Environment.TickCount - lastE > 3600)
                {
                    E.CastIfHitchanceEquals(target, HitChance.High, config.Item("packets").GetValue <bool>());
                }
                if (player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) && Q.IsReady() &&
                    E.IsReady() && E.IsReady())
                {
                    orbwalker.ForceTarget(target);
                }
                return;

                break;

            default:
                break;
            }

            if (config.Item("useqH", true).GetValue <bool>() && Q.CanCast(target))
            {
                Q.Cast(config.Item("packets").GetValue <bool>());
            }

            if (config.Item("useCH", true).GetValue <StringList>().SelectedIndex == 0 && !lastE.Equals(0) && rene &&
                !Q.IsReady() && !renw)
            {
                if (lastEpos.IsValid())
                {
                    E.Cast(player.Position.Extend(lastEpos, 350f), config.Item("packets").GetValue <bool>());
                }
            }
        }
Esempio n. 24
0
        private void Combo()
        {
            Obj_AI_Hero target = DrawHelper.GetBetterTarget(E.Range, TargetSelector.DamageType.Magical);

            if (target == null)
            {
                if (maoR)
                {
                    if (!turnOff)
                    {
                        turnOff = true;
                        Utility.DelayAction.Add(2600, () => turnOffUlt());
                    }
                }
                return;
            }
            if (config.Item("selected", true).GetValue <bool>())
            {
                target = CombatHelper.SetTarget(target, TargetSelector.GetSelectedTarget());
                orbwalker.ForceTarget(target);
            }
            var manaperc = player.Mana / player.MaxMana * 100;

            if (player.HasBuff("MaokaiSapMagicMelee") &&
                player.Distance(target) < Orbwalking.GetRealAutoAttackRange(target) + 75)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) && !player.IsWindingUp &&
                ((config.Item("useqroot", true).GetValue <bool>() &&
                  (!target.HasBuffOfType(BuffType.Snare) && !target.HasBuffOfType(BuffType.Stun) &&
                   !target.HasBuffOfType(BuffType.Suppression))) || !config.Item("useqroot", true).GetValue <bool>()) &&
                !W.CanCast(target))
            {
                Q.Cast(target);
            }
            if (config.Item("usew", true).GetValue <bool>())
            {
                if (config.Item("blocke", true).GetValue <bool>() && player.Distance(target) < W.Range && W.IsReady() &&
                    E.CanCast(target))
                {
                    E.Cast(target);
                    CastR(target);
                    Utility.DelayAction.Add(100, () => W.Cast(target));
                }
                else if (W.CanCast(target))
                {
                    CastR(target);
                    W.Cast(target);
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target))
            {
                if (!config.Item("blocke", true).GetValue <bool>() ||
                    config.Item("blocke", true).GetValue <bool>() && !W.IsReady())
                {
                    E.Cast(target);
                }
            }

            if (R.IsReady())
            {
                bool enoughEnemies = config.Item("user", true).GetValue <Slider>().Value <=
                                     player.CountEnemiesInRange(R.Range - 50);
                Obj_AI_Hero targetR = DrawHelper.GetBetterTarget(R.Range, TargetSelector.DamageType.Magical);

                if (maoR && targetR != null &&
                    ((config.Item("rks", true).GetValue <bool>() &&
                      (Damage.GetSpellDamage(player, targetR, SpellSlot.R) +
                       player.CalcDamage(target, Damage.DamageType.Magical, maoRStack)) > targetR.Health) ||
                     manaperc < config.Item("rmana", true).GetValue <Slider>().Value ||
                     (!enoughEnemies && player.Distance(targetR) > R.Range - 50)))
                {
                    R.Cast();
                }

                if (targetR != null && !maoR && manaperc > config.Item("rmana", true).GetValue <Slider>().Value&&
                    (enoughEnemies || R.IsInRange(targetR)))
                {
                    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").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Esempio n. 25
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);
            }
        }
Esempio n. 26
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);
                }
            }
        }
Esempio 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);
            }
        }
Esempio n. 28
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);
                    }
                }
            }
        }
Esempio n. 29
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1700, TargetSelector.DamageType.Magical, true);

            if (target == null || target.IsInvulnerable || target.MagicImmune)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            var  edmg      = getEdamage(target);
            var  qdmg      = getQdamage(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, 700) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target) &&
                (!ActiveQ ||
                 (!(CombatHelper.IsFacing(player, target.Position, 30) && target.Distance(player) < Q.Range))))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (Q.CanCast(target) && config.Item("useq", true).GetValue <bool>() && Qhit(target.Position) &&
                (preventSilence(Q) ||
                 (target.Health < PassiveDmg(target) * 2 || qdmg > target.Health) &&
                 target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target)))
            {
                Q.Cast(target.Position);
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(target) &&
                (((preventSilence(E) ||
                   (target.Health < PassiveDmg(target) * 2 &&
                    target.Distance(player) < Orbwalking.GetRealAutoAttackRange(target))) &&
                  (!ActiveE ||
                   System.Environment.TickCount - lastE > config.Item("eDelay", true).GetValue <Slider>().Value)) ||
                 edmg > target.Health))
            {
                E.CastIfHitchanceEquals(target, HitChance.High);
            }
            if (W.IsReady() && config.Item("wSpeed", true).GetValue <bool>() && ActiveQ && preventSilence(W) &&
                target.Distance(player) < Q.Range &&
                Prediction.GetPrediction(target, 0.2f).UnitPosition.Distance(player.Position) > Q.Range)
            {
                W.Cast();
            }
            var canR = ComboDamage(target) > target.Health && qdmg < target.Health && target.Distance(player) < Q.Range &&
                       !Silenced;

            if (R.IsReady() &&
                (((target.Health <
                   getRdamage(target) * ((target.CountAlliesInRange(600) > 0 && target.HealthPercent > 15) ? 5 : 3) &&
                   target.Distance(player) > Q.Range) ||
                  (target.Distance(player) < Q.Range && target.Health < getRdamage(target) * 3 + edmg &&
                   target.Health > qdmg)) ||
                 player.CountEnemiesInRange(R.Range) >= config.Item("Rmin", true).GetValue <Slider>().Value))
            {
                HandleR(target, canR);
            }
        }
Esempio n. 30
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(1500, TargetSelector.DamageType.Physical, true);

            if (config.Item("user", true).GetValue <bool>() && R.IsReady())
            {
                var rTarget = TargetSelector.GetTarget(2500, TargetSelector.DamageType.Physical, true);
                if (!activatedR && !player.IsWindingUp)
                {
                    if (rTarget != null && !rTarget.IsInvulnerable && !rTarget.MagicImmune &&
                        rTarget.Distance(Game.CursorPos) < 300)
                    {
                        if (player.Distance(rTarget) + 100 > Environment.Map.GetPath(player, rTarget.Position) &&
                            (ComboDamage(rTarget) > rTarget.Health &&
                             !CombatHelper.IsCollidingWith(
                                 player, rTarget.Position.Extend(player.Position, player.BoundingRadius + 15),
                                 player.BoundingRadius,
                                 new[] { CollisionableObjects.Heroes, CollisionableObjects.Walls }) &&
                             (ComboDamage(rTarget) - R.GetDamage(rTarget) < rTarget.Health ||
                              rTarget.Distance(player) > 400 || player.HealthPercent < 25) &&
                             rTarget.CountAlliesInRange(2500) + 1 >= rTarget.CountEnemiesInRange(2500)))
                        {
                            R.Cast(target.Position);
                        }
                    }
                }
            }
            if (target == null || target.IsInvulnerable || target.MagicImmune)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }
            if (!activatedW && W.IsReady() && config.Item("usew", true).GetValue <bool>())
            {
                if ((DamageTaken > getWShield() / 100 * config.Item("shieldDmg", true).GetValue <Slider>().Value) ||
                    (target.Distance(player) < W.Range && config.Item("usewir", true).GetValue <bool>()))
                {
                    W.Cast(config.Item("packets").GetValue <bool>());
                }
            }
            if (activatedW && config.Item("usew", true).GetValue <bool>() && W.IsReady() &&
                player.Distance(target) < W.Range &&
                (target.Health < W.GetDamage(target) ||
                 (W.IsInRange(target) && !W.IsInRange(Prediction.GetPrediction(target, 0.2f).UnitPosition))))
            {
                W.Cast(config.Item("packets").GetValue <bool>());
            }
            var  comboDmg  = 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, 700) && hasIgnite &&
                !CombatHelper.CheckCriticalBuffs(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
            if (activatedP)
            {
                if (Q.IsReady() && player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
                {
                    Q.Cast(config.Item("packets").GetValue <bool>());
                }
                return;
            }
            if (Q.IsCharging)
            {
                checkCastedQ(target);
                return;
            }
            if (activatedR)
            {
                return;
            }
            if (config.Item("usee", true).GetValue <bool>() && E.IsReady() && !player.IsWindingUp)
            {
                CastEHero(target);
                return;
            }
            if (config.Item("useq", true).GetValue <bool>() && !player.IsWindingUp)
            {
                castQ(target);
            }
        }