Package rsb.methods
Class Prayer
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Prayer
Prayer related operations.
- Author:
- GigiaJ
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods
-
Method Summary
Modifier and TypeMethodDescriptionboolean
activatePrayer
(GlobalWidgetId.Prayer prayer, boolean activate) Activates/deactivates a prayer via interfaces.boolean
activateQuickPrayer
(boolean activate) Activates/deactivates quick prayers via interfaces.int
Gets the remaining prayer points.int
Gets the percentage of prayer points left based on the players current prayer level.RSWidget[]
Returns an array of RSWidgets representing the prayers that are selected.boolean
isPrayerOn
(GlobalWidgetId.Prayer prayer) Returns true if designated prayer is turned on.boolean
Returns true if the quick prayer interface has been used to activate prayers.boolean
setQuickPrayers
(boolean unsetPrevious, GlobalWidgetId.Prayer... prayers) Sets up the quick prayers for the user
-
Method Details
-
isPrayerOn
Returns true if designated prayer is turned on.- Parameters:
prayer
- The prayer to check.- Returns:
true
if enabled; otherwisefalse
.
-
isQuickPrayerOn
public boolean isQuickPrayerOn()Returns true if the quick prayer interface has been used to activate prayers.- Returns:
true
if quick prayer is on; otherwisefalse
.
-
activatePrayer
Activates/deactivates a prayer via interfaces.- Parameters:
prayer
- The prayer to activate.activate
-true
to activate;false
to deactivate.- Returns:
true
if the interface was clicked; otherwisefalse
.
-
activateQuickPrayer
public boolean activateQuickPrayer(boolean activate) Activates/deactivates quick prayers via interfaces.- Parameters:
activate
-true
to activate;false
to deactivate.- Returns:
true
if the interface was clicked; otherwisefalse
.
-
setQuickPrayers
Sets up the quick prayers for the user- Parameters:
unsetPrevious
- whether the previous quick prayers should be unsetprayers
- the prayers to activate with quick prayers- Returns:
True
unless unable to access the interface
-
getSelectedPrayers
Returns an array of RSWidgets representing the prayers that are selected.- Returns:
- An
RSWidget
array containing all the components that represent selected prayers.
-
getPrayerLeft
public int getPrayerLeft()Gets the remaining prayer points.- Returns:
- The number of prayer points left.
-
getPrayerPercentLeft
public int getPrayerPercentLeft()Gets the percentage of prayer points left based on the players current prayer level.- Returns:
- The percentage of prayer points left.
-