Class GrandExchange
java.lang.Object
com.botwithus.bot.api.util.GrandExchange
Convenience wrapper around the Grand Exchange interface (
STOCKMARKET,
iface 105) and its collect-all panel (STOCKMARKET_COLLECTALL, iface 651).
Only the interface probe and the button clicks live here. Offer state (per-slot item, status, progress) is not exposed yet: the producer RPC that used to publish it was removed and nothing replaces it, so there is no read that could answer truthfully.
Every interface and component is addressed by its gameval name through
GameAPI.gamevals(); the literal ids are the fallback for a host with
no gameval index deployed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCollect-all panel interface id.static final intGE interface id.static final intNumber of offer slots. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabortOffer(int slot) Click the abort button of offerslot(0-based) on the offer summary.booleanClick "Collect to inventory" on the collect-all panel.booleanClick "Collect to bank" on the collect-all panel.booleanisOpen()True when the GE interface is open.booleanqueueComponentClick(int componentId, int optionIndex) Click an arbitrary GE component by id with the given right-click option.
-
Field Details
-
INTERFACE_ID
public static final int INTERFACE_IDGE interface id.- See Also:
-
COLLECT_INTERFACE_ID
public static final int COLLECT_INTERFACE_IDCollect-all panel interface id.- See Also:
-
SLOT_COUNT
public static final int SLOT_COUNTNumber of offer slots.- See Also:
-
-
Constructor Details
-
GrandExchange
-
-
Method Details
-
isOpen
public boolean isOpen()True when the GE interface is open. -
collectAll
public boolean collectAll()Click "Collect to inventory" on the collect-all panel. No-op when the GE isn't open. -
collectToBank
public boolean collectToBank()Click "Collect to bank" on the collect-all panel. No-op when the GE isn't open. -
abortOffer
public boolean abortOffer(int slot) Click the abort button of offerslot(0-based) on the offer summary. No-op when the GE isn't open orslotis out of range. -
queueComponentClick
public boolean queueComponentClick(int componentId, int optionIndex) Click an arbitrary GE component by id with the given right-click option. Escape hatch for callers that know the exact button id; prefer the named helpers above where they exist.
-