Package net.storm.sdk.movement.sailing
Class Sailing
java.lang.Object
net.storm.sdk.movement.sailing.Sailing
Provides utilities for controlling and navigating ships in the Sailing skill.
This class offers methods to control ship movement, direction, speed, and navigation. It supports the Sailing skill mechanics including setting sails, adjusting speed, and steering the ship toward destinations.
Key features include:
- Direction control: Set and query the ship's heading
- Navigation: Start and stop auto-navigation
- Speed control: Adjust ship speed and set/unset sails
- Ship status: Check if on a boat and get ship information
Example Usage:
// Check if currently on a boat
if (Sailing.isOnBoat()) {
// Get the current ship
Ship ship = Sailing.getShip();
// Set sails to start moving
Sailing.setSails();
// Set direction toward a target
WorldPoint destination = new WorldPoint(3000, 3000, 0);
Sailing.setDirection(destination);
// Increase speed
Sailing.increaseSpeed();
// Enable auto-navigation
if (!Sailing.isNavigating()) {
Sailing.navigate();
}
}
// Stop the ship
Sailing.stopNavigating();
Sailing.unsetSails();
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDecreases the ship's speed using the default interaction method.static booleandecreaseSpeed(InteractMethod interactMethod) Decreases the ship's speed using the specified interaction method.static SailingDirectionGets the current direction the ship is facing.static ShipgetShip()Gets the current ship the player is on.static booleanIncreases the ship's speed using the default interaction method.static booleanincreaseSpeed(InteractMethod interactMethod) Increases the ship's speed using the specified interaction method.static booleanisMoving()Checks if the ship is currently moving.static booleanChecks if auto-navigation is currently active.static booleanisOnBoat()Checks if the player is currently on a boat.static booleannavigate()Starts auto-navigation using the default interaction method.static booleannavigate(InteractMethod interactMethod) Starts auto-navigation using the specified interaction method.static booleanreverse()Puts the ship in reverse using the default interaction method.static booleanreverse(InteractMethod interactMethod) Puts the ship in reverse using the specified interaction method.static voidsetDirection(net.runelite.api.coords.WorldPoint target) Sets the ship's direction toward a target point using the default interaction method.static voidsetDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target) Sets the ship's direction toward a target point using the specified interaction method.static voidsetDirection(InteractMethod interactMethod, SailingDirection direction) Sets the ship's direction using the specified interaction method.static voidsetDirection(SailingDirection direction) Sets the ship's direction using the default interaction method.static booleansetSails()Sets the sails to enable movement using the default interaction method.static booleansetSails(InteractMethod interactMethod) Sets the sails to enable movement using the specified interaction method.static booleanStops auto-navigation using the default interaction method.static booleanstopNavigating(InteractMethod interactMethod) Stops auto-navigation using the specified interaction method.static booleanUnsets the sails to stop movement using the default interaction method.static booleanunsetSails(InteractMethod interactMethod) Unsets the sails to stop movement using the specified interaction method.
-
Constructor Details
-
Sailing
public Sailing()
-
-
Method Details
-
getDirection
Gets the current direction the ship is facing.- Returns:
- the current sailing direction
-
isMoving
public static boolean isMoving()Checks if the ship is currently moving.- Returns:
- true if the ship is in motion, false otherwise
-
setDirection
Sets the ship's direction using the specified interaction method.- Parameters:
interactMethod- the method to use for interactiondirection- the direction to face
-
setDirection
Sets the ship's direction using the default interaction method.- Parameters:
direction- the direction to face
-
setDirection
public static void setDirection(InteractMethod interactMethod, net.runelite.api.coords.WorldPoint target) Sets the ship's direction toward a target point using the specified interaction method.- Parameters:
interactMethod- the method to use for interactiontarget- the target point to face toward
-
setDirection
public static void setDirection(net.runelite.api.coords.WorldPoint target) Sets the ship's direction toward a target point using the default interaction method.- Parameters:
target- the target point to face toward
-
setSails
Sets the sails to enable movement using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction- Returns:
- true if sails were set successfully, false otherwise
-
setSails
public static boolean setSails()Sets the sails to enable movement using the default interaction method.- Returns:
- true if sails were set successfully, false otherwise
-
unsetSails
Unsets the sails to stop movement using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction- Returns:
- true if sails were unset successfully, false otherwise
-
unsetSails
public static boolean unsetSails()Unsets the sails to stop movement using the default interaction method.- Returns:
- true if sails were unset successfully, false otherwise
-
increaseSpeed
Increases the ship's speed using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction- Returns:
- true if speed was increased successfully, false otherwise
-
increaseSpeed
public static boolean increaseSpeed()Increases the ship's speed using the default interaction method.- Returns:
- true if speed was increased successfully, false otherwise
-
decreaseSpeed
Decreases the ship's speed using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction- Returns:
- true if speed was decreased successfully, false otherwise
-
decreaseSpeed
public static boolean decreaseSpeed()Decreases the ship's speed using the default interaction method.- Returns:
- true if speed was decreased successfully, false otherwise
-
reverse
Puts the ship in reverse using the specified interaction method.- Parameters:
interactMethod- the method to use for interaction- Returns:
- true if reverse was engaged successfully, false otherwise
-
reverse
public static boolean reverse()Puts the ship in reverse using the default interaction method.- Returns:
- true if reverse was engaged successfully, false otherwise
-
getShip
Gets the current ship the player is on.- Returns:
- the current Ship object, or null if not on a ship
-
isOnBoat
public static boolean isOnBoat()Checks if the player is currently on a boat.- Returns:
- true if on a boat, false otherwise
-