• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Request/Help]Damage over Time Spell

Liljon

New Member
Joined
Jun 2, 2008
Messages
9
Reaction score
0
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.

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.
 
Back
Top