• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Spell Damage -- Help.

GodSebbe

Banned User, reason: To Sexy
Joined
Apr 16, 2011
Messages
846
Reaction score
123
Location
Sweden
Hello, the time has come to create spells for my open tibia server. The problem is this:

Instead of: "setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -5, 0, -6, 0)" -- Unknown Damage.

I want something like: "setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -500, 0, -800, 0))" -- The damage is 500 to 800

It would be much easier.

Thank you in advance, God Sebbe
 
Hello, the time has come to create spells for my open tibia server. The problem is this:

Instead of: "setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -7, 1, -4, 3)" -- Unknown Damage.

I want something like: "setCombatFormula(combat1, COMBAT_FORMULA_DAMAGE, -100, 0, -2500, 0))" --


Problem i edit some so take that i gave u
 
If you want a more easy way to know the exact damage based on level/magiclevel, you can use this (you can also remove the level or magiclevel part in the min/max lines if you don't want one of them).
LUA:
function onGetFormulaValues(cid, level, maglevel)
min = -(maglevel*8) -level/5 -80
max = -(maglevel*14) -level/5 -80

return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
As you can see you can calculate it like this.

Example:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)

function onGetFormulaValues(cid, level, maglevel)
min = -(maglevel*8) -level/5 -80
max = -(maglevel*14) -level/5 -80

return min, max
end

setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

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