Package rsb.methods

Class Interfaces

Direct Known Subclasses:
NPCChat

public class Interfaces extends MethodProvider
Provides access to interfaces.
  • Constructor Details

  • Method Details

    • get

      public RSWidget get(int index)
      Gets a widget corresponding to the index
      Parameters:
      index - The index of the interface.
      Returns:
      The RSWidget for the given index.
    • getComponent

      public RSWidget getComponent(int index, int childIndex)
      Gets a widget corresponding to the indexes
      Parameters:
      index - The parent interface index
      childIndex - The component index
      Returns:
      RSWidget for the given index and child index.
    • getComponent

      public RSWidget getComponent(net.runelite.api.widgets.WidgetInfo info)
      Gets a widget corresponding to the widget info
      Parameters:
      info - The WidgetInfo for the corresponding RSWidget to retrieve
      Returns:
      The RSWidget for the WidgetInfo
    • getComponent

      public RSWidget getComponent(GlobalWidgetInfo info)
      Gets a widget corresponding to the widget info
      Parameters:
      info - The WidgetInfo for the corresponding RSWidget to retrieve
      Returns:
      The RSWidget for the WidgetInfo
    • canContinue

      public boolean canContinue()
      Checks for the click here to continue widget
      Returns:
      true if continue component is valid; otherwise false.
    • clickContinue

      public boolean clickContinue()
      Clicks the click here to continue widget
      Returns:
      true if continue component was clicked; otherwise false.
    • getContinueComponent

      public RSWidget getContinueComponent()
      Gets the click here to continue widget
      Returns:
      RSWidget containing "Click here to continue"; otherwise null.
    • clickComponent

      public boolean clickComponent(RSWidget c, String action)
      Performs the given action on this RSWidgetChild if it is showing (valid).
      Parameters:
      c - The component widget to click
      action - The menu action to click.
      Returns:
      true if the action was clicked; otherwise false
    • clickDialogueOption

      public boolean clickDialogueOption(RSWidget inter, String option)
      Clicks the dialogue option that contains the desired string.
      Parameters:
      inter - The interface of the dialogue menu.
      option - The text we want to click.
      Returns:
      true if the option was clicked; otherwise false .
    • scrollTo

      public boolean scrollTo(RSWidget component, int scrollBarID)
      Scrolls to the component
      Parameters:
      component - component to scroll to
      scrollBarID - scrollbar to scroll with
      Returns:
      true when scrolled successfully
    • scrollTo

      public boolean scrollTo(RSWidget component, RSWidget scrollBar)
      Scrolls to the component
      Parameters:
      component - component to scroll to
      scrollBar - scrollbar to scroll with
      Returns:
      true when scrolled successfully
    • waitFor

      public boolean waitFor(RSWidget iface, boolean valid, int timer)
      Waits for an interface to be closed/opened.
      Parameters:
      iface - The interface to wait for.
      valid - True if open, false if close.
      timer - Milliseconds to wait for the interface to open/close.
      Returns:
      true if the interface was successfully closed/opened.
    • isInterfaceSubstantiated

      public boolean isInterfaceSubstantiated(int index)
    • isValid

      public boolean isValid(int index)
    • makeX

      public boolean makeX(int amount)
      Uses the make interface to make items Use -1 to make all
      Parameters:
      amount - The number of items to make
      Returns:
      true f the interface was interacted with; else false