Class Production
java.lang.Object
privbot.hooks.Production
Create/make an item via the standard skill-creation interface (smithing/anvil,
cooking, fletching, crafting, …). Reusable by any skilling plugin.
v1 targets the standard creation menu: optionally use an item on an object to
open it (Production.Make.openWith(int, String)), then click the product row with a
"Make all"/quantity option (text-driven via Widgets), with a
Dialogue option-list fallback for servers that render products as a
chat-style option list. Exotic interfaces fall back to a recorded sequence (see
recordedFallbackName(String) — wired through the action executor's
PLAY_RECORDING path).
Blocking — drives interaction + settle on a worker thread (sleeps), with each
client touch marshalled via GameThread.ensure(java.util.function.Supplier<T>, T).
MAKE-interface assumptions:
- Standard OSRS/RSPS creation interface uses widget groups 270, 446, 271, 309 —
the product row's text matches the product name (partial/contains), and the
row's actions include "Make all" or "Make N". If none of these groups are
visible and the dialogue option-list fallback also misses,
Production.Make.run()returns false and the caller must drive a recorded action sequence. - The OSRS creation interface group 270 is the canonical shape; group 446 is
used by some RSPS forks. This is a best-effort scan — if the target server
uses a non-standard group ID, add it to
CREATION_GROUPS.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateItem(int itemId) Select one currently offered product.booleanTrue when a known creation interface is currently visible.Begin a make request forproduct(e.g.Exact product IDs currently offered by Elorin's native creation menu; empty when closed.options()Product names visible in the currently-open creation interface (best-effort).static StringrecordedFallbackName(String product) Recommended recorded-action name to fall back to when the standard interface is absent.
-
Method Details
-
offeredItemIds
-
createItem
public boolean createItem(int itemId) Select one currently offered product. Dispatch only; callers must confirm the inventory output. -
make
Begin a make request forproduct(e.g. "Steel platebody"). -
isCreationMenuOpen
public boolean isCreationMenuOpen()True when a known creation interface is currently visible. -
options
-
recordedFallbackName
-