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

Need help editing a spell/rune

Ecstacy

Mothafuckaaa
Joined
Dec 26, 2008
Messages
3,836
Reaction score
108
Location
The Netherlands
Hello,

I was reading some tutorial about making your own spells since I don't understand how to make them.

I used this part
HTML:
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.6, 0, -1.1, 0)

now this is a little more complicated ;p. this is how much the rune will actually HIT(damage amount). LEVELMAGIC in this case is the main skill for the rune. "-0.6, 0, -1.1, 0)" The first number is your multiplier of your MAIN skill(the one you set in the script) which in this case is magic level. The second number is the minimum damage be(be sure to put a "-" sign or else you will heal the enemy) dealt by the rune for THAT effect.
The third number is the multiplier of your character level. The fourth number is the maximum damage done by THAT effect(also be sure to put a "-" sign). you can leave the max damage blank, and the minimum, as long as u have atleast one multiplier it wills till make damage, if u just want the effect to hit 50-100 leave the multiplies 0 and make the second and fourth numbers 50 and 100.

But it didn't work, that's why I'm asking support obviously.

Now my rune needs to do the following:
It must heal 1x the users magic level.
It must heal 10x the users combat level.
minium healing should be 150 hp
maximum healing should be 1.000.000 hp (fun server)


I've got this:

LUA:
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 10, 100, 10, 0)

But a level 9,800 character only heals 400 - 700 hp, and that's not what I want by far.

Could anyone explain how to do it, rather than only fixing it, so that I understand how formula's work?

Thanks in advance,
unknown666
 
romove that <setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.6, 0, -1.1, 0)
>
and use that forms
its to better to edit and easy
magic level form
function onGetFormulaValues(cid, level, maglevel)
local min = -((level/5)+(maglevel*3.0))
local max = -((level/5)+(maglevel*4.2))
return min, max
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

skill form
function onGetFormulaValues(cid, level, skill, attack, factor)
local skillTotal, levelTotal = skill + 65, level/5
return -(skillTotal * 1.3 + levelTotal)
return -(skillTotal * 4.5 + levelTotal)
end

setCombatCallback(combat3, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")

if u want to heal more
u need to edited the level forms

remove that -HealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 10, 100, 10, 0)
and add that
function onGetFormulaValues(cid, level, maglevel)
local min = ((level*1.2)+(maglevel*3.0))
local max = ((level*2)+(maglevel*4.2))
return min, max
end

setCombatCallback(combat1, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
 
I'm sorry, but I don't understand it.

Should I just remove all this:

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_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 10, 100, 10, 0)

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

And use the following form?:
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_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)

function onGetFormulaValues(cid, level, maglevel)
local min = ((level*8)+(maglevel*1.0))
local max = ((level*11)+(maglevel*1.0))
return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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

And what does this do?
LUA:
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

And how would
LUA:
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Be able to recognise

LUA:
setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

Sorry for all the questions but I'm curious on how the spell system works.
 
Back
Top