Package com.epicbot.api.shared.methods
Interface IMagicAPI
-
public interface IMagicAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canCast(Spell spell)
Returns whether or not the given spell can be cast.boolean
cast(Spell spell)
Selects the "Cast" menu action on the spell widget.boolean
cast(Spell spell, java.lang.String action)
Selects the given menu action on the spell widget.Spell
getAutoCastSpell()
Gets the selected auto casting spell.Spell.Book
getCurrentSpellBook()
Gets the currently active spell book.boolean
isSpellSelected()
Gets whether or not a spell is selected in the magic tab.boolean
setAutoCast(Spell spell, boolean defensive)
Sets the given spell to be auto casted.
-
-
-
Method Detail
-
isSpellSelected
boolean isSpellSelected()
Gets whether or not a spell is selected in the magic tab.- Returns:
- true if a spell is selected, false otherwise
-
getAutoCastSpell
Spell getAutoCastSpell()
Gets the selected auto casting spell.- Returns:
- the spell or null if no spell is selected to be auto casted
-
canCast
boolean canCast(Spell spell)
Returns whether or not the given spell can be cast.- Parameters:
spell
- the spell, e.g.Spell.Modern.WIND_STRIKE
- Returns:
- true if the spell can be cast, false otherwise
-
cast
boolean cast(Spell spell)
Selects the "Cast" menu action on the spell widget.- Parameters:
spell
- the spell- Returns:
- true if the spell was cast/selected, false otherwise
-
cast
boolean cast(Spell spell, java.lang.String action)
Selects the given menu action on the spell widget.- Parameters:
spell
- the spellaction
- the action- Returns:
- true if the spell was cast/selected, false otherwise
-
setAutoCast
boolean setAutoCast(Spell spell, boolean defensive)
Sets the given spell to be auto casted.- Parameters:
spell
- the spell to be auto casteddefensive
- whether to cast defensively- Returns:
- true if the spell was selected for auto cast successfully, false otherwise
-
getCurrentSpellBook
Spell.Book getCurrentSpellBook()
Gets the currently active spell book.- Returns:
- the spell book
-
-