Package com.epicbot.api.shared.model.ge
Class GrandExchangeSlot
java.lang.Object
com.epicbot.api.shared.model.ge.GrandExchangeSlot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAborts the offer from theIGrandExchangeAPI.GrandExchangeScreen.OVERVIEWscreen.booleanWhether or not the slot has any number of items/coins to collect.intgetIndex()Gets the slot index.getOffer()Gets the offer.getState()Gets the offer state.Get the slot widget when visible.booleaninUse()Whether or not the slot is in use, basically notGrandExchangeOffer.OfferState.EMPTY.booleanGets whether or not the offer is completed aka checks if the slot state isGrandExchangeOffer.OfferState.BOUGHTorGrandExchangeOffer.OfferState.SOLD.booleanplaceBuyOffer(int itemId, int quantity, int price) Places a new buy offer using this (empty) slot.booleanplaceBuyOffer(String itemName, int quantity, int price) Places a new buy offer using this (empty) slot.booleanplaceSellOffer(int itemId, int quantity, int price) Places a new sell offer using this (empty) slot.booleanplaceSellOffer(ItemWidget item, int quantity, int price) Places a new sell offer using this (empty) slot.booleanplaceSellOffer(String itemName, int quantity, int price) Places a new sell offer using this (empty) slot.toString()booleanViews the offer from theIGrandExchangeAPI.GrandExchangeScreen.OVERVIEWscreen.
-
Constructor Details
-
Method Details
-
getIndex
public int getIndex()Gets the slot index.- Returns:
- int
-
getState
Gets the offer state.- Returns:
GrandExchangeOffer.OfferState
-
inUse
public boolean inUse()Whether or not the slot is in use, basically notGrandExchangeOffer.OfferState.EMPTY.- Returns:
- true if in use, false otherwise
-
isCompleted
public boolean isCompleted()Gets whether or not the offer is completed aka checks if the slot state isGrandExchangeOffer.OfferState.BOUGHTorGrandExchangeOffer.OfferState.SOLD.- Returns:
- true if completed, false otherwise
-
canCollect
public boolean canCollect()Whether or not the slot has any number of items/coins to collect. True for the following cases:- Returns:
- true if items/coins can be collected, false otherwise
-
getOffer
Gets the offer.- Returns:
- the offer.
-
viewOffer
public boolean viewOffer()Views the offer from theIGrandExchangeAPI.GrandExchangeScreen.OVERVIEWscreen.- Returns:
- true if successful, false otherwise
-
abortOffer
public boolean abortOffer()Aborts the offer from theIGrandExchangeAPI.GrandExchangeScreen.OVERVIEWscreen.- Returns:
- true if successful, false otherwise
-
placeBuyOffer
public boolean placeBuyOffer(int itemId, int quantity, int price) Places a new buy offer using this (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
Places a new buy offer using this (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
public boolean placeSellOffer(int itemId, int quantity, int price) Places a new sell offer using this (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
Places a new sell offer using this (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
-
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
-