Class Teleporter
java.lang.Object
privbot.hooks.Teleporter
Teleport actions: casting teleport spells, using teleport tabs, and item-based teleports.
Teleport tabs are inventory items with a "Break" action (option index 1 = CC_OP id 2 for
Orion/NR, ITEM_FIRST_OPTION for Roat/Impact/SpawnPK). Using
is the cleanest path; this hook wraps it for convenience.invalid reference
PrivItem#interact(String)
-
Method Summary
Modifier and TypeMethodDescriptionbooleancastTeleport(String name) booleanhasMovementEntry(String movementEntryName) True when the current server's movement catalog contains a transport/NPC entry with this name.booleanteleportToItem(int itemId) Activates the first inventory item matchingitemIdusing its primary action ("Rub", "Break", "Activate", etc.booleanteleportToItem(int itemId, String action) Uses a teleport item with a specific action label (case-insensitive).booleanteleportToItem(String name) Breaks (or otherwise activates) the first inventory item matchingname.booleanteleportToItem(String name, String action) Uses the first inventory item matchingnamewithaction("Rub","Break","Activate", …).booleanUses a movement-catalog transport or NPC entry, then clicks an exact widget path.booleantransport(TransportRequest request) Same astransport(TransportRequest, PrivTaskContext)without a task context (widget ready-waits poll on theClientThread).booleantransport(TransportRequest request, PrivTaskContext taskCtx) Uses a movement-catalog transport or NPC entry, then clicks an exact widget path.booleanUses a Scroll of Redirection (item 12403) from inventory with the "Use" action.
-
Method Details
-
castTeleport
-
teleportToItem
public boolean teleportToItem(int itemId) Activates the first inventory item matchingitemIdusing its primary action ("Rub", "Break", "Activate", etc. — whatever option index 1 maps to for that item). Works for teleport tabs, jewellery, and any single-click teleport item. -
teleportToItem
Uses a teleport item with a specific action label (case-insensitive). Useful when the primary action is not "Break" (e.g. "Rub" for amulets, "Activate" for tablets). -
teleportToItem
Breaks (or otherwise activates) the first inventory item matchingname. -
teleportToItem
-
useScrollOfRedirectedTeleport
public boolean useScrollOfRedirectedTeleport()Uses a Scroll of Redirection (item 12403) from inventory with the "Use" action. Typically requires another item to be selected first. -
transport
-
transport
Same astransport(TransportRequest, PrivTaskContext)without a task context (widget ready-waits poll on theClientThread). -
transport
Uses a movement-catalog transport or NPC entry, then clicks an exact widget path. Prefers direct object/NPC interaction and can optionally fall back to a legacy workflow.- Parameters:
taskCtx- when non-null and the caller is not on the game thread, pauses between widget steps usePrivTaskContext.sleepUntil(BooleanSupplier, int)(same asctx.sleepUntilin task nodes) so waits follow the script-thread model.
-
hasMovementEntry
True when the current server's movement catalog contains a transport/NPC entry with this name.
-