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

problem making a condition that deals damage equal to caster's level

Ashtar

ShadowRealm.online
Joined
May 1, 2009
Messages
312
Reaction score
102
hey guys i need some help :s, i wanna make a condition that deals damage equals to the caster's level.

i have this condition

HTML:
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 combat2 = createCombatObject()

function onGetFormulaValues(cid, level, maglevel)

min = -(maglevel*1) -level/1
max = -(maglevel*1) -level/1

    return min, max
    end

setCombatCallback(combat2, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 10, 2000, -combat2)
setCombatCondition(combat, condition)

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

but it doesnt work, it deals random damage and idk why the damage keeps raising each time that i use it :S

please help

i will rep++ any help btw.

kind regards
ashtar
 
i want the drown condition to deal damage exactly to the caster's level like... If im the caster and i use the spell i and im level 250 for example then the drown would hit 250, if im level 251 it will hit 251.
Didnt I understand very well, you want to reduce the damage of the magic according to the level?
 
Last edited:
Back
Top