XPBar

Methods to interact with the XP bar.


XPBar.Setup

procedure TRSXPBar.Setup(); override;

Initializes XPBar variables.

Note

This is automatically called on the XPBar variable.


XPBar.IsEnabled

function TRSXPBar.IsEnabled(): Boolean;

Checks if the XPBar circle is enabled.

Example:

WriteLn XPBar.IsEnabled();

XPBar.Enable

function TRSXPBar.Enable(): Boolean;

Enables the XPBar by clicking the XPBar circle.

Example:

if not XPBar.IsEnabled() then
  WriteLn XPBar.Enable();

XPBar._Setup

procedure TRSXPBar._Setup();

Internal method automatically called by SRL once when attempting to read the XPBar.


XPBar.Read

function TRSXPBar.Read(): Int32;

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 or XPBar.Read() was called.

Example:

while True do
  WriteLn XPBar.EarnedXP();

XPBar.WaitXP

function TRSXPBar.WaitXP(waitTime: Int32 = 600; interval: Int32 = -1): Boolean;

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


XPBar.TotalEarnedXP

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

Returns the total amount of earned experience. 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.IsOpen

function TRSXPBar.IsOpen(): Boolean;

Checks if the XPBar is open. Keep in mind interfaces and things that cover the xp bar, might make this return false.

Example:

WriteLn XPBar.IsOpen();

XPBar.Open

function TRSXPBar.Open(): Boolean;

Attempts to open the XPBar if it’s not open.

Example:

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

var XPBar

Global XPBar variable.