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

SD / UH problems!

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Reaction score
9
Location
Sweden
Hi!

I am having problems with my SD and UH as u see.
The problem is... that my sd do 5k-6k every time, and the character I use it with is lvl 433 and mlvl 148 (a Sorc)
As I have counted with this forumlar: (-1.5 * 148)+(-1.8 * 433) = -222-779.4 = -1001,4

so I should do around 1k dmg, so, do anyone know why I do 5k as well how to fix it?
Code:
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, -1.5, -20, -1.8, 0)

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

Then we have my UH, which I have another problem...
This case the uh heals normal for Sorcs, but for knights it does lower than ever...
The warrior who use this script is lvl 382 with mlvl 8, and he does around 3xx-5xx while the sorc (see above for lvl / mlvl) do 1.5k - 2k.

This is the UH script:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5.0, 10, 10.0, 20)

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

Questions & Answears I alredy done list:
Code:
Q: try to change sd/uh dmg/healing formular?
A: I have done that, SD results: EXACLY the same even if I changed it
   UH could I change the healing amount for the knight, to do 1.5k-2k healing but 
   the sorc did 15k-25k healing -.-'

Q: Use search function?
A: If that didn't answear my question? 

Q: Did you use the formular right?
A: Yes, I belive so, example, if the formular looks like this:
   1.5, 20, 1.6, 0
   (1.5 * mlvl/skill) + (1.6 * LVL) + 20
   If this isn't the right way to use it, please explain how to use it!
 
for your uh

Lua:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5.0, 10, 10.0, 20)

it uses magic level not level set it to something like this formula

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)


function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*2 + maglv*5) * 1.3)
	local formula_max = ((lv*2 + maglv*8) * 1.5)

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")

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

change the settings for that to get your healing spell how you want it
 
Code:
set[Attack/Healing]Formula(combat, formulaType, minl, maxl, minm, maxm)
This is how it works:
Code:
min = level / minl + maglvl * minm
max = level / maxl + maglvl * maxm
:D
 
Last edited:
for your uh

Lua:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5.0, 10, 10.0, 20)

it uses magic level not level set it to something like this formula

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)


function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*2 + maglv*5) * 1.3)
	local formula_max = ((lv*2 + maglv*8) * 1.5)

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")

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

change the settings for that to get your healing spell how you want it

I shall try this as fast as I get my server up and going again :D

Code:
set[Combat/Healing]Formula(combat, formulaType, minl, maxl, minm, maxm)
This is how it works:
Code:
min = level / minl + maglvl * minm
max = level / maxl + maglvl * maxm
:D

Okey.... ehm, I am a bit stupid when it's about this but, let's see if I understand it correct: say that lvl = 100 and mag lvl 50. So it should look like this
min = lvl(100) / minl(2.0) + maglvl(50) * 2.0
which is: 50 + 100 = 150
so the minimum heal is 150

max = lvl(100) / maxl(1.0) + maglvl(50) * 4.0
which is 100 + 200 = 300
so the maximum heal is 300

and the formula is then:
set[Combat/Healing]Formula(combat, formulaType, 2.0, 1.0, 2.0, 4.0)

Please correct me if I am wrong :D
 
Okey.... ehm, I am a bit stupid when it's about this but, let's see if I understand it correct: say that lvl = 100 and mag lvl 50. So it should look like this
min = lvl(100) / minl(2.0) + maglvl(50) * 2.0
which is: 50 + 100 = 150
so the minimum heal is 150

max = lvl(100) / maxl(1.0) + maglvl(50) * 4.0
which is 100 + 200 = 300
so the maximum heal is 300

and the formula is then:
set[Combat/Healing]Formula(combat, formulaType, 2.0, 1.0, 2.0, 4.0)

Please correct me if I am wrong :D
That's about it, :p
 

Similar threads

Back
Top