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.
then this in my action/scripts labelled as manarune.lua
Then this in my spells.xml
Then this in my spells/scripts/support labelled as manarune.lua
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