No edit summary |
Ning711200041546@legacy41561389 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
+ | {{wowapi}} |
||
− | = Darnassus = |
||
− | Who: [[Mathrengyl Bearwalker]]<br> |
||
− | Zone: [[Cenarion Enclave]]<br> |
||
− | City: [[Darnassus]]<br> |
||
− | Kingdom: [[Darnassus]]<br> |
||
+ | Determines whether a spell can be used by the player character. |
||
− | = Level Obtained = |
||
− | Level 50 |
||
+ | usable, nomana = IsUsableSpell("spellName" or spellID or spellIndex[, "bookType"]); |
||
− | = Level of Quest = |
||
− | Level 55 |
||
+ | ==Arguments== |
||
− | = Pre-Requisites = |
||
+ | ;spellName : String: name of the spell to check. |
||
− | [[Image:Alliance_15.gif]] [55] [[Quest:Morrowgrain Research (2)|Morrowgrain Research (2)]] |
||
+ | ;spellIndex : Number: index of a spell in the player's (or pet's) spellbook. |
||
+ | ;spellID : Number: SpellID of a spell to check. |
||
+ | ;bookType: String: does the spellIndex refer to the player's spellbook (BOOKTYPE_SPELL constant, default), or the pet's spellbook (BOOKTYPE_PET constant). |
||
+ | ==Returns== |
||
− | = Task = |
||
+ | ;usable :Boolean : 1 (true) if the spell is usable, nil otherwise. A spell is not usable if any of the following conditions apply: |
||
− | [[Mathrengyl Bearwalker]]: "The [[Fandral Staghelm|Arch Druid]] is always looking for additional [[morrowgrain]] for the [[Cenarion Circle]]'s continued research. We take them in increments of ten, and award you with a cache of goods you should find useful. When you have ten, let me know and I will reward you accordingly." |
||
+ | :* The player hasn't learned the spell |
||
+ | :* The player lacks required mana or reagents. |
||
+ | :* Reactive conditions haven't been met. |
||
+ | ;nomana : Boolean : 1 (true) if the spell can not be cast due to low mana, nil otherwise. |
||
+ | ==Example== |
||
− | Use an [[Evergreen Pouch]] with a [[Packet of Tharlendris Seeds]] and two [[Un'Goro Soil]] samples to try and cultivate samples of Morrowgrain. Bring 10 Morrowgrain to Mathrengyl Bearwalker in [[Darnassus]]. |
||
+ | usable, nomana = IsUsableSpell("Curse of Elements"); |
||
+ | if (not usable) then |
||
+ | if (not nomana) then |
||
+ | message("The spell cannot be cast"); |
||
+ | else |
||
+ | message("You do not have enough mana to cast the spell"); |
||
+ | end |
||
+ | else |
||
+ | message("The spell may be cast"); |
||
+ | end |
||
+ | usable, nomana = IsUsableSpell(20, BOOKTYPE_SPELL); |
||
− | = Completion = |
||
+ | print(GetSpellName(20, BOOKTYPE_SPELL) .. " is " .. (usable and "" or "not ") .. " usable."); |
||
− | [[Mathrengyl Bearwalker]]: "Excellent - this morrowgrain will no doubt please the Arch Druid. I must admit though... just being near them makes me feel a little uncomfortable. I can only imagine how difficult it is for the Arch Druid to tolerate them in such large numbers! This is for you. The Cenarion Circle thanks you for your continued support." |
||
− | |||
− | = Reward = |
||
− | [[Cenarion Circle Cache]]. |
||
− | |||
− | = Notes = |
||
− | This quest is repeatable, and is one of the best ways to get to Exalted with Darnassus. |
||
− | |||
− | ---- |
||
− | Go to [[Quests]] |
||
− | |||
− | [[Category:Quests]] |
||
− | [[Category:Quests:Alliance]] |
||
− | [[Category:City:Darnassus]] |
||
− | [[Category:Faction]] |
Revision as of 02:19, 14 October 2010
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Determines whether a spell can be used by the player character.
usable, nomana = IsUsableSpell("spellName" or spellID or spellIndex[, "bookType"]);
Arguments
- spellName
- String: name of the spell to check.
- spellIndex
- Number: index of a spell in the player's (or pet's) spellbook.
- spellID
- Number: SpellID of a spell to check.
- bookType
- String: does the spellIndex refer to the player's spellbook (BOOKTYPE_SPELL constant, default), or the pet's spellbook (BOOKTYPE_PET constant).
Returns
- usable
- Boolean : 1 (true) if the spell is usable, nil otherwise. A spell is not usable if any of the following conditions apply:
- The player hasn't learned the spell
- The player lacks required mana or reagents.
- Reactive conditions haven't been met.
- 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 cannot be cast"); else message("You do not have enough mana to cast the spell"); end else message("The spell may be cast"); end
usable, nomana = IsUsableSpell(20, BOOKTYPE_SPELL); print(GetSpellName(20, BOOKTYPE_SPELL) .. " is " .. (usable and "" or "not ") .. " usable.");