• 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!

Mana rune problems.

zinxiin

New Member
Joined
Jun 30, 2009
Messages
2
Reaction score
0
Ok well this is what I have so far, I need to know how to make my mana rune unlimited, it's not acting like a rune at all, every other rune is unlimited. If someone could take a look at this and tell me whats wrong or what I should add that would be quite helpful, thank you.

This is in my actions.xml without the quotations.
Code:
<action itemid="2270" script="manarune.lua"/>

then this in my action/scripts labelled as manarune.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(400, 500)
    doPlayerAddMana(cid, mana)
    --doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)
end

Then this in my spells.xml

Code:
rune name="Mana rune" id="2270" aggressive="0" charges="100" needtarget="1" maglv="1" exhaustion="1" enabled="1" allowfaruse="1" script="support/manarune.lua"/>

Then this in my spells/scripts/support labelled as manarune.lua

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function onCastSpell(cid, var)
    local mana = math.random(400, 500)
    doPlayerAddMana(cid, mana)
    --doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_GOLD)
    return doCombat(cid, combat, var)
end
 
Back
Top