Mjmackan
Mapper ~ Writer
Hello i have a problem with this script below, i recently found a good working mana rune and made it to heal health also (like great spirit potion) but only the mana shows when using.
If i put:
below the mana, the health only shows. Have also been looking around in potions.lua since spirit potions both shows health and mana but couldn't find anything there.
Rep for help.
If i put:
LUA:
doCreatureAddHealth(cid, health_add)
LUA:
local exhaust = createConditionObject(CONDITION_EXHAUST)
local config = {
level = 200000
}
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local health_minimum = (level * 2.9) - 50
local health_maximum = (level * 3.4)
local health_add = math.random(health_minimum, health_maximum)
local mana_minimum = (level * 2.9) - 50
local mana_maximum = (level * 3.4)
local mana_add = math.random(mana_minimum, mana_maximum)
if getPlayerLevel(cid) >= config.level and getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
doCreatureAddHealth(cid, health_add)
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "[Spirit rune]", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "You need to be at least level 200.000 to use this rune. Only paladins can use this rune.")
return TRUE
end
end
Rep for help.
Last edited: