function onUse(cid, item, fromPosition, itemEx, toPosition)
local cfg = {
max = 100, -- Max Level
exp = 5000,
remove = "yes" -- "yes" or "no"
}
cfg.remove = getBooleanFromString(cfg.remove)
if getPlayerLevel(cid) < cfg.max then
if cfg.remove then
doRemoveItem(item.uid, 1)
return true
end
else
doPlayerSendCancel(cid, "Sorry, not possible.")
end
return doPlayerAddExperience(cid, cfg.exp) and doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
end