• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Condition

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
978
Solutions
17
Reaction score
373
GitHub
olrios
Twitch
jamagowy
LUA:
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)
addDamageCondition(condition, "onGetFormulaValues")
setCombatCondition(combat, condition)
 
function onGetFormulaValues(cid, level, maglevel)
rounds = (getPlayerLevel(parameters.cid)/6)+4
time = 60000/(getPlayerMagLevel(parameters.cid)+30)
value = -(((getPlayerMagLevel(parameters.cid)+getPlayerLevel(parameters.cid))/4)+5)
	return rounds, time, value
end
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

This is a soulfire spell with own damage formula.
But this formula not works, dunno why
0.3.5
 
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, times to repeat, time between each dmg, -Dmg)
addDamageCondition(condition, 10, 1000, -500) --- after the first dmg it goes here.
setCombatCondition(combat, condition)

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