GrandExchangeAPI
Grand Exchange offers: buy, sell, collect and read the slots.
ClassRLPlugins API
public class GrandExchangeAPIMembers
Static methods
- voidabortOffer(int)
Aborts the active Grand Exchange offer slot which currently has the itemId.
- voidbypassHighOfferWarning()
Bypasses the high offer warning dialog if it is open.
- voidcancel(GrandExchangeSlot)
Cancels an active Grand Exchange offer in the specified slot.
- booleancanCollect()
Checks the Grand Exchange window if its currently able to collect.
- voidclose()
Closes the Grand Exchange window if it is currently open.
- voidcollectAll()
Collects all completed offers in the Grand Exchange.
- voidcollectAs(GrandExchangeSlot, boolean)
Collects items from a canceled or completed Grand Exchange offer in the specified slot.
- voidcollectFromSlot(int)
Collects gold from from a specified Grand Exchange slot (fromm sell offer).
- voidcollectFromSlot(int, boolean, int)
Collects items from a specified Grand Exchange slot.
- intfreeSlot()
Returns the first free Grand Exchange slot (1-8) or -1 if none are free.
- List<GrandExchangeOffer>getOffers()
Returns a list of the Grand Exchange offers.
- booleanisOpen()
Checks if the Grand Exchange interface is currently open.
- GrandExchangeSlotstartBuyOffer(int, int, int)
Starts a buy offer in the first free Grand Exchange slot.
- intstartBuyOfferPercentage(int, int, int, int)
Start a buy offer priced by a # of 5%s.
- GrandExchangeSlotstartSellOffer(int, int, int)
Starts a sell offer in the first free Grand Exchange slot.
- voidstartSellOfferPercentage(int, int, int, int)
Start a sell offer priced by a # of 5%s.
abortOffer(int)static
public static void abortOffer(int itemId)Aborts the active Grand Exchange offer slot which currently has the itemId.
Parameters
itemId- Item id.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
bypassHighOfferWarning()static
public static void bypassHighOfferWarning()Bypasses the high offer warning dialog if it is open.
cancel(GrandExchangeSlot)static
public static void cancel(GrandExchangeSlot slot)Cancels an active Grand Exchange offer in the specified slot.
Parameters
slot- The GrandExchangeSlot to cancel.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
canCollect()static
public static boolean canCollect()Checks the Grand Exchange window if its currently able to collect.
close()static
public static void close()Closes the Grand Exchange window if it is currently open.
collectAll()static
public static void collectAll()Collects all completed offers in the Grand Exchange.
collectAs(GrandExchangeSlot, boolean)static
public static void collectAs(GrandExchangeSlot slot, boolean noted)Collects items from a canceled or completed Grand Exchange offer in the specified slot.
Parameters
slot- The GrandExchangeSlot to collect from.
noted- True to collect noted items, false to collect unnoted items.
collectFromSlot(int)static
public static void collectFromSlot(int slotNumber)Collects gold from from a specified Grand Exchange slot (fromm sell offer).
Parameters
slotNumber- The slot number (1-8) to collect from.
collectFromSlot(int, boolean, int)static
public static void collectFromSlot(int slotNumber, boolean noted, int amount)Collects items from a specified Grand Exchange slot.
Parameters
slotNumber- The slot number (1-8) to collect from.
noted- True to collect items as noted, false for unnoted.
amount- The amount to collect. Use 1 for a single item, or any other number for all available.
freeSlot()static
public static int freeSlot()Returns the first free Grand Exchange slot (1-8) or -1 if none are free.
Returns
Slot.
getOffers()static
public static List<GrandExchangeOffer> getOffers()Returns a list of the Grand Exchange offers.
isOpen()static
public static boolean isOpen()Checks if the Grand Exchange interface is currently open.
Returns
True if the Grand Exchange interface is open, false otherwise.
startBuyOffer(int, int, int)static
public static GrandExchangeSlot startBuyOffer(int itemId, int amount, int price)Starts a buy offer in the first free Grand Exchange slot.
Parameters
itemId- The item ID to buy.
amount- The amount to buy.
price- The price per item.
Returns
The GrandExchangeSlot object representing the slot used, or null if no slot is free or an error occurs.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
startBuyOfferPercentage(int, int, int, int)static
public static int startBuyOfferPercentage(int itemId, int amount, int FivePercents, int slotNumber)Start a buy offer priced by a # of 5%s.
Parameters
itemId- Item id.
amount- Amount.
FivePercents- Price.
slotNumber- Slot.
Returns
Slot number.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
startSellOffer(int, int, int)static
public static GrandExchangeSlot startSellOffer(int itemId, int amount, int price)Starts a sell offer in the first free Grand Exchange slot.
Parameters
itemId- The item ID to sell.
amount- The amount to sell. Use -1 to sell all available.
price- The price per item.
Returns
The GrandExchangeSlot object representing the slot used, or null if no slot is free or an error occurs.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
startSellOfferPercentage(int, int, int, int)static
public static void startSellOfferPercentage(int itemId, int amount, int FivePercents, int slotNumber)Start a sell offer priced by a # of 5%s.
Parameters
itemId- Item id.
amount- Amount.
FivePercents- Price.
slotNumber- Slot.
- Can wait for the game. Call it only from
VitaPlugin.loop(); in a@Subscribemethod it freezes the game.
Also allowed
Every class has these, as in plain Java.
equals, toString