function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, item.itemid, 1) == TRUE then
local newexp = (getExperienceForLevel(getPlayerLevel(cid) + 1)) - getPlayerExperience(cid)
doPlayerAddExp(cid, newexp)
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, item.itemid, 1) == TRUE then
local newexp = (getExperienceForLevel(getPlayerLevel(cid) + 1)) - getPlayerExperience(cid)
doPlayerAddExp(cid, newexp)
doSendAnimatedText(getCreaturePosition(cid), "+" .. newexp, TEXTCOLOR_WHITE_EXP)
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local exp = 200000 -- how much exp do you want
local pos = getPlayerPosition(cid)
if getPlayerLevel(cid) >= 10 then
doPlayerAddExp(cid, exp)
doSendMagicEffect(pos, 37)
doRemoveItem(item.uid)
doCreatureSay(cid, "You Gained Exp", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, You are not level 10, TALKTYPE_ORANGE_1)
end
return TRUE
end