GrandExchangeOffer¶
Methods to interact with the GrandExchangeOffer interface:
The GrandExchange is a very complex interface, probably the most complex available in OldSchool RuneScape and for that reason, the functionality to fully interact with it is split into multiple files and records:
GrandExchange, the main grand exchange screen.
GrandExchangeHistory, the history screen of the grand exchange.
GrandExchangeChat, the chat interface of the grand exchange when you are setting up a buy offer.
GrandExchangeOffer, the screen of the grand exchange where you view or setup a new offer and what this page is about.
EGEOfferInterface¶
EGEOfferInterface = enum(SETUP, STATUS);
Enum to represent the type of GrandExchange offer interfaces.
There’s 2 types of “Offer” interfaces:
The “Setup offer” interface.¶
The “Status offer” interface.¶
You can differ them by their layout and interface title.
EGEOfferType¶
EGEOfferType = enum(SELL, BUY);
Enum to represent the type of Grand Exchange offers.
EGEOfferQuantity¶
EGEOfferQuantity = enum(ONE, TEN, HUNDRED, THOUSAND, CUSTOM);
Enum that represents the quantity buttons of Grand Exchange offers.
EGEOfferPrice¶
EGEOfferPrice = enum(MINUS_CUSTOM, MINUS_FIVE, GUIDE, CUSTOM, PLUS_FIVE, PLUS_CUSTOM);
Enum that represents the price buttons of Grand Exchange offers.
TRSGrandExchangeOffer¶
Record responsible to handle the GrandExchangeOffer interface.
GrandExchangeOffer.SetupInterface¶
procedure TRSGrandExchangeOffer.SetupInterface();
Internal method used to setup the TRSGrandExchangeOffer coordinates. This is automatically called for you on the GrandExchangeOffer variable.
GrandExchangeOffer.IsOpen¶
function TRSGrandExchangeOffer.IsOpen(): Boolean;
Returns true if the Grand Exchange is open.
Example:
WriteLn GrandExchangeOffer.IsOpen();
GrandExchangeOffer.WaitOpen¶
function TRSGrandExchangeOffer.WaitOpen(time: Integer; interval: Integer = -1): Boolean;
Returns true if the Grand Exchange is open within time milliseconds.
Example:¶
WriteLn GrandExchangeOffer.WaitOpen();
GrandExchangeOffer.Close¶
function TRSGrandExchangeOffer.Close(escape: Boolean): Boolean;
function TRSGrandExchangeOffer.Close(escapeProbability: Single = 0): Boolean; overload;
Closes the GrandExchangeOffer, Depending on escape or `escapeProbability the function will
either click the button or press escape key.
Example:
WriteLn GrandExchangeOffer.Close();
GrandExchangeOffer.Open¶
function TRSGrandExchangeOffer.Open(): Boolean;
Attempts to open the GrandExchangeOffer, returns True on success.
Example:
WriteLn GrandExchangeOffer.Open();
GrandExchangeOffer.OfferInterface¶
property TRSGrandExchangeOffer.OfferInterface: EGEOfferInterface;
Returns the EGEOfferInterface type of the GrandExchangeOffer screen.
Example:
WriteLn GrandExchangeOffer.OfferInterface;
GrandExchangeOffer.OfferType¶
property TRSGrandExchangeOffer.OfferType: EGEOfferType;
Returns the EGEOfferType of the GrandExchangeOffer screen.
Example:
WriteLn GrandExchangeOffer.OfferType;
GrandExchangeOffer.GuidePrice¶
property TRSGrandExchangeOffer.GuidePrice: Integer;
Returns the guide price for the item in the GrandExchangeOffer if any.
Example:
WriteLn GrandExchangeOffer.GuidePrice;
GrandExchangeOffer.Item¶
property TRSGrandExchangeOffer.Item: TRSItem;
Returns the item in the GrandExchangeOffer if any.
Example:
WriteLn GrandExchangeOffer.Item;
GrandExchangeOffer.Examine¶
property TRSGrandExchangeOffer.Examine: String;
Returns the examine text of the item in the GrandExchangeOffer if any.
Example:
WriteLn GrandExchangeOffer.Examine;
GrandExchangeOffer.Fee¶
property TRSGrandExchangeOffer.Fee: Double;
Returns the fee percentage of the the GrandExchangeOffer if any.
This is returned as a Double.
Example:
WriteLn GrandExchangeOffer.Fee;
GrandExchangeOffer.Quantity¶
property TRSGrandExchangeOffer.Quantity: Integer;
property TRSGrandExchangeOffer.Quantity(value: Integer): Boolean;
Returns or sets the quantity of the the GrandExchange offer:
Example:
WriteLn GrandExchangeOffer.Quantity;
WriteLn GrandExchangeOffer.Quantity[100];
WriteLn GrandExchangeOffer.Quantity;
GrandExchangeOffer.CustomPricePercent¶
property TRSGrandExchangeOffer.CustomPricePercent: Double;
property TRSGrandExchangeOffer.CustomPricePercent(value: Double): Boolean;
Returns or sets the custom price percentage button of the GrandExchange offer:
Example:
WriteLn GrandExchangeOffer.CustomPricePercent;
WriteLn GrandExchangeOffer.CustomPricePercent[0.12];
WriteLn GrandExchangeOffer.CustomPricePercent;
GrandExchangeOffer.Price¶
property TRSGrandExchangeOffer.Price: Integer;
property TRSGrandExchangeOffer.Price(value: Integer): Boolean;
property TRSGrandExchangeOffer.Price(value: Integer; tolerance: Single): Boolean;
Returns or sets the price of the the GrandExchange offer:
Example:
WriteLn GrandExchangeOffer.Price;
WriteLn GrandExchangeOffer.Price[1500500];
WriteLn GrandExchangeOffer.Price;
GrandExchangeOffer.Total¶
property TRSGrandExchangeOffer.Total: Integer;
Returns the total value of the the GrandExchange offer the user will pay/receive:
This is returned as an Integer.
Example:
WriteLn GrandExchangeOffer.Total;
GrandExchangeOffer.TrueTotal¶
property TRSGrandExchangeOffer.TrueTotal: Integer;
Returns the true total value of the the GrandExchange offer the user will receive:
This is returned as an Integer and is only available in sell offers.
Example:
WriteLn GrandExchangeOffer.TrueTotal;
GrandExchangeOffer.Change¶
function TRSGrandExchangeOffer.Change(item: TRSItem): Boolean;
Attempts to change the offer item to the specified item.
Example:
WriteLn GrandExchangeOffer.Change('Abyssal whip');
GrandExchangeOffer.Confirm¶
function TRSGrandExchangeOffer.Confirm(): Boolean;
Attempts to click the confirm button:
Example:
if GrandExchangeOffer.Change('Abyssal whip') then
GrandExchangeOffer.Confirm();
GrandExchangeOffer.Back¶
function TRSGrandExchangeOffer.Back(): Boolean;
Attempts to click the back button:
Example:
GrandExchangeOffer.Back();
GrandExchangeOffer.HasItems¶
function TRSGrandExchangeOffer.HasItems(): Boolean;
Checks if we have items to collect in an offer:
Example:
WriteLn GrandExchangeOffer.HasItems();
GrandExchangeOffer.Collect¶
function TRSGrandExchangeOffer.Collect(): Boolean;
Attempts to collect items in an offer.
Example:
GrandExchangeOffer.Collect();
GrandExchangeOffer.CreateBuyOffer¶
function TRSGrandExchangeOffer.CreateBuyOffer(itemName : String; price, quantity : Integer = -1) : Boolean;
Attempts to create a buy offer for the specified itemName, price and quantity.
Example:
if GrandExchangeOffer.CreateBuyOffer('Abyssal whip', 1500000, 1) then
WriteLn('Buy offer created successfully!');
GrandExchangeOffer.CreateSellOffer¶
function TRSGrandExchangeOffer.CreateSellOffer(itemName : String; price, quantity : Integer = -1) : Boolean;
Attempts to create a sell offer for the specified itemName, price and quantity.
Example:
if GrandExchangeOffer.CreateSellOffer('Abyssal whip', 1500000, 1) then
WriteLn('Sell offer created successfully!');
GrandExchangeOffer variable¶
Global TRSGrandExchangeOffer variable.