Michcol94
Member
- Joined
- Sep 2, 2021
- Messages
- 108
- Reaction score
- 23
He wants to change the magic effect for the hit effect and that for each spell there was a different effect
sample spell:
sample spell:
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)--Changing the effect doesn't work
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 90)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setArea(createCombatArea(AREA_CROSS1X1))
function onGetFormulaValues(player, level, magicLevel)
local min = (level / 5) + (magicLevel * 1.6) + 9
local max = (level / 5) + (magicLevel * 3.2) + 19
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end