local config = {
maxlvl = 100000, -- Max level to use
storage = 2500, -- storage value assigned
lvlamount = 50000 -- how many levels you gain
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,config.storage) < 1 then
if not getPlayerLevel(cid) > config.maxlvl then
doPlayerAddLevel(cid,config.lvlamount)
doSendMagicEffect(getThingFromPos(cid),11)
doPlayerSendTextMessage(cid,20,'You gained '..config.lvlamount' levels!')
setPlayerStorageValue(cid,config.storage,1)
else
doPlayerSendtextMessage(cid,20,'You are too high level.')
doSendMagicEffect(getThingFromPos(cid),2)
end
else
doPlayerSendtextMessage(cid,20,'You may only use this once.')
doSendMagicEffect(getThingFromPos(cid),2)
end
return true
end