Here is my code;
The spell only works outside protection zone, I mean I can easily cast it inside PZ but it will not heal the player, only when they walk outside the PZ. Help greatly appreciated
TFS 1.0
Edit -
The same thing happens when the player consumes any type of food, I am not sure whether that is intentional
XML:
<instant group="healing" name="Regeneration" words="Regeneration" lvl="0" mana="0" prem="0" aggressive="0" selftarget="1" exhaustion="2000" groupcooldown="1000" needlearn="0" script="healing/reg.lua">
<vocation name="Master Sorcerer"/>
<vocation name="Elder Druid"/>
</instant>
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, 200)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 2000)
setCombatCondition(combat, condition)
function onGetFormulaValues(cid, level, maglevel)
min = ((level / 5) + (maglevel * 3.2) + 20)
max = ((level / 5) + (maglevel * 5.4) + 40)
return min, max
end
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
The spell only works outside protection zone, I mean I can easily cast it inside PZ but it will not heal the player, only when they walk outside the PZ. Help greatly appreciated
TFS 1.0
Edit -
The same thing happens when the player consumes any type of food, I am not sure whether that is intentional
Last edited: