Can some1 be kind enough to fix the exhuast on this manarune script please?
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
vocids = {1,2,5,6}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 0.33) + (mlevel * 1.4) + 575
local mana_maximum = (level * 0.4) + (mlevel * 1.6) + 600
local mana_add = math.random(mana_minimum, mana_maximum)
if isInArray(vocids, getPlayerVocation(cid)) == true then
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
return TRUE
else
doCreatureSay(itemEx.uid, "Only Sorcerers and Druids can use this ManaRune...", TALKTYPE_ORANGE_1)
end
end
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
vocids = {1,2,5,6}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 0.33) + (mlevel * 1.4) + 575
local mana_maximum = (level * 0.4) + (mlevel * 1.6) + 600
local mana_add = math.random(mana_minimum, mana_maximum)
if isInArray(vocids, getPlayerVocation(cid)) == true then
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
return TRUE
else
doCreatureSay(itemEx.uid, "Only Sorcerers and Druids can use this ManaRune...", TALKTYPE_ORANGE_1)
end
end