private void DoFlee() { if (!Variables.Spells[SpellSlot.E].IsReady() || TunnelObjectNetworkID == -1) { Orbwalking.MoveTo(Game.CursorPos); } if (PositioningHelper.DoPositionsCrossWall(ObjectManager.Player.ServerPosition, Game.CursorPos) && PositioningHelper.GetWallLength(ObjectManager.Player.ServerPosition, Game.CursorPos) >= 200f) { Orbwalking.MoveTo(PositioningHelper.GetFirstWallPoint(ObjectManager.Player.ServerPosition, Game.CursorPos)); } //Q var ComboTarget = TargetSelector.GetTarget(Variables.Spells[SpellSlot.Q].Range / 1.3f, TargetSelector.DamageType.Magical); if (Variables.Spells[SpellSlot.Q].IsReady() && ComboTarget.IsValidTarget()) { HandleQ(ComboTarget); } //E var dir = ObjectManager.Player.ServerPosition.To2D() + ObjectManager.Player.Direction.To2D().Perpendicular() * (ObjectManager.Player.BoundingRadius * 2.5f); var Extended = Game.CursorPos; if (dir.IsWall() && PositioningHelper.GetWallLength(ObjectManager.Player.ServerPosition, Extended) >= 200f && PositioningHelper.DoPositionsCrossWall(ObjectManager.Player.ServerPosition, Extended)) { Variables.Spells[SpellSlot.E].Cast(Extended); } }
public void OnExecute() { if ((PositioningHelper.DoPositionsCrossWall(ObjectManager.Player.ServerPosition, Game.CursorPos) && PositioningHelper.GetWallLength(ObjectManager.Player.ServerPosition, Game.CursorPos) >= (35f))) { MoveToLimited(PositioningHelper.GetFirstWallPoint(ObjectManager.Player.ServerPosition, Game.CursorPos)); } else { MoveToLimited(Game.CursorPos); } var directionExtension = ObjectManager.Player.ServerPosition.To2D() + ObjectManager.Player.Direction.To2D().Perpendicular() * (ObjectManager.Player.BoundingRadius * 1.10f); var oppositeDirectionExtension = ObjectManager.Player.ServerPosition.To2D() + ObjectManager.Player.Direction.To2D().Perpendicular() * -(ObjectManager.Player.BoundingRadius * 2f); var ExtendedPosition = ObjectManager.Player.ServerPosition.To2D() + ObjectManager.Player.Direction.To2D().Perpendicular() * (300 + 65f); if (directionExtension.IsWall() && PositioningHelper.DoPositionsCrossWall(ObjectManager.Player.ServerPosition, ExtendedPosition.To3D()) && Variables.Spells[SpellSlot.Q].IsReady() && PositioningHelper.DoPositionsCrossWall(ObjectManager.Player.ServerPosition, Game.CursorPos) && PositioningHelper.GetWallLength(ObjectManager.Player.ServerPosition, ExtendedPosition.To3D()) <= (280f - 65f / 2f)) { Variables.Spells[SpellSlot.Q].Cast(oppositeDirectionExtension); } }