queria saber aonde ta o erro nessa spell e queria saber se alguem pode me repassar ela certinho sem bug!
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 4)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -2.2, -150, -2.5, 1)
arr = {
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1},
{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
}
local area = createCombatArea(arr)
setCombatArea(combat, area)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
position = getCreaturePosition(cid)
hitpos = {x = position.x - math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x - math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x + math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y + math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y - math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
hitpos = {x = position.x + math.random(1, 7), y = position.y - math.random(1, 7), z = position.z}
doSendDistanceShoot(hitpos, {x = position.x - math.random(1, 3), y = position.y + math.random(1, 3), z = position.z}, 3)
end