SixNine
Active Member
- Joined
- Dec 12, 2018
- Messages
- 484
- Reaction score
- 46
TFS 1.2
I need to call this same effect
sendCustomMagicEffect(creature:getPosition(), 47, 2, 0)
three times with different posistions and keep same hit range
LUA:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
local area = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}
combat:setArea(createCombatArea(area))
function onGetFormulaValues(player, level, maglevel)
local min = (level * 10) + (maglevel * 15.5) + 25
local max = (level * 10) + (maglevel * 25) + 50
return -min, -max
end
combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")
function onCastSpell(creature, variant)
sendCustomMagicEffect(creature:getPosition(), 47, 2, 0)
return combat:execute(creature, variant)
end
sendCustomMagicEffect(creature:getPosition(), 47, 2, 0)
three times with different posistions and keep same hit range