Interface IWalker


public interface IWalker
Provides pathfinding and walking functionality for navigation.

This interface handles automatic pathfinding across the game world, including:

  • Walking to specific locations
  • Building paths with collision detection
  • Using teleports and transports (ships, gliders, etc.)
  • Avoiding wilderness areas
  • Caching and optimizing paths

Example usage:

 
 IWalker walker = Static.getWalker();
 WorldArea destination = new WorldArea(new WorldPoint(3222, 3218, 0), 5, 5);
 walker.walkTo(destination, WalkOptions.builder().build(), 30000, 3);
 
 

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport>
    buildExperimentalTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options)
    Builds a map of available teleports to help reach a destination.
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options)
    Builds a path from start points to any of the provided target areas.
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint,Teleport> teleports, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports)
    Builds a path from start points to any of the provided target areas.
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
    Builds a path from multiple start points using default wilderness avoidance.
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness)
    Builds a path from multiple start points with wilderness avoidance option.
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache)
    Builds a path with cache option.
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports)
    Builds a path with transport and cache options.
    default 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)
    Builds a path with full parameter control (legacy method).
    default TilePath
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options)
    Builds a path from start points to a destination with options.
    buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint,Teleport> teleports, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports)
    Builds a path from start points to a destination with full control.
    default TilePath
    buildPath(List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options)
    Builds a path from the player's current location to any of the provided target areas.
    default TilePath
    buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
    Builds a path from the player's location using default wilderness avoidance.
    default TilePath
    buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness)
    Builds a path from the player's location with wilderness avoidance option.
    default TilePath
    buildPath(net.runelite.api.coords.WorldArea destination, WalkOptions options)
    Builds a path from the player's current location to a destination.
    default LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport>
    buildTeleportLinks(net.runelite.api.coords.WorldArea destination)
    Builds a map of available teleports to help reach a destination with default options.
    LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport>
    buildTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options)
    default Map<net.runelite.api.coords.WorldPoint,List<Transport>>
    Builds a map of available transports with default options.
    Map<net.runelite.api.coords.WorldPoint,List<Transport>>
    Builds a map of available transports (ships, gliders, etc.) based on options.
    default HashMap<net.runelite.api.coords.WorldPoint,Teleport>
    Builds a map of ALL available teleports with default options.
    HashMap<net.runelite.api.coords.WorldPoint,Teleport>
    Builds a map of ALL available teleports without destination-based filtering.
    Gets the currently executing path.
    Gets the last built or executed path.
    default net.runelite.api.coords.WorldPoint
    getNearestWalkableTile(net.runelite.api.coords.WorldPoint source)
    Finds the nearest walkable tile from a source point.
    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 point with a filter.
    default net.runelite.api.coords.WorldPoint
    getNearestWalkableTile(net.runelite.api.coords.WorldPoint source, CollisionMap collisionMap)
    Finds the nearest walkable tile from a source point with a specific collision map.
    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 point.
    void
    Sets the current path being executed.
    void
    Sets the last path for tracking purposes.
    void
    walk(net.runelite.api.coords.WorldPoint worldPoint)
    Walks to a specific world point.
    boolean
    walkAlong(net.runelite.api.coords.WorldArea destination, TilePath path, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports, WalkOptions options)
    Executes walking along a pre-built path.
    boolean
    walkTo(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useTeleports)
    Walks to a destination area with collision detection and optional teleports.
    boolean
    walkTo(net.runelite.api.coords.WorldArea destination, WalkOptions options)
    Walks to a destination area with advanced options.
  • Method Details

    • walk

      void walk(net.runelite.api.coords.WorldPoint worldPoint)
      Walks to a specific world point.

      This is a simple walking method that clicks on the target point. For complex pathfinding, use walkTo(WorldArea, WalkOptions) instead.

      Parameters:
      worldPoint - the destination point
    • walkTo

      boolean walkTo(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean useTeleports)
      Walks to a destination area with collision detection and optional teleports.
      Parameters:
      destination - the destination area
      collisionMap - the collision map for pathfinding
      useTeleports - whether to use teleports
      Returns:
      true if successfully started walking, false otherwise
    • walkTo

      boolean walkTo(net.runelite.api.coords.WorldArea destination, WalkOptions options)
      Walks to a destination area with advanced options.

      This is the main walking method that handles:

      • Pathfinding with collision detection
      • Using teleports and transports
      • Avoiding wilderness
      • Path caching for performance

      Parameters:
      destination - the destination area
      options - the walking options
      Returns:
      true if successfully started walking, false otherwise
    • getCurrentPath

      TilePath getCurrentPath()
      Gets the currently executing path.
      Returns:
      the current path, or null if not walking
    • getLastPath

      TilePath getLastPath()
      Gets the last built or executed path.
      Returns:
      the last path, or null if no path was built
    • setLastPath

      void setLastPath(TilePath path)
      Sets the last path for tracking purposes.
      Parameters:
      path - the path to set
    • setCurrentPath

      void setCurrentPath(TilePath path)
      Sets the current path being executed.
      Parameters:
      path - the path to set
    • buildPath

      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, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports)
      Builds a path from start points to a destination with full control.

      This is the core pathfinding method that creates a TilePath using:

      • Collision detection from the collision map
      • Available teleports (spells, items, etc.)
      • Available transports (ships, gliders, etc.)
      • Path optimization and caching

      Parameters:
      startPoints - possible starting points for the path
      destination - the destination area
      options - walking options (collision map, wilderness avoidance, etc.)
      teleports - available teleports mapped by destination
      transports - available transports mapped by source location
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, WalkOptions options)
      Builds a path from start points to a destination with options.

      Automatically determines available teleports based on the destination.

      Parameters:
      startPoints - possible starting points for the path
      destination - the destination area
      options - walking options
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(net.runelite.api.coords.WorldArea destination, WalkOptions options)
      Builds a path from the player's current location to a destination.

      Convenience method that uses the local player's position as the starting point.

      Parameters:
      destination - the destination area
      options - walking options
      Returns:
      the computed path, or null if no path found
    • buildPath

      default 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)
      Builds a path with full parameter control (legacy method).
      Parameters:
      startPoints - possible starting points
      destination - the destination area
      collisionMap - the collision map
      avoidWilderness - whether to avoid wilderness
      useCache - whether to use path caching
      useTransports - whether to use transports
      teleports - available teleports
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness)
      Builds a path from the player's location with wilderness avoidance option.
      Parameters:
      destination - the destination area
      collisionMap - the collision map
      avoidWilderness - whether to avoid wilderness
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
      Builds a path from the player's location using default wilderness avoidance.
      Parameters:
      destination - the destination area
      collisionMap - the collision map
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
      Builds a path from multiple start points using default wilderness avoidance.
      Parameters:
      startPoints - possible starting points
      destination - the destination area
      collisionMap - the collision map
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness)
      Builds a path from multiple start points with wilderness avoidance option.
      Parameters:
      startPoints - possible starting points
      destination - the destination area
      collisionMap - the collision map
      avoidWilderness - whether to avoid wilderness
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache)
      Builds a path with cache option.
      Parameters:
      startPoints - possible starting points
      destination - the destination area
      collisionMap - the collision map
      avoidWilderness - whether to avoid wilderness
      useCache - whether to use path caching
      Returns:
      the computed path, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap, boolean avoidWilderness, boolean useCache, boolean useTransports)
      Builds a path with transport and cache options.
      Parameters:
      startPoints - possible starting points
      destination - the destination area
      collisionMap - the collision map
      avoidWilderness - whether to avoid wilderness
      useCache - whether to use path caching
      useTransports - whether to use transports
      Returns:
      the computed path, or null if no path found
    • walkAlong

      boolean walkAlong(net.runelite.api.coords.WorldArea destination, TilePath path, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports, WalkOptions options)
      Executes walking along a pre-built path.

      This method handles the actual walking execution, including:

      • Following the path tiles
      • Using transports when encountered
      • Handling obstacles and recalculation

      Parameters:
      destination - the destination area
      path - the pre-built path to follow
      transports - available transports
      options - walking options
      Returns:
      true if successfully walking, false otherwise
    • buildTransportLinks

      Map<net.runelite.api.coords.WorldPoint,List<Transport>> buildTransportLinks(WalkOptions options)
      Builds a map of available transports (ships, gliders, etc.) based on options.

      Transports are mapped by their source location. Multiple transports may be available from the same location.

      Parameters:
      options - walking options (requirements, filters, etc.)
      Returns:
      map of transports by source location
    • buildTransportLinks

      default Map<net.runelite.api.coords.WorldPoint,List<Transport>> buildTransportLinks()
      Builds a map of available transports with default options.
      Returns:
      map of transports by source location
    • buildTeleportLinks

      LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options)
      Builds a map of available teleports to help reach a destination (legacy method).
      Parameters:
      destination - the destination area
      options - walking options
      Returns:
      map of teleports by destination location
    • buildExperimentalTeleportLinks

      LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildExperimentalTeleportLinks(net.runelite.api.coords.WorldArea destination, WalkOptions options)
      Builds a map of available teleports to help reach a destination.

      Teleports include:

      • Magic spells (standard, ancient, lunar)
      • Teleport items (tabs, jewelry, etc.)
      • Player-owned house teleports
      • Fairy rings, spirit trees, etc.
      Only teleports that meet the player's requirements are included.

      Parameters:
      destination - the destination area
      options - walking options (requirements, filters, etc.)
      Returns:
      map of teleports by destination location
    • buildTeleportLinks

      default LinkedHashMap<net.runelite.api.coords.WorldPoint,Teleport> buildTeleportLinks(net.runelite.api.coords.WorldArea destination)
      Builds a map of available teleports to help reach a destination with default options.
      Parameters:
      destination - the destination area
      Returns:
      map of teleports by destination location
    • 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 point.

      This method searches for the closest tile that:

      • Is walkable (not blocked by collision)
      • Passes the filter predicate
      Useful for finding valid positions near objects or NPCs.

      Parameters:
      source - the starting point
      collisionMap - the collision map to use
      filter - a filter to apply to 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 point with a filter.
      Parameters:
      source - the starting point
      filter - a filter to apply to 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 point.
      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 from a source point with a specific collision map.
      Parameters:
      source - the starting point
      collisionMap - the collision map to use
      Returns:
      the nearest walkable tile, or null if none found
    • buildPath

      TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options, HashMap<net.runelite.api.coords.WorldPoint,Teleport> teleports, Map<net.runelite.api.coords.WorldPoint,List<Transport>> transports)
      Builds a path from start points to any of the provided target areas.

      This method finds the shortest path to ANY of the provided target areas, useful for finding the nearest of multiple destinations (e.g., nearest bank). The pathfinder will return the path to whichever target area is closest.

      Parameters:
      startPoints - possible starting points for the path
      targetAreas - list of target areas - path will go to the nearest one
      options - walking options (collision map, wilderness avoidance, etc.)
      teleports - available teleports mapped by destination
      transports - available transports mapped by source location
      Returns:
      the computed path to the nearest target, or null if no path found
    • buildPath

      default TilePath buildPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options)
      Builds a path from start points to any of the provided target areas.

      Convenience method that automatically builds transport and teleport links.

      Parameters:
      startPoints - possible starting points for the path
      targetAreas - list of target areas - path will go to the nearest one
      options - walking options
      Returns:
      the computed path to the nearest target, or null if no path found
    • buildPath

      default TilePath buildPath(List<net.runelite.api.coords.WorldArea> targetAreas, WalkOptions options)
      Builds a path from the player's current location to any of the provided target areas.

      Convenience method that uses the local player's position as the starting point.

      Parameters:
      targetAreas - list of target areas - path will go to the nearest one
      options - walking options
      Returns:
      the computed path to the nearest target, or null if no path found
    • buildUnfilteredTeleportLinks

      HashMap<net.runelite.api.coords.WorldPoint,Teleport> buildUnfilteredTeleportLinks(WalkOptions options)
      Builds a map of ALL available teleports without destination-based filtering.

      Unlike buildExperimentalTeleportLinks(WorldArea, WalkOptions) which filters and weights teleports based on proximity to a single destination, this method returns ALL available teleports. This is useful for multi-area pathfinding where the destination is not known in advance.

      Basic filters still apply:

      • Teleports too close to the player (< 30 tiles) unless forceLoad is set
      • Home teleports if disabled in options
      • Minigame teleports if disabled in options

      Parameters:
      options - walking options (home teleport, minigame teleport settings, etc.)
      Returns:
      map of all available teleports by destination location
    • buildUnfilteredTeleportLinks

      default HashMap<net.runelite.api.coords.WorldPoint,Teleport> buildUnfilteredTeleportLinks()
      Builds a map of ALL available teleports with default options.
      Returns:
      map of all available teleports by destination location