Shop Actions
ShopActions wraps NPC shop interactions, supporting multi-quantity purchases by item ID or display name.
Action Methods
All buy methods accept either int itemId or String name (case-insensitive, partial match). All return InteractionResult.
buyOne(int/String)- buys 1buyFive(int/String)- buys 5buyTen(int/String)- buys 10buyFifty(int/String)- buys 50
Example:
InteractionResult result = ShopActions.buyTen(1219);
if (result.getStatus() == InteractionStatus.PACED) {
return; // retry next tick
}
Or by name:
ShopActions.buyFifty("Bronze arrow");
Behavior notes:
SHOP_NOT_OPENis returned by any action whenisOpen()is false.SHOP_ITEM_NOT_FOUNDis returned when no stock widget matches the ID or name.- All buys are paced through
ActionPacer;PACEDis returned during the cooldown window. - Purchases delegate to
ShopInteraction.buyOne/Five/Ten/Fifty- the underlying packet dispatch is handled there.
Read shop-open state, stock, and visible items through ShopApi and
sdk.query.Shop; see Query Helpers. The action class uses
those reads internally only to guard a purchase.