XPBar

Methods to interact with the XP bar.


ERSXPBarSize

ERSXPBarSize = enum(UNKNOWN, SMALL, MEDIUM, LARGE);

Enum reprensenting the XPBar available sizes.


ERSXPBarPosition

ERSXPBarPosition = enum(UNKNOWN, LEFT, CENTER, RIGHT);

Enum reprensenting the XPBar available positions.


TRSXPBar

Record responsible with interacting with the XPBar.


XPBar.UpdateSize

procedure TRSXPBar.UpdateSize();

Internal method used to update the TRSXPBar coordinates.

This is automatically called for you on the XPBar variable.


XPBar.SetupInterface

procedure TRSXPBar.SetupInterface();

Internal method used to setup the TRSXPBar coordinates and core values.

This is automatically called for you on the XPBar variable.


XPBar.IsOpen

function TRSXPBar.IsOpen(): Boolean;

Checks if the XPBar circle is enabled. This does not mean that the XPBar is actually visible, simply that according to the XPBar circle, it is enabled.

Example:

WriteLn XPBar.IsEnabled();

XPBar.WaitOpen

function TRSXPBar.WaitOpen(): Boolean;

Waits for the XPBar to be open. This does not mean that the XPBar is actually visible, simply that according to the XPBar button, it is enabled.

Example:

WriteLn XPBar.WaitOpen();

XPBar.Open

function TRSXPBar.Open(): Boolean;

Opens the XPBar by clicking the XPBar circle.

Example:

if not XPBar.IsOpen() then
  WriteLn XPBar.Open();

XPBar.Close

function TRSXPBar.Close(): Boolean;

Closes the XPBar by clicking the XPBar circle.

Example:

if XPBar.IsOpen() then
  WriteLn XPBar.Close();

XPBar.Setup

function TRSXPBar.Setup(): Boolean;

Internal method automatically called by WaspLib once when attempting to read the XPBar. Should only ever run once.


XPBar.Read

function TRSXPBar.Read(): Integer;

Reads the XP in the XPBar.

Example:

WriteLn XPBar.Read();

XPBar.EarnedXP

function TRSXPBar.EarnedXP(): Boolean;

Returns True/False if we earned XP since the last time this, XPBar.Read() or XPBar.WaitXP() were called.

Example:

while True do
  WriteLn XPBar.EarnedXP();

XPBar.WaitXP

function TRSXPBar.WaitXP(time: Integer = 600; interval: Integer = -1): Boolean;

Waits a set amount of time until XPBar.EarnedXP() is true.


XPBar.TotalEarnedXP

function TRSXPBar.TotalEarnedXP(update: Boolean = False): UInt64;

Returns the total amount of earned experience tracked since the script started running. This is pretty reliable but should be taken with a grain of salt since XPBar can be misread due to several reasons, like open interfaces.


XPBar variable

Global TRSXPBar variable.