public interface IGrandExchangeAPI
Modifier and Type | Interface and Description |
---|---|
static class |
IGrandExchangeAPI.GrandExchangeScreen |
Modifier and Type | Method and Description |
---|---|
boolean |
backToOverview()
Clicks the back button on the active/setup offer screen.
|
boolean |
close() |
boolean |
close(boolean useEsc) |
boolean |
collectToBank()
Collects any unclaimed items towards the bank.
|
boolean |
collectToInventory()
Collects any unclaimed items towards the inventory.
|
boolean |
confirmOffer()
Confirms the current offer we are setting up on screen.
|
boolean |
decreasePriceBy5Percent()
Clicks the decrease +5% button to decrease the current price per item by 5% of the current offer we are setting up on screen.
|
boolean |
decreasePriceBy5Percent(int times)
Clicks the decrease +5% button to decrease the current price per item by 5% of the current offer we are setting up on screen.
|
IGrandExchangeAPI.GrandExchangeScreen |
getCurrentScreen() |
GrandExchangeItemDetail |
getItemDetails(int id)
Looks up the item in the official RS Grand Exchange API.
|
int |
getOfferItem()
Gets the item id of the current offer on screen.
|
int |
getOfferPrice()
Gets the price per item of the current offer on screen.
|
int |
getOfferQuantity()
Gets the quantity of the current offer on screen.
|
GrandExchangeSlot |
getSlot(int slotIndex)
Get a slot by its index.
|
GrandExchangeSlot |
getSlot(java.util.function.Predicate<GrandExchangeSlot> filter)
Get the first slot matching the filter.
|
java.util.List<GrandExchangeSlot> |
getSlots()
Gets all slots.
|
java.util.List<GrandExchangeSlot> |
getSlots(java.util.function.Predicate<GrandExchangeSlot> filter)
Gets all slots matching the filter.
|
boolean |
increasePriceBy5Percent()
Clicks the increase +5% button to increase the current price per item by 5% of the current offer we are setting up on screen.
|
boolean |
increasePriceBy5Percent(int times)
Clicks the increase +5% button to increase the current price per item by 5% of the current offer we are setting up on screen.
|
boolean |
isOpen() |
boolean |
newBuyOffer(GrandExchangeSlot slot,
java.lang.String itemName)
Attempts to start a new buy offer using the given (empty) slot.
|
boolean |
newBuyOffer(java.lang.String itemName)
Attempts to start a new buy offer using an empty slot.
|
boolean |
newSellOffer(int itemId)
Attempts to start a new sell offer using an empty slot by selling an inventory item with the given id.
|
boolean |
newSellOffer(ItemWidget item)
Attempts to start a new sell offer using an empty slot by selling the given item.
|
boolean |
newSellOffer(java.lang.String itemName)
Attempts to start a new sell offer using an empty slot by selling an inventory item with the given name.
|
boolean |
open() |
boolean |
placeBuyOffer(java.lang.String itemName,
int quantity,
int price)
Convenience method to place a new buy offer using an empty slot.
|
boolean |
placeSellOffer(int itemId,
int quantity,
int price)
Convenience method to place a new sell offer using an empty slot.
|
boolean |
placeSellOffer(ItemWidget item,
int quantity,
int price)
Convenience method to place a new sell offer using an empty slot.
|
boolean |
placeSellOffer(java.lang.String itemName,
int quantity,
int price)
Convenience method to place a new sell offer using an empty slot.
|
boolean |
setPrice(int price)
Set the price of the current offer we are setting up on screen.
|
boolean |
setQuantity(int quantity)
Set the quantity of the current offer we are setting up on screen.
|
GrandExchangeItemDetail getItemDetails(int id)
id
- the item idboolean isOpen()
boolean open()
boolean close()
boolean close(boolean useEsc)
IGrandExchangeAPI.GrandExchangeScreen getCurrentScreen()
boolean collectToBank()
boolean collectToInventory()
boolean backToOverview()
boolean increasePriceBy5Percent()
boolean increasePriceBy5Percent(int times)
times
- number of times to click the buttonboolean decreasePriceBy5Percent()
boolean decreasePriceBy5Percent(int times)
times
- number of times to click the buttonboolean newBuyOffer(java.lang.String itemName)
itemName
- the exact item name (KeyEvent.VK_ENTER
is pressed after search)boolean newBuyOffer(GrandExchangeSlot slot, java.lang.String itemName)
slot
- the empty slotitemName
- the exact item name (KeyEvent.VK_ENTER
is pressed after search)boolean newSellOffer(int itemId)
itemId
- the item idboolean newSellOffer(java.lang.String itemName)
itemName
- the item nameboolean newSellOffer(ItemWidget item)
item
- the itemboolean setQuantity(int quantity)
quantity
- the quantityboolean setPrice(int price)
price
- the priceboolean confirmOffer()
int getOfferItem()
int getOfferQuantity()
int getOfferPrice()
boolean placeBuyOffer(java.lang.String itemName, int quantity, int price)
itemName
- the exact item name (KeyEvent.VK_ENTER
is pressed after search)quantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide priceboolean placeSellOffer(int itemId, int quantity, int price)
itemId
- the item idquantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide priceboolean placeSellOffer(java.lang.String itemName, int quantity, int price)
itemName
- the item namequantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide priceboolean placeSellOffer(ItemWidget item, int quantity, int price)
item
- the itemquantity
- number of items to be boughtprice
- price per item, -1 to leave price at guide pricejava.util.List<GrandExchangeSlot> getSlots()
java.util.List<GrandExchangeSlot> getSlots(java.util.function.Predicate<GrandExchangeSlot> filter)
filter
- match filterGrandExchangeSlot getSlot(int slotIndex)
slotIndex
- the slot index 0-7GrandExchangeSlot getSlot(java.util.function.Predicate<GrandExchangeSlot> filter)
filter
- match filter