Thorn
Spriting since 2013
Hello guys, im trying to add skill in the formula of a custom explosion rune, but i cant get it working D: can anybody help me plz?? tfs 1.3
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, 381)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EXPLOSION)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setArea(createCombatArea(AREA_CROSS1X1))
function onGetFormulaValues(player, level, magicLevel, skill)
local min = (level / 2) + (magicLevel * 40.3) + skill*4
local max = (level / 2) + (magicLevel * 44.4) + skill*5
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
combat:setCallback(CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end