Package com.runemate.game.api.hybrid.net
Class GrandExchange
- java.lang.Object
-
- com.runemate.game.api.hybrid.net.GrandExchange
-
public final class GrandExchange extends java.lang.Object
The newer grand exchange class which queries the correct GrandExchange based on the current game type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GrandExchange.Item
static class
GrandExchange.Offer
static class
GrandExchange.Screen
static class
GrandExchange.Slot
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
abortOffer(GrandExchange.Slot slot)
static boolean
close()
static boolean
collectToBank()
Collects any unclaimed items from the Grand Exchange to the player's bankstatic boolean
collectToInventory()
Collects any unclaimed items from the Grand Exchange to the player's inventorystatic int
getOfferedPrice()
static int
getOfferedQuantity()
static GrandExchange.Screen
getOpenedScreen()
static GrandExchange.Slot
getSlot(int i)
static java.util.List<GrandExchange.Slot>
getSlots()
static java.util.List<GrandExchange.Slot>
getSlots(java.util.function.Predicate<GrandExchange.Slot> predicate)
static GrandExchangeQueryResults
getUnusedSlots()
static boolean
isOpen()
static @Nullable GrandExchange.Item
lookup(int id)
Looks up the information of this item from the internet.static java.util.List<GrandExchange.Item>
lookup(int... ids)
Looks up the information of these items from the internet.static GrandExchangeQueryBuilder
newQuery()
static boolean
open()
static boolean
open(Npc clerk, java.lang.String action)
static boolean
open(java.lang.String action)
static boolean
placeBuyOffer(java.lang.String itemName, int quantity, int price)
Places a new buy offer within the GrandExchange.static boolean
placeSellOffer(java.lang.String itemName, int quantity, int price)
Places a new sell offer within the GrandExchange.
-
-
-
Method Detail
-
isOpen
public static boolean isOpen()
-
close
public static boolean close()
-
lookup
@Nullable public static @Nullable GrandExchange.Item lookup(int id)
Looks up the information of this item from the internet.
-
placeBuyOffer
public static boolean placeBuyOffer(java.lang.String itemName, int quantity, int price)
Places a new buy offer within the GrandExchange.- Parameters:
itemName
- The exact item name of what you want to purchase.quantity
- The quantity you want to buy.price
- The price you want to buy at.- Returns:
- If the offer was successfully placed.
-
placeSellOffer
public static boolean placeSellOffer(java.lang.String itemName, int quantity, int price)
Places a new sell offer within the GrandExchange.- Parameters:
itemName
- The exact item name of what you want to sell.quantity
- The quantity you want to sell.price
- The price you want to sell at.- Returns:
- If the offer was successfully placed.
-
abortOffer
public static boolean abortOffer(GrandExchange.Slot slot)
-
getOfferedPrice
public static int getOfferedPrice()
- Returns:
- the price of each item being purchased in the currently open offer
-
getOfferedQuantity
public static int getOfferedQuantity()
- Returns:
- the quantity of each the item being purchased in the currently open offer
-
collectToInventory
public static boolean collectToInventory()
Collects any unclaimed items from the Grand Exchange to the player's inventory- Returns:
- if the collection was successful, false otherwise
-
collectToBank
public static boolean collectToBank()
Collects any unclaimed items from the Grand Exchange to the player's bank- Returns:
- if the collection was successful, false otherwise
-
getOpenedScreen
public static GrandExchange.Screen getOpenedScreen()
-
lookup
public static java.util.List<GrandExchange.Item> lookup(int... ids)
Looks up the information of these items from the internet. This can take a few seconds so please use a separate thread
-
open
public static boolean open()
-
open
public static boolean open(java.lang.String action)
-
open
public static boolean open(Npc clerk, java.lang.String action)
-
getSlots
public static java.util.List<GrandExchange.Slot> getSlots(java.util.function.Predicate<GrandExchange.Slot> predicate)
-
getSlots
public static java.util.List<GrandExchange.Slot> getSlots()
-
getSlot
public static GrandExchange.Slot getSlot(int i)
-
getUnusedSlots
public static GrandExchangeQueryResults getUnusedSlots()
-
newQuery
public static GrandExchangeQueryBuilder newQuery()
-
-