Package com.epicbot.api.shared.methods
Interface IGrandExchangeAPI
public interface IGrandExchangeAPI
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanClicks the back button on the active/setup offer screen.booleanclose()booleanclose(boolean useEsc) booleanCollects any unclaimed items towards the bank.booleanCollects any unclaimed items towards the inventory.booleanConfirms the current offer we are setting up on screen.booleanClicks the decrease +5% button to decrease the current price per item by 5% of the current offer we are setting up on screen.booleandecreasePriceBy5Percent(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.getItemDetails(int id) Looks up the item in the official RS Grand Exchange API.intGets the item id of the current offer on screen.intGets the price per item of the current offer on screen.intGets the quantity of the current offer on screen.getSlot(int slotIndex) Get a slot by its index.getSlot(Predicate<GrandExchangeSlot> filter) Get the first slot matching the filter.getSlots()Gets all slots.getSlots(Predicate<GrandExchangeSlot> filter) Gets all slots matching the filter.booleanClicks the increase +5% button to increase the current price per item by 5% of the current offer we are setting up on screen.booleanincreasePriceBy5Percent(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.booleanisOpen()booleannewBuyOffer(int itemId) Attempts to start a new buy offer using an empty slot.booleannewBuyOffer(GrandExchangeSlot slot, int itemId) Attempts to start a new buy offer using the given (empty) slot.booleannewBuyOffer(GrandExchangeSlot slot, String itemName) Attempts to start a new buy offer using the given (empty) slot.booleannewBuyOffer(String itemName) Attempts to start a new buy offer using an empty slot.booleannewSellOffer(int itemId) Attempts to start a new sell offer using an empty slot by selling an inventory item with the given id.booleannewSellOffer(ItemWidget item) Attempts to start a new sell offer using an empty slot by selling the given item.booleannewSellOffer(String itemName) Attempts to start a new sell offer using an empty slot by selling an inventory item with the given name.booleanopen()booleanplaceBuyOffer(int itemId, int quantity, int price) Convenience method to place a new buy offer using an empty slot.booleanplaceBuyOffer(String itemName, int quantity, int price) Convenience method to place a new buy offer using an empty slot.booleanplaceSellOffer(int itemId, int quantity, int price) Convenience method to place a new sell offer using an empty slot.booleanplaceSellOffer(ItemWidget item, int quantity, int price) Convenience method to place a new sell offer using an empty slot.booleanplaceSellOffer(String itemName, int quantity, int price) Convenience method to place a new sell offer using an empty slot.booleansetPrice(int price) Set the price of the current offer we are setting up on screen.booleansetQuantity(int quantity) Set the quantity of the current offer we are setting up on screen.
-
Method Details
-
getItemDetails
Looks up the item in the official RS Grand Exchange API.- Parameters:
id- the item id- Returns:
- item detail or null
-
isOpen
boolean isOpen() -
open
boolean open() -
close
boolean close() -
close
boolean close(boolean useEsc) -
getCurrentScreen
IGrandExchangeAPI.GrandExchangeScreen getCurrentScreen() -
collectToBank
boolean collectToBank()Collects any unclaimed items towards the bank.- Returns:
- true if successful, false otherwise
-
collectToInventory
boolean collectToInventory()Collects any unclaimed items towards the inventory.- Returns:
- true if successful, false otherwise
-
backToOverview
boolean backToOverview()Clicks the back button on the active/setup offer screen.- Returns:
- true if successful, false otherwise
-
increasePriceBy5Percent
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.- Returns:
- true if successful, false otherwise
-
increasePriceBy5Percent
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.- Parameters:
times- number of times to click the button- Returns:
- true if successful, false otherwise
-
decreasePriceBy5Percent
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.- Returns:
- true if successful, false otherwise
-
decreasePriceBy5Percent
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.- Parameters:
times- number of times to click the button- Returns:
- true if successful, false otherwise
-
newBuyOffer
boolean newBuyOffer(int itemId) Attempts to start a new buy offer using an empty slot.- Parameters:
itemId- the item id- Returns:
- true if successful, false otherwise
-
newBuyOffer
Attempts to start a new buy offer using an empty slot.- Parameters:
itemName- the exact item name (KeyEvent.VK_ENTERis pressed after search)- Returns:
- true if successful, false otherwise
-
newSellOffer
boolean newSellOffer(int itemId) Attempts to start a new sell offer using an empty slot by selling an inventory item with the given id.- Parameters:
itemId- the item id- Returns:
- true if successful, false otherwise
-
newSellOffer
Attempts to start a new sell offer using an empty slot by selling an inventory item with the given name.- Parameters:
itemName- the item name- Returns:
- true if successful, false otherwise
-
setQuantity
boolean setQuantity(int quantity) Set the quantity of the current offer we are setting up on screen.- Parameters:
quantity- the quantity- Returns:
- true if successful, false otherwise
-
setPrice
boolean setPrice(int price) Set the price of the current offer we are setting up on screen.- Parameters:
price- the price- Returns:
- true if successful, false otherwise
-
confirmOffer
boolean confirmOffer()Confirms the current offer we are setting up on screen.- Returns:
- true if successful, false otherwise
-
getOfferItem
int getOfferItem()Gets the item id of the current offer on screen.- Returns:
- int
-
getOfferQuantity
int getOfferQuantity()Gets the quantity of the current offer on screen.- Returns:
- int
-
getOfferPrice
int getOfferPrice()Gets the price per item of the current offer on screen.- Returns:
- int
-
placeBuyOffer
boolean placeBuyOffer(int itemId, int quantity, int price) Convenience method to place a new buy offer using an empty slot.- Parameters:
itemId- the item idquantity- number of items to be boughtprice- price per item, -1 to leave price at guide price- Returns:
- true if an offer is placed successfully, false otherwise
-
placeBuyOffer
Convenience method to place a new buy offer using an empty slot.- Parameters:
itemName- the exact item name (KeyEvent.VK_ENTERis pressed after search)quantity- number of items to be boughtprice- price per item, -1 to leave price at guide price- Returns:
- true if an offer is placed successfully, false otherwise
-
placeSellOffer
boolean placeSellOffer(int itemId, int quantity, int price) Convenience method to place a new sell offer using an empty slot.- Parameters:
itemId- the item idquantity- number of items to be boughtprice- price per item, -1 to leave price at guide price- Returns:
- true if an offer is placed successfully, false otherwise
-
placeSellOffer
Convenience method to place a new sell offer using an empty slot.- Parameters:
itemName- the item namequantity- number of items to be boughtprice- price per item, -1 to leave price at guide price- Returns:
- true if an offer is placed successfully, false otherwise
-
getSlots
List<GrandExchangeSlot> getSlots()Gets all slots.- Returns:
- list of slots
-
getSlots
Gets all slots matching the filter.- Parameters:
filter- match filter- Returns:
- list of slots
-
getSlot
Get a slot by its index.- Parameters:
slotIndex- the slot index 0-7- Returns:
- the slot
-
getSlot
Get the first slot matching the filter.- Parameters:
filter- match filter- Returns:
- the slot or null
-