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

Damage over time spell?

Fumobix

New Member
Joined
Sep 6, 2007
Messages
154
Reaction score
0
Is there a possible way to do a DOT attack like soulfire rune but with maglevel as the damage factor?

tried this but didnt worked Event onCastSpell not Found
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
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)
function onGetFormulaValues(cid, level, maglevel, attack, factor)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -((maglevel) + 5))
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
end
 
Code:
local combat = {}
for i = 7, 150 do
	combat[i] = createCombatObject()
	setCombatParam(combat[i], COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
	setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
	setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
	local condition = createConditionObject(CONDITION_FIRE)
	setConditionParam(condition, CONDITION_PARAM_DELAYED, true)
	addDamageCondition(condition, 10, 2000, -(i + 5))
	setCombatCondition(combat[i], condition)
end

function onCastSpell(cid, var)
	return doCombat(cid, combat[getPlayerMagLevel(cid)], var)
end
 
:D What is your magic level

oh it seems as the gm cannot cast it or something similar :p couldnt do it neither at mlvl 0 or 1 but on a normal player its alright it seems

Thanks you very much
PD: I cannot give u rep atm cus i need to spread more before doing it again sorry
 
Back
Top