I want to check what spell words the player is using, then set a storage value based on the spellStats table.
Mystic Spirit 0.2.15
This is what I have so far:
Mystic Spirit 0.2.15
This is what I have so far:
Code:
spellStats =
{
["fire"] = { LVL = 1},
["ice"] = { LVL = 1}
}
function onCastSpell(cid, var)
local spellwords = ????
local spellName = spellStats[spellwords:lower()]
if spellwords == spellName then
setPlayerStorageValue(cid, 10000, spellName.LVL)
return true
else
return false
end
end