• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Spell Scroll

Gazzy

Server Owner
Joined
Sep 25, 2013
Messages
55
Reaction score
3
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
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
 
Code:
local spell = 'Mega Vis'

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLearnedInstantSpell(cid, spell) == FALSE and isSorcerer(cid) 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
 
Back
Top