local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 2000))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 2.9) + (mlevel * 1) - 50
local mana_maximum = (level * 5.0) + (mlevel * 1)
local mana_add = math.random(mana_minimum, mana_maximum)
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_STUN)
return TRUE
end
<action itemid="2294" event="script" value="manarune1.lua" allowfaruse="1"/>
Not used 'exhaust' code at start of code? Remove it. Keep posts of forum as clean as you can,.lua :
Code:local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 2000)) function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) local mlevel = getPlayerMagLevel(cid) local mana_minimum = (level * 2.9) + (mlevel * 1) - 50 local mana_maximum = (level * 5.0) + (mlevel * 1) local mana_add = math.random(mana_minimum, mana_maximum) doPlayerAddMana(cid, mana_add) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_STUN) return TRUE end
actions.xml :
Code:<action itemid="2294" event="script" value="manarune1.lua" allowfaruse="1"/>
I use this one, it's kinda modified by me but you can adjust it yourself.
I didn't know I just got it from someone :dNot used 'exhaust' code at start of code? Remove it. Keep posts of forum as clean as you can,
if getCreatureCondition(cid, CONDITION_EXHAUST) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end
I love seeing this, getting help, helping back. <3, We need more of this in the community..lua :
Code:local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 2000)) function onUse(cid, item, fromPosition, itemEx, toPosition) local level = getPlayerLevel(cid) local mlevel = getPlayerMagLevel(cid) local mana_minimum = (level * 2.9) + (mlevel * 1) - 50 local mana_maximum = (level * 5.0) + (mlevel * 1) local mana_add = math.random(mana_minimum, mana_maximum) doPlayerAddMana(cid, mana_add) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_STUN) return TRUE end
actions.xml :
Code:<action itemid="2294" event="script" value="manarune1.lua" allowfaruse="1"/>
I use this one, it's kinda modified by me but you can adjust it yourself.