Class MovementService


  • @Singleton
    public class MovementService
    extends java.lang.Object
    Walk submission and movement-state readback. Semantics (honest, per plan ยง5): - Readback methods (destination(), playerAt(), isMoving(), energy(), runEnabled()) are live client reads and are safe to call any time. - Walk submission uses the client's native MenuAction.WALK menu tier; the client resolves the revision-specific packet tuple internally. - Packet-tier walking remains optional and is not required for this command.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int VARP_RUN_ENABLED
      Historical varp for run-enabled state (173).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      net.runelite.api.coords.WorldPoint destination()
      Current destination tile as a world point, or null when idle.
      int energy()
      Run energy percentage (0-100).
      boolean isMoving()
      True when the local player has an active destination (moving).
      boolean localPlayerAt​(net.runelite.api.coords.WorldPoint point)
      True when the local player stands exactly on the given point.
      net.runelite.api.coords.WorldPoint playerAt()
      Local player's current world position, or null when unavailable.
      boolean runEnabled()
      Run-enabled state via varp 173 readback.
      void toggleRun()
      Toggle run via its settings component.
      boolean walkLocal​(net.runelite.api.coords.LocalPoint target)
      Submit a walk command to a local scene point.
      boolean walkTo​(net.runelite.api.coords.WorldPoint target)
      Submit a walk command to a world point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VARP_RUN_ENABLED

        public static final int VARP_RUN_ENABLED
        Historical varp for run-enabled state (173). Verify live in P7.
        See Also:
        Constant Field Values
    • Method Detail

      • walkTo

        public boolean walkTo​(net.runelite.api.coords.WorldPoint target)
        Submit a walk command to a world point. Uses the native menu tier. The client owns the WALK packet tuple.
      • walkLocal

        public boolean walkLocal​(net.runelite.api.coords.LocalPoint target)
        Submit a walk command to a local scene point. The scene coordinates are supplied to the native client menu pipeline.
      • destination

        public net.runelite.api.coords.WorldPoint destination()
        Current destination tile as a world point, or null when idle.
      • isMoving

        public boolean isMoving()
        True when the local player has an active destination (moving).
      • playerAt

        public net.runelite.api.coords.WorldPoint playerAt()
        Local player's current world position, or null when unavailable.
      • localPlayerAt

        public boolean localPlayerAt​(net.runelite.api.coords.WorldPoint point)
        True when the local player stands exactly on the given point.
      • energy

        public int energy()
        Run energy percentage (0-100). Client stores 0-10000 internally.
      • runEnabled

        public boolean runEnabled()
        Run-enabled state via varp 173 readback. Verify against live toggle in P7.
      • toggleRun

        public void toggleRun()
        Toggle run via its settings component. Finds the visible run-toggle control and routes it through the native menu tier.