Class MakeXDialog


  • public class MakeXDialog
    extends java.lang.Object
    The `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() exceeds getMaxAmountValue().

    • Constructor Detail

      • MakeXDialog

        public MakeXDialog()
    • Method Detail

      • setSetCustomAmount

        public static void setSetCustomAmount​(int customAmount)
        Sets the value for MakeXDialog.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.
      • setAmount

        public static boolean setAmount​(MakeXDialog.Amount amount)
        Sets the quantity to make to the specified MakeXDialog.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.