I need help with my script that gives the character a spell. I need this item to only be usable by sorcerers. Help? TFS 0.2
Script
Script
Code:
local spell = 'Mega Vis'
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLearnedInstantSpell(cid, spell) == FALSE then
playerLearnInstantSpell(cid, spell)
doCreatureSay(cid, 'You have learned the spell ' .. spell .. '.', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, 'You have already know this spell.')
end
end
return TRUE
end