• 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 Help with sudden death rune

Xerez

New Member
Joined
Mar 6, 2008
Messages
45
Reaction score
0
Hi, this is my SD rune config..

Code:
local combat = createCombatObject()
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.9, -30, -1.8, 0)

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

I know I can change the damage with -0.9 by changing it, but I want to change what it depends on, LEVEL/MAGIC LEVEL.

In other scripts I can find this:
Code:
function onGetFormulaValues(cid, level, maglevel)
	min = (level * 3 + maglevel * 1) * 1.8
	max = (level * 3 + maglevel * 1) * 2.3
	if min < 250 then
		min = 250
	end
	return min, max
end

Here I can change if it depends on level or magic level more or less. But how can I do that to the sudden death rune? THanks!!
 
Your second script correspond to ultimate healing rune.
Go to the 5th line of your first script.
Code:
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.3, -30, -1.8, 0)
-1.3 = Level * 1.3
-1.8 = Magic level * 1.8
-30 = The damage may vary 30, if it normaly does 200 damage then the new damage may be between 170 and 230. (If 200 is the regular damage, then if you put 30 you give the posibility to vary +30 or -30)

Hope I helped.
 
Back
Top