• 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!

Lua Damage over time?

Mc Lovin

Member
Joined
Apr 25, 2009
Messages
264
Reaction score
12
How can I make a spell give the target a poisoned effect that does specific damage every certain amount of seconds for an amount of time?
 
Soul Fire - Fire Damage
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
[COLOR="blue"]setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)[/COLOR]

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
[COLOR="red"][B]addDamageCondition(condition, 10, 2000, -10)[/B][/COLOR]
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

These number's in red are how long, how many times, etc...
 
Back
Top