GrandExchangeChat

Methods to interact with the GrandExchangeChat interface:

../../images/gec_interface.png

The GrandExchange is a very complex interface, probably the most complex available in game and for that reason, the functionality to fully interact with it is split into multiple files and records:


TGrandExchangeChat

Record responsible to handle the GrandExchangeChat interface.


GrandExchangeChat.Grid

property TGrandExchangeChat.Grid: TBoxArray;

Returns the GrandExchangeChat search grid.

Example:

{$I WaspLib/main.simba}
begin
  while True do
    ShowOnTarget(GrandExchangeChat.Grid);
end.
../../images/gec_grid.gif

GrandExchangeChat.SetupInterface

procedure TGrandExchangeChat.SetupInterface();

Internal method used to setup the TGrandExchangeChat coordinates. This is automatically called for you on the GrandExchangeChat variable.


GrandExchangeChat.IsOpen

function TGrandExchangeChat.IsOpen(): Boolean;

Returns true if the Grand Exchange is open.

Example:

WriteLn GrandExchangeChat.IsOpen();

GrandExchangeChat.WaitOpen

function TGrandExchangeChat.WaitOpen(time: Integer; interval: Integer = -1): Boolean;

Returns true if the Grand Exchange is open within time milliseconds.

Example:

WriteLn GrandExchangeChat.WaitOpen();

GrandExchangeChat.SearchText

property TGrandExchangeChat.SearchText: String;
property TGrandExchangeChat.SearchText(search: String): Boolean;

Returns the current GrandExchangeChat search or updates it.

../../images/gec_search.png

Example:

WriteLn GrandExchangeChat.SearchText;
WriteLn GrandExchangeChat.SearchText['Bandos tassets'];
WriteLn GrandExchangeChat.SearchText;
WriteLn GrandExchangeChat.SearchText['Bandos chestplate'];
WriteLn GrandExchangeChat.SearchText;
WriteLn GrandExchangeChat.SearchText['Banana'];
WriteLn GrandExchangeChat.SearchText;

GrandExchangeChat.Find

function TGrandExchangeChat.Find(item: TItem; out bounds: TBox): Boolean;

Returns true if the specified item text is found on the GrandExchangeChat.Grid.

bounds will return the grid box where the item text was found.

Example:

{$I WaspLib/main.simba}
var
  b: TBox;
begin
  if GrandExchangeChat.Find('Abyssal whip', b) then
    ShowOnTarget(b);
end.
../../images/gec_find.png

GrandExchangeChat.Contains

function TGrandExchangeChat.Contains(item: TItem): Boolean;

Returns true if the specified item text is found on the GrandExchangeChat.Grid.

Example:

WriteLn GrandExchangeChat.Contains('Abyssal whip');

GrandExchangeChat.Click

function TGrandExchangeChat.Click(item: TItem): Boolean;

Attempts to click the specified item on the GrandExchangeChat.Grid.

Example:

WriteLn GrandExchangeChat.Click('Abyssal whip');

GrandExchangeChat.FindScroll

function TGrandExchangeChat.FindScroll(item: TItem): Integer;

Attempts to find the scroll level the specified item is found on the GrandExchangeChat.Grid.

Example:

WriteLn GrandExchangeChat.FindScroll('Bandos tassets');

GrandExchangeChat.ScrollTo

function TGrandExchangeChat.ScrollTo(item: TItem): Boolean;

Attempts to scroll until the specified item is found on the GrandExchangeChat.Grid.

Example:

WriteLn GrandExchangeChat.ScrollTo('Bandos tassets');

GrandExchangeChat variable

Global TGrandExchangeChat variable.