-- TimeSpace Script generated by friends111's python script. Replace all %TODO% values accordingly, check for errors (packet-generation isn't perfect), and modify things if needed.
local Map = require('Map')
local Monster = require('Monster')
local Event = require('Event')
local MapObject = require('MapObject')
local MapNpc = require('MapNpc')
local Portal = require('Portal')
local Location = require('Location')
local TimeSpace = require('TimeSpace')
local PortalType = require("PortalType")
local PortalMinimapOrientation = require('PortalMinimapOrientation')
local TimeSpaceObjective = require('TimeSpaceObjective')
local TimeSpaceTaskType = require('TimeSpaceTaskType')
local TimeSpaceTask = require('TimeSpaceTask')

local objectives = TimeSpaceObjective.Create()
    .WithGoToExit()
    .WithInteractObjects(1048, 1)

-- Grid min:(1, 8) ~ max:(5, 11) (width: 4, height: 3)
--     [ 0][ 1][ 2][ 3][ 4][ 5][ 6][ 7][ 8][ 9][10]
-- [ 0][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 1][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 2][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 3][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 4][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 5][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 6][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 7][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ][  ]
-- [ 8][  ][  ][OO][OO][OO][OO][  ][  ][  ][  ][  ]
-- [ 9][  ][XX][OO][OO][  ][  ][  ][  ][  ][  ][  ]
-- [10][  ][  ][  ][OO][XX][  ][  ][  ][  ][  ][  ]
-- [11][  ][  ][  ][XX][  ][  ][  ][  ][  ][  ][  ]

local map_5_8 = Map.Create().WithMapId(4204).SetMapCoordinates(5, 8).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None)
) -- start
local map_4_8 = Map.Create().WithMapId(4205).SetMapCoordinates(4, 8).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6078)
)
local map_3_8 = Map.Create().WithMapId(4205).SetMapCoordinates(3, 8).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6079).WithOnStartShout("TS_16_TEXT_0")
)
local map_2_8 = Map.Create().WithMapId(4208).SetMapCoordinates(2, 8).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6079).WithOnStartShout("TS_16_TEXT_0")
)
local map_2_9 = Map.Create().WithMapId(4211).SetMapCoordinates(2, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6079).WithOnStartShout("TS_16_TEXT_0")
)
local map_1_9 = Map.Create().WithMapId(4202).SetMapCoordinates(1, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.KillAllMonsters).WithTaskText("TS_GENERIC_TEXT_KILL_ALL_ENEMIES")
)
local map_3_9 = Map.Create().WithMapId(4209).SetMapCoordinates(3, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6079).WithOnStartShout("TS_16_TEXT_0")
)
local map_3_10 = Map.Create().WithMapId(4212).SetMapCoordinates(3, 10).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6079).WithOnStartShout("TS_16_TEXT_0")
)
local map_4_10 = Map.Create().WithMapId(4205).SetMapCoordinates(4, 10).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.Survive, 60).WithTaskText("TS_16_TEXT_1").WithOnStartDialog(6081).WithOnStartShout("TS_16_TEXT_2").WithOnFinishShout("TS_16_TEXT_3").WithNoDialogTaskStart()
)
local map_3_11 = Map.Create().WithMapId(4201).SetMapCoordinates(3, 11).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.KillAllMonsters).WithTaskText("TS_16_TEXT_4").WithOnFinishShout("TS_16_TEXT_5")
)

local portal_5_8_to_4_8 = Portal.Create(PortalType.TsNormal).From(map_5_8, 1, 15).To(map_4_8, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_4_8_to_5_8 = Portal.Create(PortalType.TsNormal).From(map_4_8, 28, 15).To(map_5_8, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_4_8_to_3_8 = Portal.Create(PortalType.TsNormal).From(map_4_8, 1, 15).To(map_3_8, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_3_8_to_4_8 = Portal.Create(PortalType.Locked).From(map_3_8, 28, 15).To(map_4_8, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_3_8_to_2_8 = Portal.Create(PortalType.Locked).From(map_3_8, 1, 15).To(map_2_8, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_2_8_to_3_8 = Portal.Create(PortalType.Locked).From(map_2_8, 28, 15).To(map_3_8, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_2_8_to_2_9 = Portal.Create(PortalType.Locked).From(map_2_8, 14, 28).To(map_2_9, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_2_9_to_2_8 = Portal.Create(PortalType.Locked).From(map_2_9, 14, 1).To(map_2_8, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_2_9_to_3_9 = Portal.Create(PortalType.Locked).From(map_2_9, 29, 15).To(map_3_9, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_2_9_to_1_9 = Portal.Create(PortalType.Locked).From(map_2_9, 1, 15).To(map_1_9, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_1_9_to_2_9 = Portal.Create(PortalType.Locked).From(map_1_9, 28, 15).To(map_2_9, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_3_9_to_3_10 = Portal.Create(PortalType.Locked).From(map_3_9, 14, 28).To(map_3_10, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_3_9_to_2_9 = Portal.Create(PortalType.Locked).From(map_3_9, 1, 15).To(map_2_9, 29, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_3_10_to_3_9 = Portal.Create(PortalType.Locked).From(map_3_10, 14, 1).To(map_3_9, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_3_10_to_4_10 = Portal.Create(PortalType.Locked).From(map_3_10, 28, 15).To(map_4_10, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_3_10_to_3_11 = Portal.Create(PortalType.Locked).From(map_3_10, 14, 28).To(map_3_11, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_3_11_to_3_10 = Portal.Create(PortalType.Locked).From(map_3_11, 14, 1).To(map_3_10, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_4_10_to_UNKNOWN = Portal.Create(PortalType.TSEndClosed).From(map_4_10, 28, 15).To(map_4_10, 28, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_4_10_to_3_10 = Portal.Create(PortalType.Locked).From(map_4_10, 1, 15).To(map_3_10, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)

map_5_8.AddPortal(portal_5_8_to_4_8)
map_4_8.AddPortal(portal_4_8_to_5_8)
map_4_8.AddPortal(portal_4_8_to_3_8)
map_3_8.AddPortal(portal_3_8_to_4_8)
map_3_8.AddPortal(portal_3_8_to_2_8)
map_2_8.AddPortal(portal_2_8_to_3_8)
map_2_8.AddPortal(portal_2_8_to_2_9)
map_2_9.AddPortal(portal_2_9_to_2_8)
map_2_9.AddPortal(portal_2_9_to_3_9)
map_2_9.AddPortal(portal_2_9_to_1_9)
map_1_9.AddPortal(portal_1_9_to_2_9)
map_3_9.AddPortal(portal_3_9_to_3_10)
map_3_9.AddPortal(portal_3_9_to_2_9)
map_3_10.AddPortal(portal_3_10_to_3_9)
map_3_10.AddPortal(portal_3_10_to_4_10)
map_3_10.AddPortal(portal_3_10_to_3_11)
map_3_11.AddPortal(portal_3_11_to_3_10)
map_4_10.AddPortal(portal_4_10_to_UNKNOWN)
map_4_10.AddPortal(portal_4_10_to_3_10)

--- Map 5_8
map_5_8.OnMapJoin({
    Event.TryStartTaskForMap(map_5_8),
})
---

--- Map 4_8
map_4_8.OnMapJoin({
    Event.TryStartTaskForMap(map_4_8),
})
---

--- Map 3_8
map_3_8.AddMonsters({
    Monster.CreateWithVnum(58).At(11, 17).Facing(6), -- Fire Vampie [16:03:28]
    Monster.CreateWithVnum(58).At(11, 12).Facing(5), -- Fire Vampie [16:03:28]
    Monster.CreateWithVnum(271).At(17, 13).Facing(5).AsTarget(), -- Dark Gargs [16:03:28]
    Monster.CreateWithVnum(58).At(13, 22).Facing(4).SpawnAfterMobsKilled(1), -- Fire Vampie [16:03:31]
})
map_3_8.AddObjects({
    MapObject.CreateRedButton().At(5, 15).OnTrigger({
        Event.AddTime(80),
    }).OnSwitch({
        Event.TogglePortal(portal_3_8_to_2_8),
    }), -- [16:03:26]
})
map_3_8.OnMapJoin({
    Event.TryStartTaskForMap(map_3_8),
})
map_3_8.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_3_8),
})
---

--- Map 2_8
map_2_8.AddMonsters({
    Monster.CreateWithVnum(64).At(13, 22).Facing(6), -- Walker [16:03:55]
    Monster.CreateWithVnum(64).At(7, 20).Facing(4), -- Walker [16:03:55]
    Monster.CreateWithVnum(271).At(14, 18).Facing(0).AsTarget(), -- Dark Gargs [16:03:55]
    Monster.CreateWithVnum(58).At(12, 15).Facing(2).SpawnAfterMobsKilled(2), -- Fire Vampie [16:03:58]
})
map_2_8.AddObjects({
    MapObject.CreateRedButton().At(5, 15).OnTrigger({
        Event.AddTime(80),
    }).OnSwitch({
        Event.TogglePortal(portal_2_8_to_2_9),
    }), -- [16:03:53]
})
map_2_8.OnMapJoin({
    Event.TryStartTaskForMap(map_2_8),
})
map_2_8.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_2_8),
})
---

--- Map 2_9
map_2_9.AddMonsters({
    Monster.CreateWithVnum(20).At(7, 10).Facing(6), -- Angry Mandra [16:04:13]
    Monster.CreateWithVnum(271).At(14, 18).Facing(5).AsTarget(), -- Dark Gargs [16:04:13]
    Monster.CreateWithVnum(58).At(6, 18).Facing(3).SpawnAfterMobsKilled(1), -- Fire Vampie [16:04:15]
    Monster.CreateWithVnum(58).At(10, 21).Facing(1).SpawnAfterMobsKilled(1), -- Fire Vampie [16:04:15]
})
map_2_9.AddObjects({
    MapObject.CreateRedButton().At(15, 17).OnTrigger({
        Event.AddTime(80),
    }).OnSwitch({
        Event.TogglePortal(portal_2_9_to_3_9),
        Event.TogglePortal(portal_2_9_to_1_9),
    }), -- [16:04:11]
})
map_2_9.OnMapJoin({
    Event.TryStartTaskForMap(map_2_9),
})
map_2_9.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_2_9),
})
---

--- Map 1_9
map_1_9.AddMonsters({
    Monster.CreateWithVnum(58).At(16, 20).Facing(7), -- Fire Vampie [16:04:28]
    Monster.CreateWithVnum(58).At(12, 11).Facing(1), -- Fire Vampie [16:04:28]
    Monster.CreateWithVnum(66).At(18, 14).Facing(7).SpawnAfterMobsKilled(2), -- Tired Thornwalker [16:04:32]
    Monster.CreateWithVnum(66).At(6, 16).Facing(7).SpawnAfterMobsKilled(3), -- Tired Thornwalker [16:04:34]
    Monster.CreateWithVnum(66).At(12, 17).Facing(2).SpawnAfterMobsKilled(4), -- Tired Thornwalker [16:04:36]
    Monster.CreateWithVnum(66).At(13, 21).Facing(0).SpawnAfterMobsKilled(5), -- Tired Thornwalker [16:04:38]
})
map_1_9.AddObjects({
    MapObject.CreateOldBox().At(4, 14), -- [16:04:28]
    MapObject.CreateOldBox().At(4, 12), -- [16:04:28]
})
map_1_9.OnMapJoin({
    Event.TryStartTaskForMap(map_1_9),
})
map_1_9.OnTaskFinish({
    Event.OpenPortal(portal_1_9_to_2_9),
    Event.AddTime(100),
})
---

--- Map 3_9
map_3_9.AddMonsters({
    Monster.CreateWithVnum(58).At(20, 20).Facing(3), -- Fire Vampie [16:04:52]
    Monster.CreateWithVnum(58).At(8, 20).Facing(1), -- Fire Vampie [16:04:52]
    Monster.CreateWithVnum(271).At(14, 18).Facing(7).AsTarget(), -- Dark Gargs [16:04:52]
    Monster.CreateWithVnum(58).At(23, 18).Facing(3).SpawnAfterMobsKilled(2), -- Fire Vampie [16:04:56]
})
map_3_9.AddObjects({
    MapObject.CreateRedButton().At(22, 15).OnTrigger({
        Event.AddTime(100),
    }).OnSwitch({
        Event.TogglePortal(portal_3_9_to_3_10),
    }), -- [16:04:50]
})
map_3_9.OnMapJoin({
    Event.TryStartTaskForMap(map_3_9),
})
map_3_9.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_3_9),
})
---

--- Map 3_10
map_3_10.AddMonsters({
    Monster.CreateWithVnum(58).At(9, 17).Facing(6), -- Fire Vampie [16:05:08]
    Monster.CreateWithVnum(58).At(9, 14).Facing(2), -- Fire Vampie [16:05:08]
    Monster.CreateWithVnum(271).At(15, 21).Facing(2).AsTarget(), -- Dark Gargs [16:05:08]
    Monster.CreateWithVnum(58).At(11, 21).Facing(5).SpawnAfterMobsKilled(2), -- Fire Vampie [16:05:11]
    Monster.CreateWithVnum(58).At(19, 22).Facing(4).SpawnAfterMobsKilled(2), -- Fire Vampie [16:05:11]
})
map_3_10.AddObjects({
    MapObject.CreateRedButton().At(15, 15).OnTrigger({
        Event.AddTime(80),
    }).OnSwitch({
        Event.OpenPortal(portal_3_10_to_3_11),
        Event.OpenPortal(portal_3_10_to_4_10),
    }), -- [16:05:08]
})
map_3_10.OnMapJoin({
    Event.TryStartTaskForMap(map_3_10),
})
map_3_10.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_3_10),
})
---

--- Map 4_10
map_4_10.AddMonsters({
    Monster.CreateWithVnum(18).At(25, 12).Facing(5).SpawnAfterTaskStart(), -- Happy Mandra [16:05:52]
    Monster.CreateWithVnum(18).At(23, 12).Facing(7).SpawnAfterTaskStart(), -- Happy Mandra [16:05:52]
    Monster.CreateWithVnum(131).At(21, 15).Facing(4).SpawnAfterTaskStart(), -- Weak Walker [16:05:52]
    Monster.CreateWithVnum(131).At(19, 19).Facing(5).SpawnAfterTaskStart(), -- Weak Walker [16:05:52]
    Monster.CreateWithVnum(18).At(17, 6).Facing(7).SpawnAfterTaskStart(), -- Happy Mandra [16:05:52]
    Monster.CreateWithVnum(18).At(17, 4).Facing(6).SpawnAfterTaskStart(), -- Happy Mandra [16:05:52]
    Monster.CreateWithVnum(131).At(13, 10).Facing(0).SpawnAfterTaskStart(), -- Weak Walker [16:05:52]
    Monster.CreateWithVnum(131).At(9, 19).Facing(1).SpawnAfterTaskStart(), -- Weak Walker [16:05:52]
    Monster.CreateWithVnum(131).At(8, 13).Facing(4).SpawnAfterTaskStart(), -- Weak Walker [16:05:52]
    Monster.CreateWithVnum(271).At(14, 15).Facing(7).SpawnAfterTaskStart().AsTarget(), -- Dark Gargs [16:05:52]
    Monster.CreateWithVnum(57).At(10, 10).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(5), -- Weak Fire Vampie [16:05:59]
    Monster.CreateWithVnum(57).At(11, 16).Facing(6).SpawnAfterTaskStart().SpawnAfterMobsKilled(5), -- Weak Fire Vampie [16:05:59]
    Monster.CreateWithVnum(57).At(15, 10).Facing(0).SpawnAfterTaskStart().SpawnAfterMobsKilled(6), -- Weak Fire Vampie [16:06:01]
    Monster.CreateWithVnum(57).At(16, 21).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(7), -- Weak Fire Vampie [16:06:02]
    Monster.CreateWithVnum(57).At(20, 17).Facing(0).SpawnAfterTaskStart().SpawnAfterMobsKilled(7), -- Weak Fire Vampie [16:06:02]
    Monster.CreateWithVnum(57).At(11, 20).Facing(1).SpawnAfterTaskStart().SpawnAfterMobsKilled(8), -- Weak Fire Vampie [16:06:05]
    Monster.CreateWithVnum(57).At(6, 16).Facing(4).SpawnAfterTaskStart().SpawnAfterMobsKilled(9), -- Weak Fire Vampie [16:06:07]
    Monster.CreateWithVnum(136).At(14, 12).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(10), -- Boing [16:06:08]
    Monster.CreateWithVnum(136).At(14, 21).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(10), -- Boing [16:06:08]
    Monster.CreateWithVnum(136).At(17, 13).Facing(7).SpawnAfterTaskStart().SpawnAfterMobsKilled(10), -- Boing [16:06:08]
    Monster.CreateWithVnum(136).At(17, 17).Facing(4).SpawnAfterTaskStart().SpawnAfterMobsKilled(10), -- Boing [16:06:08]
    Monster.CreateWithVnum(136).At(7, 21).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(12), -- Boing [16:06:12]
    Monster.CreateWithVnum(136).At(8, 16).Facing(0).SpawnAfterTaskStart().SpawnAfterMobsKilled(13), -- Boing [16:06:14]
    Monster.CreateWithVnum(136).At(6, 12).Facing(4).SpawnAfterTaskStart().SpawnAfterMobsKilled(14), -- Boing [16:06:15]
    Monster.CreateWithVnum(136).At(15, 7).Facing(1).SpawnAfterTaskStart().SpawnAfterMobsKilled(16), -- Boing [16:06:18]
    Monster.CreateWithVnum(136).At(19, 12).Facing(0).SpawnAfterTaskStart().SpawnAfterMobsKilled(16), -- Boing [16:06:18]
    Monster.CreateWithVnum(58).At(9, 7).Facing(6).SpawnAfterTaskStart().SpawnAfterMobsKilled(18), -- Fire Vampie [16:06:21]
    Monster.CreateWithVnum(58).At(18, 8).Facing(1).SpawnAfterTaskStart().SpawnAfterMobsKilled(18), -- Fire Vampie [16:06:21]
    Monster.CreateWithVnum(58).At(20, 21).Facing(5).SpawnAfterTaskStart().SpawnAfterMobsKilled(18), -- Fire Vampie [16:06:21]
    Monster.CreateWithVnum(58).At(25, 15).Facing(7).SpawnAfterTaskStart().SpawnAfterMobsKilled(18), -- Fire Vampie [16:06:21]
    Monster.CreateWithVnum(58).At(12, 13).Facing(6).SpawnAfterTaskStart().SpawnAfterMobsKilled(20), -- Fire Vampie [16:06:24]
    Monster.CreateWithVnum(58).At(12, 24).Facing(0).SpawnAfterTaskStart().SpawnAfterMobsKilled(20), -- Fire Vampie [16:06:24]
    Monster.CreateWithVnum(58).At(15, 17).Facing(6).SpawnAfterTaskStart().SpawnAfterMobsKilled(20), -- Fire Vampie [16:06:24]
    Monster.CreateWithVnum(66).At(14, 19).Facing(1).SpawnAfterTaskStart().SpawnAfterMobsKilled(22), -- Tired Thornwalker [16:06:27]
    Monster.CreateWithVnum(66).At(9, 14).Facing(2).SpawnAfterTaskStart().SpawnAfterMobsKilled(24), -- Tired Thornwalker [16:06:29]
    Monster.CreateWithVnum(66).At(17, 10).Facing(4).SpawnAfterTaskStart().SpawnAfterMobsKilled(26), -- Tired Thornwalker [16:06:33]
    Monster.CreateWithVnum(66).At(18, 15).Facing(5).SpawnAfterTaskStart().SpawnAfterMobsKilled(28), -- Tired Thornwalker [16:06:36]
    Monster.CreateWithVnum(66).At(23, 18).Facing(3).SpawnAfterTaskStart().SpawnAfterMobsKilled(29), -- Tired Thornwalker [16:06:39]
})
map_4_10.AddObjects({
    MapObject.CreateCrystalBall().AtRandomPosition().AsObjective().OnTrigger({
        Event.TryStartTaskForMap(map_4_10),
    }), -- [16:05:43]
})
map_4_10.OnTaskFinish({
    Event.OpenPortal(portal_4_10_to_UNKNOWN),
    Event.DespawnAllMobsInRoom(map_4_10),
})
map_4_10.OnAllTargetMobsDead({
    Event.DespawnAllMobsInRoom(map_4_10),
})
---

--- Map 3_11
map_3_11.AddMonsters({
    Monster.CreateWithVnum(20).At(15, 17).Facing(1), -- Angry Mandra [16:05:24]
    Monster.CreateWithVnum(58).At(9, 9).Facing(3), -- Fire Vampie [16:05:24]
    Monster.CreateWithVnum(66).At(16, 18).Facing(1).SpawnAfterMobsKilled(1), -- Tired Thornwalker [16:05:26]
    Monster.CreateWithVnum(58).At(22, 11).Facing(1).SpawnAfterMobsKilled(2), -- Fire Vampie [16:05:27]
    Monster.CreateWithVnum(58).At(9, 17).Facing(5).SpawnAfterMobsKilled(3), -- Fire Vampie [16:05:29]
    Monster.CreateWithVnum(58).At(23, 18).Facing(5).SpawnAfterMobsKilled(3), -- Fire Vampie [16:05:29]
    Monster.CreateWithVnum(66).At(12, 12).Facing(7).SpawnAfterMobsKilled(4), -- Tired Thornwalker [16:05:30]
    Monster.CreateWithVnum(66).At(17, 13).Facing(3).SpawnAfterMobsKilled(5), -- Tired Thornwalker [16:05:32]
})
map_3_11.OnMapJoin({
    Event.TryStartTaskForMap(map_3_11),
})
map_3_11.OnTaskFinish({
    Event.OpenPortal(portal_3_11_to_3_10),
    Event.AddTime(80),
})
---

local ts = TimeSpace.Create(16)  -- TimeSpace ID
    .SetMaps({map_5_8, map_4_8, map_3_8, map_2_8, map_2_9, map_1_9, map_3_9, map_3_10, map_4_10, map_3_11})
    .SetSpawn(Location.InMap(map_5_8).At(15, 9))
    .SetLives(2)
    .SetObjectives(objectives)
    .SetDurationInSeconds(150)
    .SetBonusPointItemDropChance(5000)
return ts
