Class Teleports

java.lang.Object
privbot.hooks.Teleports

public final class Teleports extends Object
Teleport to a named destination with whatever this server provides: ctx.teleports.
  • Impact: the shared fairy-tree service (one call per step). Destinations are the Impact teleport catalog's names and slayer-task keywords. Each call runs at most one attempt (walk to the tree, open it, click the category and destination) and is throttled to one attempt per 8 s;
  • every other server (Elorin included): the server's movement catalog (ctx.teleporter.transport(name)), which walks to the entry, interacts and clicks its widget path.
A destination this server does not know answers false with one [PrivBot API] UNSUPPORTED line.

Call to(java.lang.String) from a TaskNode's execute on the script worker (it blocks while it walks and clicks), never from shouldExecute or an event handler. True is dispatch acceptance: check arrival with isAt(java.lang.String) (Impact) or your own position read.

  • Method Details

    • to

      public boolean to(String destination)
      Takes one step toward destination.
      Parameters:
      destination - a catalog name on this server
      Returns:
      true when an action was dispatched (or an Impact attempt is still in its 8 s window); false when the destination is unknown here, Impact says the player is already there, or nothing could be dispatched
    • has

      public boolean has(String destination)
      Parameters:
      destination - a destination name
      Returns:
      whether this server's catalog knows it
    • isAt

      public Observed<Boolean> isAt(String destination)
      Whether the player stands at destination's landing point (Impact: within a few tiles of the catalog's point, same plane).
      Parameters:
      destination - a destination name
      Returns:
      the answer; UNREADABLE where the catalog has no landing point (movement-catalog entries) or the player's tile cannot be read