-- Script created by Port
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 7, 14)
arr = {
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0}
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
local p = getCreaturePosition(cid)
for j = 1, 5 do
if j == 1 then
u = -2
elseif j==2 then
u = -1
elseif j==3 then
u = 0
elseif j==4 then
u = 1
elseif j==5 then
u = 2
end
for i = 1, 6 do
local x = {
[0] = {x=p.x+u, y=p.y-1*i, z=p.z, stackpos=255},
[1] = {x=p.x+1*i, y=p.y+u, z=p.z, stackpos=255},
[2] = {x=p.x+u, y=p.y+1*i, z=p.z, stackpos=255},
[3] = {x=p.x-1*i, y=p.y+u, z=p.z, stackpos=255}
}
pos = x[getCreatureLookDirection(cid)]
if isCreature(getThingfromPos(pos).uid) then
doSendMagicEffect(pos, 12) --Efeito aki, se quiser trocar mude o 12
end
end
end
return doCombat(cid, combat, var)
end