Package rsb.methods

Class Prayer


public class Prayer extends MethodProvider
Prayer related operations.
Author:
GigiaJ
  • Method Details

    • isPrayerOn

      public boolean isPrayerOn(GlobalWidgetId.Prayer prayer)
      Returns true if designated prayer is turned on.
      Parameters:
      prayer - The prayer to check.
      Returns:
      true if enabled; otherwise false.
    • isQuickPrayerOn

      public boolean isQuickPrayerOn()
      Returns true if the quick prayer interface has been used to activate prayers.
      Returns:
      true if quick prayer is on; otherwise false.
    • activatePrayer

      public boolean activatePrayer(GlobalWidgetId.Prayer prayer, boolean activate)
      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; otherwise false.
    • 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; otherwise false.
    • setQuickPrayers

      public boolean setQuickPrayers(boolean unsetPrevious, GlobalWidgetId.Prayer... prayers)
      Sets up the quick prayers for the user
      Parameters:
      unsetPrevious - whether the previous quick prayers should be unset
      prayers - the prayers to activate with quick prayers
      Returns:
      True unless unable to access the interface
    • getSelectedPrayers

      public RSWidget[] 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.