Class MakeXDialog
- java.lang.Object
-
- com.osrsbots.orb.api.interactables.dialogs.MakeXDialog
-
public class MakeXDialog extends java.lang.ObjectThe `MakeXDialog` class provides methods for interacting with the "Choose a quantity" dialog in Old School RuneScape. It allows for setting custom quantities, selecting predefined quantities, and interacting with various options.When using
MakeXDialog.Amount.CUSTOM,setSetCustomAmount(int)must called prior, default is 1.setAmount(Amount)will return false if setSetCustomAmount() exceedsgetMaxAmountValue().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMakeXDialog.AmountEnum representing predefined quantities for the dialog.
-
Constructor Summary
Constructors Constructor Description MakeXDialog()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MakeXDialog.AmountgetAmount()Gets the selectedMakeXDialog.Amountin the dialog.static intgetAmountValue()Gets the int value of the currently selected quantity.static intgetLastUsedIndex()Gets the index of the last used option in the dialog.static intgetMaxAmountValue()Returns either the defined CUSTOM_AMOUNT to be created or the MAX_AMOUNT available to be created.static java.util.List<RSWidget>getOptions()Gets a list of usable options available in the dialog.static booleanisOpen()Checks if the dialog is open.static booleanselectOption(java.lang.String option)Selects the specified option in the dialog, if available.static booleansetAmount(MakeXDialog.Amount amount)Sets the quantity to make to the specifiedMakeXDialog.Amount.static voidsetSetCustomAmount(int customAmount)Sets the value forMakeXDialog.Amount.CUSTOM.
-
-
-
Method Detail
-
setSetCustomAmount
public static void setSetCustomAmount(int customAmount)
Sets the value forMakeXDialog.Amount.CUSTOM.- Parameters:
customAmount- The custom amount to set.
-
isOpen
public static boolean isOpen()
Checks if the dialog is open.- Returns:
- true if the dialog is open, false otherwise.
-
getMaxAmountValue
public static int getMaxAmountValue()
Returns either the defined CUSTOM_AMOUNT to be created or the MAX_AMOUNT available to be created.- Returns:
- The maximum amount value.
-
getAmountValue
public static int getAmountValue()
Gets the int value of the currently selected quantity.- Returns:
- The current amount value.
-
getAmount
public static MakeXDialog.Amount getAmount()
Gets the selectedMakeXDialog.Amountin the dialog.- Returns:
- The selected predefined quantity.
-
setAmount
public static boolean setAmount(MakeXDialog.Amount amount)
Sets the quantity to make to the specifiedMakeXDialog.Amount.- Parameters:
amount- The desired quantity.- Returns:
- true if the amount is set successfully, false otherwise.
-
getLastUsedIndex
public static int getLastUsedIndex()
Gets the index of the last used option in the dialog.- Returns:
- The last used index.
-
getOptions
public static java.util.List<RSWidget> getOptions()
Gets a list of usable options available in the dialog.- Returns:
- A list of RSWidget representing the available options.
-
selectOption
public static boolean selectOption(java.lang.String option)
Selects the specified option in the dialog, if available.- Parameters:
option- The option to select.- Returns:
- true if the option is selected successfully, false otherwise.
-
-