Package rsb.methods

Class Store


public class Store extends MethodProvider
Store related operations.
  • Method Details

    • buy

      public boolean buy(int itemID, int count)
      Tries to buy an item. 0 is All. 1, 5 and 10 use buy 1/5/10 while the other numbers use buy x.
      Parameters:
      itemID - The id of the item.
      count - The number to buy.
      Returns:
      true on success
    • close

      public boolean close()
      Closes the store interface.
      Returns:
      true if the interface is no longer open
    • getInterface

      public RSWidget getInterface()
      Gets the store interface.
      Returns:
      the store RSWidget
    • getItemAt

      public RSItem getItemAt(int index)
      Gets the item at a given component index.
      Parameters:
      index - The index of the component based off of the components in the Store interface.
      Returns:
      RSWidget for the item at the given index; otherwise null.
    • getItem

      public RSItem getItem(int id)
      Gets the first item found with the given id.
      Parameters:
      id - ID of the item to get
      Returns:
      The RSWidget of the item; otherwise null.
    • getItems

      public RSItem[] getItems()
      Gets all the items in the store inventory.
      Returns:
      An RSWidget array representing all of the components in the stores RSWidget.
    • isOpen

      public boolean isOpen()
      Returns whether the store interface is open.
      Returns:
      true if the store interface is open, otherwise false.