Class Dialogues


  • public class Dialogues
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Dialogues()
      Deprecated.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static boolean areOptionsAvailable()
      Checks if there are any available options that you can click on
      static boolean canContinue()
      Checks if you can continue in a dialogue via "Click here to continue" or "Click to continue"
      static boolean canEnterInput()
      Returns true if you are able to enter input into the dialogue (like withdrawing X from bank and such)
      static boolean chooseFirstOption​(java.lang.String... options)
      This will go through the provided options in order, and will choose the first available.
      static boolean chooseFirstOptionContaining​(java.lang.String... options)
      This will go through the provided options in order, and will choose the first available option that contains one of your provided options.
      static boolean chooseOption​(int optionIndex)
      Chooses whether to click the given option index or press the key based on mouse distance and profiled values.
      static boolean chooseOption​(java.lang.String option)
      see @chooseOption(int optionIndex)
      static boolean clickContinue()
      Attempts to click the continue dialog
      static boolean clickOption​(int optionIndex)
      Clicks the given option index.
      static boolean clickOption​(java.lang.String option)
      Clicks a dialogue option with the mouse
      static boolean continueDialogue()
      Chooses either to click continue or press space to continue based on a profiled distance of your mouse
      static Dialogues getDialogues()
      Deprecated.
      static java.lang.String getNPCDialogue()
      Gets the dialogue text in a conversation.
      static int getOptionIndex​(java.lang.String option)
      Gets the index of the option.
      static int getOptionIndexContaining​(java.lang.String option)
      Gets the option index that contains the given text.
      static java.lang.String[] getOptions()
      Gets all the available options in the dialogue, not including "Click here to continue"
      static boolean inDialogue()
      Checks if you're currently in a dialogue screen.
      static boolean isProcessing()
      Checks if the "Please wait..." widget is present, can be found after clicking the continue button
      static boolean spaceToContinue()
      Uses the space bar to continue
      static boolean typeOption​(int optionIndex)
      Types the key of the given option index.
      static boolean typeOption​(java.lang.String option)
      Selects a dialogue option using the corresponding number key
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Dialogues

        @Deprecated
        public Dialogues()
        Deprecated.
    • Method Detail

      • getDialogues

        @Deprecated
        public static Dialogues getDialogues()
        Deprecated.
      • inDialogue

        public static boolean inDialogue()
        Checks if you're currently in a dialogue screen.
        Returns:
        True if the scrollbar isn't visible, else false.
      • canEnterInput

        public static boolean canEnterInput()
        Returns true if you are able to enter input into the dialogue (like withdrawing X from bank and such)
        Returns:
        False if not in dialogue or if widget is not visible, else true
      • getNPCDialogue

        public static java.lang.String getNPCDialogue()
        Gets the dialogue text in a conversation. This includes all html tagging RS uses! (br tags, color tags)
        Returns:
        empty string if not in dialogue, otherwise dialogue widget text
      • continueDialogue

        public static boolean continueDialogue()
        Chooses either to click continue or press space to continue based on a profiled distance of your mouse
        Returns:
        True if click/space Continue returns true, else false.
      • clickContinue

        public static boolean clickContinue()
        Attempts to click the continue dialog
        Returns:
        true if successful
      • spaceToContinue

        public static boolean spaceToContinue()
        Uses the space bar to continue
        Returns:
        true if successful
      • chooseOption

        public static boolean chooseOption​(int optionIndex)
        Chooses whether to click the given option index or press the key based on mouse distance and profiled values.
        Parameters:
        optionIndex - Index of the option you want to choose. *NOTE* OPTIONS START AT 1
        Returns:
        True if option is chosen.
      • chooseFirstOption

        public static boolean chooseFirstOption​(java.lang.String... options)
        This will go through the provided options in order, and will choose the first available. It will not choose multiple options even if multiple are available, only the first.
        Parameters:
        options - The options to choose
        Returns:
        true if it finds and chooses any options, otherwise false
      • chooseFirstOptionContaining

        public static boolean chooseFirstOptionContaining​(java.lang.String... options)
        This will go through the provided options in order, and will choose the first available option that contains one of your provided options. It will not choose multiple options even if multiple are available, only the first.
        Parameters:
        options - The options to look for
        Returns:
        true if it finds and chooses any options, otherwise false
      • chooseOption

        public static boolean chooseOption​(java.lang.String option)
        see @chooseOption(int optionIndex)
        Parameters:
        option - Option you want to choose
        Returns:
        see @chooseOption(int optionIndex)
      • clickOption

        public static boolean clickOption​(int optionIndex)
        Clicks the given option index.
        Parameters:
        optionIndex - Index of the option you want to click. *NOTE* OPTIONS START AT 1
        Returns:
        True if clicked successfully.
      • clickOption

        public static boolean clickOption​(java.lang.String option)
        Clicks a dialogue option with the mouse
        Parameters:
        option - The option to click
        Returns:
        True if it clicks
      • typeOption

        public static boolean typeOption​(int optionIndex)
        Types the key of the given option index.
        Parameters:
        optionIndex - Index of the option you want to choose.
        Returns:
        True if it is selected
      • typeOption

        public static boolean typeOption​(java.lang.String option)
        Selects a dialogue option using the corresponding number key
        Parameters:
        option - The option to click
        Returns:
        True if it is selected
      • getOptionIndex

        public static int getOptionIndex​(java.lang.String option)
        Gets the index of the option.
        Parameters:
        option - Option that you want to get the index of
        Returns:
        -1 if not found, otherwise return MINIMUM OF 1
      • getOptionIndexContaining

        public static int getOptionIndexContaining​(java.lang.String option)
        Gets the option index that contains the given text.
        Parameters:
        option - Option you're looking for
        Returns:
        -1 if not found, otherwise returns MINIMUM OF 1
      • areOptionsAvailable

        public static boolean areOptionsAvailable()
        Checks if there are any available options that you can click on
        Returns:
        true if there are, false otherwise
      • getOptions

        public static java.lang.String[] getOptions()
        Gets all the available options in the dialogue, not including "Click here to continue"
        Returns:
        String[] of options or null
      • canContinue

        public static boolean canContinue()
        Checks if you can continue in a dialogue via "Click here to continue" or "Click to continue"
        Returns:
        True if you can continue in a dialogue, else False
      • isProcessing

        public static boolean isProcessing()
        Checks if the "Please wait..." widget is present, can be found after clicking the continue button
        Returns:
        true if it is, false otherwise