local effects = {
	{fromPosition = Position(32526, 32536, 12), toPosition = Position(32526, 32539, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32533, 32536, 12), toPosition = Position(32533, 32539, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32540, 32536, 12), toPosition = Position(32540, 32539, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32544, 32542, 12), toPosition = Position(32546, 32542, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32540, 32545, 12), toPosition = Position(32540, 32547, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32533, 32545, 12), toPosition = Position(32533, 32547, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32526, 32545, 12), toPosition = Position(32526, 32547, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32522, 32549, 12), toPosition = Position(32524, 32549, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32522, 32554, 12), toPosition = Position(32524, 32554, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32522, 32559, 12), toPosition = Position(32524, 32559, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32528, 32561, 12), toPosition = Position(32528, 32563, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32535, 32561, 12), toPosition = Position(32535, 32563, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(32542, 32561, 12), toPosition = Position(32542, 32563, 12), effect = CONST_ME_HOLYDAMAGE},
	{fromPosition = Position(33369, 31342, 5), toPosition = Position(33371, 31342, 5), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31334, 5), toPosition = Position(33371, 31334, 5), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33363, 31330, 4), toPosition = Position(33365, 31330, 4), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33363, 31332, 4), toPosition = Position(33365, 31332, 4), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31318, 3), toPosition = Position(33370, 31318, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31322, 3), toPosition = Position(33370, 31322, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31324, 3), toPosition = Position(33370, 31324, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31328, 3), toPosition = Position(33370, 31328, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31330, 3), toPosition = Position(33370, 31330, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31336, 3), toPosition = Position(33370, 31336, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33369, 31339, 3), toPosition = Position(33370, 31339, 3), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33364, 31351, 4), toPosition = Position(33364, 31352, 4), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(33366, 31351, 4), toPosition = Position(33366, 31352, 4), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31716, 31789, 1), toPosition = Position(31716, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31709, 31789, 1), toPosition = Position(31709, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31710, 31789, 1), toPosition = Position(31710, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31703, 31789, 1), toPosition = Position(31703, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31704, 31789, 1), toPosition = Position(31704, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31697, 31789, 1), toPosition = Position(31697, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31698, 31789, 1), toPosition = Position(31698, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31691, 31789, 1), toPosition = Position(31691, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(31692, 31789, 1), toPosition = Position(31692, 31791, 1), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32514, 32610, 12), toPosition = Position(32514, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32515, 32610, 12), toPosition = Position(32515, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32520, 32610, 12), toPosition = Position(32520, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32521, 32610, 12), toPosition = Position(32521, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32526, 32610, 12), toPosition = Position(32526, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32532, 32610, 12), toPosition = Position(32532, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32533, 32610, 12), toPosition = Position(32533, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32538, 32610, 12), toPosition = Position(32538, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32539, 32610, 12), toPosition = Position(32539, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32544, 32610, 12), toPosition = Position(32544, 32612, 12), effect = CONST_ME_FIREAREA},
	{fromPosition = Position(32545, 32610, 12), toPosition = Position(32545, 32612, 12), effect = CONST_ME_FIREAREA},
}

local spawnDamage = GlobalEvent("spawn damage")
function spawnDamage.onThink(interval)
	local jolf
	for i = 1, #effects do
		local settings = effects[i]
		fromPosition = settings.fromPosition
		toPosition = settings.toPosition
		local spectators = Game.getSpectators(settings.fromPosition, false, true, 7, 7, 5, 5)
		if #spectators > 0 then
			if settings.effect then
				for y = fromPosition.y, toPosition.y do
					local newPosition = Position(fromPosition.x, y, fromPosition.z)
					newPosition:sendMagicEffect(settings.effect)

					jolf = Tile(newPosition):getTopCreature()
					if jolf and jolf:isPlayer() then
						doTargetCombatHealth(0, jolf, COMBAT_PHYSICALDAMAGE, -500, -1000, settings.effect)
					end
				end
				for x = fromPosition.x, toPosition.x do
					local newPosition2 = Position(x, fromPosition.y, fromPosition.z)
					newPosition2:sendMagicEffect(settings.effect)
					jolf = Tile(newPosition2):getTopCreature()
					if jolf and jolf:isPlayer() then
						doTargetCombatHealth(0, jolf, COMBAT_PHYSICALDAMAGE, -10, -500, settings.effect)
					end
				end
			end
		end
	end
	return true
end

spawnDamage:interval(9000)
spawnDamage:register()
