Package rs.kreme.ksbot.api.game
Class Prayer
- java.lang.Object
-
- rs.kreme.ksbot.api.game.Prayer
-
public class Prayer extends java.lang.Object
This class handles the player's prayer functionality, allowing for enabling/disabling specific prayers, checking prayer status, and retrieving the current prayer points.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Prayer.Prayerbook
Enum representing the different prayer books.static class
Prayer.Prayers
-
Constructor Summary
Constructors Constructor Description Prayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Prayer.Prayers
bestMagicPrayer()
Determines the best magic prayer available to the player based on their Prayer and Defence levels and unlock status of Augury.Prayer.Prayers
bestRangedPrayer()
Determines the best ranged prayer available to the player based on their Prayer and Defence levels and unlock status of Rigour.Prayer.Prayers
bestStrengthPrayer()
Determines the best strength prayer available to the player based on their Prayer and Defence levels and unlock status of Chivalry and Piety.void
disable(Prayer.Prayers... prayers)
Disables the provided prayers, ensuring that they are not already disabled.void
disableAll()
void
enable(Prayer.Prayers... prayers)
Enables the provided prayers, ensuring that they are not already enabled.int
getPercentLeft()
Gets the player's current prayer points percentage.int
getPoints()
Gets the player's current prayer points.boolean
isEnabled(Prayer.Prayers prayer)
Checks if a specific prayer is currently enabled.void
quickPrayer(boolean enable)
Toggles the Quick Prayer functionality based on the specified state.
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled(Prayer.Prayers prayer)
Checks if a specific prayer is currently enabled.- Parameters:
prayer
- The prayer to check.- Returns:
- True if enabled, false otherwise.
-
enable
public void enable(Prayer.Prayers... prayers)
Enables the provided prayers, ensuring that they are not already enabled. If the prayer points are 0, no action is taken.- Parameters:
prayers
- The prayers to enable.
-
disable
public void disable(Prayer.Prayers... prayers)
Disables the provided prayers, ensuring that they are not already disabled.- Parameters:
prayers
- The prayers to disable.
-
disableAll
public void disableAll()
-
getPoints
public int getPoints()
Gets the player's current prayer points.- Returns:
- The current prayer points.
-
getPercentLeft
public int getPercentLeft()
Gets the player's current prayer points percentage.- Returns:
- The current prayer points percentage.
-
quickPrayer
public void quickPrayer(boolean enable)
Toggles the Quick Prayer functionality based on the specified state.- Parameters:
enable
- - If true, enables Quick Prayer; if false, disables it.
-
bestRangedPrayer
public Prayer.Prayers bestRangedPrayer()
Determines the best ranged prayer available to the player based on their Prayer and Defence levels and unlock status of Rigour.- Returns:
- the best ranged prayer, or null if no suitable prayer is available.
-
bestStrengthPrayer
public Prayer.Prayers bestStrengthPrayer()
Determines the best strength prayer available to the player based on their Prayer and Defence levels and unlock status of Chivalry and Piety.- Returns:
- the best strength prayer, or null if no suitable prayer is available.
-
bestMagicPrayer
public Prayer.Prayers bestMagicPrayer()
Determines the best magic prayer available to the player based on their Prayer and Defence levels and unlock status of Augury.- Returns:
- the best magic prayer, or null if no suitable prayer is available.
-
-