Prayer¶
Methods to interact with the prayer gametab.

TRSPrayerSet¶
A set of prayers represented by the ERSPrayer
enumeration.
TRSPrayer¶
Main record used to interact with the Prayer gametab.
TRSPrayer.Slots¶
Slots: TBoxArray;
Slot boxes of the prayers. You are unlikely to need to use these directly.
Example:
ShowOnTarget(Prayer.Slots);

Prayer.SetupGameTab¶
procedure TRSPrayer.SetupGameTab();
Internal method used to setup the TRSPrayer coordinates.
This is automatically called for you on the Prayer variable.
TRSPrayer.IsOpen¶
function TRSPrayer.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 TRSPrayer.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 TRSPrayer.GetInfoBox(): TBox;
Attempts to locate and return the bounding box of the yellow prayer info box (the tooltip).
Example:
ShowOnTarget(Prayer.GetInfoBox());

Prayer.InfoIsOpen¶
function TRSPrayer.InfoIsOpen(): Boolean;
Returns True/False if the yellow prayer info box (the tooltip) is currently open.
Example:
WriteLn Prayer.InfoIsOpen();
Prayer.CloseInfo¶
function TRSPrayer.CloseInfo(): Boolean;
Attempts to close the prayer info box if it is open.
Example:
WriteLn Prayer.CloseInfo();
Prayer.Find¶
function TRSPrayer.Find(prayer: ERSPrayer; 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(ERSPrayer.Smite, b);
Prayer.Hover¶
function TRSPrayer.Hover(prayer: ERSPrayer; checkUpText: Boolean = False): Boolean;
Moves the mouse over the specified prayer
.
Example:
WriteLn Prayer.Hover(ERSPrayer.PIETY);
Prayer.Click¶
function TRSPrayer.Click(prayer: ERSPrayer; 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(ERSPrayer.PIETY);
Prayer.CanActivate¶
function TRSPrayer.CanActivate(prayer: ERSPrayer): 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(ERSPrayer.PIETY);
Prayer.IsActive¶
function TRSPrayer.IsActive(prayers: TRSPrayerSet): Boolean; overload;
Returns true if all the specified prayers
are currently active.
Example:
if Prayer.IsActive([ERSPrayer.PIETY, ERSPrayer.PROTECT_FROM_MELEE]) then
WriteLn('Both prayers are active')
else
WriteLn('One or more prayers are not active');
Prayer.GetActivePrayers¶
function TRSPrayer.GetActivePrayers(): TRSPrayerSet;
Returns a set of all currently active prayers.
Example:
WriteLn(Prayer.GetActivePrayers());
Prayer.Activate¶
function TRSPrayer.Activate(prayers: TRSPrayerSet): Boolean;
Attempts to activate all the specified prayers
.
Example:
if Prayer.Activate([ERSPrayer.PIETY, ERSPrayer.PROTECT_FROM_MELEE]) then
WriteLn('Prayers activated successfully')
else
WriteLn('Failed to activate prayers');
Prayer.Deactivate¶
function TRSPrayer.Deactivate(prayers: TRSPrayerSet): Boolean;
Attempts to deactivate all the specified prayers
.
Example:
if Prayer.Deactivate([ERSPrayer.PIETY, ERSPrayer.PROTECT_FROM_MELEE]) then
WriteLn('Prayers deactivated successfully')
else
WriteLn('Failed to deactivate prayers');
Prayer variable¶
Global TRSPrayer variable.