does anyone know how i can do to fix this spell?
Lua:
local combat = {}
local area = {
{
{1, 1, 1},
{1, 3, 1},
{1, 1, 1}
},
{
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 1, 0, 2, 0, 1, 0},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0}
},
{
{0, 0, 1, 1, 1, 0, 0},
{0, 1, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 1},
{1, 0, 0, 2, 0, 0, 1},
{1, 0, 0, 0, 0, 0, 1},
{0, 1, 0, 0, 0, 1, 0},
{0, 0, 1, 1, 1, 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, 1, 0, 0, 0, 1, 0, 0, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0},
{0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 1, 0, 0, 0, 1, 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}
}
}
for i = 1, #area do
combat[i] = Combat()
combat[i]:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat[i]:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA)
combat[i]:setArea(createCombatArea(area[i]))
end
function onCastSpell(creature, variant)
local pos = creature:getPosition()
Position(pos.x + 2, pos.y + 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x - 2, pos.y - 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x - 2, pos.y + 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x + 2, pos.y - 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
addEvent(function()
Position(pos.x, pos.y + 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x, pos.y - 2, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x + 2, pos.y, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
Position(pos.x - 2, pos.y, pos.z):sendDistanceEffect(pos, CONST_ANI_FIRE)
end, 200)
for i = 1, #area do
addEvent(function()
combat[i]:execute(creature, variant)
end, 200 * i)
end
end
Attachments
-
Screenshot_7.png889.8 KB · Views: 30 · VirusTotal