darkmu
Well-Known Member
TFS 1.4
I'm trying to validate when attacking a rune, check if the rune has the actionID, if it has its attack it will get stronger, can anyone help me?
18:28 You see 3 sudden death runes. They can only be used by players with level 45 and magic level 15 or higher.
They weigh 2.10 oz.
Action ID: 15000
I'm trying to validate when attacking a rune, check if the rune has the actionID, if it has its attack it will get stronger, can anyone help me?
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetFormulaValues(player, level, maglevel)
-- CONDITION NOT ACTION
local min = (level / 5) + (maglevel * 4.3) + 35
local max = (level / 5) + (maglevel * 7.4) + 54
-- CONDITION ACTION ID
--local min = (level / 5) + (maglevel * 5.3) + 35
--local max = (level / 5) + (maglevel * 9.4) + 54
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, var, isHotkey)
return combat:execute(creature, var)
end
18:28 You see 3 sudden death runes. They can only be used by players with level 45 and magic level 15 or higher.
They weigh 2.10 oz.
Action ID: 15000