Package net.storm.sdk.widgets
Class Production
java.lang.Object
net.storm.sdk.widgets.Production
Provides utility methods for interacting with production interfaces.
Production interfaces appear when crafting, smithing, cooking, and performing other skilling activities that allow quantity selection. This class provides methods to select items, quantities, and initiate production.
Common production activities include:
- Smithing bars into items
- Cooking food
- Crafting jewelry, pottery, and leather
- Fletching bows and arrows
- Herblore potion making
Example Usage:
// Wait for production interface to open
if (Production.isOpen()) {
// Select an item by name
Production.selectItem("Rune platebody");
// Or select by item ID
Production.selectItem(1234);
// Set quantity to make all
Production.selectQuantity(ProductionQuantity.ALL);
// Or set a specific quantity
Production.selectMakeXQuantity(10);
}
// Choose an option from the production menu
Production.chooseOption("Cook");
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchooseOption(int index) Chooses a production option by its index (0-based).static voidchooseOption(String option) Chooses a production option by its exact text.static voidchooseOption(Predicate<String> option) Chooses a production option matching the specified predicate.static voidChooses the previously selected production option.static voidenterAmount(int amount) Enters a numeric amount into the production input dialog.static voidEnters a name into the production input dialog.static intRetrieves the current "Make X" quantity setting.static ProductionQuantityRetrieves the currently selected production quantity preset.static booleanChecks whether an input dialog for entering amounts is currently open.static booleanisOpen()Checks whether a production interface is currently open.static voidselectItem(int itemId) Selects an item in the production interface by its item ID.static voidselectItem(String name) Selects an item in the production interface by its name.static booleanselectMakeXQuantity(int quantity) Sets the "Make X" quantity to a specific value.static voidSelects the "Other" quantity option to enter a custom amount.static booleanselectQuantity(ProductionQuantity quantity) Selects a production quantity preset.
-
Constructor Details
-
Production
public Production()
-
-
Method Details
-
isOpen
public static boolean isOpen()Checks whether a production interface is currently open.- Returns:
- true if a production interface is open, false otherwise
-
chooseOption
Chooses a production option by its exact text.- Parameters:
option- the option text to select
-
chooseOption
Chooses a production option matching the specified predicate.- Parameters:
option- a predicate to match option text
-
selectOtherQuantity
public static void selectOtherQuantity()Selects the "Other" quantity option to enter a custom amount. -
chooseOption
public static void chooseOption(int index) Chooses a production option by its index (0-based).- Parameters:
index- the index of the option to select
-
choosePreviousOption
public static void choosePreviousOption()Chooses the previously selected production option.This is equivalent to pressing space or clicking the highlighted option.
-
isEnterInputOpen
public static boolean isEnterInputOpen()Checks whether an input dialog for entering amounts is currently open.- Returns:
- true if an input dialog is open, false otherwise
-
enterAmount
public static void enterAmount(int amount) Enters a numeric amount into the production input dialog.- Parameters:
amount- the amount to enter
-
enterName
Enters a name into the production input dialog.- Parameters:
input- the name to enter
-
selectItem
Selects an item in the production interface by its name.- Parameters:
name- the item name to select
-
selectItem
public static void selectItem(int itemId) Selects an item in the production interface by its item ID.- Parameters:
itemId- the item ID to select
-
getMakeXQuantity
public static int getMakeXQuantity()Retrieves the current "Make X" quantity setting.- Returns:
- the current make-x quantity value
-
selectMakeXQuantity
public static boolean selectMakeXQuantity(int quantity) Sets the "Make X" quantity to a specific value.- Parameters:
quantity- the quantity to set- Returns:
- true if the quantity was successfully set, false otherwise
-
getSelectedQuantity
Retrieves the currently selected production quantity preset.- Returns:
- the selected quantity preset (e.g., ALL, X, 1, 5, 10)
-
selectQuantity
Selects a production quantity preset.- Parameters:
quantity- the quantity preset to select- Returns:
- true if the quantity was successfully selected, false otherwise
-