Untitled

mail@pastecode.io avatar
unknown
plain_text
9 days ago
506 B
0
Indexable
Never
local spell = "quepasa"
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
Leave a Comment