Hello i need a Book that well giv 500 more mana to player from Book ID: 2347 (Something like rebirths,I dont want to it add mana like runes "Addplayermana" nothing like that)
https://i.imgur.com/73jUEUW.png
https://i.imgur.com/73jUEUW.png
local cfg =
{
level = 25,
itemid = xxxx,
newMana = 500
}
local storage = 14580
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.itemid == cfg.itemid)then
if getPlayerLevel(cid) >= cfg.level then
if getPlayerStorageValue(cid, storage) == -1 then
setCreatureMaxMana(cid, (getCreatureMaxMana(cid)+cfg.newMana))
setPlayerStorageValue(cid, storage, 1)
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, "You have already used this before.")
end
else
doPlayerSendCancel(cid, "Your level is not high enough.")
end
return TRUE
end
end