GrandExchangeOffer

Methods to interact with the GrandExchangeOffer interface:

_images/geo_interface.png

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:


EGEOfferInterface

EGEOfferInterface = enum(SETUP, STATUS);

Enum to represent the type of GrandExchange offer interfaces.

There’s 2 types of “Offer” interfaces:

_images/geo_setup.png

The “Setup offer” interface.

_images/geo_status.png

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.


EGEOfferSpinButton

EGEOfferSpinButton = enum(DECREASE, INCREASE);

Enum that represents the buttons to decrease/increase the quantity and price spinners of Grand Exchange offers.

_images/geo_spinners.png

EGEOfferQuantity

EGEOfferQuantity = enum(ONE, TEN, HUNDRED, THOUSAND, CUSTOM);

Enum that represents the quantity buttons of Grand Exchange offers.

_images/geo_quantity_buttons.png

EGEOfferPrice

EGEOfferPrice = enum(MINUS_CUSTOM, MINUS_FIVE, GUIDE, CUSTOM, PLUS_FIVE, PLUS_CUSTOM);

Enum that represents the price buttons of Grand Exchange offers.

_images/geo_price_buttons.png

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.

_images/geo_type.png

Example:

WriteLn GrandExchangeOffer.OfferType;

GrandExchangeOffer.GuidePrice

property TRSGrandExchangeOffer.GuidePrice: Integer;

Returns the guide price for the item in the GrandExchangeOffer if any.

_images/geo_guide.png

Example:

WriteLn GrandExchangeOffer.GuidePrice;

GrandExchangeOffer.Item

property TRSGrandExchangeOffer.Item: TRSItem;

Returns the item in the GrandExchangeOffer if any.

_images/geo_item.png

Example:

WriteLn GrandExchangeOffer.Item;

GrandExchangeOffer.Examine

property TRSGrandExchangeOffer.Examine: String;

Returns the examine text of the item in the GrandExchangeOffer if any.

_images/geo_examine.png

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.

_images/geo_fee.png

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:

_images/geo_quantity.png

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:

_images/geo_customperc.png

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:

_images/geo_price.png

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:

_images/geo_total.png

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:

_images/geo_truetotal.png

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:

_images/geo_confirm.png

Example:

if GrandExchangeOffer.Change('Abyssal whip') then
  GrandExchangeOffer.Confirm();

GrandExchangeOffer.Back

function TRSGrandExchangeOffer.Back(): Boolean;

Attempts to click the back button:

_images/geo_back.png

Example:

GrandExchangeOffer.Back();

GrandExchangeOffer.HasItems

function TRSGrandExchangeOffer.HasItems(): Boolean;

Checks if we have items to collect in an offer:

_images/geo_collect.png

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.