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.AnyPrayerActive()¶
function TRSPrayer.AnyPrayerActive(prayers: array of ERSPrayer): Boolean;
Returns true if any of the specified prayers is active.
Prayer.AllPrayerActive¶
function TRSPrayer.AllPrayerActive(prayers: array of ERSPrayer): Boolean;
Returns true if all of the specified prayers is active.
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(prayers: array of ERSPrayer): Boolean;
function TRSPrayer.ActivatePrayer(prayer: ERSPrayer): Boolean; overload;
Attempts to activate the specified prayer
or prayers
.
Example:
Prayer.ActivatePrayer(ERSPrayer.PROTECT_FROM_MELEE);
Prayer.DisablePrayer¶
function TRSPrayer.DisablePrayer(prayers: array of ERSPrayer): Boolean;
function TRSPrayer.DisablePrayer(prayer: ERSPrayer): Boolean; overload;
Attempts to disable the specified prayer
or prayers
.
Example:
Prayer.DisablePrayer(ERSPrayer.PROTECT_FROM_MELEE);
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);
QuickPrayer.DeselectPrayer¶
function QuickPrayer.DeselectPrayer(QPrayer: ERSPrayer): Boolean;
function QuickPrayer.DeselectPrayer(QPrayers: array of ERSPrayer): Boolean; overload;
Attempts to Deselect the specified quick prayer/prayers.
Example:
QuickPrayers.DeselectPrayer(ERSPrayer.PROTECT_ITEM);
var QuickPrayer¶
Global QuickPrayer variable.
Prayer.Open() override¶
function TRSPrayer.Open: Boolean; override;
Overrides Prayer.Open to handle quick prayers if they are open.
Prayer.CanActivate() override¶
function TRSPrayer.CanActivate(Prayer: ERSPrayer): Boolean; override;
Overrides Prayer.CanActivate()
to handle quick prayers.
Prayer.GetAvailablePrayers() override¶
function TRSPrayer.GetAvailablePrayers(): array of ERSPrayer; override;
Overrides Prayer.GetAvailablePrayers()
to handle quick prayers.