Record Class WalkStatus

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.WalkStatus
Record Components:
state - walker state, one of: idle (this script has not asked for a walk), walking, arrived, cancelled, failed, or refused_busy (another script was already walking this character, so nothing was started). Treat an unrecognised value as non-terminal rather than switching exhaustively — states are added additively
targetX - target world tile X
targetY - target world tile Y
currentStep - current step in the local path segment
totalSteps - total steps in the local path segment
navStep - current navigation step (for world paths with multiple segments)
totalNavSteps - total navigation steps
isWalking - whether the walker is currently active
isDone - whether the walk has completed
hpaReady - whether the HPA* graph is ready for world pathfinding

public record WalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady) extends Record
Current walker state.

The state is computed host-side by the walker that drives the character, not reported by the game — so it describes what this host is trying to do, and is scoped to the script that asked. See NavigationAPI.getWalkStatus().

  • Constructor Summary

    Constructors
    Constructor
    Description
    WalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady)
    Creates an instance of a WalkStatus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the currentStep record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hpaReady record component.
    boolean
    Returns the value of the isDone record component.
    boolean
    Returns the value of the isWalking record component.
    int
    Returns the value of the navStep record component.
    Returns the value of the state record component.
    int
    Returns the value of the targetX record component.
    int
    Returns the value of the targetY record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the totalNavSteps record component.
    int
    Returns the value of the totalSteps record component.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WalkStatus

      public WalkStatus(String state, int targetX, int targetY, int currentStep, int totalSteps, int navStep, int totalNavSteps, boolean isWalking, boolean isDone, boolean hpaReady)
      Creates an instance of a WalkStatus record class.
      Parameters:
      state - the value for the state record component
      targetX - the value for the targetX record component
      targetY - the value for the targetY record component
      currentStep - the value for the currentStep record component
      totalSteps - the value for the totalSteps record component
      navStep - the value for the navStep record component
      totalNavSteps - the value for the totalNavSteps record component
      isWalking - the value for the isWalking record component
      isDone - the value for the isDone record component
      hpaReady - the value for the hpaReady record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • state

      public String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • targetX

      public int targetX()
      Returns the value of the targetX record component.
      Returns:
      the value of the targetX record component
    • targetY

      public int targetY()
      Returns the value of the targetY record component.
      Returns:
      the value of the targetY record component
    • currentStep

      public int currentStep()
      Returns the value of the currentStep record component.
      Returns:
      the value of the currentStep record component
    • totalSteps

      public int totalSteps()
      Returns the value of the totalSteps record component.
      Returns:
      the value of the totalSteps record component
    • totalNavSteps

      public int totalNavSteps()
      Returns the value of the totalNavSteps record component.
      Returns:
      the value of the totalNavSteps record component
    • isWalking

      public boolean isWalking()
      Returns the value of the isWalking record component.
      Returns:
      the value of the isWalking record component
    • isDone

      public boolean isDone()
      Returns the value of the isDone record component.
      Returns:
      the value of the isDone record component
    • hpaReady

      public boolean hpaReady()
      Returns the value of the hpaReady record component.
      Returns:
      the value of the hpaReady record component