Package privbot.hooks
@PublicApi
package privbot.hooks
ctx.* facades: inventory, bank, NPCs, widgets, and the other one-liners.-
ClassDescriptionFactories for worker-polled action proof; each plugin owns and invalidates its own tracker.Bank queries and interactions through the game client.The bank contents the player last saw, so AI Builder can answer "what is in my bank" without the bank being open.Run/script-scoped key-value scratchpad ("memory") for workflow flows and plugins.Passive recording for a plugin:
ctx.capture.Chat message reading and sending via the RuneLiteClient.Thread-safe combat reads and player/spec interactions for scripts.One detached collision read from the local player's tile, returned byctx.combat.collision()and reusable for every candidate target of one decision.The facade that hands out collision reads:ctx.combat.Dialogue state inspection and interaction.A dialogue read: the root widget id it came from, plus the stitched, normalised text.Creates independent, memory-only effect trackers for a plugin's lifetime.Worn equipment:ctx.equipment.Typed game events for plugins, backed by POLLING:ctx.events.An animation change on the local player or an NPC.A chat line that arrived since the previous tick.The local player died.Everything one poll observed.Builds aEvents.Frame; every part defaults to "not read".A graphics object (spot animation in the scene) that appeared since the previous tick.One graphics object as read on a tick.A hitsplat that landed since the previous tick.What one poll should read; anything not needed is skipped so an idle facade costs nothing.One NPC's animation as read on a tick.A projectile that appeared since the previous tick.One projectile as read on a tick.Reads oneEvents.Frame.A registered listener;Events.Subscription.cancel()(or close) removes it.A watched varp or varbit changed between two readable ticks.Friends list queries via RuneLite'sClient.Session and client state:ctx.game(server, login, tick, tabs, instance, run mode).Scene object query (KSBot-style).ToA / Tombs rewards-room anchor classifier (legacyWardenLootTaskreference): firstGameObjecton the anchor scene tile, matching sarcophagus id, gate action on resolved composition (defaultOpen).Where the anchor sarcophagus is and which action marks a purple.What the anchor sarcophagus shows.Scene graphics query hook (graphics objects deque).Ground loot query (KSBot-style).Dodging:ctx.hazards.Queues configured key presses for the plugin's worker to drain.Inventory hook backed by the client's inventory snapshots.Modular inventory food resolution: Inventory query plus Eat (Warden-style), optional name-pattern tier when composition actions are wrong, then item-id fallback.Gear setups and loadouts:ctx.loadouts.The local player, read through the plugin's own adapter:ctx.player.Picks up the drops aLootSpecwants, one proved item per step:ctx.loot.A ground stack found by the configured-loot scan (GroundItems.configuredDrop(java.util.function.Predicate<privbot.hooks.LootDrop>, int)) or picked for a Take (GroundItems.takeConfiguredDrop(java.util.function.Predicate<privbot.hooks.LootDrop>, int)).Magic spell casting through the game client.What happened to a cast's target click.A cast's outcome plus, for REFUSED, the gate that held it (the outcome's gate) and, for UNREACHABLE, the name of the reason the action could not be reached.The magic tab as the client holds it.Snapshot NPC hook: callNPCs.query()for a fluentNPCQuery(filters, closest, player north/south/east/west).Named-location registry: resolves a human place name ("Bank", "Edgeville bank", "Banker", an NPC/area name) to an anchorWorldPoint+ arrival radius, drawing from the current server's movement config (banks + NPC anchors).A resolved named location: an anchor tile and the radius that counts as "at" it.Thin wrapper soPrivContextexposes players via injectedClient.Prayer activation, deactivation, and state checks.Which prayer book the prayer tab has mounted, asPrayer.mountedBook()reads it.Create/make an item via the standard skill-creation interface (smithing/anvil, cooking, fletching, crafting, …).ctx.pvp: a detached, per-tick copy of a PvP fight (the local player and the players around it: overhead, skull, HP bar, animation, graphic, worn item ids, tile and who they interact with), the same on every server.Recover after the local player dies:ctx.recovery.Bank to a gear setup:ctx.restock.Builds aRestock.Request.What a restock needs; each server reads only its own fields.Which account the per-session game memory (the manual-click log and the last-seen bank) belongs to.High-level shop interaction: open an NPC's shop, then sell items from inventory using the shop's widget actions (Sell 1 / Sell 5 / Sell 10 / Sell 50).Skill levels and experience:ctx.skills.Keeps the player alive and boosted:ctx.sustain.Picking a target:ctx.targets.Teleport actions: casting teleport spells, using teleport tabs, and item-based teleports.Teleport to a named destination with whatever this server provides:ctx.teleports.ctx.threats: a detached, per-tick copy of the fight around the local player (NPCs, projectiles, graphics, hitpoints and chosen prayers), the same on every server.Trade interface state and interaction viaClientand the game client.Request for using a movement-catalog transport/NPC entry followed by an exact widget path.One step along the post-interaction widget path: label text, packed widget id, or inspector path with optional[index]nesting.Get to a named place (walk + transports + teleports), unifyingPathingAPIwith thePlacesnamed-location registry.Local-player state queries viaClientand the game client.One read of the local overhead:User.Overhead.isReadable()false means nothing can be said about the prayer the server shows — never treat it as "no overhead".The evidence-backed namesctx.vars.byName(...)knows on one server.One named variable.Whether a name resolves to a whole varp or a varbit.Player variables:ctx.vars.Interface widgets:ctx.widgets(find by id or visible text, read text, click options).How visible text is matched.What a confirmed widget click observed.Workflow execution hook — the simplest way to run workflows from plugin code.