Delconis
Software Engineer
- Joined
- Apr 3, 2008
- Messages
- 96
- Reaction score
- 3
Here is a mana rune I made. I don't believe it exhaust rune use.
add to data/actions/actions.xml
data/actions/custom/mana rune.lua
If this helps you at all please Rep++
add to data/actions/actions.xml
Code:
<action itemid="manaruneid here" event="script" value="custom/mana rune.lua" allowfaruse="1"/>
data/actions/custom/mana rune.lua
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 1) + (mlevel * 1) - 50
local mana_maximum = (level * 1.2) + (mlevel * 1)
local mana_add = math.random(mana_minimum, mana_maximum)
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveitem(item.uid)
return TRUE
end
If this helps you at all please Rep++
Last edited: