Sailing Actions
SailingActions is a result-aware, paced wrapper around SailingInteraction. It covers boat direction, speed, and sail state for the OSRS Sailing skill.
SailingInteraction queues its own MousePackets.queueClickPacket() internally; SailingActions does not add a second click on top of it.
Query Methods
isNavigating()→boolean- varbitNAVIGATING_VARBIT(19105) is non-zeroisMoving()→boolean- varbitSPEED_VARBIT(19175) is non-zerogetDirection()→SailingInteraction.Direction- readsSAILING_BOAT_SPAWNED_ANGLE_VARBIT(19129) and converts viaDirection.fromAngle(angle)(divides by 128)
Action Methods
All action methods gate on GameStateGuard.requireLoggedInWithPlayer() and ActionPacer.isReady() before dispatching.
setDirection(SailingInteraction.Direction direction)→InteractionResult- sets the heading; returnsTARGET_NULLif direction is nullincreaseSpeed()→InteractionResult- callsSailingInteraction.increaseSpeed(); the underlying method callssetSails()when not moving, and no-ops at speed 2decreaseSpeed()→InteractionResult- callsSailingInteraction.decreaseSpeed(); the underlying method no-ops at speed 3 (reverse)setSails()→InteractionResult- starts movement if not already movingunsetSails()→InteractionResult- stops movement if currently moving
Direction Enum
SailingInteraction.Direction has 16 compass values from SOUTH (code 0) through SOUTH_SOUTH_EAST (code 15), stepping clockwise in 22.5-degree increments. Use Direction.fromCode(int) or Direction.fromAngle(int) for reverse-lookup.
| Constant | Code |
|---|---|
| SOUTH | 0 |
| SOUTH_SOUTH_WEST | 1 |
| SOUTH_WEST | 2 |
| WEST_SOUTH_WEST | 3 |
| WEST | 4 |
| WEST_NORTH_WEST | 5 |
| NORTH_WEST | 6 |
| NORTH_NORTH_WEST | 7 |
| NORTH | 8 |
| NORTH_NORTH_EAST | 9 |
| NORTH_EAST | 10 |
| EAST_NORTH_EAST | 11 |
| EAST | 12 |
| EAST_SOUTH_EAST | 13 |
| SOUTH_EAST | 14 |
| SOUTH_SOUTH_EAST | 15 |
Example
if (SailingActions.isNavigating() && !SailingActions.isMoving()) {
SailingActions.setSails();
}
SailingInteraction.Direction current = SailingActions.getDirection();
if (current != SailingInteraction.Direction.NORTH) {
InteractionResult result = SailingActions.setDirection(SailingInteraction.Direction.NORTH);
if (result.failed()) {
log.debug("setDirection failed: {}", result.getMessage());
}
}
Behavior Notes
SailingActionsis a utility class, not a plugin.runelite-plugin.propertiesdoes not register it.increaseSpeedanddecreaseSpeeddelegate entirely toSailingInteraction; their no-op conditions (at max/min speed) are enforced in the legacy layer, not inSailingActions. A returnedInteractionResult.successdoes not guarantee a packet was sent.- Live RuneLite verification is still required for all sailing actions; the varbit IDs and widget ID (
SAILING_CONTROLS_ID= 61407257) were captured from Sailing beta builds and may drift.