Example #1
0
        public static void Flee()
        {
            if (MenuConfig.WallFlee)
            {
                var end        = Player.ServerPosition.LSExtend(Game.CursorPos, Spells.Q.Range);
                var IsWallDash = FleeLogic.IsWallDash(end, Spells.Q.Range);

                var Eend      = Player.ServerPosition.LSExtend(Game.CursorPos, Spells.E.Range);
                var WallE     = FleeLogic.GetFirstWallPoint(Player.ServerPosition, Eend);
                var WallPoint = FleeLogic.GetFirstWallPoint(Player.ServerPosition, end);
                Player.GetPath(WallPoint);

                if (Spells.Q.IsReady() && Qstack < 3)
                {
                    Spells.Q.Cast(Game.CursorPos);
                }


                if (IsWallDash && Qstack == 3 && WallPoint.LSDistance(Player.ServerPosition) <= 800)
                {
                    EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, WallPoint);
                    if (WallPoint.LSDistance(Player.ServerPosition) <= 600)
                    {
                        EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, WallPoint);
                        if (WallPoint.LSDistance(Player.ServerPosition) <= 45)
                        {
                            if (Spells.E.IsReady())
                            {
                                Spells.E.Cast(WallE);
                            }
                            if (Qstack == 3 && end.LSDistance(Player.Position) <= 260 && IsWallDash && WallPoint.IsValid())
                            {
                                EloBuddy.Player.IssueOrder(GameObjectOrder.MoveTo, WallPoint);
                                Spells.Q.Cast(WallPoint);
                            }
                        }
                    }
                }
            }
            else
            {
                var enemy = HeroManager.Enemies.Where(hero => hero.LSIsValidTarget(Player.HasBuff("RivenFengShuiEngine")
                           ? 70 + 195 + Player.BoundingRadius
                           : 70 + 120 + Player.BoundingRadius) && Spells.W.IsReady());

                var x           = Player.Position.LSExtend(Game.CursorPos, 300);
                var objAiHeroes = enemy as AIHeroClient[] ?? enemy.ToArray();
                if (Spells.W.IsReady() && objAiHeroes.Any())
                {
                    foreach (var target in objAiHeroes)
                    {
                        if (InWRange(target))
                        {
                            Spells.W.Cast();
                        }
                    }
                }
                if (Spells.Q.IsReady() && !Player.LSIsDashing())
                {
                    Spells.Q.Cast(Game.CursorPos);
                }
                if (Spells.E.IsReady() && !Player.LSIsDashing())
                {
                    Spells.E.Cast(x);
                }
            }
        }
Example #2
0
        public static void Flee()
        {
            if (MenuConfig.WallFlee)
            {
                var end        = Player.PreviousPosition.Extend(Game.CursorPosRaw, Spells.Q.Range);
                var isWallDash = FleeLogic.IsWallDash(end, Spells.Q.Range);

                var eend      = Player.PreviousPosition.Extend(Game.CursorPosRaw, Spells.E.Range);
                var wallE     = FleeLogic.GetFirstWallPoint(Player.PreviousPosition, eend);
                var wallPoint = FleeLogic.GetFirstWallPoint(Player.PreviousPosition, end);
                Player.GetPath(wallPoint);

                if (Spells.Q.IsReady() && Qstack < 3)
                {
                    Spells.Q.Cast(Game.CursorPosRaw);
                }


                if (!isWallDash || Qstack != 3 || !(wallPoint.Distance(Player.PreviousPosition) <= 800))
                {
                    return;
                }

                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, wallPoint);

                if (!(wallPoint.Distance(Player.PreviousPosition) <= 600))
                {
                    return;
                }

                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, wallPoint);

                if (!(wallPoint.Distance(Player.PreviousPosition) <= 45))
                {
                    return;
                }

                if (Spells.E.IsReady())
                {
                    Spells.E.Cast(wallE);
                }

                if (Qstack != 3 || !(end.Distance(Player.Position) <= 260) || !wallPoint.IsValid())
                {
                    return;
                }

                Player.IssueOrder(GameObjectOrder.MoveTo, wallPoint);
                Spells.Q.Cast(wallPoint);
            }
            else
            {
                var enemy = HeroManager.Enemies.Where(target => target.IsValidTarget(Player.HasBuff("RivenFengShuiEngine")
                           ? 70 + 195 + Player.BoundingRadius
                           : 70 + 120 + Player.BoundingRadius) && Spells.W.IsReady());

                var x             = Player.Position.Extend(Game.CursorPosRaw, 300);
                var objAitargetes = enemy as AIHeroClient[] ?? enemy.ToArray();
                if (Spells.W.IsReady() && objAitargetes.Any())
                {
                    foreach (var target in objAitargetes)
                    {
                        if (InWRange(target))
                        {
                            Spells.W.Cast();
                        }
                    }
                }
                if (Spells.Q.IsReady() && !Player.IsDashing())
                {
                    Spells.Q.Cast(Game.CursorPosRaw);
                }

                if (MenuConfig.FleeYomuu)
                {
                    Usables.CastYoumoo();
                }

                if (Spells.E.IsReady() && !Player.IsDashing())
                {
                    Spells.E.Cast(x);
                }
            }
        }