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 Type
    Method
    Description
    net.runelite.api.coords.WorldPoint
    Gets the current walking destination.
    default net.runelite.api.coords.WorldPoint
    getNearestWalkableTile(net.runelite.api.coords.WorldPoint source)
    Finds the nearest walkable tile from a source.
    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.
    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.
    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.
    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.
    default TilePath
    getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, boolean useCache)
    Builds a path with cache option.
    default TilePath
    getPath(Collection<net.runelite.api.coords.WorldPoint> startPoints, net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
    Builds a path with collision map.
    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.
    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 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.
    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.
    default TilePath
    getPath(net.runelite.api.coords.WorldArea destination)
    Builds a path from the player to a destination area.
    default TilePath
    getPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
    Builds a path from the player to a destination area with a collision map.
    default TilePath
    getPath(net.runelite.api.coords.WorldPoint destination)
    Builds a path from the player to a destination point.
    default TilePath
    getPath(net.runelite.api.coords.WorldPoint destination, CollisionMap collisionMap)
    Builds a path from the player to a destination with a specific collision map.
    int
    Gets the current run energy percentage.
    boolean
    Checks if running is currently enabled.
    boolean
    Checks if the player has a stamina boost active.
    boolean
    Checks if the player is currently walking or running.
    void
    setDestination(int sceneX, int sceneY)
    Sets the click destination for walking.
    void
    Toggles run mode on or off.
    void
    walk(net.runelite.api.coords.WorldPoint worldPoint)
    Walks to a specific world point by clicking on it.
    boolean
    walkTo(net.runelite.api.coords.WorldArea worldArea)
    Walks to an area using pathfinding.
    boolean
    walkTo(net.runelite.api.coords.WorldArea area, CollisionMap collisionMap, boolean useTeleports)
    Walks to an area with collision detection and optional teleports.
    boolean
    walkTo(net.runelite.api.coords.WorldArea area, WalkOptions options)
    Walks to an area with configurable options.
    boolean
    walkTo(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 coordinate
      sceneY - 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 area
      collisionMap - the collision map
      useTeleports - whether to use teleports
      Returns:
      true if walking was initiated
    • walkTo

      boolean walkTo(net.runelite.api.coords.WorldArea area, WalkOptions options)
      Walks to an area with configurable options.
      Parameters:
      area - the destination area
      options - 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 points
      destination - the destination area
      collisionMap - the collision map
      useCache - whether to use cached paths
      useTransports - whether to use transports
      teleports - 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 points
      destination - the destination area
      options - walking options
      teleports - available teleports
      Returns:
      the computed path, or null if no path found
    • getPath

      default TilePath getPath(net.runelite.api.coords.WorldPoint destination)
      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

      default TilePath getPath(net.runelite.api.coords.WorldPoint destination, CollisionMap collisionMap)
      Builds a path from the player to a destination with a specific collision map.
      Parameters:
      destination - the destination point
      collisionMap - 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 points
      destination - 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 points
      destination - the destination point
      collisionMap - the collision map
      Returns:
      the computed path, or null if no path found
    • getPath

      default TilePath getPath(net.runelite.api.coords.WorldArea destination)
      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

      default TilePath getPath(net.runelite.api.coords.WorldArea destination, CollisionMap collisionMap)
      Builds a path from the player to a destination area with a collision map.
      Parameters:
      destination - the destination area
      collisionMap - 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 points
      destination - 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 points
      destination - the destination area
      collisionMap - 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 points
      destination - the destination area
      useCache - 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 points
      destination - the destination area
      collisionMap - the collision map
      useCache - 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 point
      collisionMap - the collision map
      filter - 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 point
      filter - 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 point
      collisionMap - the collision map
      Returns:
      the nearest walkable tile, or null if none found