Package net.storm.api.widgets
Interface IProduction
public interface IProduction
Interface for interacting with production interfaces in the game.
This interface provides methods to interact with skilling interfaces such as crafting, smithing, cooking, and other production activities. It allows selecting items to produce, specifying quantities, and entering custom amounts.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidchooseOption(int index) Chooses a production option by its index position in the interface.default voidchooseOption(String option) Chooses a production option containing the specified text (case-insensitive).voidchooseOption(Predicate<String> option) Chooses a production option that matches the given predicate.voidChooses the previously selected production option.voidenterAmount(int amount) Enters a numeric amount into the currently open input dialog.voidEnters a text name into the currently open input dialog.intGets the currently set "Make X" quantity value.Gets the currently selected production quantity option.booleanChecks if an input dialog for entering amounts or names is currently open.booleanisOpen()Checks if a production interface is currently open.voidselectItem(int itemId) Selects an item in the production interface by its item ID.voidselectItem(String name) Selects an item in the production interface by its name.booleanselectMakeXQuantity(int quantity) Sets the "Make X" quantity to the specified value.voidSelects the "Other" quantity option in the production interface, which allows entering a custom amount.booleanselectQuantity(ProductionQuantity quantity) Selects a predefined production quantity option.
-
Method Details
-
isOpen
boolean isOpen()Checks if a production interface is currently open.- Returns:
trueif a production interface is open,falseotherwise
-
chooseOption
Chooses a production option that matches the given predicate.- Parameters:
option- the predicate to match against option text
-
chooseOption
Chooses a production option containing the specified text (case-insensitive).- Parameters:
option- the text to search for in option names
-
selectOtherQuantity
void selectOtherQuantity()Selects the "Other" quantity option in the production interface, which allows entering a custom amount. -
chooseOption
void chooseOption(int index) Chooses a production option by its index position in the interface.- Parameters:
index- the zero-based index of the option to select
-
choosePreviousOption
void choosePreviousOption()Chooses the previously selected production option. This is typically bound to the spacebar in the game interface. -
isEnterInputOpen
boolean isEnterInputOpen()Checks if an input dialog for entering amounts or names is currently open.- Returns:
trueif an input dialog is open,falseotherwise
-
enterAmount
void enterAmount(int amount) Enters a numeric amount into the currently open input dialog.- Parameters:
amount- the amount to enter
-
enterName
Enters a text name into the currently open input dialog.- Parameters:
input- the text to enter
-
selectItem
Selects an item in the production interface by its name.- Parameters:
name- the name of the item to select
-
selectItem
void selectItem(int itemId) Selects an item in the production interface by its item ID.- Parameters:
itemId- the ID of the item to select
-
getMakeXQuantity
int getMakeXQuantity()Gets the currently set "Make X" quantity value.- Returns:
- the current Make X quantity
-
selectMakeXQuantity
boolean selectMakeXQuantity(int quantity) Sets the "Make X" quantity to the specified value.- Parameters:
quantity- the quantity to set- Returns:
trueif the quantity was successfully set,falseotherwise
-
getSelectedQuantity
ProductionQuantity getSelectedQuantity()Gets the currently selected production quantity option.- Returns:
- the selected
ProductionQuantity, ornullif none is selected
-
selectQuantity
Selects a predefined production quantity option.- Parameters:
quantity- the quantity option to select- Returns:
trueif the quantity was successfully selected,falseotherwise
-