dofile("Scripts/mission.lua");
dofile("Scripts/msl.lua");

function PostCreate()
	mission_lua.BasicMissionInitialize()
	AIparts:AddPeriodic("Offiziere bei Oberst", 10, func_Offiziere_bei_Oberst, 0 + RandomHalf(10))
	AIparts:AddPeriodic("Bunker1 erreicht", 100, func_Bunker1_erreicht, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Befehlsübergabe Bunker1", 100, func_Befehls_bergabe_Bunker1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Bunker2 erreicht", 100, func_Bunker2_erreicht, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Befehlsübergabe Bunker2", 100, func_Befehls_bergabe_Bunker2, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Übergabe Flugabwehr", 100, func__bergabe_Flugabwehr, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Welle1", 100, func_Welle1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Welle2", 100, func_Welle2, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Ari Graben", 100, func_Ari_Graben, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 1", 100, func_New_Script_1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 2", 100, func_New_Script_2, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 3", 100, func_New_Script_3, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 4", 100, func_New_Script_4, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 5", 100, func_New_Script_5, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 6", 100, func_New_Script_6, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 7", 100, func_New_Script_7, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("New Script 8", 100, func_New_Script_8, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Patrol LKW", 1200, func_Patrol_LKW, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Angriff alle Sektoren", 100, func_Angriff_alle_Sektoren, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben1", 100, func_Fighter_Graben1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben3", 100, func_Fighter_Graben3, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben7", 100, func_Fighter_Graben7, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben11", 100, func_Fighter_Graben11, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben13", 100, func_Fighter_Graben13, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben17", 100, func_Fighter_Graben17, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Fighter Graben21", 100, func_Fighter_Graben21, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Bomber 1", 100, func_Bomber_1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("LKW hinter Wall", 100, func_LKW_hinter_Wall, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Panzer an Wall", 100, func_Panzer_an_Wall, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle3 Start ", 100, func_Welle3_Start_, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle31", 100, func_Welle31, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle32", 100, func_Welle32, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle33", 100, func_Welle33, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle34", 100, func_Welle34, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle35", 100, func_Welle35, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle36", 100, func_Welle36, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle37", 100, func_Welle37, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Welle38", 100, func_Welle38, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Angriff Süd", 100, func_Angriff_S_d, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Angriff Nord", 100, func_Angriff_Nord, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Verstärkung Süd", 100, func_Verst_rkung_S_d, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Verstärkung Nord", 100, func_Verst_rkung_Nord, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Angriff_Arti", 100, func_Angriff_Arti, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt", 100, func_Stadt, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Durchbruch > 0", 100, func_Durchbruch___0, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Durchbruch > 1", 100, func_Durchbruch___1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Durchbruch > 7", 200, func_Durchbruch___7, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Attack Oberst", 100, func_Attack_Oberst, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft1", 100, func_Luft1, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft2", 100, func_Luft2, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft3", 100, func_Luft3, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft4", 100, func_Luft4, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft5", 100, func_Luft5, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft6", 100, func_Luft6, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft7", 100, func_Luft7, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft8", 100, func_Luft8, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luft9", 100, func_Luft9, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Volkssturm", 100, func_Volkssturm, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("West", 100, func_West, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Panzer Stadt", 100, func_Panzer_Stadt, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Luftabwehr defekt", 100, func_Luftabwehr_defekt, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Air Attack", 100, func_Air_Attack, 15000 + RandomHalf(100))
	AIparts:AddPeriodic("Oberst_Phase1", 100, func_Oberst_Phase1, 1500 + RandomHalf(100))
	AIparts:AddPeriodic("Blockade", 100, func_Blockade, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Start_Stadt_räumen", 100, func_Start_Stadt_r_umen, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sturm Nord", 100, func_Sturm_Nord, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sturm Sued", 100, func_Sturm_Sued, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sturm_Ost", 100, func_Sturm_Ost, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sturm West", 100, func_Sturm_West, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sturm_Oberst", 100, func_Sturm_Oberst, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Killer Zentrum1", 10, func_Killer_Zentrum1, 20000 + RandomHalf(10))
	AIparts:AddPeriodic("Zivilist tot", 100, func_Zivilist_tot, 1000 + RandomHalf(100))
	AIparts:AddPeriodic("Entsatz", 100, func_Entsatz, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Entsatz im Zentrum", 100, func_Entsatz_im_Zentrum, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Bomber Ost", 100, func_Bomber_Ost, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Bomber Stadt Ost", 100, func_Bomber_Stadt_Ost, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt 1", 100, func_Stadt_1, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt 2", 100, func_Stadt_2, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt 3", 100, func_Stadt_3, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt 4", 100, func_Stadt_4, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Stadt 5", 100, func_Stadt_5, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Sieg", 100, func_Sieg, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Bomber Sued", 100, func_Bomber_Sued, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("Bomber Nord", 100, func_Bomber_Nord, 20000 + RandomHalf(100))
	AIparts:AddPeriodic("cheat", 100, func_cheat, 100 + RandomHalf(100))
	AIparts:AddPeriodic("Sound", 20000, func_Sound, 3000 + RandomHalf(100))
	msd_vars = {
		Air_Attack = false,
		AriGraben = false,
		Arti_Ende = false,
		Arti_Start = false,
		Attack_Oberst_Ende = false,
		Attack_Oberst_Start = false,
		Befehlsuebergabe_Wall = false,
		Blockade = false,
		cheat = true,
		Counter_Killer = 0,
		Counter_Sektor = 0,
		Counter_SN = 0,
		Counter_SO = 0,
		Counter_SS = 0,
		Counter_SW = 0,
		Durchbruch = false,
		Durchbruch_Counter = 0,
		Entsatz = false,
		Feindkontakt = false,
		final = false,
		Killer_Start = false,
		Luft_Counter = 0,
		Luft1Ende = false,
		Luft1Start = false,
		Luft2Ende = false,
		Luft2Start = false,
		Luft3Ende = false,
		Luft3Start = false,
		Luft4Ende = false,
		Luft4Start = false,
		Luft5Ende = false,
		Luft5Start = false,
		Luft6Ende = false,
		Luft6Start = false,
		Luft7Ende = false,
		Luft7Start = false,
		Luft8Ende = false,
		Luft8Start = false,
		Luft9Ende = false,
		Luft9Start = false,
		Panther_zu_Wall = false,
		SNE = false,
		SNS = false,
		SOE = false,
		SOS = false,
		SSE = false,
		SSS = false,
		StrasseNordAngriff = false,
		StrasseNordAngriffEnde = false,
		StrasseSuedAngriff = false,
		StrasseSuedAngriffEnde = false,
		SturmStart = false,
		SWE = false,
		SWS = false,
		Timer_Arti = true,
		Timer_Attack_Oberst = true,
		Timer_Luft1 = true,
		Timer_Luft2 = true,
		Timer_Luft3 = true,
		Timer_Luft4 = true,
		Timer_Luft5 = true,
		Timer_Luft6 = true,
		Timer_Luft7 = true,
		Timer_Luft8 = true,
		Timer_Luft9 = true,
		Timer_Nord = true,
		Timer_SN = true,
		Timer_SO = true,
		Timer_SS = true,
		Timer_Sued = true,
		Timer_SW = true,
		Timer_Welle1 = true,
		Timer_Welle2 = true,
		Timer_Welle31 = true,
		Timer_Welle32 = true,
		Timer_Welle33 = true,
		Timer_Welle34 = true,
		Timer_Welle35 = true,
		Timer_Welle36 = true,
		Timer_Welle37 = true,
		Timer_Welle38 = true,
		Welle1_Counter = 0,
		Welle1Ende = false,
		Welle1Start = false,
		Welle2_Counter = 0,
		Welle2Ende = false,
		Welle2Start = false,
		Welle31_Counter = 0,
		Welle31Ende = false,
		Welle31Start = false,
		Welle32Ende = false,
		Welle32Start = false,
		Welle33Ende = false,
		Welle33Start = false,
		Welle34Ende = false,
		Welle34Start = false,
		Welle35Ende = false,
		Welle35Start = false,
		Welle36Ende = false,
		Welle36Start = false,
		Welle37Ende = false,
		Welle37Start = false,
		Welle38Ende = false,
		Welle38Start = false,
		Welle3Start = false,
		Zivis = true,
	}
end

function func_Offiziere_bei_Oberst()
	do
		mission.CameraLock(true)
		mission.CameraAt({20.441696, 3.617657, -43.270493}, 30.000000, 90.000000, 130.000000, 5.00)
		DisableObjective("Einleitung")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  mission.CameraAt({20.441698, 3.975204, -29.658096}, 44.567867, 90.000000, 30.000000, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  mission.OutScreenMessage(100008, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  mission.CameraAt({-496.384857, 13.338258, -615.486694}, 51.906738, -170.903305, 54.307762, 0.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 36*10, function()  mission.OutScreenMessage(100009, 15, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  mission.CameraAt({-489.612274, 14.479280, 648.456299}, 45.688473, 129.111328, 64.193520, 0.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 56*10, function()  mission.OutScreenMessage(100010, 15, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  mission.CameraAt({20.441696, 3.617657, -43.270493}, 30.000000, 90.000000, 64.671211, 0.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 76*10, function()  mission.OutScreenMessage(100011, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  mission.CameraAt({20.441698, 3.975204, -29.658096}, 44.567867, 90.000000, 30.000000, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 95*10, function()  mission.OutScreenMessage(100012, 15, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 115*10, function()  mission.CameraAt({19.196983, 3.450295, -53.787895}, 59.999996, 85.338882, 50.159924, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 125*10, function()  mission.OutScreenMessage(100013, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 130*10, function()  MoveGroupTo("Offiziere1", {}, {"Parken_Oberst", }, {}, true, true, "", false, 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 129*10, function()  mission.CameraAt({20.441696, 3.617657, -43.270493}, 30.000000, 90.000000, 64.671211, 5.00) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  TransferUnits("Offiziere1", 0, "Offiziere", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 135*10, function()  TransferUnits("StartJeep", 0, "Jeep_Player", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  AcivateObjective("Befehlsbunker1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  AcivateObjective("Befehlsbunker2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  mission.CameraLock(false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  mission.OutScreenMessage(100050, 20, "0xFFE0E0E0") end)
		AIparts:RemovePeriodic("Offiziere bei Oberst")
	end
end

function func_Bunker1_erreicht()
	if NumGroupUnitsNearPoint("Offiziere", 13, "Bunker1", 3) > 0 then
		ProceedObjective("Befehlsbunker1", "Player")
		SetPlaneSide(1, "E")
		msd_vars.Welle1Start = true
		AIparts:RemovePeriodic("Bunker1 erreicht")
	end
end

function func_Befehls_bergabe_Bunker1()
	if IsObjectiveCompleted("Befehlsbunker1", "Player") then
		TransferUnits("Graben1_Friend", 0, "Uebergabe_Wall", 0)
		msd_vars.Befehlsuebergabe_Wall = true
		AIparts:RemovePeriodic("Befehlsübergabe Bunker1")
	end
end

function func_Bunker2_erreicht()
	if NumGroupUnitsNearPoint("Offiziere", 13, "Bunker2", 3) > 0 then
		ProceedObjective("Befehlsbunker2", "Player")
		AIparts:RemovePeriodic("Bunker2 erreicht")
		msd_vars.Welle1Start = true
	end
end

function func_Befehls_bergabe_Bunker2()
	if IsObjectiveCompleted("Befehlsbunker2", "Player") then
		TransferUnits("Graben2_Friend", 0, "Uebergabe_Wall", 0)
		msd_vars.Befehlsuebergabe_Wall = true
		AIparts:RemovePeriodic("Befehlsübergabe Bunker2")
	end
end

function func__bergabe_Flugabwehr()
	if IsObjectiveCompleted("Befehlsbunker1", "Player") and IsObjectiveCompleted("Befehlsbunker2", "Player") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Flugabwehr", 0, "Uebergabe_Wall", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  TransferUnits("Graben1_Friend", 0, "Uebergabe_Wall", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  TransferUnits("Graben2_Friend", 0, "Uebergabe_Wall", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung4") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung5") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung6") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung7") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  AcivateObjective("Stellung8") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 8*10, function()  DisableObjective("Befehlsbunker1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 8*10, function()  DisableObjective("Befehlsbunker2") end)
		msd_vars.cheat = false
		AIparts:RemovePeriodic("Übergabe Flugabwehr")
	end
end

function func_Welle1()
	if msd_vars.Welle1Ende or msd_vars.Welle1_Counter > 5 then
		msd_vars.Welle1Start = false
		msd_vars.Welle2Start = true
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle", "Welle1", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Welle1")
	end
	if msd_vars.Welle1Start and msd_vars.Timer_Welle1 then
		MoveGroupToZone("Welle", "Welle1", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle1", }, "Spawn_00", "Welle", "Welle", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle1 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  msd_vars.Timer_Welle1 = true end)
		msd_vars.Welle1_Counter = msd_vars.Welle1_Counter + 1
	end
end

function func_Welle2()
	if msd_vars.Welle2Ende or msd_vars.Welle2_Counter > 5 then
		msd_vars.Welle2Start = false
		msd_vars.Welle3Start = true
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle", "Welle1", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Welle2")
	end
	if msd_vars.Welle2Start and msd_vars.Timer_Welle2 then
		MoveGroupToZone("Welle", "Welle1", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle2", }, "Spawn_00", "Welle", "Welle", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle2 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  msd_vars.Timer_Welle2 = true end)
		msd_vars.Welle2_Counter = msd_vars.Welle2_Counter + 1
	end
end

function func_Ari_Graben()
	if msd_vars.AriGraben then
		Bombardment("Graben01", 30, 8, 6, 30)
		Bombardment("Graben02", 30, 8, 6, 30)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  Bombardment("Graben03", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  Bombardment("Graben13", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  Bombardment("Graben04", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  Bombardment("Graben14", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  Bombardment("Graben05", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  Bombardment("Graben15", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  Bombardment("Graben06", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  Bombardment("Graben16", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  Bombardment("Graben07", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  Bombardment("Graben17", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  Bombardment("Graben08", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  Bombardment("Graben18", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  Bombardment("Graben09", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  Bombardment("Graben19", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  Bombardment("Graben10", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  Bombardment("Graben20", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  Bombardment("Graben11", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  Bombardment("Graben21", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  Bombardment("Graben12", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  Bombardment("Graben22", 30, 8, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  Bombardment("AriPatrol1", 50, 12, 15, 30) end)
		AIparts:RemovePeriodic("Ari Graben")
	end
end

function func_New_Script_1()
	if NumGroupUnitsNearPoint("Patrol1", 0, "Patrol1", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol1", {}, {"Patrol2", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol1", 0, "Patrol2", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol1", {}, {"Patrol1", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol1", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100000, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol1", 50, 12, 15, 300)
		MoveGroupTo("Patrol1", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol1", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall1b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall1a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 1")
	end
end

function func_New_Script_2()
	if NumGroupUnitsNearPoint("Patrol2", 0, "Patrol2", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol2", {}, {"Patrol3", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol2", 0, "Patrol3", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol2", {}, {"Patrol2", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol2", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100001, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol2", 50, 12, 15, 300)
		MoveGroupTo("Patrol2", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol2", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall2a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall2b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 2")
	end
end

function func_New_Script_3()
	if NumGroupUnitsNearPoint("Patrol3", 0, "Patrol3", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol3", {}, {"Patrol4", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol3", 0, "Patrol4", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol3", {}, {"Patrol3", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol3", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100002, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol3", 50, 12, 15, 300)
		MoveGroupTo("Patrol3", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol3", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall3b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_02", "", "Uebergabe_Wall", false, true, {{unload_to="Wall3a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 3")
	end
end

function func_New_Script_4()
	if NumGroupUnitsNearPoint("Patrol4", 0, "Patrol4", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol4", {}, {"Patrol5", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol4", 0, "Patrol5", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol4", {}, {"Patrol4", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol4", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100003, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol4", 50, 12, 15, 300)
		MoveGroupTo("Patrol4", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol4", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_00", "", "Uebergabe_Wall", false, true, {{unload_to="Wall4b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_00", "", "Uebergabe_Wall", false, true, {{unload_to="Wall4a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 4")
	end
end

function func_New_Script_5()
	if NumGroupUnitsNearPoint("Patrol5", 0, "Patrol5", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol5", {}, {"Patrol6", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol5", 0, "Patrol6", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol5", {}, {"Patrol5", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol5", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100004, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol5", 50, 12, 15, 300)
		MoveGroupTo("Patrol5", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol5", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_00", "", "Uebergabe_Wall", false, true, {{unload_to="Wall5b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_00", "", "Uebergabe_Wall", false, true, {{unload_to="Wall5a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 5")
	end
end

function func_New_Script_6()
	if NumGroupUnitsNearPoint("Patrol6", 0, "Patrol6", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol6", {}, {"Patrol7", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol6", 0, "Patrol7", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol6", {}, {"Patrol6", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol6", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100005, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol6", 50, 12, 15, 300)
		MoveGroupTo("Patrol6", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol6", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall6b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall6a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 6")
	end
end

function func_New_Script_7()
	if NumGroupUnitsNearPoint("Patrol7", 0, "Patrol7", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol7", {}, {"Patrol8", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol7", 0, "Patrol8", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol7", {}, {"Patrol7", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol7", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100006, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol7", 50, 12, 15, 300)
		MoveGroupTo("Patrol7", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol7", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall7b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall7a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 7")
	end
end

function func_New_Script_8()
	if NumGroupUnitsNearPoint("Patrol8", 0, "Patrol8", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol8", {}, {"Patrol9", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnitsNearPoint("Patrol8", 0, "Patrol9", 20) == 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupTo("Patrol8", {}, {"Patrol8", }, {}, true, true, "", false, 2) end)
	end
	if NumGroupUnits("Patrol8", 0, false, false, false) < 2 then
		mission.OutScreenMessage(100007, 10, "0xFFE0E0E0")
		Bombardment("AriPatrol8", 50, 12, 15, 300)
		MoveGroupTo("Patrol8", {"", }, {"Oberst", }, {"", }, true, true, "", false, 100)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  TransferUnits("Patrol8", 0, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall1", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall8b", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Player", {"Verstärkung_Wall2", }, "Spawn_01", "", "Uebergabe_Wall", false, true, {{unload_to="Wall8a", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 50) end)
		msd_vars.Feindkontakt = true
		msd_vars.Counter_Sektor = msd_vars.Counter_Sektor + 1
		AIparts:RemovePeriodic("New Script 8")
	end
end

function func_Patrol_LKW()
	if msd_vars.Feindkontakt then
		UnloadTransports("Patrol_LKW")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  TransferUnits("Patrol_LKW", 13, "Uebergabe_Patrol", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  MoveGroupTo("Patrol_LKW", {}, {"Exit", }, {}, true, true, "", true, 30) end)
		AIparts:RemovePeriodic("Patrol LKW")
	end
	if not msd_vars.Feindkontakt then
		RunSpawn("Friend", {"Patrol_LKW", }, "Spawn_09", "Patrol_LKW", "Patrol_LKW", true, true, {{dislocation="Patrol1", }, {disappear=true, }, }, false, 30)
	end
end

function func_Angriff_alle_Sektoren()
	if msd_vars.Counter_Sektor > 7 then
		msd_vars.AriGraben = true
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_01", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_02", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_03", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_04", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_05", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_06", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_07", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_08", "Versorger_Friend", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Versorgung", }, "Spawn_10", "Versorger_Friend", "", true, true, {}, false, 10) end)
		TransferUnits("Graben1_Friend", 0, "Uebergabe_Wall", 0)
		TransferUnits("Graben2_Friend", 0, "Uebergabe_Wall", 0)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  TransferUnits("Versorger_Friend", 0, "Uebergabe_Wall", 0) end)
		msd_vars.Welle1Ende = true
		AIparts:RemovePeriodic("Angriff alle Sektoren")
	end
end

function func_Fighter_Graben1()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben01", 15) > 0 then
		SendPlane("Player", "Graben01", "strike_fighter", "E", 3, -1, "")
		AIparts:RemovePeriodic("Fighter Graben1")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben3()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben03", 15) > 0 then
		SendPlane("Player", "Graben03", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben3")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben7()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben07", 15) > 0 then
		SendPlane("Player", "Graben07", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben7")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben11()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben11", 15) > 0 then
		SendPlane("Player", "Graben11", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben11")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben13()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben13", 15) > 0 then
		SendPlane("Player", "Graben13", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben13")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben17()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben17", 15) > 0 then
		SendPlane("Player", "Graben17", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben17")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Fighter_Graben21()
	if NumGroupUnitsNearPoint("Welle", 0, "Graben21", 15) > 0 then
		SendPlane("Player", "Graben21", "strike_fighter", "E", 10, -1, "")
		AIparts:RemovePeriodic("Fighter Graben21")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_Bomber_1()
	if NumGroupUnitsNearPoint("Welle", 0, "Bomber", 15) > 5 then
		SendPlane("Player", "Bomber", "bomber", "NE", 10, -1, "")
		SendPlane("Player", "Bomber", "bomber", "SE", 10, -1, "")
		AIparts:RemovePeriodic("Bomber 1")
		AddBonus(1, 3, 1, -1, -1)
	end
end

function func_LKW_hinter_Wall()
	if NumPlayerUnitsInZone("Enemy", "Vor_Wall") > 0 then
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_00", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW4", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_01", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW7", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_01", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW6", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_01", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW5", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_02", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW3", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_02", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW2", }, }, false, 10)
		RunSpawn("Player", {"Verstärkung_Wall3", }, "Spawn_02", "Uebergabe_Wall", "Uebergabe_Wall", true, true, {{dislocation="LKW1", }, }, false, 10)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Panther_zu_Wall = true end)
		AIparts:RemovePeriodic("LKW hinter Wall")
	end
end

function func_Panzer_an_Wall()
	if msd_vars.Panther_zu_Wall then
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_01", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_02", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_03", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_04", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_05", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_06", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_07", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_08", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		RunSpawn("Friend", {"Panzer_4", }, "Spawn_10", "Versorger_Friend", "Uebergabe_Wall", true, true, {}, false, 50)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  TransferUnits("Versorger_Friend", 0, "Uebergabe_Wall", 0) end)
		AIparts:RemovePeriodic("Panzer an Wall")
	end
end

function func_Welle3_Start_()
	if msd_vars.Welle3Start then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  MoveGroupToZone("Welle", "Welle1", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  msd_vars.Welle31Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  msd_vars.Welle35Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 140*10, function()  msd_vars.Welle33Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  msd_vars.Welle38Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 220*10, function()  msd_vars.Welle34Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  msd_vars.Welle37Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Welle32Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 340*10, function()  msd_vars.Welle36Start = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 900*10, function()  MoveGroupToZone("Welle", "Welle1", false, false) end)
		RunSpawn("Enemy", {"Wave", }, "Spawn_10", "Wave", "Wave", true, true, {}, false, 10)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 850*10, function()  MoveGroupToZone("Wave", "Zentrum", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 950*10, function()  MoveGroupToZone("Wave", "Zentrum", false, false) end)
		AIparts:RemovePeriodic("Welle3 Start ")
	end
end

function func_Welle31()
	if NumGroupUnitsInZone("Welle31", "Wall1") > 5 and NumPlayerUnitsInZone("Player", "Wall1") < 2 or NumGroupUnitsInZone("Welle31", "Wall1") > 25 then
		msd_vars.Welle31Ende = true
		msd_vars.Arti_Start = true
		msd_vars.Luft1Start = true
	end
	if msd_vars.Welle31Ende then
		msd_vars.Welle31Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle31", "Wall1", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle31")
	end
	if msd_vars.Welle31Start and msd_vars.Timer_Welle31 then
		MoveGroupToZone("Welle31", "Wall1", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_01", "Welle31", "Welle31", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle31 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle31 = true end)
	end
end

function func_Welle32()
	if NumGroupUnitsInZone("Welle32", "Wall2") > 5 and NumPlayerUnitsInZone("Player", "Wall2") < 2 or NumGroupUnitsInZone("Welle32", "Wall2") > 25 then
		msd_vars.Welle32Ende = true
		msd_vars.StrasseSuedAngriff = true
		msd_vars.Luft2Start = true
	end
	if msd_vars.Welle32Ende then
		msd_vars.Welle32Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle32", "Wall2", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle32")
	end
	if msd_vars.Welle32Start and msd_vars.Timer_Welle32 then
		MoveGroupToZone("Welle32", "Wall2", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_02", "Welle32", "Welle32", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle32 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle32 = true end)
	end
end

function func_Welle33()
	if NumGroupUnitsInZone("Welle33", "Wall3") > 5 and NumPlayerUnitsInZone("Player", "Wall3") < 2 or NumGroupUnitsInZone("Welle33", "Wall3") > 25 then
		msd_vars.Welle33Ende = true
		msd_vars.Luft3Start = true
	end
	if msd_vars.Welle33Ende then
		msd_vars.Welle33Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle33", "Wall3", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle33")
	end
	if msd_vars.Welle33Start and msd_vars.Timer_Welle33 then
		MoveGroupToZone("Welle33", "Wall3", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_03", "Welle33", "Welle33", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle33 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle33 = true end)
	end
end

function func_Welle34()
	if NumGroupUnitsInZone("Welle34", "Wall4") > 5 and NumPlayerUnitsInZone("Player", "Wall4") < 2 or NumGroupUnitsInZone("Welle34", "Wall4") > 25 then
		msd_vars.Welle34Ende = true
		msd_vars.Attack_Oberst_Start = true
	end
	if msd_vars.Welle34Ende then
		msd_vars.Welle34Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle34", "Wall4", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle34")
	end
	if msd_vars.Welle34Start and msd_vars.Timer_Welle34 then
		MoveGroupToZone("Welle34", "Wall4", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_04", "Welle34", "Welle34", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle34 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle34 = true end)
	end
end

function func_Welle35()
	if NumGroupUnitsInZone("Welle35", "Wall5") > 5 and NumPlayerUnitsInZone("Player", "Wall5") < 2 or NumGroupUnitsInZone("Welle35", "Wall5") > 25 then
		msd_vars.Welle35Ende = true
		msd_vars.Attack_Oberst_Start = true
	end
	if msd_vars.Welle35Ende then
		msd_vars.Welle35Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle35", "Wall5", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle35")
	end
	if msd_vars.Welle35Start and msd_vars.Timer_Welle35 then
		MoveGroupToZone("Welle35", "Wall5", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_05", "Welle35", "Welle35", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle35 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle35 = true end)
	end
end

function func_Welle36()
	if NumGroupUnitsInZone("Welle36", "Wall6") > 5 and NumPlayerUnitsInZone("Player", "Wall6") < 2 or NumGroupUnitsInZone("Welle36", "Wall6") > 25 then
		msd_vars.Welle36Ende = true
		msd_vars.Luft4Start = true
	end
	if msd_vars.Welle36Ende then
		msd_vars.Welle36Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle36", "Wall6", true, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle36")
	end
	if msd_vars.Welle36Start and msd_vars.Timer_Welle36 then
		MoveGroupToZone("Welle36", "Wall6", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_06", "Welle36", "Welle36", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle36 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle36 = true end)
	end
end

function func_Welle37()
	if NumGroupUnitsInZone("Welle37", "Wall7") > 5 and NumPlayerUnitsInZone("Player", "Wall7") < 2 or NumGroupUnitsInZone("Welle37", "Wall7") > 25 then
		msd_vars.Welle37Ende = true
		msd_vars.StrasseNordAngriff = true
		msd_vars.Luft5Start = true
	end
	if msd_vars.Welle37Ende then
		msd_vars.Welle37Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle37", "Wall7", false, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle37")
	end
	if msd_vars.Welle37Start and msd_vars.Timer_Welle37 then
		MoveGroupToZone("Welle37", "Wall7", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_07", "Welle37", "Welle37", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle37 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle37 = true end)
	end
end

function func_Welle38()
	if NumGroupUnitsInZone("Welle38", "Wall8") > 5 and NumPlayerUnitsInZone("Player", "Wall8") < 2 or NumGroupUnitsInZone("Welle38", "Wall8") > 25 then
		msd_vars.Welle38Ende = true
		msd_vars.Luft6Start = true
	end
	if msd_vars.Welle38Ende then
		msd_vars.Welle38Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Welle38", "Wall8", false, false) end)
		FlushSpawn(2)
		msd_vars.Durchbruch_Counter = msd_vars.Durchbruch_Counter + 1
		AIparts:RemovePeriodic("Welle38")
	end
	if msd_vars.Welle38Start and msd_vars.Timer_Welle38 then
		MoveGroupToZone("Welle38", "Wall8", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Welle3", }, "Spawn_08", "Welle38", "Welle38", true, true, {}, false, 5) end)
		msd_vars.Timer_Welle38 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Timer_Welle38 = true end)
	end
end

function func_Angriff_S_d()
	if NumGroupUnitsInZone("StrasseSued", "Tor_Sued") > 5 and NumPlayerUnitsInZone("Player", "Tor_Sued") < 2 or NumGroupUnitsInZone("StrasseSued", "Tor_Sued") > 25 then
		msd_vars.StrasseSuedAngriffEnde = true
		msd_vars.Luft8Start = true
	end
	if msd_vars.StrasseSuedAngriffEnde then
		msd_vars.StrasseSuedAngriff = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("StrasseSued", 0, "Exit_Sued", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("StrasseSued", "Tor_Sued", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Angriff Süd")
	end
	if msd_vars.StrasseSuedAngriff and msd_vars.Timer_Sued then
		MoveGroupToZone("StrasseSued", "Tor_Sued", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Strassensperre", }, "Spawn_02", "StrasseSued", "StrasseSued", true, true, {}, false, 5) end)
		msd_vars.Timer_Sued = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  msd_vars.Timer_Sued = true end)
	end
end

function func_Angriff_Nord()
	if NumGroupUnitsInZone("StrasseNord", "Tor_Nord") > 5 and NumPlayerUnitsInZone("Player", "Tor_Nord") < 2 or NumGroupUnitsInZone("StrasseNord", "Tor_Nord") > 25 then
		msd_vars.StrasseNordAngriffEnde = true
		msd_vars.Luft7Start = true
	end
	if msd_vars.StrasseNordAngriffEnde then
		msd_vars.StrasseNordAngriff = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("StrasseNord", 0, "Exit_Nord", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("StrasseNord", "Tor_Nord", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Angriff Nord")
	end
	if msd_vars.StrasseNordAngriff and msd_vars.Timer_Nord then
		MoveGroupToZone("StrasseNord", "Tor_Nord", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Strassensperre", }, "Spawn_07", "StrasseNord", "StrasseNord", true, true, {}, false, 5) end)
		msd_vars.Timer_Nord = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  msd_vars.Timer_Nord = true end)
	end
end

function func_Verst_rkung_S_d()
	if NumGroupUnitsInZone("StrasseSued", "Tor_Sued") > 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  RunSpawn("Player", {"Tank + 5 LKW + Versorger", }, "Spawn_05", "", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  mission.OutScreenMessage(100024, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  AcivateObjective("Süd") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 230*10, function()  DisableObjective("Süd") end)
		AIparts:RemovePeriodic("Verstärkung Süd")
	end
end

function func_Verst_rkung_Nord()
	if NumGroupUnitsInZone("StrasseNord", "Tor_Nord") > 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  RunSpawn("Player", {"Tank + 5 LKW + Versorger", }, "Spawn_04", "", "", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  mission.OutScreenMessage(100023, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  AcivateObjective("Nord") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 230*10, function()  DisableObjective("Nord") end)
		AIparts:RemovePeriodic("Verstärkung Nord")
	end
end

function func_Angriff_Arti()
	if NumGroupUnitsInZone("Angriff_Arti", "Arti") > 15 then
		msd_vars.Arti_Ende = true
		msd_vars.Arti_Start = false
		msd_vars.Timer_Arti = false
	end
	if msd_vars.Arti_Ende then
		msd_vars.Arti_Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Angriff_Arti", "Arti", true, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Angriff_Arti", 0, "Exit_Sued", 0) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Angriff_Arti")
	end
	if msd_vars.Arti_Start and msd_vars.Timer_Arti and not msd_vars.Arti_Ende then
		MoveGroupToZone("Angriff_Arti", "Arti", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Angriff_Stellung", }, "Spawn_09", "Angriff_Arti", "Angriff_Arti", true, true, {}, false, 10) end)
		msd_vars.Timer_Arti = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  msd_vars.Timer_Arti = true end)
	end
end

function func_Stadt()
	if IsObjectiveActive("Stadt") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung4") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung5") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung6") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung7") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  DisableObjective("Stellung8") end)
		AIparts:RemovePeriodic("Stadt")
	end
end

function func_Durchbruch___0()
	if msd_vars.Durchbruch_Counter > 0 then
		RunSpawn("Friend", {"Königstiger", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="Stadt1", }, }, false, 0)
		RunSpawn("Friend", {"Tiger", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="Stadt2", }, }, false, 0)
		RunSpawn("Friend", {"Tiger", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="Stadt3", }, }, false, 0)
		RunSpawn("Friend", {"Tiger", }, "Spawn_12", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="Stadt4", }, }, false, 0)
		RunSpawn("Friend", {"Tiger", }, "Spawn_13", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="Stadt5", }, }, false, 0)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 900*10, function()  MoveGroupToZone("Welle", "Welle1", false, false) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  RunSpawn("Friend", {"Fabrikmaenner", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO6", }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtW1", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 35*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtW2", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 40*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtW3", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 45*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtW4", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 50*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_12", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtN1", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 55*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_12", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtN2", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_12", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtN3", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 65*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_12", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtN4", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 70*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_13", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtS1", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 75*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_13", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtS2", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 80*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_13", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtS3", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 85*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_13", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtS4", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 115*10, function()  RunSpawn("Friend", {"10_Maenner x 4", }, "Spawn_15", "Stadt_Friend", "Stadt_Friend", true, true, {}, false, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  RunSpawn("Friend", {"10_Maenner x 4", }, "Spawn_14", "Stadt_Friend", "", true, true, {}, false, 30) end)
		RunSpawn("Enemy", {"Strassensperre", }, "Spawn_07", "StrasseNord", "StrasseNord", true, true, {}, false, 10)
		RunSpawn("Enemy", {"Strassensperre", }, "Spawn_02", "StrasseSued", "StrasseSued", true, true, {}, false, 10)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO1", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 95*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO2", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO3", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 105*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO4", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  RunSpawn("Friend", {"Stadt_Pak", }, "Spawn_11", "Stadt_Friend", "Stadt_Friend", true, true, {{unload_to="StadtO5", }, {disconnect=true, }, {dislocation="Exit", }, {disappear=true, }, }, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  RunSpawn("Player", {"5 LKW + Versorger", }, "Spawn_03", "Stadt", "Stadt", true, true, {}, false, 2) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  mission.OutScreenMessage(100021, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  mission.OutScreenMessage(100022, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  RunSpawn("Player", {"2Jagdpanzer", }, "Spawn_01", "Stadt", "Stadt", true, true, {}, false, 10) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  RunSpawn("Player", {"2Jagdpanzer", }, "Spawn_02", "Stadt", "Stadt", true, true, {}, false, 10) end)
		MoveGroupToZone("Welle", "Welle1", true, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  TransferUnits("Stadt_Friend", 0, "Stadt", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 350*10, function()  TransferUnits("Stadt_Friend", 0, "Stadt", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 450*10, function()  TransferUnits("Stadt_Friend", 0, "Stadt", 0) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 550*10, function()  TransferUnits("Stadt_Friend", 0, "Stadt", 0) end)
		AIparts:RemovePeriodic("Durchbruch > 0")
	end
end

function func_Durchbruch___1()
	if msd_vars.Durchbruch_Counter > 1 then
		Bombardment("Wall_Strasse", 30, 20, 12, 30)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  Bombardment("Bunker1", 5, 20, 6, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  Bombardment("Bunker2", 5, 20, 6, 30) end)
		MoveGroupToZone("Welle", "Welle1", true, false)
		MoveGroupToZone("Zivilist1", "Zentrum", false, false)
		AIparts:RemovePeriodic("Durchbruch > 1")
	end
end

function func_Durchbruch___7()
	if msd_vars.Durchbruch_Counter > 7 then
		TransferUnits("Welle31", 16, "Wall_Exit", 0)
		TransferUnits("Welle32", 16, "Wall_Exit", 0)
		TransferUnits("Welle33", 16, "Wall_Exit", 0)
		TransferUnits("Welle34", 16, "Wall_Exit", 0)
		TransferUnits("Welle35", 16, "Wall_Exit", 0)
		TransferUnits("Welle36", 16, "Wall_Exit", 0)
		TransferUnits("Welle37", 16, "Wall_Exit", 0)
		TransferUnits("Welle38", 16, "Wall_Exit", 0)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 600*10, function()  MoveGroupTo("Wall_Exit", {}, {"Exit_Feind", }, {}, false, false, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 900*10, function()  MoveGroupTo("Wall_Exit", {}, {"Exit_Feind", }, {}, false, false, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1.200*10, function()  MoveGroupTo("Wall_Exit", {}, {"Exit_Feind", }, {}, false, false, "", true, 30) end)
		MoveGroupToZone("Welle", "Welle1", true, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1.500*10, function()  DisappearUnitsInGroup("Wall_Exit") end)
		AIparts:RemovePeriodic("Durchbruch > 7")
		msd_vars.Durchbruch = true
	end
end

function func_Attack_Oberst()
	if msd_vars.Air_Attack then
		MoveGroupTo("Attack_Oberst", {}, {"Exit_Feind", }, {}, true, true, "", true, 30)
		AIparts:RemovePeriodic("Attack Oberst")
	end
	if msd_vars.Attack_Oberst_Start and msd_vars.Timer_Attack_Oberst then
		MoveGroupToZone("Attack_Oberst", "Zentrum", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_10", "Attack_Oberst", "", true, true, {}, false, 5) end)
		msd_vars.Timer_Attack_Oberst = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Attack_Oberst = true end)
	end
end

function func_Luft1()
	if NumGroupUnitsInZone("Luft1", "Luft1") > 5 and NumPlayerUnitsInZone("Player", "Luft1") < 1 then
		msd_vars.Luft1Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft1Ende then
		msd_vars.Luft1Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft1", "Luft1", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft1", 0, "Exit_Sued", 0) end)
		AIparts:RemovePeriodic("Luft1")
	end
	if msd_vars.Luft1Start and msd_vars.Timer_Luft1 then
		MoveGroupToZone("Luft1", "Luft1", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_01", "Luft1", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft1 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft1 = true end)
	end
end

function func_Luft2()
	if NumGroupUnitsInZone("Luft2", "Luft2") > 5 and NumPlayerUnitsInZone("Player", "Luft2") < 1 then
		msd_vars.Luft2Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft2Ende then
		msd_vars.Luft2Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft2", "Luft2", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft2", 0, "Exit_Sued", 0) end)
		AIparts:RemovePeriodic("Luft2")
	end
	if msd_vars.Luft2Start and msd_vars.Timer_Luft2 then
		MoveGroupToZone("Luft2", "Luft2", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_02", "Luft2", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft2 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft2 = true end)
	end
end

function func_Luft3()
	if NumGroupUnitsInZone("Luft3", "Luft3") > 5 and NumPlayerUnitsInZone("Player", "Luft3") < 1 then
		msd_vars.Luft3Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft3Ende then
		msd_vars.Luft3Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft3", "Luft3", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft3", 0, "Exit_Sued", 0) end)
		AIparts:RemovePeriodic("Luft3")
	end
	if msd_vars.Luft3Start and msd_vars.Timer_Luft3 then
		MoveGroupToZone("Luft3", "Luft3", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_03", "Luft3", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft3 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft3 = true end)
	end
end

function func_Luft4()
	if NumGroupUnitsInZone("Luft4", "Luft4") > 5 and NumPlayerUnitsInZone("Player", "Luft4") < 1 then
		msd_vars.Luft4Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft4Ende then
		msd_vars.Luft4Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft4", "Luft4", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft4", 0, "Exit_Nord", 0) end)
		AIparts:RemovePeriodic("Luft4")
	end
	if msd_vars.Luft4Start and msd_vars.Timer_Luft4 then
		MoveGroupToZone("Luft4", "Luft4", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_06", "Luft4", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft4 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft4 = true end)
	end
end

function func_Luft5()
	if NumGroupUnitsInZone("Luft5", "Luft5") > 5 and NumPlayerUnitsInZone("Player", "Luft5") < 1 then
		msd_vars.Luft5Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft5Ende then
		msd_vars.Luft5Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft5", "Luft5", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft5", 0, "Exit_Nord", 0) end)
		AIparts:RemovePeriodic("Luft5")
	end
	if msd_vars.Luft5Start and msd_vars.Timer_Luft5 then
		MoveGroupToZone("Luft5", "Luft5", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_07", "Luft5", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft5 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft5 = true end)
	end
end

function func_Luft6()
	if NumGroupUnitsInZone("Luft6", "Luft6") > 5 and NumPlayerUnitsInZone("Player", "Luft6") < 1 then
		msd_vars.Luft6Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft6Ende then
		msd_vars.Luft6Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft6", "Luft6", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft6", 0, "Exit_Nord", 0) end)
		AIparts:RemovePeriodic("Luft6")
	end
	if msd_vars.Luft6Start and msd_vars.Timer_Luft6 then
		MoveGroupToZone("Luft6", "Luft6", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_08", "Luft6", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft6 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft6 = true end)
	end
end

function func_Luft7()
	if NumGroupUnitsInZone("Luft7", "Luft7") > 5 and NumPlayerUnitsInZone("Player", "Luft7") < 1 then
		msd_vars.Luft7Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
		msd_vars.Luft9Start = true
	end
	if msd_vars.Luft7Ende then
		msd_vars.Luft7Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft7", "Luft7", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft7", 0, "Exit_Nord", 0) end)
		AIparts:RemovePeriodic("Luft7")
	end
	if msd_vars.Luft7Start and msd_vars.Timer_Luft7 then
		MoveGroupToZone("Luft7", "Luft7", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_11", "Luft7", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft7 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft7 = true end)
	end
end

function func_Luft8()
	if NumGroupUnitsInZone("Luft8", "Luft8") > 5 and NumPlayerUnitsInZone("Player", "Luft8") < 1 then
		msd_vars.Luft8Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
		msd_vars.Luft9Start = true
	end
	if msd_vars.Luft8Ende then
		msd_vars.Luft8Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft8", "Luft8", true, true) end)
		FlushSpawn(2)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  TransferUnits("Luft8", 0, "Exit_Sued", 0) end)
		AIparts:RemovePeriodic("Luft8")
	end
	if msd_vars.Luft8Start and msd_vars.Timer_Luft8 then
		MoveGroupToZone("Luft8", "Luft8", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_12", "Luft8", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft8 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft8 = true end)
	end
end

function func_Luft9()
	if NumGroupUnitsInZone("Luft9", "Luft9") > 5 and NumPlayerUnitsInZone("Player", "Luft9") < 1 then
		msd_vars.Luft9Ende = true
		msd_vars.Luft_Counter = msd_vars.Luft_Counter + 1
	end
	if msd_vars.Luft9Ende then
		msd_vars.Luft9Start = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Luft9", "Luft9", true, true) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Luft9")
	end
	if msd_vars.Luft9Start and msd_vars.Timer_Luft9 then
		MoveGroupToZone("Luft9", "Luft9", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_13", "Luft9", "", true, true, {}, false, 10) end)
		msd_vars.Timer_Luft9 = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Luft9 = true end)
	end
end

function func_Volkssturm()
	if msd_vars.Luft_Counter > 2 then
		RunSpawn("Player", {"Volkssturm", }, "Spawn_06", "Stadt", "", true, true, {}, false, 50)
		mission.OutScreenMessage(100031, 20, "0xFFE0E0E0")
		AIparts:RemovePeriodic("Volkssturm")
	end
end

function func_West()
	if msd_vars.Luft_Counter > 5 then
		RunSpawn("Enemy", {"Sicherung", }, "Spawn_14", "", "", true, true, {}, false, 30)
		AIparts:RemovePeriodic("West")
	end
end

function func_Panzer_Stadt()
	if msd_vars.Luft_Counter > 6 then
		RunSpawn("Player", {"Panzer_Stadt", }, "Spawn_07", "Stadt", "", true, true, {}, false, 20)
		AIparts:RemovePeriodic("Panzer Stadt")
	end
end

function func_Luftabwehr_defekt()
	if msd_vars.Luft_Counter > 7 then
		mission.OutScreenMessage(100032, 20, "0xFFE0E0E0")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  msd_vars.Air_Attack = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "Oberst", "scout", "W", 5, -1, "") end)
		AIparts:RemovePeriodic("Luftabwehr defekt")
	end
end

function func_Air_Attack()
	if msd_vars.Air_Attack then
		msd_vars.Zivis = false
		MoveGroupToZone("Exit_Feind", "Exit_Feind", false, false)
		MoveGroupToZone("Exit_Nord", "Tor_Nord", false, false)
		MoveGroupToZone("Exit_Sued", "Tor_Sued", false, false)
		SendPlane("Enemy", "StadtW1", "bomber", "SW", 50, -1, "")
		SendPlane("Enemy", "StadtW2", "bomber", "W", 50, -1, "")
		SendPlane("Enemy", "StadtW3", "bomber", "W", 50, -1, "")
		SendPlane("Enemy", "StadtW4", "bomber", "NW", 50, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Stadt1", "strike_fighter", "W", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Stadt2", "strike_fighter", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Stadt3", "strike_fighter", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Stadt4", "strike_fighter", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Stadt5", "strike_fighter", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SendPlane("Enemy", "StadtN1", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SendPlane("Enemy", "StadtN2", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SendPlane("Enemy", "StadtS1", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  SendPlane("Enemy", "StadtS2", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "StadtN3", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "StadtN4", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "StadtS3", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "StadtS4", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  SendPlane("Enemy", "StadtO1", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  SendPlane("Enemy", "StadtO2", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  SendPlane("Enemy", "StadtO3", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  SendPlane("Enemy", "StadtO4", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  SendPlane("Enemy", "StadtO5", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  SendPlane("Enemy", "Parken_Oberst", "scout", "W", 5, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 180*10, function()  MoveGroupTo("Exit_Feind", {}, {"Exit_Feind", }, {}, true, true, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 190*10, function()  MoveGroupTo("Exit_Nord", {}, {"Exit_Nord", }, {}, true, true, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  MoveGroupTo("Exit_Sued", {}, {"Exit_Sued", }, {}, true, true, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  MoveGroupTo("Exit_Feind", {}, {"Exit_Feind", }, {}, true, true, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 250*10, function()  MoveGroupTo("Angriff_Arti", {}, {"Exit_Feind", }, {}, true, true, "", true, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  msd_vars.Blockade = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  SendPlane("Enemy", "Stadt1", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  SendPlane("Enemy", "Stadt2", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  SendPlane("Enemy", "Stadt3", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  SendPlane("Enemy", "Stadt4", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 260*10, function()  SendPlane("Enemy", "Stadt5", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungN", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungO", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungS", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungW", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  SendPlane("Enemy", "Arti", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  SendPlane("Enemy", "Luft1", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  SendPlane("Enemy", "Luft2", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  SendPlane("Enemy", "Luft3", "bomber", "NW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 105*10, function()  SendPlane("Enemy", "Luft4", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 105*10, function()  SendPlane("Enemy", "Luft5", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 105*10, function()  SendPlane("Enemy", "Luft6", "bomber", "SW", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  SendPlane("Enemy", "Luft7", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  SendPlane("Enemy", "Luft8", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 110*10, function()  SendPlane("Enemy", "Luft9", "bomber", "W", 50, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 300*10, function()  SendPlane("Enemy", "Zentrum", "bomber", "W", 5, -1, "") end)
		AIparts:RemovePeriodic("Air Attack")
	end
end

function func_Oberst_Phase1()
	if NumGroupUnits("Oberst", 0, false, false, false) == 0 then
		mission.CameraLock(true)
		mission.CameraAt({20.441698, 3.975204, -29.658096}, 44.567867, 90.000000, 30.000000, 0.00)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100033, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  PlayerDefeat("Player") end)
		AIparts:RemovePeriodic("Oberst_Phase1")
	end
end

function func_Blockade()
	if msd_vars.Blockade then
		RunSpawn("Enemy", {"Blockade", }, "Spawn_18", "Blockade", "Blockade", true, true, {}, false, 50)
		RunSpawn("Enemy", {"Blockade", }, "Spawn_16", "Blockade", "Blockade", true, true, {}, false, 50)
		RunSpawn("Enemy", {"Blockade", }, "Spawn_17", "Blockade", "Blockade", true, true, {}, false, 50)
		RunSpawn("Enemy", {"Blockade", }, "Spawn_15", "Blockade", "Blockade", true, true, {}, false, 50)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 100*10, function()  msd_vars.SturmStart = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  DisableObjective("Stadt") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  AcivateObjective("Oberst3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  mission.OutScreenMessage(100036, 30, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 600*10, function()  UnloadTransports("Blockade") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 700*10, function()  DisappearUnitsInGroup("Exit_Feind") end)
		AIparts:RemovePeriodic("Blockade")
	end
end

function func_Start_Stadt_r_umen()
	if msd_vars.SturmStart then
		msd_vars.Killer_Start = true
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  msd_vars.SNS = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 60*10, function()  msd_vars.SSS = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  msd_vars.SOS = true end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 120*10, function()  msd_vars.SWS = true end)
		AIparts:RemovePeriodic("Start_Stadt_räumen")
	end
end

function func_Sturm_Nord()
	if IsObjectiveCompleted("Stadt 4", "Player") then
		AIparts:RemovePeriodic("Sturm Nord")
	end
	if msd_vars.Counter_SN > 15 then
		msd_vars.SNS = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Sturm_Nord", "Stadt_Nord", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Sturm Nord")
	end
	if msd_vars.SNS and msd_vars.Timer_SN and not msd_vars.SNE then
		MoveGroupToZone("Sturm_Nord", "Stadt_Nord", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Sturm_Stadt", }, "Spawn_20", "Sturm_Nord", "", true, true, {}, false, 50) end)
		msd_vars.Timer_SN = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_SN = true end)
		msd_vars.Counter_SN = msd_vars.Counter_SN + 1
	end
end

function func_Sturm_Sued()
	if IsObjectiveCompleted("Stadt 5", "Player") then
		AIparts:RemovePeriodic("Sturm Sued")
	end
	if msd_vars.Counter_SS > 15 then
		msd_vars.SSS = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Sturm_Sued", "Stadt_Sued", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Sturm Sued")
	end
	if msd_vars.SSS and msd_vars.Timer_SS and not msd_vars.SSE then
		MoveGroupToZone("Sturm_Sued", "Stadt_Sued", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Sturm_Stadt", }, "Spawn_21", "Sturm_Sued", "", true, true, {}, false, 50) end)
		msd_vars.Timer_SS = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_SS = true end)
		msd_vars.Counter_SS = msd_vars.Counter_SS + 1
	end
end

function func_Sturm_Ost()
	if IsObjectiveCompleted("Stadt 3", "Player") then
		AIparts:RemovePeriodic("Sturm_Ost")
	end
	if msd_vars.Counter_SO > 15 then
		msd_vars.SOS = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Sturm_Ost", "Stadt_Ost", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Sturm_Ost")
	end
	if msd_vars.SOS and msd_vars.Timer_SO and not msd_vars.SOE then
		MoveGroupToZone("Sturm_Ost", "Stadt_Ost", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Sturm_Stadt", }, "Spawn_18", "Sturm_Ost", "", true, true, {}, false, 50) end)
		msd_vars.Timer_SO = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_SO = true end)
		msd_vars.Counter_SO = msd_vars.Counter_SO + 1
	end
end

function func_Sturm_West()
	if IsObjectiveCompleted("Stadt 2", "Player") then
		AIparts:RemovePeriodic("Sturm West")
	end
	if msd_vars.Counter_SW > 15 then
		msd_vars.SWS = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  MoveGroupToZone("Sturm_West", "Stadt_West", true, false) end)
		FlushSpawn(2)
		AIparts:RemovePeriodic("Sturm West")
	end
	if msd_vars.SWS and msd_vars.Timer_SW and not msd_vars.SWE then
		MoveGroupToZone("Sturm_West", "Stadt_West", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Sturm_Stadt", }, "Spawn_15", "Sturm_West", "", true, true, {}, false, 50) end)
		msd_vars.Timer_SW = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_SW = true end)
		msd_vars.Counter_SW = msd_vars.Counter_SW + 1
	end
end

function func_Sturm_Oberst()
	if IsObjectiveCompleted("Entsatz", "Player") then
		MoveGroupToZone("Killer", "Zentrum", false, false)
		AIparts:RemovePeriodic("Sturm_Oberst")
	end
	if msd_vars.Killer_Start and msd_vars.Timer_Attack_Oberst then
		MoveGroupToZone("Killer", "Zentrum", false, false)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  RunSpawn("Enemy", {"Oberst_Killer", }, "Spawn_19", "Killer", "", true, true, {}, false, 30) end)
		msd_vars.Timer_Attack_Oberst = false
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  msd_vars.Timer_Attack_Oberst = true end)
		msd_vars.Counter_Killer = msd_vars.Counter_Killer + 1
	end
end

function func_Killer_Zentrum1()
	if NumGroupUnitsInZone("Killer", "Zentrum1") > 0 or msd_vars.Counter_Killer > 15 then
		FlushSpawn(2)
		TransferUnits("OstEnde", 0, "Stadt", 0)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 10*10, function()  RunSpawn("Enemy", {"Blockade", }, "Spawn_18", "", "", true, true, {{unload_to="KreuzungO", }, {disconnect=true, }, }, false, 30) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 15*10, function()  RunSpawn("Player", {"Entsatz", }, "Spawn_08", "Entsatz", "Entsatz", true, true, {}, false, 20) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  mission.OutScreenMessage(100041, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  DisableObjective("Oberst3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  AcivateObjective("Entsatz") end)
		UnloadTransports("Sturm_Nord")
		UnloadTransports("Sturm_Ost")
		UnloadTransports("Sturm_Sued")
		UnloadTransports("Sturm_West")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  AddBonus(1, 7, 3, -1, 4) end)
		AIparts:RemovePeriodic("Killer Zentrum1")
	end
end

function func_Zivilist_tot()
	if NumGroupUnits("Zivilist1", 0, false, false, false) < 10 and msd_vars.Zivis then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 2*10, function()  mission.OutScreenMessage(100037, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  PlayerDefeat("Player") end)
		AIparts:RemovePeriodic("Zivilist tot")
	end
end

function func_Entsatz()
	if NumGroupUnitsInZone("Entsatz", "Zentrum1") > 0 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  msd_vars.Entsatz = true end)
		AIparts:RemovePeriodic("Entsatz")
	end
end

function func_Entsatz_im_Zentrum()
	if msd_vars.Entsatz then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  mission.OutScreenMessage(100045, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SetObjectiveComplete("Entsatz", "Player") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  mission.OutScreenMessage(100046, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  RunSpawn("Player", {"Entsatz2", }, "Spawn_01", "Entsatz", "", true, true, {}, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  RunSpawn("Player", {"Entsatz2", }, "Spawn_02", "Entsatz", "", true, true, {}, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 150*10, function()  RunSpawn("Player", {"Entsatz2", }, "Spawn_08", "Entsatz", "", true, true, {}, false, 50) end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  mission.OutScreenMessage(100043, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt 1") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt 2") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt 3") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt 4") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  AcivateObjective("Stadt 5") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 200*10, function()  DisableObjective("Entsatz") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 230*10, function()  msd_vars.final = true end)
		AIparts:RemovePeriodic("Entsatz im Zentrum")
	end
end

function func_Bomber_Ost()
	if NumGroupUnitsNearPoint("Entsatz", 0, "KreuzungO", 40) > 3 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungO", "bomber", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungO", "bomber", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SendPlane("Enemy", "KreuzungO", "strike_fighter", "W", 15, -1, "") end)
		AIparts:RemovePeriodic("Bomber Ost")
	end
end

function func_Bomber_Stadt_Ost()
	if NumGroupUnitsNearPoint("Entsatz", 0, "StadtO4", 40) > 2 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "StadtO4", "bomber", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "StadtO4", "bomber", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SendPlane("Enemy", "KreuzungW", "strike_fighter", "W", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SendPlane("Enemy", "StadtO4", "strike_fighter", "W", 15, -1, "") end)
		AIparts:RemovePeriodic("Bomber Stadt Ost")
	end
end

function func_Stadt_1()
	if msd_vars.final and NumPlayerUnitsInZone("Enemy", "Zentrum1") < 4 then
		ProceedObjective("Stadt 1", "Player")
		RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_22", "", "", true, true, {}, false, 30)
		AddBonus(1, 8, 1, -1, -1)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Fabrik", "bomber", "NW", 40, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 30*10, function()  SendPlane("Enemy", "Fabrik", "bomber", "SW", 40, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 90*10, function()  SendPlane("Enemy", "Fabrik", "transport", "W", 5, 4, "") end)
		AIparts:RemovePeriodic("Stadt 1")
	end
end

function func_Stadt_2()
	if msd_vars.final and NumPlayerUnitsInZone("Enemy", "Stadt_West") < 4 then
		ProceedObjective("Stadt 2", "Player")
		RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_22", "", "", true, true, {}, false, 30)
		AddBonus(1, 7, 1, -1, 4)
		SendPlane("Enemy", "Stadt1", "bomber", "W", 15, -1, "")
		SendPlane("Enemy", "Stadt2", "bomber", "W", 15, -1, "")
		SendPlane("Enemy", "Stadt3", "bomber", "W", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Stadt1", "transport", "W", 15, 4, "") end)
		AIparts:RemovePeriodic("Stadt 2")
	end
end

function func_Stadt_3()
	if msd_vars.final and NumPlayerUnitsInZone("Enemy", "Stadt_Ost") < 4 then
		ProceedObjective("Stadt 3", "Player")
		RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_22", "", "", true, true, {}, false, 30)
		AddBonus(1, 7, 1, -1, 4)
		SendPlane("Enemy", "StadtO5", "bomber", "W", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "StadtO5", "transport", "W", 15, 4, "") end)
		AIparts:RemovePeriodic("Stadt 3")
	end
end

function func_Stadt_4()
	if msd_vars.final and NumPlayerUnitsInZone("Enemy", "Stadt_Nord") < 4 then
		ProceedObjective("Stadt 4", "Player")
		RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_22", "", "", true, true, {}, false, 30)
		AddBonus(1, 7, 1, -1, 4)
		SendPlane("Enemy", "Stadt5", "bomber", "W", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Stadt5", "transport", "W", 15, 4, "") end)
		AIparts:RemovePeriodic("Stadt 4")
	end
end

function func_Stadt_5()
	if msd_vars.final and NumPlayerUnitsInZone("Enemy", "Stadt_Sued") < 4 then
		ProceedObjective("Stadt 5", "Player")
		RunSpawn("Enemy", {"10Amis + 1 sherman", }, "Spawn_22", "", "", true, true, {}, false, 30)
		AddBonus(1, 7, 1, -1, 4)
		SendPlane("Enemy", "Stadt4", "bomber", "W", 15, -1, "")
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 20*10, function()  SendPlane("Enemy", "Stadt4", "transport", "W", 15, 4, "") end)
		AIparts:RemovePeriodic("Stadt 5")
	end
end

function func_Sieg()
	if IsObjectiveCompleted("Stadt 1", "Player") and IsObjectiveCompleted("Stadt 2", "Player") and IsObjectiveCompleted("Stadt 3", "Player") and IsObjectiveCompleted("Stadt 4", "Player") and IsObjectiveCompleted("Stadt 5", "Player") then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  mission.OutScreenMessage(100049, 20, "0xFFE0E0E0") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 25*10, function()  PlayerWin("Player") end)
		AIparts:RemovePeriodic("Sieg")
	end
end

function func_Bomber_Sued()
	if NumGroupUnitsNearPoint("Entsatz", 0, "KreuzungS", 40) > 3 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungS", "bomber", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungS", "bomber", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SendPlane("Enemy", "KreuzungS", "strike_fighter", "W", 15, -1, "") end)
		AIparts:RemovePeriodic("Bomber Sued")
	end
end

function func_Bomber_Nord()
	if NumGroupUnitsNearPoint("Entsatz", 0, "KreuzungN", 40) > 3 then
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungN", "bomber", "NW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 5*10, function()  SendPlane("Enemy", "KreuzungN", "bomber", "SW", 15, -1, "") end)
		AIparts:AddOneTime(AIparts:GetUniqueId("TIMER_DO_"), 1*10, function()  SendPlane("Enemy", "KreuzungN", "strike_fighter", "W", 15, -1, "") end)
		AIparts:RemovePeriodic("Bomber Nord")
	end
end

function func_cheat()
	if NumGroupUnitsInZone("Offiziere", "Sicherung") > 0 and msd_vars.cheat then
		PlayerWin("Player")
		AIparts:RemovePeriodic("cheat")
	end
end

function func_Sound()
	do
		mission.OutScreenMessage(100051, 20, "0xFFE0E0E0")
	end
end

