Пример #1
0
 private void beforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe && Q.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
         config.Item("useqLC").GetValue<bool>() && !(args.Target is Obj_AI_Hero) && (args.Target.Health > 700))
     {
         Q.Cast(config.Item("packets").GetValue<bool>());
         player.IssueOrder(GameObjectOrder.AutoAttack, args.Target);
     }
 }
Пример #2
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     var target = args.Target as Obj_AI_Base;
     if (Q.IsReady() && target != null &&
         ((target is Obj_AI_Hero && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
           !target.HasBuffOfType(BuffType.Slow)) ||
          target.Health < Q.GetDamage(target) + player.GetAutoAttackDamage(target)))
     {
         Q.Cast(config.Item("packets").GetValue<bool>());
     }
 }
Пример #3
0
 private void BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe && Q.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
         config.Item("useqLC", true).GetValue<bool>() &&
         Environment.Minion.countMinionsInrange(player.Position, 600f) >
         config.Item("qhitLC", true).GetValue<Slider>().Value)
     {
         Q.Cast(config.Item("packets").GetValue<bool>());
         Orbwalking.ResetAutoAttackTimer();
         //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
     }
 }
Пример #4
0
        private void AfterAttack(AttackableUnit unit, AttackableUnit targetO)
        {
            Obj_AI_Hero    targ             = (Obj_AI_Hero)targetO;
            List <Vector3> passivePositions = GetPassivePositions(targetO);
            bool           rapid            = player.GetAutoAttackDamage(targ) * 3 + ComboDamage(targ) > targ.Health ||
                                              (player.Health < targ.Health && player.Health < player.MaxHealth / 2);

            if (unit.IsMe && E.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                (config.Item("usee", true).GetValue <bool>() ||
                 (unit.IsMe && config.Item("RapidAttack", true).GetValue <KeyBind>().Active || rapid)) &&
                !Orbwalking.CanAttack())
            {
                E.Cast(config.Item("packets").GetValue <bool>());
            }
            if (unit.IsMe && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                (config.Item("RapidAttack", true).GetValue <KeyBind>().Active || rapid) && !Orbwalking.CanAttack() &&
                passivePositions.Any())
            {
                var passive = GetClosestPassivePosition(targ);
                var pos     = GetQpoint(targ, passive);
                if (pos.IsValid())
                {
                    Q.Cast(pos, config.Item("packets").GetValue <bool>());
                }
                else
                {
                    var pos2 = GetQpoint(targ, Prediction.GetPrediction(targ, 2).UnitPosition);
                    if (pos2.IsValid())
                    {
                        Q.Cast(pos2, config.Item("packets").GetValue <bool>());
                    }
                }
            }
            if (unit.IsMe)
            {
                var         pos    = GetClosestPassivePosition(targetO);
                Obj_AI_Hero target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
                if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && targetO.NetworkId == target.NetworkId &&
                    R.IsReady() && R.CanCast(target) &&
                    HealthPrediction.GetHealthPrediction(target, 1000) > player.GetAutoAttackDamage(target) &&
                    ComboDamage(target) + player.GetAutoAttackDamage(target) * 5 > target.Health &&
                    ((config.Item("userally", true).GetValue <Slider>().Value <=
                      HeroManager.Allies.Count(
                          a => a.IsValid && !a.IsDead && a.Distance(target) < 600 && a.HealthPercent < 90) &&
                      config.Item("usertf", true).GetValue <bool>()) ||
                     (player.HealthPercent < 75 && config.Item("user", true).GetValue <bool>())))
                {
                    R.CastOnUnit(target, config.Item("packets").GetValue <bool>());
                }
            }
        }
Пример #5
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>());
            }
        }
Пример #6
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();
            }
        }
Пример #7
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);
            }
        }
Пример #8
0
        private void Game_ProcessSpell(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!(sender is Obj_AI_Base))
            {
                return;
            }
            if (sender.IsMe && args.SData.Name == "GalioIdolOfDurand" && !justR)
            {
                justR = true;
                Utility.DelayAction.Add(200, () => justR = false);
            }
            if (sender.IsMe && args.SData.Name == "GalioResoluteSmite")
            {
                justQ = true;
                Utility.DelayAction.Add(getDelay(Q, args.End), () => justQ = false);
            }
            if (sender.IsMe && args.SData.Name == "GalioRighteousGust")
            {
                justE = true;
                Utility.DelayAction.Add(getDelay(E, args.End), () => justE = false);
            }
            Obj_AI_Hero target = args.Target as Obj_AI_Hero;

            if (target != null && target.IsAlly)
            {
                if (sender.IsValid && !sender.IsDead && sender.IsEnemy)
                {
                    var data = IncomingDamages.FirstOrDefault(i => i.Hero.NetworkId == target.NetworkId);
                    if (Orbwalking.IsAutoAttack(args.SData.Name))
                    {
                        var dmg = (float)sender.GetAutoAttackDamage(target, true);
                        data.DamageTaken += dmg;
                        data.DamageCount++;
                    }
                    else
                    {
                        data.DamageCount++;
                        Utility.DelayAction.Add(
                            300, () =>
                        {
                            if (data.DamageCount > 0)
                            {
                                data.DamageCount--;
                            }
                        });
                    }
                }
            }
        }
Пример #9
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;
                }
            }
        }
Пример #10
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);
            }
        }
Пример #11
0
        private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            var junglemob = Jungle.GetNearest(player.Position);

            if (unit.IsMe && Q.IsReady() &&
                ((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && config.Item("useq", true).GetValue <bool>() &&
                  target.IsEnemy && target.Team != player.Team) ||
                 (config.Item("useqLC", true).GetValue <bool>() && junglemob != null &&
                  junglemob.Distance(player.Position) < player.AttackRange + 30)))
            {
                Q.Cast();
                Orbwalking.ResetAutoAttackTimer();
                //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }
        }
Пример #12
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();
            }
        }
Пример #13
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            Obj_AI_Hero targetf = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);

            if (config.Item("useeflashforced").GetValue <KeyBind>().Active)
            {
                if (targetf == null)
                {
                    player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                }
                else
                {
                    var  bestpos  = CombatHelper.bestVectorToPoppyFlash2(targetf);
                    bool hasFlash = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerFlash")) ==
                                    SpellState.Ready;
                    if (E.IsReady() && hasFlash && !CheckWalls(player, targetf) && bestpos.IsValid())
                    {
                        player.Spellbook.CastSpell(player.GetSpellSlot("SummonerFlash"), bestpos);
                        player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
                    }
                    else if (!hasFlash)
                    {
                        Combo();
                        Orbwalking.Orbwalk(targetf, Game.CursorPos, 90, 90);
                    }
                }
            }
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                Combo();
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                break;

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

            case Orbwalking.OrbwalkingMode.LastHit:
                break;

            default:
                break;
            }
            Jungle.CastSmite(config.Item("useSmite").GetValue <KeyBind>().Active);
        }
Пример #14
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }

            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:
                break;

            default:
                break;
            }
            var data = Program.IncDamages.GetAllyData(player.NetworkId);

            if (config.Item("autoECC", true).GetValue <bool>() && data.AnyCC)
            {
                CastAutoE();
            }
            if (config.Item("autoEdmg2", true).GetValue <Slider>().Value / 100f * player.Health < data.DamageTaken &&
                E.IsReady() && !OnTrident)
            {
                CastAutoE();
            }
            if (config.Item("castR", true).GetValue <KeyBind>().Active&& R.IsReady())
            {
                Obj_AI_Hero target = DrawHelper.GetBetterTarget(R.Range, TargetSelector.DamageType.Magical, true);
                if (target != null && R.CanCast(target))
                {
                    CastR(target);
                    Orbwalking.MoveTo(Game.CursorPos);
                }
            }
        }
Пример #15
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);
            }
        }
Пример #16
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);
            }
        }
Пример #17
0
 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && Q.IsReady() && ((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && config.Item("useq").GetValue <bool>() && target.IsEnemy && target.Team != player.Team) || (config.Item("useqLC").GetValue <bool>() && Jungle.GetNearest(player.Position).Distance(player.Position) < player.AttackRange + 30)))
     {
         Q.Cast(config.Item("packets").GetValue <bool>());
         Orbwalking.ResetAutoAttackTimer();
         //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
         return;
     }
     if (unit.IsMe && Q.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && config.Item("useqLC").GetValue <bool>() && Environment.Minion.countMinionsInrange(player.Position, 600f) > 1)
     {
         Q.Cast(config.Item("packets").GetValue <bool>());
         Orbwalking.ResetAutoAttackTimer();
         //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
     }
 }
Пример #18
0
 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && Q.IsReady() &&
         (((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo ||
            config.Item("useeflashforced").GetValue <KeyBind>().Active) && config.Item("useq").GetValue <bool>() &&
           target.IsEnemy && target is Obj_AI_Hero &&
           target.Health - player.GetAutoAttackDamage(target as Obj_AI_Hero) > 0) ||
          (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
           player.ManaPercent > config.Item("minmana").GetValue <Slider>().Value&&
           config.Item("useqLC").GetValue <bool>() && target is Obj_AI_Minion &&
           target.Health > Q.GetDamage((Obj_AI_Base)target) * 2)))
     {
         Q.Cast(config.Item("packets").GetValue <bool>());
         Orbwalking.ResetAutoAttackTimer();
     }
 }
Пример #19
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))
                        {
                            Q.Cast(minion, config.Item("packets").GetValue <bool>());
                        }
                        else if (minion.Distance(player) > player.AttackRange)
                        {
                            Q.Cast(minion, config.Item("packets").GetValue <bool>());
                        }
                    }
                }
            }
        }
Пример #20
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>());
                }
            }
        }
Пример #21
0
 private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && Q.IsReady() &&
         ((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && config.Item("useq", true).GetValue <bool>() &&
           target.IsEnemy && target.Team != player.Team) ||
          (config.Item("useqLC", true).GetValue <bool>() &&
           Jungle.GetNearest(player.Position).Distance(player.Position) < player.AttackRange + 30)))
     {
         var starget = TargetSelector.GetSelectedTarget();
         if (config.Item("selected", true).GetValue <bool>() && starget != null && target.Name != starget.Name)
         {
             return;
         }
         Q.Cast(config.Item("packets").GetValue <bool>());
         Orbwalking.ResetAutoAttackTimer();
         //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
     }
 }
Пример #22
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();
            }
        }
Пример #23
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe && stance == Stance.Phoenix && player.GetBuff("UdyrPhoenixStance").Count == 3)
     {
         justR2 = true;
         Utility.DelayAction.Add((int) (player.AttackDelay * 1000), () => justR2 = false);
     }
     if (!args.Unit.IsMe || !R.IsReady())
     {
         return;
     }
     var target =
         HeroManager.Enemies.FirstOrDefault(
             h => h.Distance(player) < R2.Range && CombatHelper.IsFacing(player, h.Position, 45f));
     if (target != null && orbwalker.ActiveMode != Orbwalking.OrbwalkingMode.Combo)
     {
         Harass();
     }
 }
Пример #24
0
 private void afterAttack(AttackableUnit unit, AttackableUnit target)
 {
     if (unit.IsMe && target is Obj_AI_Hero &&
         ((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
           checkFuryMode(SpellSlot.W, (Obj_AI_Base)target)) ||
          orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed))
     {
         var time = Game.Time - W.Instance.CooldownExpires;
         if (config.Item("hyd").GetValue <bool>() &&
             (W.Instance.Cooldown - Math.Abs(time) < 1 || time < -6 || player.HealthPercent < 50))
         {
             ItemHandler.castHydra((Obj_AI_Hero)target);
         }
     }
     if (unit.IsMe && target is Obj_AI_Hero && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
         config.Item("usew", true).GetValue <bool>() && checkFuryMode(SpellSlot.W, (Obj_AI_Base)target))
     {
         W.Cast();
         Orbwalking.ResetAutoAttackTimer();
         return;
     }
     if (unit.IsMe && target is Obj_AI_Hero && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
         config.Item("useCH", true).GetValue <StringList>().SelectedIndex == 0)
     {
         if (W.IsReady())
         {
             W.Cast();
             Orbwalking.ResetAutoAttackTimer();
             return;
         }
         if (Q.IsReady())
         {
             Q.Cast();
             return;
         }
         if (E.CanCast((Obj_AI_Base)target))
         {
             E.Cast(target.Position);
             return;
         }
     }
 }
Пример #25
0
        private void WardJump()
        {
            Orbwalking.MoveTo(Game.CursorPos);
            if (!Q.IsReady())
            {
                return;
            }
            var wardSlot = Items.GetWardSlot();
            var pos      = Game.CursorPos;

            if (pos.Distance(player.Position) > 600)
            {
                pos = player.Position.Extend(pos, 600);
            }

            var jumpObj = GetJumpObj(pos);

            if (jumpObj != null)
            {
                Q.CastOnUnit(jumpObj);
            }
            else
            {
                if (wardSlot != null && wardSlot.IsValidSlot() &&
                    (player.Spellbook.CanUseSpell(wardSlot.SpellSlot) == SpellState.Ready || wardSlot.Stacks != 0) &&
                    !justWJ)
                {
                    justWJ = true;
                    Utility.DelayAction.Add(new Random().Next(1000, 1500), () => { justWJ = false; });
                    player.Spellbook.CastSpell(wardSlot.SpellSlot, pos);
                    Utility.DelayAction.Add(
                        150, () =>
                    {
                        var predWard = GetJumpObj(pos);
                        if (predWard != null && Q.IsReady())
                        {
                            Q.CastOnUnit(predWard);
                        }
                    });
                }
            }
        }
Пример #26
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);
        }
Пример #27
0
        private void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            Obj_AI_Hero targetO = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical, true);

            if (unit != null && unit.IsMe && Q.IsReady() && target != null)
            {
                if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear &&
                    config.Item("useqLC", true).GetValue <bool>())
                {
                    var minis = MinionManager.GetMinions(
                        ObjectManager.Player.ServerPosition, 600, MinionTypes.All, MinionTeam.NotAlly);

                    float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;
                    if (player.Mana > player.MaxMana * perc &&
                        (minis.Count() > 1 || player.GetAutoAttackDamage((Obj_AI_Base)target, true) < target.Health))
                    {
                        Q.Cast();
                        Orbwalking.ResetAutoAttackTimer();
                    }
                }
                if (targetO != null && targetO.NetworkId != target.NetworkId)
                {
                    return;
                }
                if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                    config.Item("useqH", true).GetValue <bool>() && target is Obj_AI_Hero)
                {
                    float perc = config.Item("minmanaH", true).GetValue <Slider>().Value / 100f;
                    if (player.Mana > player.MaxMana * perc)
                    {
                        Q.Cast();
                        Orbwalking.ResetAutoAttackTimer();
                    }
                }
                if (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                    config.Item("useq", true).GetValue <bool>())
                {
                    Q.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                }
            }
        }
Пример #28
0
        private static void AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            if (CanQ2)
            {
                return;
            }
            var nearestMob = Jungle.GetNearest(player.Position);

            if (unit.IsMe && Q.IsReady() &&
                (((orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo && config.Item("useq", true).GetValue <bool>()) ||
                  (orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                   config.Item("useqH", true).GetValue <bool>())) && target is Obj_AI_Hero) ||
                (config.Item("useqLC", true).GetValue <bool>() && nearestMob != null &&
                 nearestMob.Distance(player.Position) < player.AttackRange + 30))
            {
                Q.Cast();
                Orbwalking.ResetAutoAttackTimer();
                //player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }
        }
Пример #29
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);
        }
Пример #30
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);
            }
        }
Пример #31
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>());
     }
 }
Пример #32
0
        private void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            switch (orbwalker.ActiveMode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (config.Item("useq", true).GetValue <bool>() && Q.IsReady() && target is Obj_AI_Hero)
                {
                    Q.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                    player.IssueOrder(GameObjectOrder.AutoAttack, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (config.Item("useqH", true).GetValue <bool>() && Q.IsReady() && target is Obj_AI_Hero &&
                    config.Item("minmanaH", true).GetValue <Slider>().Value < player.ManaPercent)
                {
                    Q.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                    player.IssueOrder(GameObjectOrder.AutoAttack, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (config.Item("useqLC", true).GetValue <bool>() && Q.IsReady() &&
                    config.Item("minmana", true).GetValue <Slider>().Value < player.ManaPercent &&
                    (target.Health <
                     player.GetAutoAttackDamage((Obj_AI_Base)target) + Q.GetDamage((Obj_AI_Base)target) ||
                     target.Health > player.GetAutoAttackDamage((Obj_AI_Base)target, true) * 4))
                {
                    Q.Cast();
                    Orbwalking.ResetAutoAttackTimer();
                    player.IssueOrder(GameObjectOrder.AutoAttack, target);
                }
                break;

            default:
                break;
            }
        }
Пример #33
0
        private void Game_OnGameUpdate(EventArgs args)
        {
            if (FpsBalancer.CheckCounter())
            {
                return;
            }
            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 (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 = DrawHelper.GetBetterTarget(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));
                }
            }
        }
Пример #34
0
        public static void Game_ProcessSpell(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args)
        {
            if (args == null || hero == null)
            {
                return;
            }
            Obj_AI_Hero targetW   = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Physical);
            var         spellName = args.SData.Name;
            Obj_AI_Hero target    = args.Target as Obj_AI_Hero;

            if (targetW != null)
            {
                hero = targetW;
            }
            if (hero.IsMe)
            {
                if (args.SData.Name == "FioraE")
                {
                    Orbwalking.ResetAutoAttackTimer();
                }
            }
        }
Пример #35
0
        private void beforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Unit.IsMe && W.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                config.Item("usew").GetValue<bool>() && args.Target is Obj_AI_Hero)
            {
                if ((player.Mana > 40 && !fury) || (Q.IsReady() && canBeOpWIthQ(player.Position)))
                {
                    return;
                }

                W.Cast(config.Item("packets").GetValue<bool>());
                return;
            }
            if (args.Unit.IsMe && W.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                config.Item("usewH").GetValue<bool>() && args.Target is Obj_AI_Hero)
            {
                W.Cast(config.Item("packets").GetValue<bool>());
            }
        }
Пример #36
0
        private void beforeAttack(Orbwalking.BeforeAttackEventArgs args)
        {
            if (args.Unit.IsMe && W.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo &&
                args.Target is Obj_AI_Hero && checkFuryMode(SpellSlot.W, (Obj_AI_Base) args.Target) &&
                config.Item("usew", true).GetValue<bool>())
            {
                if ((player.Mana > 40 && !fury) || (Q.IsReady() && canBeOpWIthQ(player.Position)))
                {
                    return;
                }

                W.Cast(config.Item("packets").GetValue<bool>());
                return;
            }
            if (args.Unit.IsMe && W.IsReady() && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed &&
                config.Item("usewH", true).GetValue<bool>() && args.Target is Obj_AI_Hero &&
                config.Item("useCH", true).GetValue<StringList>().SelectedIndex != 0)
            {
                W.Cast(config.Item("packets").GetValue<bool>());
            }
        }
Пример #37
0
 private void Orbwalking_BeforeAttack(Orbwalking.BeforeAttackEventArgs args)
 {
     if (args.Unit.IsMe && orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
     {
         var mob = Jungle.GetNearest(player.Position);
         if (mob != null && config.Item("useqLCSteal").GetValue<bool>() && Q.IsReady() &&
             Q.GetDamage(mob) > mob.Health)
         {
             Q.Cast(config.Item("packets").GetValue<bool>());
         }
         if (mob != null && config.Item("useqbsmite").GetValue<bool>() && Q.IsReady() &&
             Jungle.SmiteReady(config.Item("useSmite").GetValue<KeyBind>().Active) &&
             Q.GetDamage(mob) + Jungle.smiteDamage(mob) > mob.Health)
         {
             Q.Cast(config.Item("packets").GetValue<bool>());
         }
     }
     if (args.Unit.IsMe && Q.IsReady() && config.Item("useq").GetValue<bool>() && args.Target is Obj_AI_Hero &&
         Q.GetDamage((Obj_AI_Base) args.Target) > args.Target.Health)
     {
         Q.Cast(config.Item("packets").GetValue<bool>());
     }
 }