Tibera Fan
New Member
- Joined
- May 9, 2010
- Messages
- 6
- Reaction score
- 0
Is it possible to make a spell heal what u have [Maxhealth] (mana and health) ?
Thanks for help REP++ ofc
Thanks for help REP++ ofc
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)
setCombatCallback(CALLBACK_PARAM_LEVELMAGICVALUE, combat, "getFormula")
function getFormula(cid)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
return 1, 1
end
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
I'm decent sure this would work, for TFS 0.3.6:
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) setCombatCallback(CALLBACK_PARAM_LEVELMAGICVALUE, combat, "getFormula") function getFormula(cid) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) [COLOR=red] return 1, 1[/COLOR] end function onCastSpell(cid, var) return doCombat(cid, combat, var) end