Package net.storm.api.movement
Interface IMovement
public interface IMovement
Provides movement and pathfinding utilities for the local player.
This interface handles player movement including:
- Walking and running to destinations
- Path building and navigation
- Run energy management
- Destination tracking
Example usage:
IMovement movement = Static.getMovement();
// Simple walk
movement.walk(new WorldPoint(3200, 3200, 0));
// Check if running
if (movement.getRunEnergy() > 30 && !movement.isRunEnabled()) {
movement.toggleRun();
}
// Walk with pathfinding
movement.walkTo(BankLocation.GRAND_EXCHANGE.getArea());
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionnet.runelite.api.coords.WorldPointGets the current walking destination.default net.runelite.api.coords.WorldPointgetNearestWalkableTile(net.runelite.api.coords.WorldPoint source) Finds the nearest walkable tile from a source.default net.runelite.api.coords.WorldPointgetNearestWalkableTile(net.runelite.api.coords.WorldPoint source, Predicate<net.runelite.api.coords.WorldPoint> filter) Finds the nearest walkable tile from a source with a filter using global collision map.default net.runelite.api.coords.WorldPointgetNearestWalkableTile(net.runelite.api.coords.WorldPoint source, CollisionMap collisionMap) Finds the nearest walkable tile with a specific collision map.net.runelite.api.coords.WorldPointgetNearestWalkableTile(net.runelite.api.coords.WorldPoint source, CollisionMap collisionMap, Predicate<net.runelite.api.coords.WorldPoint> filter) Finds the nearest walkable tile from a source with a filter.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination) Builds a path from multiple start points to a destination area.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, boolean useCache) Builds a path with cache option.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Builds a path with collision map.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useCache) Builds a path with collision map and cache option.getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useCache, boolean useTransports, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Builds a path with full parameter control.getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Builds a path with walk options and teleports.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldPoint destination) Builds a path from multiple start points to a destination point.default TilePathgetPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldPoint destination, CollisionMap collisionMap) Builds a path from multiple start points to a destination with a collision map.default TilePathgetPath(net.runelite.api.coords.WorldArea destination) Builds a path from the player to a destination area.default TilePathgetPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Builds a path from the player to a destination area with a collision map.default TilePathgetPath(net.runelite.api.coords.WorldPoint destination) Builds a path from the player to a destination point.default TilePathgetPath(net.runelite.api.coords.WorldPoint destination, CollisionMap collisionMap) Builds a path from the player to a destination with a specific collision map.intGets the current run energy percentage.booleanChecks if running is currently enabled.booleanChecks if the player has a stamina boost active.booleanChecks if the player is currently walking or running.voidsetDestination(int sceneX, int sceneY) Sets the click destination for walking.voidToggles run mode on or off.voidwalk(net.runelite.api.coords.WorldPoint worldPoint) Walks to a specific world point by clicking on it.booleanwalkTo(net.runelite.api.coords.WorldArea worldArea) Walks to an area using pathfinding.booleanwalkTo(net.runelite.api.coords.WorldArea area, CollisionMap collisionMap, boolean useTeleports) Walks to an area with collision detection and optional teleports.booleanwalkTo(net.runelite.api.coords.WorldArea area, WalkOptions options) Walks to an area with configurable options.booleanwalkTo(net.runelite.api.coords.WorldPoint worldPoint) Walks to a specific world point using pathfinding.
-
Method Details
-
setDestination
void setDestination(int sceneX, int sceneY) Sets the click destination for walking.- Parameters:
sceneX- the scene X coordinatesceneY- the scene Y coordinate
-
getDestination
@Nullable net.runelite.api.coords.WorldPoint getDestination()Gets the current walking destination.- Returns:
- the destination point, or null if not walking
-
isWalking
boolean isWalking()Checks if the player is currently walking or running.- Returns:
- true if the player is moving
-
walk
void walk(net.runelite.api.coords.WorldPoint worldPoint) Walks to a specific world point by clicking on it.This is a direct click without pathfinding.
- Parameters:
worldPoint- the destination
-
walkTo
boolean walkTo(net.runelite.api.coords.WorldPoint worldPoint) Walks to a specific world point using pathfinding.- Parameters:
worldPoint- the destination- Returns:
- true if walking was initiated
-
walkTo
boolean walkTo(net.runelite.api.coords.WorldArea worldArea) Walks to an area using pathfinding.- Parameters:
worldArea- the destination area- Returns:
- true if walking was initiated
-
walkTo
boolean walkTo(net.runelite.api.coords.WorldArea area, CollisionMap collisionMap, boolean useTeleports) Walks to an area with collision detection and optional teleports.- Parameters:
area- the destination areacollisionMap- the collision mapuseTeleports- whether to use teleports- Returns:
- true if walking was initiated
-
walkTo
Walks to an area with configurable options.- Parameters:
area- the destination areaoptions- walking options- Returns:
- true if walking was initiated
-
isRunEnabled
boolean isRunEnabled()Checks if running is currently enabled.- Returns:
- true if run mode is active
-
toggleRun
void toggleRun()Toggles run mode on or off. -
isStaminaBoosted
boolean isStaminaBoosted()Checks if the player has a stamina boost active.- Returns:
- true if stamina potion effect is active
-
getRunEnergy
int getRunEnergy()Gets the current run energy percentage.- Returns:
- run energy (0-100)
-
getPath
TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useCache, boolean useTransports, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Builds a path with full parameter control.- Parameters:
startPoints- possible starting pointsdestination- the destination areacollisionMap- the collision mapuseCache- whether to use cached pathsuseTransports- whether to use transportsteleports- available teleports- Returns:
- the computed path, or null if no path found
-
getPath
TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Builds a path with walk options and teleports.- Parameters:
startPoints- possible starting pointsdestination- the destination areaoptions- walking optionsteleports- available teleports- Returns:
- the computed path, or null if no path found
-
getPath
Builds a path from the player to a destination point.- Parameters:
destination- the destination point- Returns:
- the computed path, or null if no path found
-
getPath
Builds a path from the player to a destination with a specific collision map.- Parameters:
destination- the destination pointcollisionMap- the collision map- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldPoint destination) Builds a path from multiple start points to a destination point.- Parameters:
startPoints- possible starting pointsdestination- the destination point- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldPoint destination, CollisionMap collisionMap) Builds a path from multiple start points to a destination with a collision map.- Parameters:
startPoints- possible starting pointsdestination- the destination pointcollisionMap- the collision map- Returns:
- the computed path, or null if no path found
-
getPath
Builds a path from the player to a destination area.- Parameters:
destination- the destination area- Returns:
- the computed path, or null if no path found
-
getPath
Builds a path from the player to a destination area with a collision map.- Parameters:
destination- the destination areacollisionMap- the collision map- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination) Builds a path from multiple start points to a destination area.- Parameters:
startPoints- possible starting pointsdestination- the destination area- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Builds a path with collision map.- Parameters:
startPoints- possible starting pointsdestination- the destination areacollisionMap- the collision map- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, boolean useCache) Builds a path with cache option.- Parameters:
startPoints- possible starting pointsdestination- the destination areauseCache- whether to use cached paths- Returns:
- the computed path, or null if no path found
-
getPath
default TilePath getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useCache) Builds a path with collision map and cache option.- Parameters:
startPoints- possible starting pointsdestination- the destination areacollisionMap- the collision mapuseCache- whether to use cached paths- Returns:
- the computed path, or null if no path found
-
getNearestWalkableTile
net.runelite.api.coords.WorldPoint getNearestWalkableTile(net.runelite.api.coords.WorldPoint source, CollisionMap collisionMap, Predicate<net.runelite.api.coords.WorldPoint> filter) Finds the nearest walkable tile from a source with a filter.- Parameters:
source- the starting pointcollisionMap- the collision mapfilter- a filter for candidate tiles- Returns:
- the nearest walkable tile, or null if none found
-
getNearestWalkableTile
default net.runelite.api.coords.WorldPoint getNearestWalkableTile(net.runelite.api.coords.WorldPoint source, Predicate<net.runelite.api.coords.WorldPoint> filter) Finds the nearest walkable tile from a source with a filter using global collision map.- Parameters:
source- the starting pointfilter- a filter for candidate tiles- Returns:
- the nearest walkable tile, or null if none found
-
getNearestWalkableTile
default net.runelite.api.coords.WorldPoint getNearestWalkableTile(net.runelite.api.coords.WorldPoint source) Finds the nearest walkable tile from a source.- Parameters:
source- the starting point- Returns:
- the nearest walkable tile, or null if none found
-
getNearestWalkableTile
default net.runelite.api.coords.WorldPoint getNearestWalkableTile(net.runelite.api.coords.WorldPoint source, CollisionMap collisionMap) Finds the nearest walkable tile with a specific collision map.- Parameters:
source- the starting pointcollisionMap- the collision map- Returns:
- the nearest walkable tile, or null if none found
-