• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Need help with mana rune.

Use exhaustion condition instead of spell exhaust.
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 950)

Code:
doAddCondition(cid, exhaust)

You can also add the mana rune in actions with doPlayerAddMana, instead of using maglv and lv parameters from the function, use getPlayerLevel(cid) and getPlayerMagLevel(cid) in the calculation.
Then you can use
Code:
doPlayerAddMana(cid, math.random(formula_min, formula_max))

Or add it as an extra potion in potions.lua in actions.
 
Spell exhaust is the exhaustion in spells.xml, you can add the condition at the top, then add doAddCondition under function onCastSpell.
 
Then you should add it in actions, if you don't want any exhaust with other spells/runes.
You can change it like I said in the first post, but you can also just add the rune in potions.lua, then it will work exactly like potions.
 
Back
Top