Prayer

Methods to interact with the prayer gametab.

../../images/prayer.png

TPrayerSet

A set of prayers represented by the EPrayer enumeration.


TPrayer

Main record used to interact with the Prayer gametab.


TPrayer.Slots

Slots: TBoxArray;

Slot boxes of the prayers. You are unlikely to need to use these directly.

Example:

ShowOnTarget(Prayer.Slots);
../../images/prayer_slots.png

Prayer.SetupGameTab

procedure TPrayer.SetupGameTab();

Internal method used to setup the TPrayer coordinates.

This is automatically called for you on the Prayer variable.


TPrayer.IsOpen

function TPrayer.IsOpen(): Boolean;

Returns True/False whether the Prayer gametab is currently open.

Example:

if Prayer.IsOpen() then
  WriteLn('Prayer tab is open')
else
  WriteLn('Prayer tab is closed');

Prayer.Open

function TPrayer.Open(): Boolean;

Attempts to open the Prayer tab.

Example:

if Prayer.Open() then
  WriteLn('Prayer tab is open')
else
  WriteLn('Failed to open Prayer tab');

Prayer.GetInfoBox

function TPrayer.GetInfoBox(): TBox;

Attempts to locate and return the bounding box of the yellow prayer info box (the tooltip).

Example:

ShowOnTarget(Prayer.GetInfoBox());
../../images/prayer_tooltip.png

Prayer.InfoIsOpen

function TPrayer.InfoIsOpen(): Boolean;

Returns True/False if the yellow prayer info box (the tooltip) is currently open.

Example:

WriteLn Prayer.InfoIsOpen();

Prayer.CloseInfo

function TPrayer.CloseInfo(): Boolean;

Attempts to close the prayer info box if it is open.

Example:

WriteLn Prayer.CloseInfo();

Prayer.Find

function TPrayer.Find(prayer: EPrayer; out bounds: TBox; attempts: Integer = 2): Boolean;

Searches for the specified prayer. Returns true if found and it’s bounds through bounds

Example:

WriteLn Prayer.Find(EPrayer.Smite, b);

Prayer.Hover

function TPrayer.Hover(prayer: EPrayer; checkUpText: Boolean = False): Boolean;

Moves the mouse over the specified prayer.

Example:

WriteLn Prayer.Hover(EPrayer.PIETY);

Prayer.Click

function TPrayer.Click(prayer: EPrayer; button: EMouseButton = EMouseButton.LEFT; checkUpText: Boolean = False): Boolean;

Clicks on the specified prayer with the specified button. If no button is specified EMouseButton.LEFT is used.

Example:

Prayer.Click(EPrayer.PIETY);

Prayer.CanActivate

function TPrayer.CanActivate(prayer: EPrayer): Boolean;

Checks if the specified prayer can be activated. For example, if you check a prayer you don’t have the level for this should return False.

Example:

WriteLn Prayer.CanActivate(EPrayer.PIETY);

Prayer.IsActive

function TPrayer.IsActive(prayers: TPrayerSet): Boolean; overload;

Returns true if all the specified prayers are currently active.

Example:

if Prayer.IsActive([EPrayer.PIETY, EPrayer.PROTECT_FROM_MELEE]) then
  WriteLn('Both prayers are active')
else
  WriteLn('One or more prayers are not active');

Prayer.GetActivePrayers

function TPrayer.GetActivePrayers(): TPrayerSet;

Returns a set of all currently active prayers.

Example:

WriteLn(Prayer.GetActivePrayers());

Prayer.Activate

function TPrayer.Activate(prayers: TPrayerSet): Boolean;

Attempts to activate all the specified prayers.

Example:

if Prayer.Activate([EPrayer.PIETY, EPrayer.PROTECT_FROM_MELEE]) then
  WriteLn('Prayers activated successfully')
else
  WriteLn('Failed to activate prayers');

Prayer.Deactivate

function TPrayer.Deactivate(prayers: TPrayerSet): Boolean;

Attempts to deactivate all the specified prayers.

Example:

if Prayer.Deactivate([EPrayer.PIETY, EPrayer.PROTECT_FROM_MELEE]) then
  WriteLn('Prayers deactivated successfully')
else
  WriteLn('Failed to deactivate prayers');

Prayer variable

Global TPrayer variable.