Beispiel #1
0
        public static void OnUpdate()
        {
            var target = Global.TargetSelector.GetTarget(2500);

            if (target == null || !target.IsValidTarget())
            {
                return;
            }

            var targetDist = target.Distance(Global.Player);
            var minion     = MinionHelper.GetDashableMinion(target);

            var m2 = MinionHelper.GetClosest(target);
            var positionBehindMinion = MinionHelper.WalkBehindMinion(target);

            if (!positionBehindMinion.IsZero && positionBehindMinion.Distance(Global.Player) <= MenuConfig.Combo["MRange"].Value)
            {
                MinionHelper.ExtendedMinion = positionBehindMinion;
                MinionHelper.ExtendedTarget = target.ServerPosition;
            }

            var dashDistance = MinionHelper.DashDistance(minion, target);

            if (SpellConfig.E.Ready)
            {
                if (targetDist <= Global.Player.AttackRange && !SpellConfig.Q.Ready)
                {
                    return;
                }

                if (!target.HasBuff("YasuoDashWrapper") && targetDist <= SpellConfig.E.Range && (targetDist > SpellConfig.E.Range - 50 && minion == null || Extension.CurrentMode == Mode.Tornado))
                {
                    SpellConfig.E.CastOnUnit(target);
                }

                if (positionBehindMinion.Distance(Global.Player) <= MenuConfig.Combo["MRange"].Value &&
                    MenuConfig.Combo["Walk"].Enabled &&
                    Global.Orbwalker.CanMove() &&
                    !(MenuConfig.Combo["Turret"].Enabled && target.IsUnderEnemyTurret()))
                {
                    Global.Orbwalker.Move(positionBehindMinion);

                    if (positionBehindMinion.Distance(Global.Player) <= 65)
                    {
                        SpellConfig.E.CastOnUnit(m2);
                    }
                }
                else if (minion != null)
                {
                    if (MenuConfig.Combo["Turret"].Enabled && minion.ServerPosition.PointUnderEnemyTurret() ||
                        MenuConfig.Combo["Dash"].Value == 0 &&
                        minion.Distance(Game.CursorPos) > MenuConfig.Combo["Range"].Value)
                    {
                        return;
                    }

                    SpellConfig.E.CastOnUnit(minion);
                }
            }

            if (SpellConfig.Q.Ready)
            {
                switch (Extension.CurrentMode)
                {
                case Mode.Dashing:
                case Mode.DashingTornado:
                    if (MenuConfig.Combo["Flash"].Enabled && dashDistance < 470 && dashDistance > 220 && (Dmg.Damage(target) * 1.25 > target.Health || target.ServerPosition.CountEnemyHeroesInRange(220) >= 2))
                    {
                        SpellConfig.Q.Cast();
                        DelayAction.Queue(Game.Ping / 2 + 30, () => SummonerSpells.Flash.Cast(target.Position), new CancellationToken(false));
                    }
                    else
                    {
                        var circle = new Geometry.Circle(Global.Player.GetDashInfo().EndPos, 220);
                        var count  = GameObjects.EnemyHeroes.Count(x => x.IsValidTarget() && x.Distance(circle.Center.To3D()) <= circle.Radius);

                        if (count != 0)
                        {
                            SpellConfig.Q.Cast(target);
                        }
                    }
                    break;

                default:
                    if (!Global.Player.IsDashing() && target.IsValidSpellTarget(SpellConfig.Q.Range) && !(SpellConfig.E.Ready && !target.HasBuff("YasuoDashWrapper") && Extension.CurrentMode == Mode.Tornado))
                    {
                        var enemyHero = GameObjects.EnemyHeroes.OrderBy(x => x.Health).FirstOrDefault(x => x.IsValidTarget(SpellConfig.Q.Range));
                        if (enemyHero != null)
                        {
                            SpellConfig.Q.Cast(enemyHero);
                        }
                    }
                    break;
                }
            }

            if (SpellConfig.R.Ready && KnockUpHelper.KnockedUp(target) && KnockUpHelper.IsItTimeToUlt(target))
            {
                var airbourneTargets = GameObjects.EnemyHeroes.Where(x => KnockUpHelper.KnockedUp(x) && x.Distance(Global.Player) <= SpellConfig.R.Range);
                var targetCount      = (airbourneTargets as Obj_AI_Hero[] ?? airbourneTargets.ToArray()).Length;

                if (targetCount >= MenuConfig.Combo["Count"].Value || targetDist > 350)
                {
                    SpellConfig.R.Cast();
                }
            }
        }
Beispiel #2
0
        public static void OnKeyPressed()
        {
            var target = Extension.BeybladeMode.GetTarget() as Obj_AI_Hero;

            if (target == null)
            {
                return;
            }

            var distance = target.Distance(Global.Player);
            var minion   = MinionHelper.GetDashableMinion(target);

            var m2 = MinionHelper.GetClosest(target);
            var positionBehindMinion = MinionHelper.WalkBehindMinion(target);

            MinionHelper.ExtendedMinion = positionBehindMinion;
            MinionHelper.ExtendedTarget = target.ServerPosition;

            var dashDistance = MinionHelper.DashDistance(minion, target);

            if (SpellConfig.Q.Ready)
            {
                switch (Extension.CurrentMode)
                {
                case Mode.Dashing:
                    SpellConfig.Q.Cast();
                    break;

                case Mode.DashingTornado:
                    if (minion != null && dashDistance <= 425 && dashDistance > 220)
                    {
                        if (MenuConfig.Combo["Flash"].Enabled && SummonerSpells.IsValid(SummonerSpells.Flash))
                        {
                            SpellConfig.Q.Cast();

                            DelayAction.Queue(Game.Ping / 2 + 30, () =>
                            {
                                SummonerSpells.Flash.Cast(target.Position);
                            }, new CancellationToken(false));;
                        }
                    }
                    break;

                case Mode.Normal:
                    if (target.IsValidTarget(SpellConfig.Q.Range))
                    {
                        SpellConfig.Q.CastOnUnit(target);
                    }
                    break;
                }
            }

            //if (KnockUpHelper.IsItTimeToUlt(target, 860) && SpellConfig.R.Ready)
            //{
            //    SpellConfig.R.OnProcessSpellCast();
            //}

            if (SpellConfig.E.Ready)
            {
                if (distance <= 320)
                {
                    return;
                }

                if (!positionBehindMinion.IsZero && Global.Orbwalker.CanMove())
                {
                    Global.Orbwalker.Move(positionBehindMinion);
                    if (positionBehindMinion.Distance(Global.Player) <= 65)
                    {
                        SpellConfig.E.CastOnUnit(m2);
                    }
                }
                else if (minion != null)
                {
                    SpellConfig.E.CastOnUnit(minion);
                }
            }
        }
Beispiel #3
0
        public static void OnKeyPressed()
        {
            var target = Extension.BeybladeMode.GetTarget() as Obj_AI_Hero;

            if (target == null)
            {
                return;
            }

            var distance = target.Distance(Global.Player);
            var minion   = MinionHelper.GetDashableMinion(target);

            var m2 = MinionHelper.GetClosest(target);
            var positionBehindMinion = MinionHelper.WalkBehindMinion(target, m2);

            MinionHelper.ExtendedMinion = positionBehindMinion;
            MinionHelper.ExtendedTarget = target.ServerPosition;

            var dashDistance = MinionHelper.DashDistance(minion, target);

            if (SpellConfig.Q.Ready)
            {
                switch (Extension.CurrentMode)
                {
                case Mode.Dashing:
                    SpellConfig.Q.Cast();
                    break;

                case Mode.DashingTornado:
                    if (minion != null && dashDistance <= 425 && dashDistance > 220)
                    {
                        if (MenuConfig.Combo["Flash"].Enabled && SummonerSpells.IsValid(SummonerSpells.Flash))
                        {
                            DelayAction.Queue(Game.Ping / 2,
                                              () =>
                            {
                                SpellConfig.Q.Cast();
                            },
                                              new CancellationToken(false));

                            DelayAction.Queue(Game.Ping / 2 + 50,
                                              () =>
                            {
                                SummonerSpells.Flash.Cast(target.Position);
                            },
                                              new CancellationToken(false));
                        }
                    }
                    break;

                case Mode.Normal:
                    if (target.IsValidTarget(SpellConfig.Q.Range))
                    {
                        SpellConfig.Q.CastOnUnit(target);
                    }
                    break;
                }
            }

            if (SpellConfig.E.Ready)
            {
                if (distance <= 320)
                {
                    return;
                }

                SpellConfig.CastE(target);
            }
        }