Package net.storm.sdk.movement
Class Walker
java.lang.Object
net.storm.sdk.movement.Walker
Provides low-level pathfinding and walking utilities for advanced movement control.
This class offers more granular control over the pathfinding system compared to
Movement. It provides methods to build paths, manage transport links, configure
teleport options, and walk along pre-calculated paths.
Key features include:
- Path building: Calculate paths with custom options
- Transport links: Build and use transport connections (boats, carts, etc.)
- Teleport links: Calculate optimal teleport destinations
- Path management: Track current and last calculated paths
Example Usage:
// Build a path with custom options
WalkOptions options = new WalkOptions();
options.setAvoidWilderness(true);
TilePath path = Walker.buildPath(destination.toWorldArea(), options);
// Walk along a pre-built path
Map<WorldPoint, List<Transport>> transports = Walker.buildTransportLinks();
Walker.walkAlong(destination, path, transports, options);
// Get teleport links to a destination
LinkedHashMap<WorldPoint, Teleport> teleports = Walker.buildTeleportLinks(destination);
// Invalidate cached paths when needed
Walker.invalidatePath();
// Check the current path being walked
TilePath currentPath = Walker.getCurrentPath();
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LinkedHashMap<net.runelite.api.coords.WorldPoint, Teleport> buildExperimentalTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options) Deprecated.This method is experimental and may be removed or changedstatic TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Deprecated.static TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a path from multiple starting points using custom walk options.static TilePathbuildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports, HashMap<net.runelite.api.coords.WorldPoint, List<Transport>> transports) Builds a path with full customization using walk options, teleports, and transports.static TilePathbuildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Deprecated.UsebuildPath(WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness) Deprecated.UsebuildPath(WorldArea, WalkOptions)with WalkOptions insteadstatic TilePathbuildPath(net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a path to a destination using custom walk options.static LinkedHashMap<net.runelite.api.coords.WorldPoint, Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination) Builds a map of teleport destinations using default options.static LinkedHashMap<net.runelite.api.coords.WorldPoint, Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a map of teleport destinations that could help reach the destination.Builds a map of all available transport links using default options.buildTransportLinks(WalkOptions options) Builds a map of all available transport links using custom walk options.static TilePathRetrieves the path currently being walked.static TilePathRetrieves the last calculated path.static voidInvalidates both the current and last cached paths.static booleanwalkAlong(net.runelite.api.coords.WorldArea destination, TilePath path, Map<net.runelite.api.coords.WorldPoint, List<Transport>> transports, WalkOptions options) Walks along a pre-calculated path using the specified transports and options.static booleanwalkTo(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useTeleports) Pathfinds and walks to a destination using a custom collision map.static booleanwalkTo(net.runelite.api.coords.WorldArea destination, WalkOptions options) Pathfinds and walks to a destination using custom walk options.static booleanwalkTo(net.runelite.api.coords.WorldPoint destination, WalkOptions options) Pathfinds and walks to a destination point using custom walk options.
-
Constructor Details
-
Walker
public Walker()
-
-
Method Details
-
walkTo
public static boolean walkTo(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useTeleports) Pathfinds and walks to a destination using a custom collision map.- Parameters:
destination- the destination areacollisionMap- the collision map to use for pathfindinguseTeleports- whether to consider teleports in the path- Returns:
- true if a complete path was found, false if only a partial path
-
walkTo
Pathfinds and walks to a destination using custom walk options.- Parameters:
destination- the destination areaoptions- custom walk options for path calculation- Returns:
- true if a complete path was found, false if only a partial path
-
walkTo
Pathfinds and walks to a destination point using custom walk options.- Parameters:
destination- the destination pointoptions- custom walk options for path calculation- Returns:
- true if a complete path was found, false if only a partial path
-
getCurrentPath
Retrieves the path currently being walked.- Returns:
- the current tile path, or null if not currently walking a path
-
getLastPath
Retrieves the last calculated path.- Returns:
- the last tile path calculated, or null if no path has been calculated
-
invalidatePath
public static void invalidatePath()Invalidates both the current and last cached paths.Call this method when the game state changes in a way that would invalidate previously calculated paths (e.g., after teleporting).
-
walkAlong
public static boolean walkAlong(net.runelite.api.coords.WorldArea destination, TilePath path, Map<net.runelite.api.coords.WorldPoint, List<Transport>> transports, WalkOptions options) Walks along a pre-calculated path using the specified transports and options.- Parameters:
destination- the final destination areapath- the pre-calculated tile path to followtransports- map of transport links available for useoptions- custom walk options- Returns:
- true if successfully walking the path, false otherwise
-
buildPath
@Deprecated public static TilePath buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness) Deprecated.UsebuildPath(WorldArea, WalkOptions)with WalkOptions insteadBuilds a path to the destination using a custom collision map.- Parameters:
destination- the destination areacollisionMap- the collision map to useavoidWilderness- whether to avoid wilderness areas- Returns:
- the calculated tile path
-
buildPath
@Deprecated public static TilePath buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Deprecated.UsebuildPath(WorldArea, WalkOptions)with WalkOptions insteadBuilds a path to the destination using a custom collision map.- Parameters:
destination- the destination areacollisionMap- the collision map to use- Returns:
- the calculated tile path
-
buildPath
@Deprecated public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadBuilds a path from multiple starting points to the destination.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areacollisionMap- the collision map to use- Returns:
- the calculated tile path from the optimal starting point
-
buildPath
@Deprecated public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadBuilds a path from multiple starting points with wilderness avoidance option.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areacollisionMap- the collision map to useavoidWilderness- whether to avoid wilderness areas- Returns:
- the calculated tile path
-
buildPath
@Deprecated public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadBuilds a path with caching option.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areacollisionMap- the collision map to useavoidWilderness- whether to avoid wilderness areasuseCache- whether to use cached path data- Returns:
- the calculated tile path
-
buildPath
@Deprecated public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports) Deprecated.UsebuildPath(Collection, WorldArea, WalkOptions)with WalkOptions insteadBuilds a path with transport option.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areacollisionMap- the collision map to useavoidWilderness- whether to avoid wilderness areasuseCache- whether to use cached path datauseTransports- whether to include transport links- Returns:
- the calculated tile path
-
buildPath
@Deprecated public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports) Deprecated.Builds a path with teleport support.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areacollisionMap- the collision map to useavoidWilderness- whether to avoid wilderness areasuseCache- whether to use cached path datauseTransports- whether to include transport linksteleports- map of teleport destinations to teleport objects- Returns:
- the calculated tile path
-
buildPath
public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint, Teleport> teleports, HashMap<net.runelite.api.coords.WorldPoint, List<Transport>> transports) Builds a path with full customization using walk options, teleports, and transports.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areaoptions- custom walk optionsteleports- map of teleport destinations to teleport objectstransports- map of transport source points to available transports- Returns:
- the calculated tile path
-
buildPath
public static TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a path from multiple starting points using custom walk options.- Parameters:
startPoints- the collection of possible starting pointsdestination- the destination areaoptions- custom walk options- Returns:
- the calculated tile path
-
buildPath
public static TilePath buildPath(net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a path to a destination using custom walk options.- Parameters:
destination- the destination areaoptions- custom walk options- Returns:
- the calculated tile path
-
buildTransportLinks
public static Map<net.runelite.api.coords.WorldPoint,List<Transport>> buildTransportLinks(WalkOptions options) Builds a map of all available transport links using custom walk options.Transport links include shortcuts, agility obstacles, boats, carts, and other methods of non-walking movement between areas.
- Parameters:
options- custom walk options to filter transports- Returns:
- a map of source points to available transports from those points
-
buildTransportLinks
Builds a map of all available transport links using default options.- Returns:
- a map of source points to available transports from those points
-
buildTeleportLinks
public static LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options) Builds a map of teleport destinations that could help reach the destination.- Parameters:
destination- the target destinationoptions- custom walk options to filter teleports- Returns:
- an ordered map of teleport destinations to teleport objects
-
buildTeleportLinks
public static LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination) Builds a map of teleport destinations using default options.- Parameters:
destination- the target destination- Returns:
- an ordered map of teleport destinations to teleport objects
-
buildExperimentalTeleportLinks
@Deprecated public static LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildExperimentalTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options) Deprecated.This method is experimental and may be removed or changedBuilds experimental teleport links with advanced optimization.- Parameters:
destination- the target destinationoptions- custom walk options- Returns:
- an ordered map of teleport destinations to teleport objects
-