Hello. Here is my mana rune script (this is my first script ^^):
1. Make new file called mana rune.lua in spells/scripts/healing.
2. Add to your spells.xml:
3. Open items.xml. Add this before </items>:
4. Voila! You can set minimum and maximum healing mana, just replace this:
with this:
example:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 10, 12, 100, 100000)
1. Make new file called mana rune.lua in spells/scripts/healing.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 10, 12)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
2. Add to your spells.xml:
Code:
<rune name="Mana Rune" id="2280" allowfaruse="1" charges="1" lvl="16" maglv="1" exhaustion="1000" aggressive="0" needtarget="1" blocktype="solid" event="script" value="healing/mana rune.lua"/>
3. Open items.xml. Add this before </items>:
Code:
<item id="2280" override="yes" article="a" name="mana rune">
<attribute key="runeSpellName" value="adura mas vita" />
<attribute key="weight" value="120" />
<attribute key="charges" value="1" />
</item>
Code:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 10, 12)
Code:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, min, max)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 3, 3, 10, 12, 100, 100000)