local config = {
exp = 30000,
voc = {1,2,5,6},
level = 100,
words = "Exp!",
itemID = 6119
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVocation(cid) == config.voc then
if getPlayerLevel(cid) <= config.level then
doPlayerAddExp(cid, config.exp)
doCreatureSay(cid, config.words, 18)
doRemoveItem(cid, config.itemID, 1)
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_YELLOW)
else
doPlayerSendCancel(cid, "Sorry, you need to be lower than level "..config.level..".")
end
else
doPlayerSendCancel(cid, "Only mages can use this scroll.")
end
return TRUE
end