Prayer
Methods to interact with the prayer tab and quick prayers.
Prayer.Setup
procedure TRSPrayer.Setup; override;
Initializes Prayer variables.
Note
This is automatically called on the Prayer variable.
Prayer.SetupAlignment
procedure TRSPrayer.SetupAlignment(Mode: ERSClientMode); override;
Setups up the interface aligment for the current client mode.
Note
This is automatically called on the TRSClient.ClientModeChanged function.
Prayer.GetPrayerLevel
function TRSPrayer.GetPrayerLevel: Int32;
Prayer.GetPrayerLevel is used to retrieve the prayer level from the prayer tab.
Example
Writeln Prayer.GetPrayerLevel;
Prayer.IsOpen
function TRSPrayer.IsOpen: Boolean;
Returns true if the Prayer tab is open.
Prayer.Open
function TRSPrayer.Open: Boolean;
Attempts to open the prayer tab.
Example
Prayer.Open;
Prayer.GetPrayerBoxes
function TRSPrayer.GetPrayerBoxes: TBoxArray;
function TRSPrayer.GetPrayerBoxes(Prayers: array of ERSPrayer): TBoxArray; overload;
Internal function to get the bounds of all or the specified prayers.
Prayer.GetPrayerBox
function TRSPrayer.GetPrayerBox(Prayer: ERSPrayer): TBox;
Internal function to get the bounds of a single prayer.
Prayer.PointToPrayer
function TRSPrayer.PointToPrayer(P: TPoint): Int32;
Returns the prayer number that P is part of. -1 is returned if there’s no result.
Example
WriteLn('Mouse is hovering prayer ', Prayer.PointToPrayer(Mouse.Position));
Prayer.MouseOver
function TRSPrayer.MouseOver(Prayer: ERSPrayer): Boolean;
Hovers the specified prayer.
Example
Prayer.MouseOver(ERSPrayer.PROTECT_FROM_MELEE);
Prayer.CanActivate
function TRSPrayer.CanActivate(Prayer: ERSPrayer): Boolean;
Returns true if we have enough level and have unlocked the specified prayer.
Example
WriteLn Prayer.CanActivate(ERSPrayer.PROTECT_FROM_MELEE);
Prayer.GetAvailablePrayers
function TRSPrayer.GetAvailablePrayers: array of ERSPrayer;
Returns an array of all available prayers.
Prayer.IsPrayerActive
function TRSPrayer.IsPrayerActive(Prayer: ERSPrayer): Boolean;
Returns true if the specified prayer is active right now.
Example
WriteLn Prayer.IsPrayerActive(ERSPrayer.SMITE);
Prayer.GetActivePrayers
function TRSPrayer.GetActivePrayers: array of ERSPrayer;
Returns an array of all active prayers.
Prayer.PrayerActive
function TRSPrayer.PrayerActive: Boolean;
Returns true if any prayer is active.
Prayer.ActivatePrayer
function TRSPrayer.ActivatePrayer(Prayer: ERSPrayer): Boolean;
Attempts to activate the specified prayer.
Example
Prayer.ActivatePrayer(ERSPrayer.PROTECT_FROM_MELEE);
Prayer.ActivatePrayer
function TRSPrayer.ActivatePrayer(Prayers: array of ERSPrayer): Boolean; overload;
Attempts to activate the several prayers.
Example
Prayer.ActivatePrayer([ERSPrayer.PROTECT_FROM_MELEE, ERSPrayer.PIETY]);
var Prayer
Global Prayer variable.
QuickPrayer.Setup
procedure QuickPrayer.Setup;
Initializes QuickPrayer variables.
Note
This is automatically called on the QuickPrayer variable.
QuickPrayer.SetupSetupAlignment
procedure QuickPrayer.SetupSetupAlignment(Mode: ERSClientMode); override;
Setups up the interface aligment for the current client mode.
Note
This is automatically called on the TRSClient.ClientModeChanged function.
QuickPrayer.IsOpen
function QuickPrayer.IsOpen: Boolean;
function QuickPrayer.IsOpen(WaitTime: Int32; Interval: Int32 = -1): Boolean; overload;
Returns true if the quick prayers are open.
QuickPrayer.Open
function QuickPrayer.Open: Boolean;
Attempts to open the quick prayers.
Example
QuickPrayer.Open;
QuickPrayer.Close
function QuickPrayer.Close: Boolean;
Attempts to close the quick prayers.
Example
QuickPrayers.Close;
QuickPrayer.IsPrayerSelected
function QuickPrayer.IsPrayerSelected(QPrayer: ERSPrayer): Boolean;
Returns true if the specified quick prayer is selected.
Example
WriteLn QuickPrayers.IsPrayerSelected(ERSPrayer.PROTECT_FROM_MAGIC);
QuickPrayer.GetSelectedPrayers
function QuickPrayer.GetSelectedPrayers: array of ERSPrayer;
Returns an array of all selected quick prayers
Example
WriteLn QuickPrayers.GetSelectedPrayers;
QuickPrayer.SelectPrayer
function QuickPrayer.SelectPrayer(QPrayer: ERSPrayer): Boolean;
function QuickPrayer.SelectPrayer(QPrayers: array of ERSPrayer): Boolean; overload;
Attempts to select the specified quick prayer/prayers.
Example
QuickPrayers.SelectPrayer(ERSPrayer.PROTECT_ITEM);
var QuickPrayer
Global QuickPrayer variable.
Minimap
Methods to handle the minimap prayer orb.
Minimap.GetPrayerLevel
function TRSMinimap.GetPrayerLevel: Int32;
Minimap.GetPrayerLevel is used to retrieve the prayer level from the minimap orb.
Example
Writeln Minimap.GetPrayerLevel;
Minimap.IsPrayerEnabled
function TRSMinimap.IsPrayerEnabled: Boolean;
Minimap.IsPrayerEnabled is used to retrieve the quick prayer state (enabled or disabled).
Example
Writeln Minimap.IsPrayerEnabled;
Minimap.EnablePrayer
function TRSMinimap.EnablePrayer: Boolean;
Minimap.EnablePrayer is used to enable quick prayers.
Example
Minimap.EnablePrayer;
Minimap.DisablePrayer
function TRSMinimap.DisablePrayer: Boolean;
Minimap.DisablePrayer is used to disable quick prayers.
Example
Minimap.DisablePrayer;
Prayer.Open
function TRSPrayer.Open: Boolean; override;
Overrides Prayer.Open to handle quick prayers if they are open.
Prayer.CanActivate
function TRSPrayer.CanActivate(Prayer: ERSPrayer): Boolean; override;
Overrides Prayer.CanActivate to handle quick prayers.
Prayer.GetAvailablePrayers
function TRSPrayer.GetAvailablePrayers: array of ERSPrayer; override;
Overrides Prayer.GetAvailablePrayers to handle quick prayers.