Class GrandExchangeSlot


  • public class GrandExchangeSlot
    extends java.lang.Object
    • Method Detail

      • getIndex

        public int getIndex()
        Gets the slot index.
        Returns:
        int
      • placeBuyOffer

        public boolean placeBuyOffer​(java.lang.String itemName,
                                     int quantity,
                                     int price)
        Places a new buy offer using this (empty) slot.
        Parameters:
        itemName - the exact item name (KeyEvent.VK_ENTER is pressed after search)
        quantity - number of items to be bought
        price - price per item, -1 to leave price at guide price
        Returns:
        true if an offer is placed successfully, false otherwise
      • placeSellOffer

        public boolean placeSellOffer​(int itemId,
                                      int quantity,
                                      int price)
        Places a new sell offer using this (empty) slot.
        Parameters:
        itemId - the item id
        quantity - number of items to be bought
        price - price per item, -1 to leave price at guide price
        Returns:
        true if an offer is placed successfully, false otherwise
      • placeSellOffer

        public boolean placeSellOffer​(java.lang.String itemName,
                                      int quantity,
                                      int price)
        Places a new sell offer using this (empty) slot.
        Parameters:
        itemName - the item name
        quantity - number of items to be bought
        price - price per item, -1 to leave price at guide price
        Returns:
        true if an offer is placed successfully, false otherwise
      • placeSellOffer

        public boolean placeSellOffer​(ItemWidget item,
                                      int quantity,
                                      int price)
        Places a new sell offer using this (empty) slot.
        Parameters:
        item - the item
        quantity - number of items to be bought
        price - price per item, -1 to leave price at guide price
        Returns:
        true if an offer is placed successfully, false otherwise
      • getWidget

        public WidgetChild getWidget()
        Get the slot widget when visible.
        Returns:
        the widget or null when the grand exchange widget (WidgetID.BANK_GROUP_ID) is not visible.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object