Package dev.twilite.game.facade
Class GrandExchange
java.lang.Object
dev.twilite.game.facade.GrandExchange
Grand Exchange state and offer helpers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDestination used when collecting completed Grand Exchange offers.static interfaceResolves the price used when creating a Grand Exchange offer.static classMutable builder for placing a single Grand Exchange offer.static enumGrand Exchange interface screens. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GrandExchange.Requestbuy(int itemId) Starts building a buy request for an item id.static voidclose()Closes the grand exchange interfacestatic booleancollect(GrandExchangeOffer offer) Collects an offer to the inventory.static booleancollect(GrandExchangeOffer offer, GrandExchange.CollectionMode mode) Collects an offer using the selected destination.static booleanCollects all completed offers to the selected destination.static booleanCollects the currently viewed offer to the selected destination.static intReturns the number of empty offer slots.static booleanfull()Returns whether every usable offer slot is occupied.static ItemViewReturns a lazy view over items in the inventory (GeOffersSide).static Optional<GrandExchangeOffer> offer(int slot) Returns the offer at a slot.static GrandExchangeOfferViewoffers()Returns a lazy view over all native offer slots.static voidopen()Opens the Grand Exchange through a nearby booth or clerk.static voidReturns to the main offer overview when the Grand Exchange is on an offer screen.static GrandExchange.Screenscreen()Returns the current Grand Exchange view.static Optional<GrandExchangeOffer> Returns the currently viewed offer.static intReturns the selected offer slot, or-1when no offer is selected.static GrandExchange.Requestsell(int itemId) Starts building a sell request for an item id.static GrandExchange.RequestStarts building a sell request selected from the inventory.static booleanshowing()Returns whether the Grand Exchange interface is visible.static intslots()Returns the number of usable offer slots.static intReturns the number of non-empty offer slots.
-
Constructor Details
-
GrandExchange
public GrandExchange()
-
-
Method Details
-
inventory
Returns a lazy view over items in the inventory (GeOffersSide). -
showing
public static boolean showing()Returns whether the Grand Exchange interface is visible. -
close
public static void close()Closes the grand exchange interface -
open
public static void open()Opens the Grand Exchange through a nearby booth or clerk. -
offers
Returns a lazy view over all native offer slots. -
offer
Returns the offer at a slot. -
selectedOffer
Returns the currently viewed offer. -
selectedSlot
public static int selectedSlot()Returns the selected offer slot, or-1when no offer is selected. -
screen
Returns the current Grand Exchange view. -
openOverview
public static void openOverview()Returns to the main offer overview when the Grand Exchange is on an offer screen. -
slots
public static int slots()Returns the number of usable offer slots. -
usedSlots
public static int usedSlots()Returns the number of non-empty offer slots. -
freeSlots
public static int freeSlots()Returns the number of empty offer slots. -
full
public static boolean full()Returns whether every usable offer slot is occupied. -
buy
Starts building a buy request for an item id. -
sell
Starts building a sell request for an item id. -
sell
Starts building a sell request selected from the inventory. -
collectAll
Collects all completed offers to the selected destination. -
collect
Collects an offer to the inventory. -
collect
Collects an offer using the selected destination. -
collectViewed
Collects the currently viewed offer to the selected destination.
-