Forkz
Well-Known Member
- Joined
- Jun 29, 2020
- Messages
- 419
- Solutions
- 1
- Reaction score
- 97
Hi otlanders,
How do I add an effect while the spell is active?
How do I add an effect while the spell is active?
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
local condition = Condition(CONDITION_REGENERATION)
condition:setParameter(CONDITION_PARAM_SUBID, 1)
condition:setParameter(CONDITION_PARAM_BUFF_SPELL, 1)
condition:setParameter(CONDITION_PARAM_TICKS, 1 * 60 * 1000)
condition:setParameter(CONDITION_PARAM_HEALTHGAIN, 800)
condition:setParameter(CONDITION_PARAM_HEALTHTICKS, 1000)
combat:addCondition(condition)
function onCastSpell(creature, var)
return combat:execute(creature, var)
end