function startfirestorm()
local specs = Game.getSpectators(fsWaitingRoomPos, false, true, 0, fsWaitingRoomRadiusX, 0, fsWaitingRoomRadiusY)
if Game.getStorageValue(fsJoinedCountGlobalStorage) <= fsMinPlayers then
for i = 1, #specs do
specs[i]:teleportTo(specs[i]:getTown():getTemplePosition(), false)
specs[i]:setStorageValue(fsJoinStorage, 0)
end
resetfsVariables()
Game.broadcastMessage('firestorm Event failed to start, because of to little players joined the event!', MESSAGE_STATUS_WARNING)
return true
end
for i = 1, #specs do
local rX, rY, rZ
rX = math.random(fsArenaFromPosition.x, fsArenaToPosition.x)
rY = math.random(fsArenaFromPosition.y, fsArenaToPosition.y)
rZ = math.random(fsArenaFromPosition.z, fsArenaToPosition.z)
specs[i]:teleportTo(Position(rX, rY, rZ))
end
Game.broadcastMessage("firestorm Event has started, good luck to all participant.", MESSAGE_STATUS_WARNING)
Game.setStorageValue(fsStartedGlobalStorage, 2)
dostartfirestorm()