Class TransportRequest

java.lang.Object
privbot.hooks.TransportRequest

public final class TransportRequest extends Object
Request for using a movement-catalog transport/NPC entry followed by an exact widget path. Path steps are either visible option text (matched like dialogue), a packed widget id from the Widget Inspector (group << 16 | child), or an inspector path with nested indices when packed ids collide (e.g. 820.49[44] — see Widgets.getByInspectorPath(java.lang.String)).
  • Constructor Details

    • TransportRequest

      public TransportRequest(String movementEntryName, List<String> widgetPath)
      A movement-catalog entry followed by option texts, with default timeouts (30 s to reach the entry, 7.5 s per widget step) and the legacy workflow fallback allowed.
      Parameters:
      movementEntryName - the catalog entry's name
      widgetPath - option texts to click after interacting, in order (may be empty)
    • TransportRequest

      public TransportRequest(String movementEntryName, List<String> widgetPath, long navigationTimeoutMs, long widgetTimeoutMs, boolean allowWorkflowFallback)
      Parameters:
      movementEntryName - the catalog entry's name
      widgetPath - option texts to click after interacting, in order (may be empty)
      navigationTimeoutMs - how long to walk toward the entry
      widgetTimeoutMs - how long each widget step may wait
      allowWorkflowFallback - whether a saved legacy workflow may stand in
  • Method Details

    • of

      public static TransportRequest of(String movementEntryName, Object... widgetPath)
      Movement catalog entry name plus widget path steps. Each argument may be a String (option text, or inspector path syntax group.child[index]...), or Integer (packed widget id from the inspector).
    • forObject

      public static TransportRequest forObject(net.runelite.api.coords.WorldPoint targetPoint, int targetRadius, String objectName, String objectAction, Object... widgetPath)
      Direct object interaction at targetPoint plus widget path steps. Each step may be a String (option text or inspector path) or Integer (packed widget id).
    • forObjectWithTimeouts

      public static TransportRequest forObjectWithTimeouts(net.runelite.api.coords.WorldPoint targetPoint, int targetRadius, String objectName, String objectAction, long navigationTimeoutMs, long widgetTimeoutMs, Object... widgetPath)
      Like forObject(WorldPoint, int, String, String, Object...) with explicit navigation / widget interaction timeouts (e.g. longer widget phase when the server is slow to open interfaces).
    • widgetSteps

      public List<TransportRequest.WidgetPathStep> widgetSteps()
      Returns:
      the widget steps, in order
    • movementEntryName

      public String movementEntryName()
      Returns:
      the movement-catalog entry's name, or null for a direct object/NPC request
    • objectName

      public String objectName()
      Returns:
      the object to interact with directly, or null
    • objectAction

      public String objectAction()
      Returns:
      the action on objectName(), or null
    • npcName

      public String npcName()
      Returns:
      the NPC to interact with directly, or null
    • npcAction

      public String npcAction()
      Returns:
      the action on npcName(), or null
    • targetPoint

      public net.runelite.api.coords.WorldPoint targetPoint()
      Returns:
      where the object or NPC is, or null
    • targetRadius

      public int targetRadius()
      Returns:
      tiles around targetPoint() to search
    • widgetTimeoutMs

      public long widgetTimeoutMs()
      Returns:
      how long each widget step may wait for its target
    • allowWorkflowFallback

      public boolean allowWorkflowFallback()
      Returns:
      whether a saved legacy workflow may stand in when the direct interaction fails