• 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 spell - exura san

Gomn

Universe OTS is commin...
Joined
Feb 21, 2010
Messages
102
Reaction score
1
Location
Dungannon
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)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 6, 5, 18.5, 25)

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

I want paladin on lvl 100 heal 700 hp +/-, and on lvl 200 1400 +/-.

Code:
set[Attack/Healing]Formula(combat, formulaType, minl, maxl, minm, maxm)

min = level / minl + maglvl * minm
max = level / maxl + maglvl * maxm

I know i need to use this formula. Many people tried to explain how it works to me and I still dont get it. So please help :)

PS. it should not be based on magic level (if possible)
 
Last edited:
nope :(

edit.
Is this right?
Lua:
100 / 6 + 25 * 18.5  = 770.8
200 / 5 + 25 * 25    = 1625

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)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 770.8, 1625, 18.5, 25)
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

i will check it and edit
 
Last edited:
Lua:
min = level / 6 + maglvl * 18.5
means that minimum healing is = Your level divided by 6 , the result + your magic level X 18,5 = so much you heal.

Example: If your a level 600 with 20 ml you heal 470 (LEVEL>600/6 = 100 + ML>20 X 18,5 = 470)
And if you are same level with the "max" you heal 620 (LEVEL>600/5 =120 + ML>20 X 25 = 620)

so maximum healing is
Lua:
max = level / 5 + maglvl * 25
So with this:
Lua:
min = level / 6 + maglvl * 18.5
max = level / 5 + maglvl * 25

a level 600 with 20 ML would heal minimum: 470 and maximum : 620
so it will heal randomly between 470-620

Got it now? :)
 
Hopefuly:
thats what i got now, ill go and check it.
local combat = createCombatObject()
Lua:
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)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 41.6, 21.5, 18.5, 25)

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

it doesnt :(
 
lmao myself, anyway i was reading what you wrote, but i didnt get it
and Cyko i did dicrease it, cuz my first result was 770.8, 1625
so what i did now was much smaller :p
i will keep trying to make it and keep posting my result until i get it working by myself, or someone gives me whole thing, which is too easy

edit.
lol, i was just guessing, and i got it healing me right
tell me if its ok.
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)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 0.252, 0.20, 18.5, 25)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Last edited:
Ok, so i just have to keep going and trying to get right healing.
min = level / 6 + maglvl * 18.5
max = level / 5 + maglvl * 25

Until its fine for me? Finaly i got it.

Sweddy, my brain works like a diesel in winter(cold) :D
 
Back
Top