FairyRing

Methods to interact with the Fairy rings interface:

_images/fairyring.png

ERSFairyRingDial

ERSFairyRingDial = enum(LEFT, MIDDLE, RIGHT);

Enum representing the FairyRing dials available.


TRSFairyRing

Record responsible with interacting with the FairyRing.


FairyRing.Setup

procedure FairyRing.Setup();

Initializes TRSFairyRing variables.

Note

This is automatically called on the FairyRing variable.


FairyRing.IsOpen

function TRSFairyRing.IsOpen(): Boolean;

Returns true/false whether the FairyRing interface is open or not.

Example:

WriteLn FairyRing.IsOpen();

FairyRing.WaitOpen

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

Returns true if the fairy ring interface is open within time milliseconds.

Example:

WriteLn FairyRing.WaitOpen();

FairyRing.Close

function TRSFairyRing.Close(escape: Boolean): Boolean;
function TRSFairyRing.Close(escapeProbability: Double = BioHash): Boolean; overload;

Closes the FairyRing interface, depending on escape the function will either press escape or click the close button:

_images/fairyring_closebtn.png

Example:

WriteLn FairyRing.Close();

FairyRing.HandleItem

function TRSFairyRing.HandleItem(): Boolean;

Magically finds, caches for next usages and equips dramen or lunar staff with the minimum tab opening possible. If no item is found, we will assume the user has the elite lumbridge and draynor diary complete for next uses.

Example:

 if FairyRing.HandleItem() then
WriteLn FairyRing.Item;

FairyRing.Open

function TRSFairyRing.Open(cuboid: TCuboid): Boolean;

Attempts to open the closest fairy ring RSObject.

Example:

 WriteLn FairyRing.Open();

FairyRing.IsLetterValid

function TRSFairyRing.IsLetterValid(letter: Char; dial: ERSFairyRingDial): Boolean;

Checks if the letter passed on is valid for the given dial.

Example:

WriteLn FairyRing.IsLetterValid('z', ERSFairyRingDial.LEFT);

FairyRing.IsCodeValid

function TRSFairyRing.IsCodeValid(fairyCode: String): Boolean;

Checks if the a given fairyCode is a valid fairy ring code.

Example:

WriteLn FairyRing.IsCodeValid('abc');

FairyRing.Spin

procedure TRSFairyRing.SpinLeft(dial: ERSFairyRingDial);
procedure TRSFairyRing.SpinRight(dial: ERSFairyRingDial);

Spins the given dial left or right.

Example:

WriteLn FairyRing.SpinLeft(ERSFairyRingDial.LEFT);

If you want, you can see the left and right dial blick boxes with the following code:

{$I WaspLib/osrs.simba}
begin
  ShowOnTarget(FairyRing.RotateLeftBoxes + FairyRing.RotateRightBoxes);
end.
_images/fairyring_dialspinboxes.png

FairyRing.Letter

property TRSFairyRing.Letter(dial: ERSFairyRingDial): Char;
property TRSFairyRing.Letter(character: Char; dial: ERSFairyRingDial): Boolean;

Returns or sets the letter of a fairy ring dial.

Example:

WriteLn FairyRing.Letter[ERSFairyRingDial.RIGHT];
WriteLn FairyRing.Letter['p', ERSFairyRingDial.RIGHT];
WriteLn FairyRing.Letter[ERSFairyRingDial.RIGHT];

The letter in question that will be read or set is the one that is in the dial “hole”:

{$I WaspLib/osrs.simba}
begin
  ShowOnTarget(FairyRing.DialHoles);
end.
_images/fairyring_dialholes.png

FairyRing.Code

property TRSFairyRing.Code: String;
property TRSFairyRing.Code(code: String): Boolean;

Returns the current fairy ring code or sets the new one in the dials.

Example:

WriteLn FairyRing.Code;
WriteLn FairyRing.Code['DLP'];
WriteLn FairyRing.Code;

FairyRing.ClickTeleport

function TRSFairyRing.ClickTeleport(): Boolean;

Clicks the fairy ring the teleport button:

_images/fairyring_teleportbtn.png

Example:

WriteLn FairyRing.ClickTeleport();

FairyRing TravelLog

This next section is about the fairy ring travel log GameTab menu:

_images/fairyring_travellog.png

FairyRing.GetLogCodes

function TRSFairyRing.GetLogCodes(out boxes: TBoxArray): TStringArray;
function TRSFairyRing.GetLogCodes(): TStringArray; overload;

Returns the visible codes in the fairy ring travel log.

Example:

{$I WaspLib/osrs.simba}
var
  logs: TStringArray;
  boxes: TBoxArray;
begin
  logs := FairyRing.GetLogCodes(boxes);
  if logs <> [] then
  begin
    WriteLn logs;
    ShowOnTarget(boxes);
  end;
end.
_images/fairyring_logs.png

FairyRing.FindLogCode

function TRSFairyRing.FindLogCode(code: String; out b: TBox): Boolean;
function TRSFairyRing.FindLogCode(code: String): Boolean; overload;

Finds the code specified in the travel log. Codes casing is ignored.

Example:

{$I WaspLib/osrs.simba}

var
  b: TBox;
begin
  if FairyRing.FindLogCode('ALQ', b) then
    ShowOnTarget(b);
end.
_images/fairyring_findlog.png

FairyRing.ClickLogCode

function TRSFairyRing.ClickLogCode(fairyCode: String): Boolean;

Finds and clicks the fairyCode specified in the travel log. Codes casing is ignored.

Example:

WriteLn FairyRing.ClickLogCode('cip');

FairyRing.HandleInterface

function TRSFairyRing.HandleInterface(code: String): Boolean;

Completely handles the fairy ring interface to set a code and teleport. Will use both the log and the dials depending on the user biohash.

Example:

WriteLn FairyRing.HandleInterface('cip');

FairyRing.Teleport

function TRSFairyRing.Teleport(fairyCode: String; cuboid: TCuboid): Boolean;

Teleports the user to the specified fairy ring code. If the fairy ring interface is not open, the RSObject will be used to find the closest one and open it. If the code is on the right click context menu, it will be used. You can also optional pass in “Zanaris” or “BKS” to go to zanaris.

Example:

WriteLn FairyRing.Teleport('cip');

FairyRing variable

Global TRSFairyRing variable.