Prayers

Group
player
Methods
16
Fields
None

Getting one

player:prayer()

Methods

MethodReturnsDescription
quickPrayersActive()booleanWhether quick prayers are switched on.
quickPrayersConfigured()booleanWhether any prayers are assigned to the quick-prayer slot.
prayerbook()Prayerbook?The active prayerbook.
active(){ string }Every prayer currently on, by display name.
isActive(Prayer | string)booleanWhether one prayer is on.
isAvailable(Prayer | string)booleanWhether the prayer is in the active book and its level and unlock requirements are met. Uses the boosted Prayer level inside LMS.
activate(Prayer | string)booleanSwitch a prayer on.
deactivate(Prayer | string)booleanSwitch a prayer off, when it is on.
flick({ Prayer | string })booleanFlick prayers: on ones are toggled off and back on, off ones are switched on, every press together in one game tick or not at all, joining…
offensivePrayers(AttackStyle){ string }The best available offensive set for an attack style, by display name, without causing any input.
activateOffensivePrayers(AttackStyle?)booleanSwitch on the best offensive set for an attack style.
deactivateOffensivePrayers()booleanSwitch off the offensive prayers that are on.
deactivateAllPrayers()booleanSwitch off every prayer that is on, or the quick-prayer orb when quick prayers are on.
activateQuickPrayers()booleanSwitch quick prayers on.
deactivateQuickPrayers()booleanSwitch quick prayers off.
flickQuickPrayers()booleanFlick quick prayers in one tick.

Returned by

MethodReturnsDescription
PlayerDomain.prayerPrayersPrayerbook, activation, flicking, and quick prayers.

Method details

active

active: (Prayers) -> { string }

Every prayer currently on, by display name.

isActive

isActive: (Prayers, Prayer | string) -> boolean

Whether one prayer is on.

Takes a Prayer constant (or a name); client:isPrayerActive(prayer) answers the same.

prayer
A Prayer constant or a prayer's name.

isAvailable

isAvailable: (Prayers, Prayer | string) -> boolean

Whether the prayer is in the active book and its level and unlock requirements are met. Uses the boosted Prayer level inside LMS.

prayer
A Prayer constant or a prayer's name.

activate

activate: (Prayers, Prayer | string) -> boolean

Switch a prayer on.

Does nothing when it is on, unavailable, or the live Prayer level is 0. To fall back to what the account has unlocked (Piety to Chivalry to the separate prayers), use activateOffensivePrayers(style). To toggle:

if prayer:isActive(p) then prayer:deactivate(p) else prayer:activate(p) end
prayer
A Prayer constant or a prayer's name.

deactivate

deactivate: (Prayers, Prayer | string) -> boolean

Switch a prayer off, when it is on.

deactivate(Prayer.PIETY) on an account without Piety answers false and leaves the fallback prayers on. deactivateOffensivePrayers(), the counterpart of activateOffensivePrayers(style), takes the fallbacks too (Piety not unlocked: Chivalry, else Ultimate Strength and Incredible Reflexes; Rigour: Deadeye or Eagle Eye; Augury: Mystic Vigour or Mystic Might).

prayer
A Prayer constant or a prayer's name.

flick

flick: (Prayers, { Prayer | string }) -> boolean

Flick prayers: on ones are toggled off and back on, off ones are switched on, every press together in one game tick or not at all, joining an open Actions.sameTick(). An inactive prayer the account cannot use is not pressed: activateOffensivePrayers(style) and deactivateOffensivePrayers() take the fallbacks. To flick the best offensive set:

prayer:flick(prayer:offensivePrayers(player:combat():currentAttackStyle()))
prayers
Prayer constants or names; duplicates are dropped.
Returns
false when the live Prayer level is 0.

offensivePrayers

offensivePrayers: (Prayers, AttackStyle) -> { string }

The best available offensive set for an attack style, by display name, without causing any input.

style
Attack style, e.g. AttackStyle.MELEE.

activateOffensivePrayers

activateOffensivePrayers: (Prayers, AttackStyle?) -> boolean

Switch on the best offensive set for an attack style.

style
Attack style, e.g. AttackStyle.MELEE; omit for the current one.
Returns
false when nothing was switched on, or the current style cannot be read.

deactivateAllPrayers

deactivateAllPrayers: (Prayers) -> boolean

Switch off every prayer that is on, or the quick-prayer orb when quick prayers are on.

activateQuickPrayers

activateQuickPrayers: (Prayers) -> boolean

Switch quick prayers on.

activateQuickPrayers() / deactivateQuickPrayers() ask for a state rather than a flip (quickPrayersActive() tells which).

flickQuickPrayers

flickQuickPrayers: (Prayers) -> boolean

Flick quick prayers in one tick.

Returns
false at zero prayer points, or when none are configured.