SailingAPI
Sailing API.
ClassRLPlugins API
public class SailingAPIMembers
Static methods
- booleandirectHeading(WorldPoint)
Directs the boat towards a target WorldPoint.
- HeadinggetHeading()
Gets the current heading as a Heading enum (0-15).
- intgetHeadingRaw()
Gets the current heading in JAU (0-2047).
- intgetHeadingValue()
Gets the current heading value (0-15) directly.
- HeadinggetResolvedHeading()
The resolved heading.
- intgetResolvedHeadingValue()
Gets the resolved heading from the varbit (0-15).
- intgetSpeed()
The speed.
- HeadinggetTargetHeading()
The target heading.
- intgetTargetHeadingValue()
The target heading value.
- booleanisMovingBackward()
Checks if the boat is moving backward.
- booleanisMovingForward()
Checks if the boat is moving forward.
- booleanisNavigating()
Checks if player is currently navigating.
- booleanisOnBoat()
Checks if the player is on a sailing boat using worldview level check.
- booleanisRotating()
Checks if the boat is currently rotating (changing heading).
- booleanisStandingStill()
Checks if the boat is standing still.
- booleannavigate()
Navigate.
- booleanopenCargo()
Opens the cargo hold on the boat.
- booleansailsNeedTrimming()
Sails need trimming.
- booleansailTo(WorldPoint)
Sails the boat towards a target WorldPoint.
- voidsetHeading(Heading)
Sets the heading of the boat.
- booleansetSails()
Sets sails to start navigating.
- voidsetSpeed(int)
Sets the speed.
- booleanstopNavigate()
Stop navigate.
- booleantrimSails()
Trims the sails on the boat.
- booleanunSetSails()
Unsets sails to stop navigating.
directHeading(WorldPoint)static
public static boolean directHeading(WorldPoint target)Directs the boat towards a target WorldPoint.
Parameters
target- Target WorldPoint.
Returns
True if heading was set, false otherwise.
getHeading()static
public static Heading getHeading()Gets the current heading as a Heading enum (0-15).
Uses transform matrix analysis for real-time tracking during rotation.
Returns
Heading enum representing the boat's current visual direction, or null if not on boat.
getHeadingRaw()static
public static int getHeadingRaw()Gets the current heading in JAU (0-2047).
Uses transform matrix analysis for real-time heading during rotation.
Returns
Raw heading in JAU (0-2047), or -1 if not on boat.
getHeadingValue()static
public static int getHeadingValue()Gets the current heading value (0-15) directly.
Convenience method using transform matrix for real-time rotation tracking.
Returns
Heading value (0-15), or -1 if not on boat.
getResolvedHeading()static
public static Heading getResolvedHeading()The resolved heading.
getResolvedHeadingValue()static
public static int getResolvedHeadingValue()Gets the resolved heading from the varbit (0-15).
This reflects the last stable heading after rotation completes.
Returns
Resolved heading value (0-15).
getSpeed()static
public static int getSpeed()The speed.
getTargetHeading()static
public static Heading getTargetHeading()The target heading.
getTargetHeadingValue()static
public static int getTargetHeadingValue()The target heading value.
isMovingBackward()static
public static boolean isMovingBackward()Checks if the boat is moving backward.
Returns
True if moving backward, false otherwise.
isMovingForward()static
public static boolean isMovingForward()Checks if the boat is moving forward.
Returns
True if moving forward, false otherwise.
isOnBoat()static
public static boolean isOnBoat()Checks if the player is on a sailing boat using worldview level check.
Returns
True if player is on a sailing boat, false otherwise.
isRotating()static
public static boolean isRotating()Checks if the boat is currently rotating (changing heading).
Compares the target heading (client field) with the resolved heading (varbit). Agnostic of our transform-based heading calculation.
Returns
True if the boat is mid-rotation, false if stationary or not on boat.
isStandingStill()static
public static boolean isStandingStill()Checks if the boat is standing still.
Returns
True if standing still, false otherwise.
openCargo()static
public static boolean openCargo()Opens the cargo hold on the boat.
Returns
True if cargo hold was opened, false otherwise.
sailsNeedTrimming()static
public static boolean sailsNeedTrimming()Sails need trimming.
sailTo(WorldPoint)static
public static boolean sailTo(WorldPoint target)Sails the boat towards a target WorldPoint.
Parameters
target- Target WorldPoint.
Returns
True if sailing action was initiated, false otherwise.
setHeading(Heading)static
public static void setHeading(Heading heading)Sets the heading of the boat.
Parameters
heading- Heading value (0-15).
setSails()static
public static boolean setSails()Sets sails to start navigating.
Returns
True if sails were set, false otherwise.
setSpeed(int)static
public static void setSpeed(int arg0)Sets the speed.
Parameters
arg0- Argument 0.
trimSails()static
public static boolean trimSails()Trims the sails on the boat.
Returns
True if sails were trimmed, false otherwise.
unSetSails()static
public static boolean unSetSails()Unsets sails to stop navigating.
Returns
True if sails were unset, false otherwise.
Also allowed
Every class has these, as in plain Java.
equals, toString