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

How i can make the sd hit depends on player level?

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
Hi all,

As the title says how i make the suddendeath rune depends on player level? its now like this

PHP:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, 0, 0, 0, 0)

i dont know how but should it be like this?
PHP:
setCombatFormula(combat, COMBAT_FORMULA_LEVEL, -0, -0, -0, -0, 0, 0, 0, 0)
 
well you can remove the set combat formula becuz it is hard to understant its formula and use a easy one like that
LUA:
function onGetFormulaValues(cid, level, skill, attack, factor)
	local min, max= level, level+5
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
 
can someone tell me how to edit the sd script with the function @up?


PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, 0, 0, 0, 0)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
just remove the line below with the code i posted and try
LUA:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -0, -0, -0, -0, 0, 0, 0, 0)
 
Back
Top