After using the item,why it doesn't dissapear? The problem is,you get the item,click on it,YOU RECEIVE THE SPELL,but the book is not gone,after you click again on it it says "You already know this spell" and then it's gone,but I want so it dissapears at the first use,not second...
Code:
local spell = "Super Exori"
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not getPlayerLearnedInstantSpell(cid, spell) then
doPlayerLearnInstantSpell(cid, spell)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned spell " .. spell .. "!")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
else
doCreatureSay(cid, "You already know this spell!", TALKTYPE_ORANGE_1, nil, cid, getThingPos(cid))
doPlayerRemoveItem(cid, 1985, 1)
end
return true
end
Code:
<action itemid="1985" event="script" value="ek1.lua"/>
Last edited: