-- 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 TimeSpaceFinishType = require('TimeSpaceFinishType')
local MonsterWave = require('MonsterWave')

local objectives = TimeSpaceObjective.Create()
    .WithGoToExit()
    .WithProtectNPC()

local map_0_7 = Map.Create().WithMapId(4100).SetMapCoordinates(0, 7).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None)
) -- start
local map_1_7 = Map.Create().WithMapId(4100).SetMapCoordinates(1, 7).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6075)
)
local map_2_7 = Map.Create().WithMapId(2103).SetMapCoordinates(2, 7).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.Survive, 600).WithTaskText("TS_14_TEXT_0")
)
local map_3_7 = Map.Create().WithMapId(4102).SetMapCoordinates(3, 7).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6076)
)
local map_3_8 = Map.Create().WithMapId(4103).SetMapCoordinates(3, 8).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None)
)
local map_3_9 = Map.Create().WithMapId(4102).SetMapCoordinates(3, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.KillAllMonsters).WithTaskText("TS_14_TEXT_1")
)
local map_3_10 = Map.Create().WithMapId(4105).SetMapCoordinates(3, 10).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None)
)
local map_2_10 = Map.Create().WithMapId(4102).SetMapCoordinates(2, 10).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartShout("TS_14_TEXT_2")
)
local map_4_10 = Map.Create().WithMapId(4107).SetMapCoordinates(4, 10).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartShout("TS_14_TEXT_3")
)
local map_3_11 = Map.Create().WithMapId(4108).SetMapCoordinates(3, 11).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.KillAllMonsters).WithTaskText("TS_14_TEXT_1")
)
local map_4_9 = Map.Create().WithMapId(4111).SetMapCoordinates(4, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.KillAllMonsters).WithTaskText("TS_14_TEXT_1")
)
local map_5_9 = Map.Create().WithMapId(4112).SetMapCoordinates(5, 9).WithTask(
    TimeSpaceTask.Create(TimeSpaceTaskType.None).WithOnStartDialog(6077).WithOnStartShout("TS_14_TEXT_4")
)

local portal_0_7_to_1_7 = Portal.Create(PortalType.TsNormal).From(map_0_7, 28, 15).To(map_1_7, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_1_7_to_2_7 = Portal.Create(PortalType.TsNormal).From(map_1_7, 28, 15).To(map_2_7, 8, 26).MinimapOrientation(PortalMinimapOrientation.East)
local portal_1_7_to_0_7 = Portal.Create(PortalType.TsNormal).From(map_1_7, 1, 15).To(map_0_7, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_2_7_to_3_7 = Portal.Create(PortalType.Locked).From(map_2_7, 41, 26).To(map_3_7, 1, 14).MinimapOrientation(PortalMinimapOrientation.East)
local portal_2_7_to_1_7 = Portal.Create(PortalType.Locked).From(map_2_7, 8, 26).To(map_1_7, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_3_7_to_3_8 = Portal.Create(PortalType.TsNormal).From(map_3_7, 14, 28).To(map_3_8, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_3_7_to_2_7 = Portal.Create(PortalType.TsNormal).From(map_3_7, 1, 14).To(map_2_7, 41, 26).MinimapOrientation(PortalMinimapOrientation.West)
local portal_3_8_to_3_7 = Portal.Create(PortalType.TsNormal).From(map_3_8, 14, 1).To(map_3_7, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_3_8_to_3_9 = Portal.Create(PortalType.TsNormal).From(map_3_8, 14, 28).To(map_3_9, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_3_9_to_3_8 = Portal.Create(PortalType.Locked).From(map_3_9, 14, 1).To(map_3_8, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
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_10_to_3_9 = Portal.Create(PortalType.TsNormal).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.Open).From(map_3_10, 28, 15).To(map_4_10, 1, 14).MinimapOrientation(PortalMinimapOrientation.East)
local portal_3_10_to_3_11 = Portal.Create(PortalType.TsNormal).From(map_3_10, 14, 28).To(map_3_11, 14, 5).MinimapOrientation(PortalMinimapOrientation.South)
local portal_3_10_to_2_10 = Portal.Create(PortalType.TsNormal).From(map_3_10, 1, 14).To(map_2_10, 28, 14).MinimapOrientation(PortalMinimapOrientation.West)
local portal_3_11_to_3_10 = Portal.Create(PortalType.Locked).From(map_3_11, 14, 5).To(map_3_10, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_2_10_to_3_10 = Portal.Create(PortalType.Locked).From(map_2_10, 28, 14).To(map_3_10, 1, 14).MinimapOrientation(PortalMinimapOrientation.East)
local portal_4_10_to_4_9 = Portal.Create(PortalType.Locked).From(map_4_10, 14, 1).To(map_4_9, 14, 28).MinimapOrientation(PortalMinimapOrientation.North)
local portal_4_10_to_3_10 = Portal.Create(PortalType.Locked).From(map_4_10, 1, 14).To(map_3_10, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)
local portal_4_9_to_5_9 = Portal.Create(PortalType.Locked).From(map_4_9, 28, 15).To(map_5_9, 1, 15).MinimapOrientation(PortalMinimapOrientation.East)
local portal_4_9_to_4_10 = Portal.Create(PortalType.Locked).From(map_4_9, 14, 28).To(map_4_10, 14, 1).MinimapOrientation(PortalMinimapOrientation.South)
local portal_5_9_to_UNKNOWN = Portal.Create(PortalType.TSEnd).From(map_5_9, 14, 1).To(map_5_9, 14, 1).MinimapOrientation(PortalMinimapOrientation.North)
local portal_5_9_to_4_9 = Portal.Create(PortalType.TsNormal).From(map_5_9, 1, 15).To(map_4_9, 28, 15).MinimapOrientation(PortalMinimapOrientation.West)

map_0_7.AddPortal(portal_0_7_to_1_7)
map_1_7.AddPortal(portal_1_7_to_2_7)
map_1_7.AddPortal(portal_1_7_to_0_7)
map_2_7.AddPortal(portal_2_7_to_3_7)
map_2_7.AddPortal(portal_2_7_to_1_7)
map_3_7.AddPortal(portal_3_7_to_3_8)
map_3_7.AddPortal(portal_3_7_to_2_7)
map_3_8.AddPortal(portal_3_8_to_3_7)
map_3_8.AddPortal(portal_3_8_to_3_9)
map_3_9.AddPortal(portal_3_9_to_3_8)
map_3_9.AddPortal(portal_3_9_to_3_10)
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_10.AddPortal(portal_3_10_to_2_10)
map_3_11.AddPortal(portal_3_11_to_3_10)
map_2_10.AddPortal(portal_2_10_to_3_10)
map_4_10.AddPortal(portal_4_10_to_4_9)
map_4_10.AddPortal(portal_4_10_to_3_10)
map_4_9.AddPortal(portal_4_9_to_5_9)
map_4_9.AddPortal(portal_4_9_to_4_10)
map_5_9.AddPortal(portal_5_9_to_UNKNOWN)
map_5_9.AddPortal(portal_5_9_to_4_9)

--- Map 0_7
map_0_7.OnMapJoin({
    Event.TryStartTaskForMap(map_0_7),
})
---

--- Map 1_7
map_1_7.OnMapJoin({
    Event.TryStartTaskForMap(map_1_7),
})
---

--- Map 2_7
map_2_7.AddMonsterWaves({
    -- wave 1
    MonsterWave.CreateWithDelay(0 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 27).Facing(5), -- Happy Miner [15:52:32]
        Monster.CreateWithVnum(105).At(32, 19).Facing(2), -- Happy Miner [15:52:32]
        Monster.CreateWithVnum(108).At(32, 24).Facing(1), -- Weak Expy Miner [15:52:32]
        Monster.CreateWithVnum(108).At(32, 33).Facing(7), -- Weak Expy Miner [15:52:32]
        Monster.CreateWithVnum(107).At(39, 31).Facing(5), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(19).At(39, 15).Facing(4), -- Mandra [15:52:33]
        Monster.CreateWithVnum(107).At(37, 29).Facing(2), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(37, 25).Facing(1), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(37, 23).Facing(0), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(19).At(37, 12).Facing(6), -- Mandra [15:52:33]
        Monster.CreateWithVnum(107).At(34, 37).Facing(7), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(34, 25).Facing(1), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(35, 20).Facing(3), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(34, 20).Facing(5), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(32, 39).Facing(0), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(107).At(32, 34).Facing(6), -- Angry Miner [15:52:33]
        Monster.CreateWithVnum(111).At(32, 26).Facing(4), -- Tired Chief Miner [15:52:33]
    }),
    -- wave 2
    MonsterWave.CreateWithDelay(1 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 27).Facing(4), -- Happy Miner [15:53:02]
        Monster.CreateWithVnum(105).At(32, 19).Facing(3), -- Happy Miner [15:53:02]
        Monster.CreateWithVnum(108).At(32, 24).Facing(7), -- Weak Expy Miner [15:53:02]
        Monster.CreateWithVnum(108).At(32, 33).Facing(1), -- Weak Expy Miner [15:53:02]
    }),
    -- wave 3
    MonsterWave.CreateWithDelay(2 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 27).Facing(2), -- Happy Miner [15:53:32]
        Monster.CreateWithVnum(105).At(30, 32).Facing(1), -- Happy Miner [15:53:32]
        Monster.CreateWithVnum(105).At(32, 19).Facing(3), -- Happy Miner [15:53:32]
        Monster.CreateWithVnum(108).At(32, 24).Facing(3), -- Weak Expy Miner [15:53:32]
        Monster.CreateWithVnum(108).At(32, 33).Facing(6), -- Weak Expy Miner [15:53:32]
        Monster.CreateWithVnum(109).At(33, 34).Facing(1), -- Expy Miner [15:53:32]
    }),
    -- wave 4
    MonsterWave.CreateWithDelay(3 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 27).Facing(5), -- Happy Miner [15:54:02]
        Monster.CreateWithVnum(105).At(30, 32).Facing(4), -- Happy Miner [15:54:02]
        Monster.CreateWithVnum(105).At(32, 19).Facing(7), -- Happy Miner [15:54:03]
        Monster.CreateWithVnum(108).At(32, 33).Facing(2), -- Weak Expy Miner [15:54:03]
        Monster.CreateWithVnum(109).At(33, 34).Facing(2), -- Expy Miner [15:54:03]
    }),
    -- wave 5
    MonsterWave.CreateWithDelay(4 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 27).Facing(5), -- Happy Miner [15:54:32]
        Monster.CreateWithVnum(105).At(30, 32).Facing(6), -- Happy Miner [15:54:32]
        Monster.CreateWithVnum(105).At(30, 38).Facing(7), -- Happy Miner [15:54:32]
        Monster.CreateWithVnum(105).At(32, 19).Facing(3), -- Happy Miner [15:54:32]
        Monster.CreateWithVnum(108).At(32, 33).Facing(7), -- Weak Expy Miner [15:54:32]
        Monster.CreateWithVnum(109).At(33, 29).Facing(2), -- Expy Miner [15:54:32]
        Monster.CreateWithVnum(109).At(33, 34).Facing(7), -- Expy Miner [15:54:32]
    }),
    -- wave 6
    MonsterWave.CreateWithDelay(5 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 32).Facing(1), -- Happy Miner [15:55:02]
        Monster.CreateWithVnum(105).At(32, 19).Facing(1), -- Happy Miner [15:55:02]
        Monster.CreateWithVnum(108).At(32, 33).Facing(1), -- Weak Expy Miner [15:55:02]
        Monster.CreateWithVnum(109).At(33, 29).Facing(5), -- Expy Miner [15:55:02]

    }),
    -- wave 7
    MonsterWave.CreateWithDelay(6 * 30).WithMonsters({
        Monster.CreateWithVnum(105).At(30, 32).Facing(3), -- Happy Miner [15:55:32]
        Monster.CreateWithVnum(106).At(30, 35).Facing(5), -- Miner [15:55:32]
        Monster.CreateWithVnum(105).At(32, 19).Facing(4), -- Happy Miner [15:55:32]
        Monster.CreateWithVnum(108).At(32, 33).Facing(7), -- Weak Expy Miner [15:55:32]
        Monster.CreateWithVnum(109).At(33, 29).Facing(4), -- Expy Miner [15:55:32]
    }),
    -- wave 8
    MonsterWave.CreateWithDelay(7 * 30).WithMonsters({
        Monster.CreateWithVnum(106).At(30, 35).Facing(7), -- Miner [15:56:02]
    }),
    -- wave 9
    MonsterWave.CreateWithDelay(8 * 30).WithMonsters({
        Monster.CreateWithVnum(106).At(30, 35).Facing(4), -- Miner [15:56:32]
    }),
})
map_2_7.AddNpcs({
    MapNpc.CreateNpcWithVnum(321).At(16, 29).Facing(5), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(16, 17).Facing(3), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(16, 15).Facing(5), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(16, 13).Facing(3), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(15, 11).Facing(1), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 25).Facing(4), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(14, 21).Facing(4), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(14, 17).Facing(4), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(14, 14).Facing(5), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 30).Facing(5), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 29).Facing(7), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 22).Facing(7), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 14).Facing(2), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(12, 13).Facing(6), -- Lord Cuarry's Knight [15:49:00]
    MapNpc.CreateNpcWithVnum(321).At(14, 13).Facing(4), -- Lord Cuarry's Knight [15:49:00]
})
map_2_7.AddObjects({
    MapObject.CreateLever().At(37, 10).OnTrigger({
        Event.OpenPortal(portal_2_7_to_3_7),
    }), -- [15:49:00]
    MapObject.CreateOldBox().At(31, 40), -- [15:49:00]
    MapObject.CreateOldBox().At(30, 11), -- [15:49:00]
})
map_2_7.OnMapJoin({
    Event.TryStartTaskForMap(map_2_7),
})
map_2_7.OnTaskFail({
    Event.FinishTimeSpace(TimeSpaceFinishType.TIME_IS_UP),
})
---

--- Map 3_7
map_3_7.AddNpcs({
    MapNpc.CreateNpcWithVnum(332).At(16, 16).Facing(7).WithMustProtectAura().WithFollowPlayer().WithCustomLevel(25), -- Mine Manager [15:49:32]
})
map_3_7.OnMapJoin({
    Event.TryStartTaskForMap(map_3_7),
})
---

--- Map 3_8
map_3_8.AddMonsters({
    Monster.CreateWithVnum(56).At(21, 15).Facing(7), -- Strong Vampie [15:49:39]
    Monster.CreateWithVnum(56).At(16, 24).Facing(2), -- Strong Vampie [15:49:39]
    Monster.CreateWithVnum(56).At(9, 15).Facing(4), -- Strong Vampie [15:49:39]
})
map_3_8.OnMapJoin({
    Event.TryStartTaskForMap(map_3_8),
})
---

--- Map 3_9
map_3_9.AddMonsters({
    Monster.CreateWithVnum(20).At(14, 15).Facing(0), -- Angry Mandra [15:49:48]
    Monster.CreateWithVnum(136).At(12, 13).Facing(4), -- Boing [15:49:48]
    Monster.CreateWithVnum(136).At(16, 13).Facing(2).SpawnAfterMobsKilled(1), -- Boing [15:49:50]
    Monster.CreateWithVnum(136).At(20, 14).Facing(6).SpawnAfterMobsKilled(2), -- Boing [15:49:51]
    Monster.CreateWithVnum(58).At(24, 13).Facing(7).SpawnAfterMobsKilled(2), -- Fire Vampie [15:49:51]
    Monster.CreateWithVnum(58).At(20, 16).Facing(1).SpawnAfterMobsKilled(4), -- Fire Vampie [15:49:53]
})
map_3_9.OnMapJoin({
    Event.TryStartTaskForMap(map_3_9),
})
map_3_9.OnTaskFinish({
    Event.OpenPortal(portal_3_9_to_3_10),
})
---

--- Map 3_10
map_3_10.OnMapJoin({
    Event.TryStartTaskForMap(map_3_10),
})
---

--- Map 2_10
map_2_10.AddMonsters({
    Monster.CreateWithVnum(58).At(14, 18).Facing(7), -- Fire Vampie [15:50:25]
    Monster.CreateWithVnum(58).At(14, 10).Facing(3), -- Fire Vampie [15:50:25]
    Monster.CreateWithVnum(66).At(10, 14).Facing(0).SpawnAfterMobsKilled(1), -- Tired Thornwalker [15:50:27]
    Monster.CreateWithVnum(66).At(19, 16).Facing(1).SpawnAfterMobsKilled(1), -- Tired Thornwalker [15:50:27]
    Monster.CreateWithVnum(140).At(7, 16).Facing(7).SpawnAfterMobsKilled(3), -- Small Mimic [15:50:29]
    Monster.CreateWithVnum(140).At(10, 10).Facing(1).SpawnAfterMobsKilled(5), -- Small Mimic [15:50:33]
})
map_2_10.AddObjects({
    MapObject.CreateLever().At(8, 5).OnSwitch({
        Event.TogglePortal(portal_2_10_to_3_10),
    }).OnTrigger({
        Event.AddTime(150),
    }), -- [15:50:25]
    MapObject.CreateOldBox().At(2, 14), -- [15:50:25]
})
map_2_10.OnMapJoin({
    Event.TryStartTaskForMap(map_2_10),
})
---

--- Map 4_10
map_4_10.AddMonsters({
    Monster.CreateWithVnum(136).At(14, 22).Facing(1), -- Boing [15:50:48]
    Monster.CreateWithVnum(136).At(10, 16).Facing(5), -- Boing [15:50:48]
    Monster.CreateWithVnum(58).At(7, 12).Facing(1), -- Fire Vampie [15:50:48]
    Monster.CreateWithVnum(58).At(17, 15).Facing(4).SpawnAfterMobsKilled(1), -- Fire Vampie [15:50:49]
    Monster.CreateWithVnum(58).At(21, 13).Facing(1).SpawnAfterMobsKilled(1), -- Fire Vampie [15:50:49]
})
map_4_10.AddObjects({
    MapObject.CreateLever().At(22, 18).OnSwitch({
        Event.TogglePortal(portal_4_10_to_4_9),
    }).OnTrigger({
        Event.AddTime(100),
    }), -- [15:50:48]
})
map_4_10.OnMapJoin({
    Event.TryStartTaskForMap(map_4_10),
})
---

--- Map 3_11
map_3_11.AddMonsters({
    Monster.CreateWithVnum(102).At(21, 13).Facing(3), -- Small Steel Hamster [15:50:09]
    Monster.CreateWithVnum(102).At(16, 10).Facing(4), -- Small Steel Hamster [15:50:09]
    Monster.CreateWithVnum(102).At(13, 16).Facing(2), -- Small Steel Hamster [15:50:09]
    Monster.CreateWithVnum(136).At(23, 17).Facing(0).SpawnAfterMobsKilled(2), -- Boing [15:50:12]
    Monster.CreateWithVnum(136).At(11, 11).Facing(5).SpawnAfterMobsKilled(3), -- Boing [15:50:13]
    Monster.CreateWithVnum(136).At(15, 23).Facing(4).SpawnAfterMobsKilled(3), -- Boing [15:50:13]
})
map_3_11.OnMapJoin({
    Event.TryStartTaskForMap(map_3_11),
})
map_3_11.OnTaskFinish({
    Event.OpenPortal(portal_3_11_to_3_10),
})
---

--- Map 4_9
map_4_9.AddMonsters({
    Monster.CreateWithVnum(56).At(11, 16).Facing(7), -- Strong Vampie [15:51:08]
    Monster.CreateWithVnum(56).At(11, 10).Facing(6), -- Strong Vampie [15:51:08]
    Monster.CreateWithVnum(56).At(14, 22).Facing(5).SpawnAfterMobsKilled(1), -- Strong Vampie [15:51:10]
    Monster.CreateWithVnum(56).At(14, 6).Facing(0).SpawnAfterMobsKilled(2), -- Strong Vampie [15:51:12]
    Monster.CreateWithVnum(136).At(10, 14).Facing(3).SpawnAfterMobsKilled(3), -- Boing [15:51:13]
    Monster.CreateWithVnum(136).At(13, 18).Facing(7).SpawnAfterMobsKilled(3), -- Boing [15:51:13]
    Monster.CreateWithVnum(136).At(13, 10).Facing(5).SpawnAfterMobsKilled(4), -- Boing [15:51:16]
})
map_4_9.OnMapJoin({
    Event.TryStartTaskForMap(map_4_9),
})
map_4_9.OnTaskFinish({
    Event.OpenPortal(portal_4_9_to_5_9),
})
---

--- Map 5_9
map_5_9.OnMapJoin({
    Event.TryStartTaskForMap(map_5_9),
})
---

local ts = TimeSpace.Create(14)  -- TimeSpace ID
    .SetMaps({map_0_7, map_1_7, map_2_7, map_3_7, map_3_8, map_3_9, map_3_10, map_2_10, map_4_10, map_3_11, map_4_9, map_5_9})
    .SetSpawn(Location.InMap(map_0_7).At(8, 10))
    .SetLives(3)
    .SetObjectives(objectives)
    .SetDurationInSeconds(300)
    .SetBonusPointItemDropChance(5000)
return ts
