local cfg = {
max = 100, -- Maximum Level to Use
add = 10 -- Levels to Add
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerLevel(cid) < cfg.max)then
doPlayerAddExperience(cid, getExperienceForLevel(getPlayerLevel(cid)) + cfg.add)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have recieved ".. cfg.add .." levels.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
doRemoveItem(item.uid)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have exceeeded the max level to use this.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return true
end