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

[Request] Exori gran for 0.3.6 real dmg

Code:
local TFS, TIBIAWIKI, TIBIASTATS = 0, 1, 2
local FORMULA = TIBIAWIKI

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatParam(combat, COMBAT_PARAM_USECHARGES, true)

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

function onGetFormulaValues(cid, level, skill, attack, factor)
	local min = FORMULA == TIBIAWIKI and (0.055 * skill * attack + level / 5) or FORMULA == TIBIASTATS and (skill / 10 * attack / 10 * 6 + level / 5 + 13) or FORMULA == TFS and ((skill + attack * 2) * 1.1 + level / 5)
	local max = FORMULA == TIBIAWIKI and (0.11 * skill * attack + level / 5) or FORMULA == TIBIASTATS and (skill / 10 * attack / 10 * 11 + level / 5 + 27) or FORMULA == TFS and ((skill + attack * 2) * 3 + level / 5)
	return -min, -max
end

setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
Have fun.
 
Back
Top