Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cfg = {
- name = "Light Healing", -- Nome da Spell (Nome Clássico)
- vocs = {1, 5} -- Vocações que Podem Aprender
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- if isInArray(cfg.vocs, getPlayerVocation(cid)) then
- get = getPlayerLearnedInstantSpell(cid, cfg.name)
- if not get then
- doPlayerSendTextMessage(cid, "Congratulations, you have been learned "..cfg.name.." successfully.")
- doSendMagicEffect(getThingPos(cid), 12)
- doRemoveItem(item.uid)
- else
- doPlayerSendCancel(cid, "You already learned this spell.")
- end
- else
- doPlayerSendCancel(cid, "Sorry, but you don't have vocation to learn this spell.")
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement