Package net.openosrs.api.service.ge
Class GrandExchangeService
- java.lang.Object
-
- net.openosrs.api.service.ge.GrandExchangeService
-
@Singleton public class GrandExchangeService extends java.lang.ObjectGrand Exchange slot readback and visible offer commands.
-
-
Constructor Summary
Constructors Constructor Description GrandExchangeService(net.runelite.api.Client client, NpcService npcs, WidgetService widgets, DialogueService dialogue)GrandExchangeService(net.runelite.api.Client client, NpcService npcs, WidgetService widgets, DialogueService dialogue, ObjectService objects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(int zeroBasedSlot)Aborts an active offer in the specified slot.voidadjustPrice(PriceAdjustment adjustment)Adjusts the price using one of the native shortcut buttons (+1, -1, +5%, -5%, Guide price).voidadjustQuantity(QuantityAdjustment adjustment)Adjusts the quantity using one of the native shortcut buttons (+1, -1, +10, +100, +1000, All).voidcancelSelected()booleanclose()Closes the Grand Exchange interface.voidcollect(int zeroBasedSlot)voidcollectAll()voidcollectSelected()voidcollectSlot(int zeroBasedSlot)Collects one completed offer when the global collect control is unavailable.voidconfirm()booleangoBack()Returns from the offer setup or detail view back to the main offers overview.booleanisOpen()booleanisSearching()True if the chatbox item search prompt is currently active.GrandExchangeSlotoffer(int slot)java.util.List<GrandExchangeSlot>offers()booleanopen()Automatically discovers the nearest Grand Exchange clerk or booth and opens the exchange.voidopen(NpcRef clerk)Opens the Grand Exchange via the specified clerk NPC.booleanopenOfferDetails(int zeroBasedSlot)Opens the details screen for an active offer slot.voidopenPriceEntry()Opens the price input; submit the value on a later client tick.voidopenQuantityEntry()Opens the quantity input; submit the value on a later client tick.voidopenSlot(int zeroBasedSlot, boolean buy)booleanretryOfferWithHigherPrice(int zeroBasedSlot, PriceAdjustment adjustment)Aborts an active buying offer that has not yet filled, collects returned coins, re-opens the slot, bumps the price higher using the specified adjustment, and confirms the new offer.java.util.List<SearchResult>searchResults()The items listed under the search prompt, in the order shown.booleanselectBuyItem(int itemId)Selects an item from the search results by item ID, scrolling the list to it if needed.booleanselectBuyItem(java.lang.String itemName)Selects an item from the search results by name.voidselectSellItem(InventoryItem item)voidsetPrice(int price)voidsetQuantity(int quantity)voidsubmitPrice(int price)Sends the active price input value.voidsubmitQuantity(int quantity)Sends the active quantity input value.voidtypeSearch(java.lang.String query)Simulates typing search text into the active chatbox search prompt.
-
-
-
Constructor Detail
-
GrandExchangeService
@Inject public GrandExchangeService(net.runelite.api.Client client, NpcService npcs, WidgetService widgets, DialogueService dialogue)
-
GrandExchangeService
public GrandExchangeService(net.runelite.api.Client client, NpcService npcs, WidgetService widgets, DialogueService dialogue, ObjectService objects)
-
-
Method Detail
-
isOpen
public boolean isOpen()
-
open
public void open(NpcRef clerk)
Opens the Grand Exchange via the specified clerk NPC.
-
open
public boolean open()
Automatically discovers the nearest Grand Exchange clerk or booth and opens the exchange.
-
close
public boolean close()
Closes the Grand Exchange interface.
-
goBack
public boolean goBack()
Returns from the offer setup or detail view back to the main offers overview.
-
isSearching
public boolean isSearching()
True if the chatbox item search prompt is currently active.
-
typeSearch
public void typeSearch(java.lang.String query)
Simulates typing search text into the active chatbox search prompt.
-
searchResults
public java.util.List<SearchResult> searchResults()
The items listed under the search prompt, in the order shown.
-
selectBuyItem
public boolean selectBuyItem(int itemId)
Selects an item from the search results by item ID, scrolling the list to it if needed.
-
selectBuyItem
public boolean selectBuyItem(java.lang.String itemName)
Selects an item from the search results by name. An exact match wins over a partial one, so "Rune platebody" is not mistaken for "Rune platebody (g)".
-
offers
public java.util.List<GrandExchangeSlot> offers()
-
offer
public GrandExchangeSlot offer(int slot)
-
openSlot
public void openSlot(int zeroBasedSlot, boolean buy)
-
selectSellItem
public void selectSellItem(InventoryItem item)
-
setQuantity
public void setQuantity(int quantity)
-
openPriceEntry
public void openPriceEntry()
Opens the price input; submit the value on a later client tick.
-
submitPrice
public void submitPrice(int price)
Sends the active price input value.
-
openQuantityEntry
public void openQuantityEntry()
Opens the quantity input; submit the value on a later client tick.
-
submitQuantity
public void submitQuantity(int quantity)
Sends the active quantity input value.
-
setPrice
public void setPrice(int price)
-
adjustPrice
public void adjustPrice(PriceAdjustment adjustment)
Adjusts the price using one of the native shortcut buttons (+1, -1, +5%, -5%, Guide price).
-
adjustQuantity
public void adjustQuantity(QuantityAdjustment adjustment)
Adjusts the quantity using one of the native shortcut buttons (+1, -1, +10, +100, +1000, All).
-
confirm
public void confirm()
-
collectAll
public void collectAll()
-
collectSlot
public void collectSlot(int zeroBasedSlot)
Collects one completed offer when the global collect control is unavailable.
-
collect
public void collect(int zeroBasedSlot)
-
collectSelected
public void collectSelected()
-
cancelSelected
public void cancelSelected()
-
abort
public void abort(int zeroBasedSlot)
Aborts an active offer in the specified slot.
-
openOfferDetails
public boolean openOfferDetails(int zeroBasedSlot)
Opens the details screen for an active offer slot.
-
retryOfferWithHigherPrice
public boolean retryOfferWithHigherPrice(int zeroBasedSlot, PriceAdjustment adjustment)Aborts an active buying offer that has not yet filled, collects returned coins, re-opens the slot, bumps the price higher using the specified adjustment, and confirms the new offer.
-
-