• 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] Formula needed!

sebas182

New Member
Joined
Aug 10, 2008
Messages
121
Reaction score
1
I dont understand how to modify the formula of the spells...

I need a spell that hits: (MagicLevel*1.8)+1 ~ (MagicLevel*1.8)+15

So if you have Magic Level 10, will hit: 19 ~ 33

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

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

Anyone may modify it to me!?
Please: THE LEVEL OF THE CHARACTER MUST NOT MODIFY THE DAMAGE D:

I will rep++ forever =D
 
I found this useful.

TLDR:

setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC,-1.0, -900, -3.2, -1100)


# This is magiclevel * that value

# This is the Minimum Damage
# This is level * that value
# This is the max damage.


It counts the damage as this.. They take the # + # + (a random number between # and #)

Edit: as you can see, this formula is a bit different from what you posted, but it should work good too - though I think the formula you posted is more advanced and I would also like to see someone explain how it works if anyone knows.
 
Exactly what I needed. I already had see something like that bug you explained me fine. ^_^Thanks!
Now I have another problem! I made a type-of-spell system in my OT and I got problems! I will PM you if it's no problem!
 
Back
Top