Someone could add Health in this script,as spirit potion:
LUA:
local config = {
mana = {200, 300},
vocations = {1, 2, 5, 6},
vocStr = "sorcerers and druids",
level = 80,
effect = {1, 50} -- number or a table with 2 numbers which will act as a random range
}
local exhaust = createConditionObject(CONDITION_EXHAUST or CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))
function onUse(cid, item, fromPosition, itemEx, interval, lastexecution)
local tid = itemEx.uid or cid
if(isPlayer(tid) == FALSE) then
return FALSE
elseif(isInArray(config.vocations, getPlayerVocation(cid)) == FALSE or getPlayerLevel(cid) < config.level) then
doCreatureSay(cid, "Only " .. config.vocStr .. " of level " .. config.level .. " or above can use this mana rune.", TALKTYPE_ORANGE_1)
return TRUE
elseif(doPlayerAddMana(tid, math.random(mana[1], mana[2])) == LUA_ERROR) then
return FALSE
end
doAddCondition(cid, exhaust)
doCreatureSay(tid, "Ahh, manarune rocks!", TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, type(config.effect) == "table" and math.random(config.effect[1], config.effect[2]) or config.effect)
return TRUE
end