Hey everyone! I'm trying to make a damage over time spell for my OT but I'm at a bit of a standstill. Basically I want the spell to do no initial damage, only create an effect that does damage over time (based on players magic level).
This is what I have so far.
I don't want the -100 to be a fixed value, I'd rather calculate the damage done every tick based on how normal spells on OT's are calculated... I'm just not entirely sure how to do that.
Thanks in advance.
This is what I have so far.
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -100)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
I don't want the -100 to be a fixed value, I'd rather calculate the damage done every tick based on how normal spells on OT's are calculated... I'm just not entirely sure how to do that.
Thanks in advance.