local t = {
[29001] = {"Light Healing"},
[29002] = {"Haste"},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
[290] = {""},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.actionid]
if v then
if getPlayerLearnedInstantSpell(cid, v[1]) then
return doPlayerSendCancel(cid, "You already know this spell."), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF), false
end
doPlayerLearnInstantSpell(cid, v[1])
doSendMagicEffect(getThingPos(cid), CONST_ME_WRAPS)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You learned the spell " .. v[1] ..".")
end
return true
end