Guitar Freak
_LüA_n☺b_
Hey guys straight to the point, on all my manarunes I have the simple effect that it shows an animated text of the value it heals, this is the script:
However, its easy because the local value is already set to 8k~11k, but I wanted to make for example the spell "Exura" to show the value too, but with a value based on lvl/maglvl, not a set one, this is the script of Exura:
So my question is, how can I call this:
A "local" value so the animated text shows it when I heal? Ive tried some stuff but none works, Im sure a lot of ppl here knows better than me.
Im using TFS 0.2.
Thanks in advance.
~Guitar Freak
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(8000, 11000)
doPlayerAddMana(cid, mana)
doSendAnimatedText(getPlayerPosition(cid), '+' .. mana, TEXTCOLOR_YELLOW)
return doCombat(cid, combat, var)
end
However, its easy because the local value is already set to 8k~11k, but I wanted to make for example the spell "Exura" to show the value too, but with a value based on lvl/maglvl, not a set one, this is the script of Exura:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
[B]setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.08, 0, 0.33, 0)[/B]
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
So my question is, how can I call this:
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.08, 0, 0.33, 0)
A "local" value so the animated text shows it when I heal? Ive tried some stuff but none works, Im sure a lot of ppl here knows better than me.
Im using TFS 0.2.
Thanks in advance.
~Guitar Freak