local cfg =
{
level = 20, ---minimum level
itemid = 7632,
newMana = 25 ---the amount of mana the mana booster will add to the character
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.itemid == cfg.itemid) then
if getPlayerLevel(cid) >= cfg.level and (isSorcerer(cid) or isDruid(cid) or isPaladin(cid) or isRookie(cid)) then
setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+cfg.newMana))
doSendAnimatedText(getCreaturePosition(cid), "Mana!",TEXTCOLOR_RED)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
doCreatureSay(cid, "You have recieved ".. cfg.newMana .." extra mana points, now your mana is ".. getCreatureMaxMana(cid) .."!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid, "Your level is not high enough or you are not a magician.")
end
return TRUE
end
end