local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 32)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -90.2, 1, -90.2, 1)
arr1 = {
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 1, 0, 0, 0},
{0, 0, 0, 3, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0},
}
local area1 = createCombatArea(arr1)
setCombatArea(combat1, area1)
function onCastSpell(cid, var)
local waittime = 1 -- Tempo de exhaustion
local storage = 5819
if exhaustion.check(cid, storage) then
doCreatureSay(cid, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.", TALKTYPE_MONSTER)
return false
end
local hits = 4
local time = 400
local p = getCreaturePosition(cid)
local x = {
[0] = {x=p.x, y=p.y-1, z=p.z},
[1] = {x=p.x+4, y=p.y, z=p.z},
[2] = {x=p.x, y=p.y+4, z=p.z},
[3] = {x=p.x-1, y=p.y, z=p.z}
}
local y = {
[0] = 307,
[1] = 304,
[2] = 306,
[3] = 305
}
pos = x[getCreatureLookDirection(cid)]
eff = y[getCreatureLookDirection(cid)]
for i = 1, hits do
addEvent(doSendMagicEffect, time * i ,pos, eff)
addEvent(doCombat, time * i, cid, combat1, var)
end
doCreatureSay(cid, "Choju giga nezumi", TALKTYPE_MONSTER)
return true,exhaustion.set(cid, storage, waittime)
end