Malakar35877@legacy41555941 (talk | contribs) m (Added failure condition) |
Xelepart70006@legacy41588824 (talk | contribs) m (Correction for function input.) |
||
Line 6: | Line 6: | ||
;''Arguments'' |
;''Arguments'' |
||
− | :;''SPELL'' : A spell name |
+ | :;''SPELL'' : A spell name. Don't try to use a spellID. |
---- |
---- |
Revision as of 22:44, 20 February 2007
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
usable, nomana = IsUsableSpell(SPELL);
- Arguments
- SPELL
- A spell name. Don't try to use a spellID.
- Returns
- usable
-
- Boolean
- 1 (true) if the spell is usable, nil otherwise.
- nomana
-
- Boolean
- 1 (true) if the spell can not be cast due to low mana, nil otherwise.
- Example
usable, nomana = IsUsableSpell("Curse of Elements") if (not usable) then if (not nomana) then message("The spell can not be cast"); else message("You do not have enough mana to cast the spell"); end else message("The spell may be cast"); end
- Conditions for Failure
* Spell is not in spellbook * Not enough mana to cast spell * Reagents required for spell do not exist in bags * Reactive skill conditions have not been met