Package com.kraken.api.service.spell
Class SpellService
- java.lang.Object
-
- com.kraken.api.service.spell.SpellService
-
public class SpellService extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SpellService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancast(Spells spell)Clicks on a spell in the spellbook.SpellbookgetCurrentSpellbook()Get the current active spellbookbooleanhasRequiredRunes(Spells spell)Returns true if the player has the required runes to cast the given spell.
-
-
-
Method Detail
-
cast
public boolean cast(Spells spell)
Clicks on a spell in the spellbook. This method checks the following conditions before casting a spell: 1. Player is on the right spellbook 2. Player has the magic level required to cast the spell 3. Player has the required runes to cast the spell 4. Player has the required prayer to cast the spell (if applicable)- Parameters:
spell- The spell to be clicked.- Returns:
- True if the cast was successful and false otherwise
-
hasRequiredRunes
public boolean hasRequiredRunes(Spells spell)
Returns true if the player has the required runes to cast the given spell. This method checks both the inventory and the rune pouch for the required runes.- Parameters:
spell- The spell to check for required runes.- Returns:
- true if the player has all required runes, false otherwise.
-
getCurrentSpellbook
public Spellbook getCurrentSpellbook()
Get the current active spellbook- Returns:
- The currently active Spellbook
-
-