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
      Run-enabled variable from the pinned game-value definitions.
    • 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).
      void ensureRunEnabled​(boolean enabled)
      Submit a flip only when the observed state differs; does not claim server completion.
      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()
      Explicit flip through the revision-240 orb control shared by desktop fixed/resizable layouts.
      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.
      boolean walkTo​(net.runelite.api.coords.WorldPoint target, boolean ctrl)  
      • 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
        Run-enabled variable from the pinned game-value definitions.
        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. Human mouse mode submits a scene-tile click through the input router. Packet mode uses MOVE_GAMECLICK when available, otherwise the native menu tier.
      • walkTo

        public boolean walkTo​(net.runelite.api.coords.WorldPoint target,
                              boolean ctrl)
      • 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()
        Explicit flip through the revision-240 orb control shared by desktop fixed/resizable layouts. Completion is observed separately through runEnabled().
      • ensureRunEnabled

        public void ensureRunEnabled​(boolean enabled)
        Submit a flip only when the observed state differs; does not claim server completion.