new amiroslo
New Member
- Joined
- Jun 3, 2011
- Messages
- 29
- Reaction score
- 0
I want that when u use this script u learn the spell and then the ID OF XXX dissapers and u learned the spell, and if u try to use it aggain it says u already learned this spell, or u cant learn it twice
Code:
local spell = "Donation Spell"
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))
end
return true
end