function onSay(cid, words, param, type)
local timer = tonumber(param)
local player = Player(cid)
local pos = player:getPosition()
for i = 0, math.max(0, timer - 1000), 10 do
for j = 1, 2 do
local DistEffects = {CONST_ANI_ENERGYBALL, CONST_ANI_ENERGY, CONST_ANI_SMALLSTONE, CONST_ANI_LARGEROCK}
local fromPos = Position(pos.x + math.random(-85, 85), pos.y + math.random(-85,85), pos.z)
addEvent(Position.sendDistanceEffect, i, fromPos, pos, DistEffects[math.random(1,#DistEffects)])
addEvent(Position.sendMagicEffect, i, fromPos, CONST_ME_GROUNDSHAKER)
end
end
addEvent(function(player, pos)
local c = 0
for r = 1, 100, 0.75 do
c = c + 1
local o = 2 * math.pi * r
addEvent(function(o, r, pos)
for i = -math.pi, math.pi, (math.pi * 2) / o do
for z = pos.z, 2, -1 do
local newPos = Position(
pos.x + math.ceil(-0.5 + r * math.cos(i)),
pos.y + math.ceil(-0.5 + r * math.sin(i)),
z
)
local nextPos = Position(
pos.x + math.ceil(-0.5 + (r + 1.75) * math.cos(i)),
pos.y + math.ceil(-0.5 + (r + 1.75) * math.sin(i)),
z
)
local Effects = {CONST_ME_BLACKSMOKE, CONST_ME_FIREWORK_BLUE, CONST_ME_GROUNDSHAKER, CONST_ME_ENERGYAREA}
newPos:sendMagicEffect(Effects[math.random(1, #Effects)])
local tile = Tile(newPos)
if (tile) then
local creature = tile:getTopCreature()
if creature then
if creature:isMonster() or creature:isPlayer() then
doTargetCombatHealth(player,creature,COMBAT_UNDEFINEDDAMAGE,-2000,-2000,CONST_ME_ENERGYHIT)
local nt = Tile(nextPos)
if nt then
if not nt:hasProperty(CONST_PROP_BLOCKSOLID) then
creature:teleportTo(nextPos, true)
end
end
end
end
end
end
end
end,
math.floor(c * 35),
o, r, pos
)
end
end,
timer,
player,
pos
)
return true
end