//==========================================================================================
//
//	eagles_2ways_b3.gm
//
//	Who              	When			What
//------------------------------------------------------------------------------------------
//	native12 & Qiki		20.10.2010		Initial Script
//				28.10.2010		Final version
//	native12		29.12.2010		Correction in Allied spawns, added navigation....
//	native12 & Qiki		14.01.2012		Redoing of script
//	native12 & Qiki		17.01.2012		changed: mobilemg42 & smokebomb near hangar, and triggers Bus_build & Bus_destroyed.
//==========================================================================================
//
//	eagles_2ways_b3.way		17.01.2012
//	eagles_2ways_b3_goals.gm	17.01.2012
//
global Map =
{
	Debug = 0,
	Talk = true,
	talk = 1,

	cablecar_1_position = -1,	// 1 => in Castle station (initialy)
					//-1 => leaving station
					// 0 => in Village station

	cablecar_2_position = -1,	// 1 => in Castle station
					//-1 => leaving station
					// 0 => in Village station (initialy)

	Bus_Is_Near_Plane = 0,
	Tunnel = 0,
	Wall = 0,
	BusEscaping = 0,
	CastleWall = 0,
	Castle_Ladder = false,
	BusDocumentTaken = 0,
	BusFuelTaken = 0,
	BusCaptured = 0,
	Barrier1Builded = 0,
	BusAtBarrier_1 = 0,
	BusPastFirstBarrier = 0,
	BusPastBarrier_1 = 0,
	BusStatus = 1,		//builded
	FirstFlagAllies = 0,
	SecondFlagAllies = 0,
	BusOnTheBridge = 0,
	BusPastTheBridge = 0,
	BridgeBuilded = 0,
	BusAtBarrier_2 = 0,
	Barrier2Builded = 0,
	Allied5Spawn = 0,
	HangarDoor = 1,		//Intact
	planefuelTaken = 0,
	Tram_Door = false,
	Allied_CP = false,
	Axis_CP = false,
	Guardhouse = false,
	Castle_Steel_Door = false,
	Avalanche_Wall_Dyno = 0,
	Barrier_1_Dyno = 0,
	Barrier_2_Dyno = 0,
	Barrier_2_1_Dyno = 0,
	Bridge_Dyno = 0,
	Castle_Steel_Door_Dyno = 0,
	Command_Post_Dyno = 0,
	Constructible_Dyno = 0,
	Constructible_1_Dyno = 0,
	Guardhouse_Dyno = 0,
	Hangar_Dyno = 0,
	Road_MG_Dyno = 0,
	Tram_Door_Dyno = 0,
	Tunnel_Entrance_Dyno = 0,
	Tunnel_Entrance_1_Dyno = 0,
	KT1_busgarage = 0,
	KT2_atcastlewall = 0,
	Allies_Win = false,
	RoadMGBuilt = false,
	BusPastBarrier_2 = 0,

	Navigation =
	{
		//  	/bot waypoint_setproperty paththrough Navigation_PT:jump
		jump =
		{
			navigate = function(_this)
			{
				wpTable = {};
				Wp.GetWaypointByName("jump", wpTable);
				if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS )
				{
					_this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing);
					sleep(0.5);
					_this.AddWeaponRequest(Priority.VeryHigh, WEAPON.KNIFE );
					_this.BlockForWeaponChange( WEAPON.KNIFE );
					_this.Bot.HoldButton(BTN.SPRINT, 2);
					_this.Bot.HoldButton(BTN.FORWARD, 2);
					sleep(1.8);
				}
			},
		},

		//  	/bot waypoint_setproperty paththrough Navigation_PT:l
		l =
		{
			navigate = function(_this)
			{
				wpTable = {};
				Wp.GetWaypointByName("L", wpTable);
				if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS )
				{
					_this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing);
					sleep(1);
				}
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:ladder
		ladder =
		{
			navigate = function(_this)
			{
				wpTable = {};
				Wp.GetWaypointByName("ladder", wpTable);
				if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS )
				{
					_this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing);
					_this.Bot.HoldButton(BTN.FORWARD, 0.35);
					sleep(0.35);
				}
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:callarti
		callarti =
		{
			navigate = function(_this)
			{
				wpTable = {};
				Wp.GetWaypointByName("call", wpTable);
				if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS )
				{
					_this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing);
					sleep(0.5);
					_this.Bot.HoldButton(BTN.FORWARD, 2.5);
					sleep(2.2);
					_this.Bot.HoldButton(BTN.STRAFE_L, 0.7);
					sleep(0.7);
				}
			},
		},

		//  	/bot waypoint_setproperty paththrough Navigation_PT:xx
		xx =	//castle ladder
		{
			navigate = function(_this)
			{
				wpTable = {};
				Wp.GetWaypointByName("XX", wpTable);
				if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS )
				{
					_this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing);
					sleep(0.5);
					_this.Bot.HoldButton(BTN.BACKWARD, 1);
					_this.Bot.HoldButton(BTN.WALK, 1);
					sleep(1);
					_this.AddAimRequest( Priority.VeryHigh, "facing",Vector3( -0.036109, 0.007136, -0.999322 ) );
					sleep(0.5);
					_this.Bot.HoldButton(BTN.FORWARD, 1);
					_this.AddAimRequest( Priority.VeryHigh, "facing",Vector3( -0.036730, 0.002387, 0.999322 ) );
					_this.Bot.HoldButton(BTN.BACKWARD, 15);
					sleep(15);
				}
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:box1
		box1 =
		{
			navigate = function(_this)
			{
				_this.Bot.HoldButton(BTN.JUMP, 1);
				_this.Bot.HoldButton(BTN.FORWARD, 0.5);
				sleep(1);
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:box2
		box2 =
		{
			navigate = function(_this)
			{
				_this.Bot.HoldButton(BTN.JUMP, 1);
				_this.Bot.HoldButton(BTN.FORWARD, 0.5);
				sleep(1);
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:box3
		box3 =
		{
			navigate = function(_this)
			{
				_this.Bot.HoldButton(BTN.JUMP, 1);
				_this.Bot.HoldButton(BTN.FORWARD, 0.5);
				sleep(1);
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:box4
		box4 =
		{
			navigate = function(_this)
			{
				_this.Bot.HoldButton(BTN.JUMP, 0.5);
				_this.Bot.HoldButton(BTN.FORWARD, 0.5);
				sleep(0.5);
			},
		},
		//  	/bot waypoint_setproperty paththrough Navigation_PT:box5
		box5 =
		{
			navigate = function(_this)
			{
				_this.Bot.ReleaseButton(BTN.JUMP, BTN.FORWARD);
			},
		},
	},

	Movers =
	{
		"MOVER_cablecar1",
		"MOVER_cablecar2",
		"MOVER_truck",
	},

	RideMovers =
	{
		//	/bot waypoint_setproperty paththrough RideMover_PT:car1village
		car1village =
		{
			Enabled = true,
			movergoal = "MOVER_cablecar1",
			rideposition = Vector3(0, 0, -150),
			startwp = "car1low",
			exitwp = "car1upp",
			stance = BTN.CROUCH,
 			board = function(_this)
			{
				if ( Map.cablecar_1_position == 0 )
					{ return true; }
				return false;
			},
 			leave = function(_this)
			{
				if ( Map.cablecar_1_position == 1 )
					{ return true; }
				return false;
			},
		},
		//	/bot waypoint_setproperty paththrough RideMover_PT:car1castle
		car1castle =
		{
			Enabled = true,
			movergoal = "MOVER_cablecar1",
			rideposition = Vector3(0, 0, -150),
			startwp = "car1upp",
			exitwp = "car1low",
			stance = BTN.CROUCH,
 			board = function(_this)
			{
				if ( Map.cablecar_1_position == 1 )
					{ return true; }
				return false;
			},
 			leave = function(_this)
			{
				if ( Map.cablecar_1_position == 0 )
					{ return true; }
				return false;
			},
		},
		//	/bot waypoint_setproperty paththrough RideMover_PT:car2village
		car2village =
		{
			Enabled = true,
			movergoal = "MOVER_cablecar2",
			rideposition = Vector3(0, 0, -150),
			startwp = "car2low",
			exitwp = "car2upp",
			stance = BTN.CROUCH,
 			board = function(_this)
			{
				if ( Map.cablecar_2_position == 0 )
					{ return true; }
				return false;
			},
 			leave = function(_this)
			{
				if ( Map.cablecar_2_position == 1 )
					{ return true; }
				return false;
			},
		},
		//	/bot waypoint_setproperty paththrough RideMover_PT:car2castle
		car2castle =
		{
			Enabled = true,
			movergoal = "MOVER_cablecar2",
			rideposition = Vector3(0, 0, -150),
			startwp = "car2upp",
			exitwp = "car2low",
			stance = BTN.CROUCH,
 			board = function(_this)
			{
				if ( Map.cablecar_2_position == 1 )
					{ return true; }
				return false;
			},
 			leave = function(_this)
			{
				if ( Map.cablecar_2_position == 0 )
					{ return true; }
				return false;
			},
		},
		//	/bot waypoint_setproperty paththrough RideMover_PT:busgarrage
		busgarrage =
		{
			movergoal = "MOVER_truck",
			rideposition = Vector3(0, 0, -150),
			startwp = "InBusRide",
			exitwp = "OutBusRide",
			stance = BTN.PRONE,
			Tolerance = 500,
 			board = function(_this)
			{
				if ( Map.BusEscaping == 0 )
					{ return true; }
				return false;
			},
 			leave = function(_this)
			{
				if ( Map.Bus_Is_Near_Plane == 1 )
					{ return true; }
				return false;
			},
		},
	},

	cablecar1_in_Village =
 	{
 		Name="cablecar1_in_Village",
		TriggerOnEntity = GetGoal("MOVER_cablecar1").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.cablecar_1_position = 0;

			Wp.SetWaypointFlag( "Upper_Right_CbCWp", "closed", false);
			sleep(1);
			Wp.SetWaypointFlag( "Low_Right_CbCWp", "closed", true);

			//Util.MapDebugPrint(GetEntName(ent) + " is in Village station");

 		},
 		OnExit = function(ent)
 		{
			Map.cablecar_1_position = -1;

			//Util.MapDebugPrint(GetEntName(ent) + " is leaving Village station");
 		},
	},

	cablecar1_in_Castle =
 	{
 		Name="cablecar1_in_Castle",
		TriggerOnEntity = GetGoal("MOVER_cablecar1").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.cablecar_1_position = 1;

			Wp.SetWaypointFlag( "Low_Right_CbCWp", "closed", false);
			sleep(1);
			Wp.SetWaypointFlag( "Upper_Right_CbCWp", "closed", true);

			//Util.MapDebugPrint(GetEntName(ent) + " is in Castle station");

 		},
 		OnExit = function(ent)
 		{
			Map.cablecar_1_position = -1;

			//Util.MapDebugPrint(GetEntName(ent) + " is leaving Castle station");
 		},
	},

	cablecar2_in_Village =
 	{
 		Name="cablecar2_in_Village",
		TriggerOnEntity = GetGoal("MOVER_cablecar2").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.cablecar_2_position = 0;

			Wp.SetWaypointFlag( "Upper_Left_CbCWp", "closed", false);
			sleep(1);
			Wp.SetWaypointFlag( "Low_Left_CbCWp", "closed", true);

			//Util.MapDebugPrint(GetEntName(ent) + " is in Village station");

 		},
 		OnExit = function(ent)
 		{
			Map.cablecar_2_position = -1;

			//Util.MapDebugPrint(GetEntName(ent) + " is leaving Village station");
 		},
	},

	cablecar2_in_Castle =
 	{
 		Name="cablecar2_in_Castle",
		TriggerOnEntity = GetGoal("MOVER_cablecar2").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.cablecar_2_position = 1;

			Wp.SetWaypointFlag( "Low_Left_CbCWp", "closed", false);
			sleep(1);
			Wp.SetWaypointFlag( "Upper_Left_CbCWp", "closed", true);

			//Util.MapDebugPrint(GetEntName(ent) + " is in Castle station");

 		},
 		OnExit = function(ent)
 		{
			Map.cablecar_2_position = -1;

			//Util.MapDebugPrint(GetEntName(ent) + " is leaving Castle station");
 		},
	},

	Planted_at_Tunnel_Entrance = function( trigger )
	{

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Tunnel_Entrance_.*" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Tunnel_Entrance" );

		Util.MapDebugPrint( "^5Planted_at_Tunnel_Entrance" );
	},

	Tunnel_Entrance_Destroyed = function( trigger )
	{

		Util.MapDebugPrint( "^5Tunnel_Entrance_Destroyed" );

		Map.Tunnel = 1;

		Wp.SetWaypointFlag( "U", "jump", true);

		Wp.SetWaypointFlag( "b", "closed", false);

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Tunnel_Entrance" );

		if ( Map.Wall == 0 )
		{
			Util.SetMaxUsers( 2, "BUILD_Constructible" );
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );
			SetGoalPriority( "BUILD_Constructible", 0.99, TEAM.AXIS, CLASS.ENGINEER );
			sleep(0.5);
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );
			SetGoalPriority( "BUILD_Barrier_1", 0.9, TEAM.AXIS, CLASS.ENGINEER );
		}

		sleep(1.5);

		SetAvailableMapGoals( TEAM.ALLIES, true, "ROUTE_TunnelEntrance" );

		if ( Map.FirstFlagAllies == 0 )
		{
			if ( Map.Wall == 0 )
			{
				SetGoalPriority( "BUILD_Tram_Door", 0.91, TEAM.AXIS, CLASS.ENGINEER );

				SetGoalPriority( "CHECKPOINT_firstflag", 0.82, TEAM.ALLIES, 0 );	//more important than plant

				SetAvailableMapGoals( TEAM.AXIS, false, {
					"DEFEND_Axis_start_.*",
					"PLANTMINE_Axis_start_.*",
				});

				SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_firstflag_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_start_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"HEALTHCAB_.*",
					"AMMOCAB_.*",
					"ROUTE_.*",
					"ATTACK_Allied_firstflag_.*",
					"CHECKPOINT_firstflag",
				});

				if ( Map.Axis_CP )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
				}
				if ( Map.Tram_Door )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Tram_Door" );
				}

				if ( Map.CastleWall == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Constructible" );
				}

				if ( Map.CastleWall == 0 and !Map.Castle_Ladder )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
				}

				sleep(0.5);
				Util.BotChat( TEAM.ALLIES, "vsay", VOICE.G_ENEMY_WEAK, 1 );
				sleep(1.5);
				Util.BotChat( TEAM.AXIS, "vsay", VOICE.G_OOPS, 1 );
			}

			if ( Map.Guardhouse )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Guardhouse" );

				SetAvailableMapGoals( TEAM.AXIS, true, {
					"MOUNTMG42_Guardhouse",
					"REPAIRMG42_Guardhouse",
				});
			}
		}
	},

	Planted_AvalancheWall = function( trigger )
	{

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Avalanche_Wall_.*" );

		Util.MapDebugPrint( "^5Planted_AvalancheWall" );
	},

	Avalanche_Wall_Destroyed = function( trigger )
	{
		Map.Wall = 1;

		Util.MapDebugPrint( "^5Avalanche_Wall_Destroyed" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Avalanche_Wall_.*" );

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Avalanche_Wall_.*" );

		if ( Map.Tunnel == 0 )
		{
			Util.SetMaxUsers( 2, "BUILD_Constructible" );
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );
			SetGoalPriority( "BUILD_Constructible", 0.99, TEAM.AXIS, CLASS.ENGINEER );
			sleep(0.5);
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );
			SetGoalPriority( "BUILD_Barrier_1", 0.9, TEAM.AXIS, CLASS.ENGINEER );
		}

		sleep(1.5);

		SetAvailableMapGoals( TEAM.ALLIES, true, "ROUTE_AvalancheWall" );

		if ( Map.FirstFlagAllies == 0 )
		{
			if ( Map.Tunnel == 0 )
			{
				SetGoalPriority( "BUILD_Tram_Door", 0.91, TEAM.AXIS, CLASS.ENGINEER );

				SetGoalPriority( "CHECKPOINT_firstflag", 0.82, TEAM.ALLIES, 0 );	//more important than plant

				SetAvailableMapGoals( TEAM.AXIS, false, {
					"DEFEND_Axis_start_.*",
					"PLANTMINE_Axis_start_.*",
				});

				SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_firstflag_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_start_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"HEALTHCAB_.*",
					"AMMOCAB_.*",
					"ROUTE_.*",
					"ATTACK_Allied_firstflag_.*",
					"CHECKPOINT_firstflag",
				});

				if ( Map.Axis_CP )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
				}
				if ( Map.Tram_Door )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Tram_Door" );
				}

				if ( Map.CastleWall == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Constructible" );
				}

				if ( Map.CastleWall == 0 and !Map.Castle_Ladder )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
				}

				sleep(0.5);
				Util.BotChat( TEAM.ALLIES, "vsay", VOICE.G_ENEMY_WEAK, 1 );
				sleep(1.5);
				Util.BotChat( TEAM.AXIS, "vsay", VOICE.G_OOPS, 1 );
			}
		}
	},

	firstflag_Allies_Captured = function( trigger )
	{
		Map.FirstFlagAllies = 1;

		Wp.SetWaypointFlag( "ally_1", "allies", false);
		Wp.SetWaypointFlag( "ally_3", "allies", false);
		Wp.SetWaypointFlag( "ally_4", "allies", false);
		Wp.SetWaypointFlag( "ally_5", "allies", false);
		Wp.SetWaypointFlag( "ally_6", "allies", false);
		Wp.SetWaypointFlag( "ally_7", "allies", false);
		Wp.SetWaypointFlag( "ally_8", "allies", false);
		Wp.SetWaypointFlag( "axi_1", "axis", false);
		Wp.SetWaypointFlag( "axi_2", "axis", false);
		Wp.SetWaypointFlag( "axi_3", "axis", false);
		Wp.SetWaypointFlag( "axi_4", "axis", false);
		Wp.SetWaypointFlag( "axi_5", "axis", false);
		Wp.SetWaypointFlag( "axi_6", "axis", false);

		Util.SetMaxUsers( 2, "BUILD_.*" );

		SetGoalPriority( "PLANT_Tram_Door", 0.82, TEAM.ALLIES, CLASS.COVERTOPS );
		SetGoalPriority( "PLANT_Tram_Door", 0.55, TEAM.ALLIES, CLASS.ENGINEER );
		SetGoalPriority( "PLANT_Command_Post", 0.55, TEAM.ALLIES, CLASS.ENGINEER );
		SetGoalPriority( "PLANT_Guardhouse", 0.0, TEAM.ALLIES, CLASS.ENGINEER );

		SetGoalPriority( "BUILD_Constructible", 0.99, TEAM.AXIS, CLASS.ENGINEER );
		SetGoalPriority( "BUILD_Barrier_1", 0.9, TEAM.AXIS, CLASS.ENGINEER );
		SetGoalPriority( "DEFEND_Axis_secondflag_1", 0.55, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_Axis_secondflag_2", 0.55, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_Axis_secondflag_12", 0.546, TEAM.AXIS, CLASS.FIELDOPS );
		SetGoalPriority( "DEFEND_Axis_secondflag_13", 0.546, TEAM.AXIS, CLASS.ENGINEER );
		SetGoalPriority( "DEFEND_Axis_secondflag_14", 0.544, TEAM.AXIS, 0 );

		if ( Map.Tunnel == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Avalanche_Wall" );
		}

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Tunnel_Entrance" );

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"MOUNTMG42_Guardhouse",
			"REPAIRMG42_Guardhouse",
			"BUILD_Guardhouse",
			"BUILD_Tram_Door",
			"BUILD_Command_Post",
			"PLANT_Command_Post",
			"DEFUSE_Avalanche_Wall_.*",
			".*_Axis_start_.*",
			".*_Axis_firstflag_.*",
		});

		SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_secondflag_.*" );

		if ( Map.Tunnel == 0 and Map.Wall == 0 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_start_.*" );

			SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_start_.*" );
		}

		if ( Map.CastleWall == 0 and !Map.Castle_Ladder )
		{
			ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.COVERTOPS );
			ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.FIELDOPS );
			ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.MEDIC );
			ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.SOLDIER );

			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Wall_Tunnel_.*" );

			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );
			SetGoalPriority( "BUILD_Constructible", 0.99, TEAM.AXIS, CLASS.ENGINEER );
			sleep(0.5);
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );

			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
		}
		else
		{
			if ( Map.CastleWall == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Constructible" );

				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, 0 );
			}
			else
			{
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.COVERTOPS );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.FIELDOPS );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.MEDIC );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.SOLDIER );
			}
			if ( Map.Castle_Ladder )
			{
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.COVERTOPS );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.FIELDOPS );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.MEDIC );
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.SOLDIER );

				SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Constructible_1" );
			}
		}

		if ( !Map.Castle_Steel_Door )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Castle_Steel_Door" );
		}

		if ( Map.CastleWall == 0 or !Map.Tram_Door )
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_firstflag_.*" );

			if ( Map.Castle_Steel_Door )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Castle_Steel_Door" );
			}

			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"CHECKPOINT_secondflag",
				".*_Allied_secondflag_.*",
			});
		}

		if ( Map.Axis_CP )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
		}
		if ( Map.Tram_Door )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Tram_Door" );
		}

		if ( Map.Guardhouse )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Guardhouse" );
		}

		Util.MapDebugPrint( "^5firstflag_Allies_Captured" );
	},

	Guardhouse_Built = function( trigger )
	{

		Map.Guardhouse = true;

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Guardhouse" );

		if ( Map.Tunnel == 1 and Map.FirstFlagAllies == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, {
				"MOUNTMG42_Guardhouse",
				"REPAIRMG42_Guardhouse",
			});
		}
		if ( Map.Tunnel == 1 or Map.Wall == 1 )
		{
			if ( Map.SecondFlagAllies == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Guardhouse" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Guardhouse" );
			}
		}

		Util.MapDebugPrint( "^5Guardhouse_Built" );
	},

	Guardhouse_Planted = function( trigger )
	{
		Map.Guardhouse_Dyno += 1;

		if ( Map.FirstFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Guardhouse.*" );
		}

		Util.MapDebugPrint( "^5Guardhouse_Planted" );
	},

	Guardhouse_Destroyed = function( trigger )
	{
		Map.Guardhouse = false;

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"MOUNTMG42_Guardhouse",
			"REPAIRMG42_Guardhouse",
			"DEFUSE_Guardhouse.*",
		});

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Guardhouse" );

		if ( Map.FirstFlagAllies == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Guardhouse" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Guardhouse" );
		}

		Util.MapDebugPrint( "^5Guardhouse_Destroyed" );
	},

	Allied_CP_Built = function( trigger )
	{
		Map.Allied_CP = true;

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" );

		if ( Map.FirstFlagAllies == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Command_Post" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Command_Post" );
		}

		Util.MapDebugPrint( "^5Allied_CP_Built" );
	},

	Allied_CP_Destroyed = function( trigger )
	{

		Map.Allied_CP = false;

		SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Command_Post" );

		if ( Map.FirstFlagAllies == 0 )
		{
			if ( Map.Tunnel == 1 or Map.Wall == 1 )
			{
				if ( Map.BusEscaping == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );
				}
			}
		}
		else
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );
			}
		}

		if ( Map.FirstFlagAllies == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Command_Post" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" );
		}

		Util.MapDebugPrint( "^5Allied_CP_Destroyed" );
	},

	Axis_CP_Built = function( trigger )
	{

		Map.Axis_CP = true;

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );

		if ( Map.Tunnel == 1 or Map.Wall == 1 )
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Command_Post" );
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Command_Post" );
		}

		Util.MapDebugPrint( "^5Axis_CP_Built" );
	},

	Axis_CP_Destroyed = function( trigger )
	{

		Map.Axis_CP = false;

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Command_Post" );

		if ( Map.FirstFlagAllies == 0 )
		{
			if ( Map.Tunnel == 1 or Map.Wall == 1 )
			{
				if ( Map.BusEscaping == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );
				}
			}
		}
		else
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" );
			}
		}

		if ( Map.FirstFlagAllies == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Command_Post" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" );
		}

		Util.MapDebugPrint( "^5Axis_CP_Destroyed" );
	},

	CP_Planted = function( trigger )
	{

		if ( Map.Axis_CP )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Command_Post_.*" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Command_Post_.*" );
		}

		Util.MapDebugPrint( "^5CP_Planted" );
	},

	Tram_Door_Built = function( trigger )
	{
		Map.Tram_Door = true;

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Tram_Door" );

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"ROUTE_Tram1",
			"ROUTE_Tram2",
			"ROUTE_Cablecar_Left",
			"ROUTE_Cablecar_Right",
		});

		if ( Map.FirstFlagAllies == 0 )
		{
			if ( Map.Tunnel == 1 or Map.Wall == 1 )
			{
				if ( Map.BusEscaping == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Tram_Door" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Tram_Door" );
				}
			}
		}
		else
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Tram_Door" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Tram_Door" );
			}
		}

		Util.MapDebugPrint( "^5Tram_Door_Built" );
	},

	Tram_Door_Planted = function( trigger )
	{
		Map.Tram_Door_Dyno += 1;

		if ( Map.FirstFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Tram_Door.*" );
		}

		Util.MapDebugPrint( "^5Tram_Door_Planted" );
	},

	Tram_Door_Destroyed = function( trigger )
	{
		Map.Tram_Door = false;

		Util.MapDebugPrint( "^5Tram_Door_Destroyed" );

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"PLANT_Tram_Door",
			"DEFUSE_Tram_Door.*",
		});

		sleep(1.5);

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			"ROUTE_Tram1",
			"ROUTE_Tram2",
			"ROUTE_Cablecar_Left",
			"ROUTE_Cablecar_Right",
		});

		if ( Map.FirstFlagAllies == 1 )
		{
			if ( Map.CastleWall == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_firstflag_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"CHECKPOINT_secondflag",
					".*_Allied_secondflag_.*",
				});
			}

			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Tram_Door" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Tram_Door" );
		}
	},

	Castle_wall_Built = function( trigger )
	{
		Map.CastleWall = 1;

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"BUILD_Constructible",
			"CAMP_Axis_At_Castle_Wall",
		});

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"BUILD_Constructible",
			"ROUTE_Constructible",
			"ROUTE_BackTunnel1",
			"ROUTE_FlagDoor",
			"ROUTE_UpperHealth2",
		});

		if ( Map.FirstFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Constructible" );

			if ( Map.SecondFlagAllies == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "CAMP_Allied_At_Castle_Wall" );
			}

			SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Axis_Castle_Wall_Tunnel_.*" );

			Map.KT2_atcastlewall = OnTriggerRegion(AABB(-2811.773,-4132.481,1048.125,-1905.024,-3560.884,1207.225), RegionTrigger.KillTrigger );
			yield();
			DeleteTriggerRegion( Map.KT2_atcastlewall );
		}

		Util.MapDebugPrint( "^5Castle_wall_Built" );
	},

	Castle_wall_Destroyed = function( trigger )
	{
		Map.CastleWall = 0;

		Util.MapDebugPrint( "^5Castle_wall_Destroyed" );

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"PLANT_Constructible",
			"CAMP_Allied_At_Castle_Wall",
		});

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Constructible.*" );

		sleep(1.5);

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			"ROUTE_Constructible",
			"ROUTE_BackTunnel1",
			"ROUTE_FlagDoor",
			"ROUTE_UpperHealth2",
		});

		if ( Map.FirstFlagAllies == 1 )
		{
			if ( Map.Tram_Door )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_firstflag_.*" );

				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"CHECKPOINT_secondflag",
					".*_Allied_secondflag_.*",
				});
			}

			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Wall_Tunnel_.*" );

			if ( Map.SecondFlagAllies == 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Axis_secondflag_.*" );
				sleep(0.5);
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_secondflag_.*" );
			}

			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
		}
		if ( Map.BusEscaping == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, {
				"BUILD_Constructible",
				"CAMP_Axis_At_Castle_Wall",
			});
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );
		}
	},

	Castle_Ladder_Built = function( trigger )
	{
		Wp.SetWaypointFlag( "a", "closed", false );

		Map.Castle_Ladder = true;

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Constructible" );

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			"ROUTE_ConstructibleLadder",
			"ROUTE_ConstructibleLadder1",
		});

		if ( Map.FirstFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Ladder" );

			if ( Map.SecondFlagAllies == 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Axis_secondflag_.*" );
				sleep(0.5);
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_secondflag_.*" );
			}
		}

		if ( Map.BusEscaping == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Constructible_1" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Constructible_1" );
		}

		if ( Map.Castle_Steel_Door )
		{
			if ( Map.SecondFlagAllies == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Castle_Steel_Door" );
			}
		}

		Util.MapDebugPrint( "^5Castle_Ladder_Built" );
	},

	Castle_Ladder_Destroyed = function( trigger )
	{
		Wp.SetWaypointFlag( "a", "closed", true );

		Map.Castle_Ladder = false;

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"ROUTE_ConstructibleLadder",
			"ROUTE_ConstructibleLadder1",
			"DEFUSE_Constructible.*",
		});

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"PLANT_Constructible_1",
			"DEFEND_Axis_Castle_Ladder",
		});

		if ( Map.FirstFlagAllies == 1 )
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Constructible" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Constructible" );
			}
		}

		if ( Map.BusEscaping == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Constructible" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Constructible" );
		}

		if ( Map.Castle_Steel_Door )
		{
			if ( Map.SecondFlagAllies == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Castle_Steel_Door" );
			}
		}

		Util.MapDebugPrint( "^5Castle_Ladder_Destroyed" );
	},

	Planted_Constructible = function( trigger )
	{

		Map.Constructible_Dyno += 1;

		if ( Map.CastleWall == 1 )
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFUSE_Constructible_.*" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Constructible_.*" );
			}
		}
		else
		{
			if ( Map.BusEscaping == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "DEFUSE_Constructible_.*" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Constructible_.*" );
			}
		}

		Util.MapDebugPrint( "^5Planted_Constructible" );
	},

	Constructible_Defused = function( trigger )
	{
		Map.Constructible_Dyno -= 1;

		if ( Map.CastleWall == 1 )
		{
			if ( Map.Constructible_Dyno == 0 )
			{
				if ( Map.FirstFlagAllies == 1 )
				{
					Map.KT2_atcastlewall = OnTriggerRegion(AABB(-2811.773,-4132.481,1048.125,-1905.024,-3560.884,1207.225), RegionTrigger.KillTrigger );
					yield();
					DeleteTriggerRegion( Map.KT2_atcastlewall );
				}
			}
		}

		Util.MapDebugPrint( "^5Constructible_Defused" );
	},

	Castle_Steel_Door_Built = function( trigger )
	{
		Map.Castle_Steel_Door = true;

		SetAvailableMapGoals( TEAM.ALLIES, false, "ROUTE_SteelDoor" );

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Castle_Steel_Door" );

		if ( Map.Castle_Ladder or Map.SecondFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Castle_Steel_Door" );
		}

		Util.MapDebugPrint( "^5Castle_Steel_Door_Built" );
	},

	Castle_Steel_Door_Planted = function( trigger )
	{
		Map.Castle_Steel_Door_Dyno += 1;

		if ( Map.BusEscaping == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Castle_Steel_Door.*" );
		}

		Util.MapDebugPrint( "^5Castle_Steel_Door_Planted" );
	},

	Castle_Steel_Door_Destroyed = function( trigger )
	{
		Map.Castle_Steel_Door = false;

		Util.MapDebugPrint( "^5Castle_Steel_Door_Destroyed" );

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Castle_Steel_Door_.*" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Castle_Steel_Door" );

		sleep(1.5);

		SetAvailableMapGoals( TEAM.ALLIES, true, "ROUTE_SteelDoor" );
	},

	secondflag_Allies_Captured = function( trigger )
	{
		Map.SecondFlagAllies = 1;

		Wp.SetWaypointFlag( "ally_11", "allies", false);
		Wp.SetWaypointFlag( "ally_12", "allies", false);
		Wp.SetWaypointFlag( "axi_11", "axis", false);
		Wp.SetWaypointFlag( "axi_12", "axis", false);

		foreach ( id and bot in BotTable )
		{
			if ( bot.GetTeam() == TEAM.AXIS )
			{
				ETUtil.SelectWeapon(bot, WEAPON.MOBILE_MG42);
			}
		}

		SetAvailableMapGoals( TEAM.AXIS, false, {
			".*_Axis_secondflag_.*",
			"MOVER_cablecar1",
			"MOVER_cablecar2",
		});

		SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_secondflag_.*" );

		SetAvailableMapGoals( TEAM.AXIS, true, {
			".*_Axis_FlagBus_.*",
			"MOBILEMG42_Axis_AtFlagDoc",
		});

		if ( !Map.Castle_Ladder )
		{
			if ( Map.Castle_Steel_Door )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Castle_Steel_Door" );
			}
		}

		if ( Map.BusDocumentTaken == 0 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_tcr_docs_scriptname" );
		}

		if ( Map.BusFuelTaken == 0 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_tcr_fuel_scriptname" );
		}

		Util.MapDebugPrint( "^5secondflag_Allies_Captured" );
	},

	tcr_docs_scriptname_Taken = function( trigger )
	{
		Map.BusDocumentTaken = 1;

		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_tcr_docs_scriptname" );

		SetAvailableMapGoals( TEAM.ALLIES, true, "CAPPOINT_Bus" );

		if ( Map.BusFuelTaken == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, {
				".*_Axis_FlagBus_.*",
				".*_Axis_secondflag_.*",
				"DEFEND_Axis_Castle_Ladder",
				"DEFEND_Axis_Castle_Wall_Tunnel_.*",
				"MOBILEMG42_Axis_AtFlagDoc",
			});

			SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_secondflag_.*" );

			SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Bus_.*" );

			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Bus_.*" );
		}
		else
		{
			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Axis_start_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						"DEFEND_Axis_start_.*",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_Allied_firstflag_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_firstflag_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_firstflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_firstflag_.*",
						"DEFEND_Bus_6",
					});
				}
			}
			else
			{
				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_Allied_secondflag_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_secondflag_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_secondflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_secondflag_.*",
						"DEFEND_Bus_6",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_FlagBus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_tcr_fuel_scriptname" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_FlagBus_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"DEFEND_Bus_6",
						"FLAG_tcr_fuel_scriptname",
					});
				}
			}
		}

		Util.MapDebugPrint( "^5Bus_Documents_Taken" );
	},

	Document_dropped = function( trigger )
	{
		Util.SetMaxUsers( 2, "FLAGRETURN_.*" );

		Util.MapDebugPrint( "^5Document_dropped" );
	},

	Bus_Documents_Returned = function( trigger )
	{
		Map.BusDocumentTaken = 0;

		if ( Map.SecondFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_tcr_docs_scriptname" );
		}

		if ( Map.BusFuelTaken == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "MOBILEMG42_Axis_AtFlagDoc" );

			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						"DEFEND_Axis_start_.*",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_firstflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_firstflag_.*",
						"DEFEND_Bus_6",
					});
				}
			}
			else
			{
				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_secondflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_secondflag_.*",
						"DEFEND_Bus_6",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_FlagBus_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Bus_6" );
				}
			}

			if ( Map.BusCaptured > 0 )
			{
				if ( Map.CastleWall == 1 )
				{
					Map.KT1_busgarage = OnTriggerRegion(AABB(-2320.875,-2496.875,1048.125,-1519.126,-1855.125,1408.452), RegionTrigger.KillTrigger );
					sleep(1);
					DeleteTriggerRegion( Map.KT1_busgarage );

					Util.MapDebugPrint( "^5Deleting trigger KT1_busgarage" );
				}
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "CAPPOINT_Bus" );

			if ( Map.CastleWall == 1 )
			{
				Map.KT1_busgarage = OnTriggerRegion(AABB(-2320.875,-2496.875,1048.125,-1519.126,-1855.125,1408.452), RegionTrigger.KillTrigger );
				sleep(1);
				DeleteTriggerRegion( Map.KT1_busgarage );

				Util.MapDebugPrint( "^5Deleting trigger KT1_busgarage" );
			}

			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_start_.*" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_firstflag_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_Allied_firstflag_.*" );
				}
			}
			else
			{
				if ( Map.Castle_Ladder )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Ladder" );
				}

				if ( Map.CastleWall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Wall_Tunnel_.*" );
				}

				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_secondflag_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_Allied_secondflag_.*" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_FlagBus_.*" );
				}
			}
		}

		Util.MapDebugPrint( "^5Bus_Documents_Returned" );
	},

	tcr_fuel_scriptname_Taken = function( trigger )
	{
		Map.BusFuelTaken = 1;

		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_tcr_fuel_scriptname" );

		SetAvailableMapGoals( TEAM.ALLIES, true, "CAPPOINT_Bus" );

		if ( Map.BusDocumentTaken == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, {
				".*_Axis_FlagBus_.*",
				".*_Axis_secondflag_.*",
				"DEFEND_Axis_Castle_Ladder",
				"DEFEND_Axis_Castle_Wall_Tunnel_.*",
				"MOBILEMG42_Axis_AtFlagDoc",
			});

			SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allied_secondflag_.*" );

			SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Bus_.*" );

			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Bus_.*" );
		}
		else
		{
			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Axis_start_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						"DEFEND_Axis_start_.*",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_Allied_firstflag_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_firstflag_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_firstflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_firstflag_.*",
						"DEFEND_Bus_6",
					});
				}
			}
			else
			{
				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_Allied_secondflag_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_secondflag_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_secondflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_secondflag_.*",
						"DEFEND_Bus_6",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, ".*_Axis_FlagBus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_tcr_docs_scriptname" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_FlagBus_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"DEFEND_Bus_6",
						"FLAG_tcr_docs_scriptname",
					});
				}
			}
		}

		Util.MapDebugPrint( "^5Bus_Fuel_Taken" );
	},

	Fuel_dropped = function( trigger )
	{
		Util.SetMaxUsers( 2, "FLAGRETURN_.*" );

		Util.MapDebugPrint( "^5Fuel_dropped" );
	},

	Bus_Fuel_Returned = function( trigger )
	{
		Map.BusFuelTaken = 0;

		if ( Map.SecondFlagAllies == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_tcr_fuel_scriptname" );
		}

		if ( Map.BusDocumentTaken == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "MOBILEMG42_Axis_AtFlagDoc" );

			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						"DEFEND_Axis_start_.*",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_firstflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_firstflag_.*",
						"DEFEND_Bus_6",
					});
				}
			}
			else
			{
				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_secondflag_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, {
						"ATTACK_Allied_secondflag_.*",
						"DEFEND_Bus_6",
					});
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );
					sleep(0.5);
					SetAvailableMapGoals( TEAM.AXIS, true, {
						"DEFEND_Bus_5",
						"DEFEND_Bus_6",
						".*_Axis_FlagBus_.*",
					});

					SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Bus_6" );
				}
			}

			if ( Map.BusCaptured > 0 )
			{
				if ( Map.CastleWall == 1 )
				{
					Map.KT1_busgarage = OnTriggerRegion(AABB(-2320.875,-2496.875,1048.125,-1519.126,-1855.125,1408.452), RegionTrigger.KillTrigger );
					sleep(1);
					DeleteTriggerRegion( Map.KT1_busgarage );

					Util.MapDebugPrint( "^5Deleting trigger KT1_busgarage" );
				}
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "CAPPOINT_Bus" );

			if ( Map.CastleWall == 1 )
			{
				Map.KT1_busgarage = OnTriggerRegion(AABB(-2320.875,-2496.875,1048.125,-1519.126,-1855.125,1408.452), RegionTrigger.KillTrigger );
				sleep(1);
				DeleteTriggerRegion( Map.KT1_busgarage );

				Util.MapDebugPrint( "^5Deleting trigger KT1_busgarage" );
			}

			if ( Map.FirstFlagAllies == 0 )
			{
				if ( Map.Tunnel == 0 and Map.Wall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_start_.*" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_firstflag_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_Allied_firstflag_.*" );
				}
			}
			else
			{
				if ( Map.Castle_Ladder )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Ladder" );
				}

				if ( Map.CastleWall == 0 )
				{
					SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Axis_Castle_Wall_Tunnel_.*" );
				}

				if ( Map.SecondFlagAllies == 0 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_secondflag_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_Allied_secondflag_.*" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Bus_.*" );

					SetAvailableMapGoals( TEAM.AXIS, true, ".*_Axis_FlagBus_.*" );
				}
			}
		}

		Util.MapDebugPrint( "^5Bus_Fuel_Returned" );
	},

	Bus_Captured = function( trigger )
	{
		Map.BusCaptured += 1;

		if ( Map.Barrier1Builded == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Barrier_1" );
		}

		if ( Map.BusStatus == 0 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
		}

		Util.MapDebugPrint( "^5Bus_Captured" );
	},

	Bus_Escaping = function( trigger )
	{
		Map.BusEscaping = 1;

		Util.DisableGoal( ".*", true );

		SetGoalPriority( "RIDE_Bus", 0.80, TEAM.ALLIES, CLASS.SOLDIER );

		if ( Map.BusStatus == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"MOVER_truck",
				"RIDE_Bus",
			});
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, {
				"MOVER_truck",
				"RIDE_Bus",
			});

			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );

			SetGoalPriority( "BUILD_Bus", 0.92, TEAM.ALLIES, CLASS.ENGINEER );
		}

		if ( Map.Barrier1Builded == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Barrier_1" );
		}

		if ( Map.BridgeBuilded == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Bridge" );
		}

		if ( Map.RoadMGBuilt )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Road_MG" );
		}

		if ( Map.Barrier2Builded == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Barrier_2" );
		}

		SetAvailableMapGoals( TEAM.AXIS, true, {
			"CALLARTILLERY_Axis_AtBarrier1_1",
			"ARTILLERY_S_Axis_AtBarrier1_2",
			"DEFEND_Axis_AtBarrier1_.*",
			"REVIVE_.*",
		});

		Util.SetMaxUsers( 3, "DEFUSE_Hangar.*" );

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			".*_Allies_AtBarrier1_.*",
			"REVIVE_.*",
		});

		Util.MapDebugPrint( "^5Bus_Escaping" );
	},

	Bus_Destroyed = function( trigger )
	{
		Map.BusStatus = 0;

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"MOVER_truck",
			"RIDE_Bus",
		});
		sleep(0.5);
		Util.SetPositionGoal( "BUILD_Bus", "MOVER_truck" );

		if ( Map.BusCaptured > 0 )
		{
			if ( Map.Bus_Is_Near_Plane == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );

			}
			else if ( Map.BusAtBarrier_2 == 1 )
			{
				if ( Map.Barrier2Builded == 1 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
				}
			}
			else if ( Map.BusOnTheBridge == 1 )
			{
				if ( Map.BridgeBuilded == 1 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
				}
			}
			else if ( Map.BusAtBarrier_1 == 1 )
			{
				if ( Map.Barrier1Builded == 1 )
				{
					SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
				}
				else
				{
					SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
				}
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
			}
		}

		Util.MapDebugPrint( "^5Bus_Destroyed" );
	},

	Bus_Built = function( trigger )
	{
		Map.BusStatus = 1;

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );

		if ( Map.BusCaptured == 2 )
		{
			if ( Map.Bus_Is_Near_Plane == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else if ( Map.Barrier2Builded == 1 and Map.BusAtBarrier_2 == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else if ( Map.BusOnTheBridge == 1 and Map.BridgeBuilded == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else if ( Map.Barrier1Builded == 1 and Map.BusAtBarrier_1 == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
		}

		Util.MapDebugPrint( "^5Bus_Built" );
	},

	Bus_Near_Barrier1 =
 	{
 		Name="BusNear_Barrier1",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusAtBarrier_1 = 1;

			if ( Map.Barrier1Builded == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}

			Util.MapDebugPrint(GetEntName(ent) + "^5 is near the Barrier 1");

 		},
 		OnExit = function(ent)
 		{
			Map.BusAtBarrier_1 = 0;

			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_1" );
 		},
	},

	Barrier_1_Built = function( trigger )
	{
		Map.Barrier1Builded = 1;

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_1" );

		if ( Map.BusCaptured > 0 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Barrier_1" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Barrier_1" );
		}

		if ( Map.BusAtBarrier_1 == 1 )
		{
			if ( Map.BusStatus == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
			}
		}

		Util.MapDebugPrint( "^5Barrier_1_Built" );
	},

	Planted_Barrier_1 = function( trigger )
	{

		if ( Map.BusCaptured == 0 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Barrier_1_.*" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "DEFUSE_Barrier_1_.*" );
		}

		Util.MapDebugPrint( "^5Planted_Barrier_1" );
	},

	Barrier_1_Destroyed = function( trigger )
	{
		Map.Barrier1Builded = 0;

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Barrier_1.*" );

		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Barrier_1" );

		if ( Map.BusStatus == 1 and Map.BusAtBarrier_1 == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"MOVER_truck",
				"RIDE_Bus",
			});
		}
		if ( Map.BusStatus == 0 and Map.BusAtBarrier_1 == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
		}

		if ( Map.BusPastFirstBarrier == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_1" );
		}
		else
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Barrier_1" );
		}

		Util.MapDebugPrint( "^5Barrier_1_Destroyed" );
	},

	Bus_Past_First_Barrier =
 	{
 		Name="Bus_Past_First_Barrier",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusPastFirstBarrier = 1;
			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_1" );

			Util.MapDebugPrint(GetEntName(ent) + "^5 Bus_Past_First_Barrier");

 		},
	},

	Bus_Past_Barrier1 =
 	{
 		Name="Bus_Past_Barrier1",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusPastBarrier_1 = 1;

			SetAvailableMapGoals( TEAM.AXIS, false, {
				"CALLARTILLERY_Axis_AtBarrier1_1",
				"ARTILLERY_S_Axis_AtBarrier1_2",
			});

			if ( !Map.RoadMGBuilt )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Road_MG" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"REPAIRMG42_Road_MG",
					"MOUNTMG42_Road_MG",
				});
			}

			if ( Map.BridgeBuilded == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bridge" );
			}

			SetAvailableMapGoals( TEAM.AXIS, true, {
				"CALLARTILLERY_AxisPastBarrier1_1",
				"ARTILLERY_S_AxisPastBarrier1_2",
				"ARTILLERY_S_AxisPastBarrier1_3",
			});

			SetGoalPriority( "PLANT_Road_MG", 0.45, TEAM.AXIS, CLASS.ENGINEER );

			Util.MapDebugPrint(GetEntName(ent) + "^5 is near the Tunnel");

 		},
	},

	Allied_5_Spawn = function( trigger )
	{
		Map.Allied5Spawn = 1;

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"CALLARTILLERY_AxisPastBarrier1_1",
			"ARTILLERY_S_AxisPastBarrier1_2",
			"ARTILLERY_S_AxisPastBarrier1_3",
			"DEFEND_Axis_AtBarrier1_.*",
		});

		SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allies_AtBarrier1_.*" );

		SetGoalPriority( "DEFEND_BackAccessToHangar_.*", 0.6, TEAM.AXIS, 0 );

		SetAvailableMapGoals( TEAM.AXIS, true, {
			".*_Axis_AtBridge_.*",
			"DEFEND_BackAccessToHangar_.*",
		});

		if ( Map.Barrier2Builded == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"PLANT_Barrier_2_1",
				"PLANT_Barrier_2",
			});
		}

		if ( Map.HangarDoor == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Hangar" );
		}

		if ( !Map.RoadMGBuilt )
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, {
				"BUILD_Road_MG",
				"BUILD_Road_MG",
			});
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, {
				"REPAIRMG42_Road_MG",
				"MOUNTMG42_Road_MG",
			});
		}

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			"ATTACK_Allies_AtBridge_.*",
			"CALLARTILLERY_Allies_AtBridge_5",
			"ARTILLERY_S_Allies_AtBridge_6",
			"CALLARTILLERY_Allies_AtBridge_7",
			"ARTILLERY_S_Allies_AtBridge_8",
			"ROUTE_Allied5Spawn",
		});

		Util.MapDebugPrint( "^5Allied_captured_5_Spawn" );
	},

	Road_MG_Built = function( trigger )
	{

		Map.RoadMGBuilt = true;

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Road_MG" );

		SetAvailableMapGoals( TEAM.AXIS, false, {
			"MOUNTMG42_Road_MG",
			"REPAIRMG42_Road_MG",
		});

		if ( Map.Allied5Spawn == 0 )
		{
			if ( Map.BusPastBarrier_1 == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"MOUNTMG42_Road_MG",
					"REPAIRMG42_Road_MG",
				});
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOUNTMG42_Road_MG",
					"REPAIRMG42_Road_MG",
				});
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, {
				"MOUNTMG42_Road_MG",
				"REPAIRMG42_Road_MG",
			});
		}

		if ( Map.BusEscaping == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Road_MG" );
		}

		Util.MapDebugPrint( "^5Road_MG_Built" );
	},

	Road_MG_Planted = function( trigger )
	{
		Map.Road_MG_Dyno += 1;

		if ( Map.Allied5Spawn == 0 )
		{
			if ( Map.BusPastBarrier_1 == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "DEFUSE_Road_MG_.*" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Road_MG_.*" );
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Road_MG_.*" );
		}

		Util.MapDebugPrint( "^5Road_MG_Planted" );
	},

	Road_MG_Destroyed = function( trigger )
	{

		Map.RoadMGBuilt = false;

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"MOUNTMG42_Road_MG",
			"DEFUSE_Road_MG.*",
		});

		SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Road_MG" );

		if ( Map.Allied5Spawn == 0 )
		{
			if ( Map.BusPastBarrier_1 == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Road_MG" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Road_MG" );
			}
		}
		else
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Road_MG" );
		}

		Util.MapDebugPrint( "^5Road_MG_Destroyed" );
	},

	Bus_At_Bridge =
 	{
 		Name="Bus_At_Bridge",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusOnTheBridge = 1;

			Wp.SetWaypointFlag( "d", "closed", false);
			Wp.SetWaypointFlag( "e", "closed", false);
			Wp.SetWaypointFlag( "f", "closed", false);
			Wp.SetWaypointFlag( "g", "closed", false);
			Wp.SetWaypointFlag( "aaaa_1", "closed", true);
			Wp.SetWaypointFlag( "aaaa_2", "closed", true);
			Wp.SetWaypointFlag( "aaaa_3", "closed", true);
			Wp.SetWaypointFlag( "aaaa_4", "closed", true);
			Wp.SetWaypointFlag( "aaaa_5", "closed", true);
			Wp.SetWaypointFlag( "aaaa_6", "closed", true);
			Wp.SetWaypointFlag( "aaaa_7", "closed", true);
			Wp.SetWaypointFlag( "aaaa_8", "closed", true);

			if ( Map.BridgeBuilded == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});

				SetGoalPriority( "BUILD_Bridge", 0.91, TEAM.ALLIES, CLASS.ENGINEER );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}

			Util.MapDebugPrint(GetEntName(ent) + "^5 is on the Bridge");

 		},
	},

	Bus_Past_Bridge =
 	{
 		Name="Bus_Past_Bridge",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusOnTheBridge = 0;
			Map.BusPastTheBridge = 1;

			SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Bridge" );

			SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bridge" );

			Wp.SetWaypointFlag( "aaaa_1", "closed", false);
			Wp.SetWaypointFlag( "aaaa_2", "closed", false);
			Wp.SetWaypointFlag( "aaaa_3", "closed", false);
			Wp.SetWaypointFlag( "aaaa_4", "closed", false);
			Wp.SetWaypointFlag( "aaaa_5", "closed", false);
			Wp.SetWaypointFlag( "aaaa_6", "closed", false);
			Wp.SetWaypointFlag( "aaaa_7", "closed", false);
			Wp.SetWaypointFlag( "aaaa_8", "closed", false);
			Wp.SetWaypointFlag( "d", "closed", true);
			Wp.SetWaypointFlag( "e", "closed", true);
			Wp.SetWaypointFlag( "f", "closed", true);
			Wp.SetWaypointFlag( "g", "closed", true);

			Util.MapDebugPrint(GetEntName(ent) + "^5 past the Bridge");

 		},
	},

	Bridge_Built = function( trigger )
	{
		Wp.SetWaypointFlag( "d", "jump", false);
		Wp.SetWaypointFlag( "e", "jump", false);
		Wp.SetWaypointFlag( "f", "jump", false);
		Wp.SetWaypointFlag( "g", "jump", false);

		Map.BridgeBuilded = 1;

		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bridge" );

		if ( Map.BusStatus == 0 )
		{
			if ( Map.BusOnTheBridge == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
			}
		}

		if ( Map.BusStatus == 1 and Map.BusOnTheBridge == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"MOVER_truck",
				"RIDE_Bus",
			});
		}

		if ( Map.BusEscaping == 1 )
		{
			if ( Map.BusPastTheBridge == 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Bridge" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Bridge" );
			}
		}

		Util.MapDebugPrint( "^5Bridge_Built" );
	},

	Bridge_Planted = function( trigger )
	{
		Map.Bridge_Dyno += 1;

		if ( Map.BusPastBarrier_1 == 1 )
		{
			if ( Map.BusPastTheBridge == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Bridge_.*" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "DEFUSE_Bridge_.*" );
			}
		}

		Util.MapDebugPrint( "^5Bridge_Planted" );
	},

	Bridge_Destroyed = function( trigger )
	{
		Wp.SetWaypointFlag( "d", "jump", true );
		Wp.SetWaypointFlag( "e", "jump", true );
		Wp.SetWaypointFlag( "f", "jump", true );
		Wp.SetWaypointFlag( "g", "jump", true );

		Map.BridgeBuilded = 0;

		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Bridge.*" );

		SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Bridge" );

		if ( Map.BusPastBarrier_1 == 1 )
		{
			if ( Map.BusPastTheBridge == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bridge" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bridge" );
			}
		}

		if ( Map.BusOnTheBridge == 1 )
		{
			if ( Map.BusStatus == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
			}
		}

		Util.MapDebugPrint( "^5Bridge_Destroyed" );
	},

	Barrier_2_Built = function( trigger )
	{
		Map.Barrier2Builded = 1;

		Wp.SetWaypointFlag( "B_1", "closed", true);
		Wp.SetWaypointFlag( "B_2", "closed", true);

		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_2" );

		if ( Map.BusAtBarrier_2 == 1 )
		{
			if ( Map.BusStatus == 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Bus" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
		}

		if ( Map.Allied5Spawn == 1 )
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"PLANT_Barrier_2",
				"PLANT_Barrier_2_1",
			});
		}

		Util.MapDebugPrint( "^5Barrier_2_Built" );
	},

	Barrier_2_Destroyed = function( trigger )
	{
		Map.Barrier2Builded = 0;

		Wp.SetWaypointFlag( "B_1", "closed", false);
		Wp.SetWaypointFlag( "B_2", "closed", false);

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Barrier_2.*" );

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"PLANT_Barrier_2",
			"PLANT_Barrier_2_1",
		});

		if ( Map.BusEscaping == 1 )
		{
			if ( Map.BusPastBarrier_2 == 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Barrier_2" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_2" );
			}
		}

		if ( Map.BusAtBarrier_2 == 1 )
		{
			if ( Map.BusStatus == 0 )
			{
				Util.SetMaxUsers( 2, "BUILD_Bus" );

				SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Bus" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
					"MOVER_truck",
					"RIDE_Bus",
				});
			}
		}

		Util.MapDebugPrint( "^5Barrier_2_Destroyed" );
	},

	Bus_At_Barrier2 =
 	{
 		Name="Bus_At_Barrier2",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusAtBarrier_2 = 1;

			Wp.SetWaypointFlag( "B_2", "closed", true);

			if ( Map.Barrier2Builded == 1 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, {
					"MOVER_truck",
					"RIDE_Bus",
				});

				SetGoalPriority( "PLANT_Barrier_2_1", 0.82, TEAM.ALLIES, CLASS.ENGINEER );
				SetGoalPriority( "PLANT_Barrier_2", 0.82, TEAM.ALLIES, CLASS.ENGINEER );
			}

			Util.MapDebugPrint( "^5Bus_At_Barrier2" );

 		},
	},

	Bus_Past_Barrier2 =
 	{
 		Name="Bus_Past_Barrier2",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.BusAtBarrier_2 = 0;
			Map.BusPastBarrier_2 = 1;

			Wp.SetWaypointFlag( "B_2", "closed", false);

			SetAvailableMapGoals( TEAM.ALLIES, false, {
				"PLANT_Barrier_2_1",
				"PLANT_Barrier_2",
				"ATTACK_Allies_AtBridge_.*",
			});

			SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Barrier_2" );

			SetAvailableMapGoals( TEAM.AXIS, true, ".*_AxisPastBarrier2_.*" );

			SetAvailableMapGoals( TEAM.ALLIES, true, ".*_AlliedPastBarrier2_.*" );

			Util.MapDebugPrint( "^5Bus_Past_Barrier2" );
 		},
	},

	Bus_Near_Plane =
 	{
 		Name="Bus_Near_Plane",
		TriggerOnEntity = GetGoal("MOVER_truck").GetEntity(),
 		OnEnter = function(ent)
 		{
			Map.Bus_Is_Near_Plane = 1;

			Util.DisableGoal( ".*", true );

			foreach ( id and bot in BotTable )
			{
				if ( bot.GetTeam() == TEAM.AXIS )
				{
					Util.IgnoreTargetGoal( bot, "MOVER_truck" );
					ETUtil.SelectWeapon(bot, WEAPON.MOBILE_MG42);
				}
			}

			Util.SetMaxUsers( 2, "FLAG.*" );

			SetAvailableMapGoals( TEAM.AXIS, true, {
				"REVIVE_.*",
				"MOBILEMG42_Axis_AtHangar",
			});

			if ( Map.Hangar_Dyno > 0 )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFUSE_Hangar.*" );
			}

			if ( Map.HangarDoor == 1 )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, {
					"DEFEND_BackAccessToHangar_.*",
					".*_AxisPastBarrier2_.*",
				});

				SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Hangar" );
			}
			else
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_AxisPastBarrier2_.*" );

				SetAvailableMapGoals( TEAM.AXIS, true, {
					".*_AxisInHangar_.*",
					"DEFEND_BackAccessToHangar_.*",
				});
				sleep(0.5);
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_AxisPastBarrier2_.*" );
			}

			SetAvailableMapGoals( TEAM.ALLIES, true, {
				"REVIVE_.*",
				"FLAG_tcr_planefuel_scriptname",
				".*_AlliedPastBarrier2_.*",
			});

			Util.MapDebugPrint( "^5Bus_Near_Plane" );

 		},
	},

	Hangar_Planted = function( trigger )
	{
		Map.Hangar_Dyno += 1;

		if ( Map.BusEscaping == 0 )
		{
			if ( Map.Constructible_Dyno == 0 )
			{
				foreach ( id and bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.AXIS )
					{
						if ( bot.GetReinforceTime() < 10 )
						{
							ETUtil.SuicideSpawn( TEAM.AXIS, 4, -1, CLASS.ENGINEER );
						}
						else
						{
							SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Hangar.*" );
						}
					}
				}
			}
			else
			{
				if ( Map.CastleWall == 0 )
				{
					foreach ( id and bot in BotTable )
					{
						if ( bot.GetTeam() == TEAM.AXIS )
						{
							if ( bot.GetReinforceTime() < 10 )
							{
								ETUtil.SuicideSpawn( TEAM.AXIS, 4, -1, CLASS.ENGINEER );
							}
							else
							{
								SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Hangar.*" );
							}
						}
					}
				}
			}

		}

		Util.MapDebugPrint( "^5Hangar_Planted" );
	},

	Hangar_Defused = function( trigger )
	{
		Map.Hangar_Dyno -= 1;

		if ( Map.Hangar_Dyno == 0 )
		{
			if ( Map.BusEscaping == 0 )
			{
				if ( Map.Constructible_Dyno == 0 )
				{
					ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.ENGINEER );
				}
				else
				{
					if ( Map.CastleWall == 0 )
					{
						ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.ENGINEER );
					}
				}
			}
		}

		Util.MapDebugPrint( "^5Hangar_Defused" );
	},

	Hangar_Destroyed = function( trigger )
	{
		Map.HangarDoor = 0;
		Map.Hangar_Dyno = 0;

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Hangar.*" );

		SetAvailableMapGoals( TEAM.ALLIES, true, "ROUTE_FlagBusFuel5" );

		if ( Map.BusEscaping == 0 )
		{
			if ( Map.Constructible_Dyno == 0 )
			{
				ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.ENGINEER );
			}
			else
			{
				if ( Map.CastleWall == 0 )
				{
					ETUtil.SuicideSpawn( TEAM.AXIS, 0, -1, CLASS.ENGINEER );
				}
			}
		}

		if ( Map.Bus_Is_Near_Plane == 1 )
		{
			SetAvailableMapGoals( TEAM.AXIS, false, {
				"DEFEND_BackAccessToHangar_.*",
				".*_AxisPastBarrier2_.*",
			});

			SetAvailableMapGoals( TEAM.AXIS, true, ".*_AxisInHangar_.*" );
			sleep(0.5);
			SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_BackAccessToHangar_.*",
				".*_AxisPastBarrier2_.*",
			});
		}

		Util.MapDebugPrint( "^5Hangar_Destroyed" );
	},

	tcr_planefuel_scriptname_Taken = function( trigger )
	{
		Map.planefuelTaken = 1;

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"ATTACK_AlliedPastBarrier2_.*",
			"FLAG_tcr_planefuel_scriptname",
		});

		SetAvailableMapGoals( TEAM.ALLIES, true, {
			"CAPPOINT_Plane",
			"ATTACK_AlliedInHangar_.*",
		});
		sleep(0.5);
		SetAvailableMapGoals( TEAM.ALLIES, true, ".*_AlliedPastBarrier2_.*" );

		if ( Map.HangarDoor == 1 )	//intact
		{
			SetAvailableMapGoals( TEAM.AXIS, false, ".*_AxisPastBarrier2_.*" );

			SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_AxisInHangar_1",
				"DEFEND_AxisInHangar_11",
				"DEFEND_AxisInHangar_12",
			});
			sleep(0.5);
			SetAvailableMapGoals( TEAM.AXIS, true, ".*_AxisPastBarrier2_.*" );
		}

		Util.MapDebugPrint( "^5Plane_Fuel_Taken" );
	},

	Plane_Fuel_dropped = function( trigger )
	{
		Util.SetMaxUsers( 2, "FLAGRETURN_.*" );

		Util.MapDebugPrint( "^5Plane_Fuel_dropped" );
	},

	Plane_Fuel_Returned = function( trigger )
	{
		Map.planefuelTaken = 0;

		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"CAPPOINT_Plane",
			"ATTACK_AlliedInHangar_.*",
		});

		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_tcr_planefuel_scriptname" );

		if ( Map.HangarDoor == 1 )	//intact
		{
			SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_AxisInHangar_.*" );
		}

		Util.MapDebugPrint( "^5Plane_Fuel_Returned" );
	},

	Plane_Captured = function( trigger )
	{
		if ( Map.HangarDoor == 1 )	//intact
		{
			SetAvailableMapGoals( TEAM.ALLIES, false, ".*_AlliedInHangar_.*" );

			SetAvailableMapGoals( TEAM.AXIS, false, ".*_AxisInHangar_.*" );

			Util.BotChat( TEAM.ALLIES, "vsay", VOICE.G_CHEER, 1 );
			sleep(1.5);
			Util.BotChat( TEAM.AXIS, "vsay", VOICE.G_OOPS, 1 );

			SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Hangar" );
		}

		Util.MapDebugPrint( "^5Plane_Captured" );
	},

	Allies_Win = function( trigger )
	{

		Map.Allies_Win = true;

		Util.MapDebugPrint( "^5Allies_Win" );

		sleep(1);
		ETUtil.WinningChat( TEAM.ALLIES );
		sleep(1.5);
		ETUtil.LosingChat( TEAM.AXIS );
	},

	Thirty_second = function( trigger )
	{
		Util.MapDebugPrint( "^5Thirty_second" );

		sleep(31);

		if ( !Map.Allies_Win )
		{
			ETUtil.WinningChat( TEAM.AXIS );
			sleep(1.5);
			ETUtil.LosingChat( TEAM.ALLIES );
		}
	},

};

global OnMapLoad = function()
{
	OnTrigger( "Truck Barrier #1 has been constructed.", Map.Barrier_1_Built );
	OnTrigger( "Truck Barrier #2 has been constructed.", Map.Barrier_2_Built );
	OnTrigger( "^1The Allied Forces have constructed the Bridge!", Map.Bridge_Built );
	OnTrigger( "The Truck has been repaired!", Map.Bus_Built );
	OnTrigger( "The Truck has been damaged!", Map.Bus_Destroyed );
	OnTrigger( "^1The Axis have built the Steel Door (up at the castle)!", Map.Castle_Steel_Door_Built );
	OnTrigger( "^1Axis have built The High Guardtower.", Map.Guardhouse_Built );
	OnTrigger( "^1The Allied Forces have constructed the Road MG Nest!", Map.Road_MG_Built );
	OnTrigger( "^1The Axis have built the Tram Door (lower tram station)!", Map.Tram_Door_Built );
	OnTrigger( "^1The Avalanche Wall has been Destroyed by the Allies!", Map.Avalanche_Wall_Destroyed );
	OnTrigger( "Truck Barrier #1 has been destroyed.", Map.Barrier_1_Destroyed );
	OnTrigger( "Truck Barrier #2 has been destroyed.", Map.Barrier_2_Destroyed );
	OnTrigger( "^1The Axis have dynamited the Bridge!", Map.Bridge_Destroyed );
	OnTrigger( "^1The Allies have destroyed the Steel Door (up at the castle)!", Map.Castle_Steel_Door_Destroyed );
	OnTrigger( "^1The Axis High Guardtower has been destroyed!", Map.Guardhouse_Destroyed );
	OnTrigger( "^1The Allies have destroyed the Hangar Door!", Map.Hangar_Destroyed );
	OnTrigger( "^1The Axis team has destroyed the Road MG Nest!", Map.Road_MG_Destroyed );
	OnTrigger( "^1The Allies have destroyed the Tram Door (lower tram station)!", Map.Tram_Door_Destroyed );
	OnTrigger( "^1The Tunnel Entrance has been destroyed by the Allies!", Map.Tunnel_Entrance_Destroyed );
	OnTrigger( "Allies have stolen the Document!", Map.tcr_docs_scriptname_Taken );
	OnTrigger( "Allies have stolen the Bus Fuel!", Map.tcr_fuel_scriptname_Taken );
	OnTrigger( "Allies have stolen the Plane Fuel!", Map.tcr_planefuel_scriptname_Taken );
	OnTrigger( "^1The Allied Forces have secured the documents on the Bus!", Map.Bus_Captured );
	OnTrigger( "^1The Allied Forces have secured the Bus Fuel!", Map.Bus_Captured );
	OnTrigger( "^1The Allied Forces have won the game!", Map.Allies_Win );
	OnTrigger( "Allies captured tfm_redfuelcan_plane", Map.Plane_Captured );
	OnTrigger( "CHECKPOINT_firstflag to team 2", Map.firstflag_Allies_Captured );
	OnTrigger( "CHECKPOINT_secondflag to team 2", Map.secondflag_Allies_Captured );
	OnTrigger( "^1The Axis Constructible (castle-tunnel wall) has been constructed!", Map.Castle_wall_Built );
	OnTrigger( "^1The Axis Constructible (castle-tunnel wall) has been destroyed!", Map.Castle_wall_Destroyed );
	OnTrigger( "^1The Allied Constructible (castle-ladder) has been constructed!", Map.Castle_Ladder_Built );
	OnTrigger( "^1The Allied Constructible (castle-ladder) has been destroyed!", Map.Castle_Ladder_Destroyed );
	OnTrigger( "^1Allied Command Post constructed. Charge speed increased!", Map.Allied_CP_Built );
	OnTrigger( "^1Axis team has destroyed the Allied Command Post!", Map.Allied_CP_Destroyed );
	OnTrigger( "^1Axis Command Post constructed. Charge speed increased!", Map.Axis_CP_Built );
	OnTrigger( "^1Allied team has destroyed the Axis Command Post!", Map.Axis_CP_Destroyed );
	OnTrigger( "Flag returned tcr_fuel_scriptname!", Map.Bus_Fuel_Returned );
	OnTrigger( "Flag returned tcr_docs_scriptname!", Map.Bus_Documents_Returned );
	OnTrigger( "Flag returned tcr_planefuel_scriptname!", Map.Plane_Fuel_Returned );
	OnTrigger( "Planted at Tunnel Entrance.", Map.Planted_at_Tunnel_Entrance );
	OnTrigger( "Planted at Barrier #1.", Map.Planted_Barrier_1 );
	OnTrigger( "Planted at the Constructible.", Map.Planted_Constructible );
	OnTrigger( "Planted at Avalanche Wall.", Map.Planted_AvalancheWall );
	OnTrigger( "^1The Allied Forces have secured the 'Allied 5-spawn'!", Map.Allied_5_Spawn );
	OnTrigger( "Planted at the Command Post.", Map.CP_Planted );
	OnTrigger( "Planted at the Tram Door.", Map.Tram_Door_Planted );
	OnTrigger( "Planted at the Guardhouse.", Map.Guardhouse_Planted );
	OnTrigger( "^1Allied team is escaping with the bus!", Map.Bus_Escaping );
	OnTrigger( "Planted at Castle Steel Door.", Map.Castle_Steel_Door_Planted );
	OnTrigger( "Defused at the Constructible.", Map.Constructible_Defused );
	OnTrigger( "thirty second warning.", Map.Thirty_second );
	OnTrigger( "Planted at the Hangar.", Map.Hangar_Planted );
	OnTrigger( "Defused at the Hangar.", Map.Hangar_Defused );
	OnTrigger( "Planted at the Road MG.", Map.Road_MG_Planted );
	OnTrigger( "Planted at the Bridge.", Map.Bridge_Planted );
	OnTrigger( "the Document dropped.", Map.Document_dropped );
	OnTrigger( "the Bus Fuel dropped.", Map.Fuel_dropped );
	OnTrigger( "the Plane Fuel dropped.", Map.Plane_Fuel_dropped );

	SetAvailableMapGoals( TEAM.AXIS, false, {
		".*",
		"MOVER_truck",
		"RIDE_Bus",
	});

	SetAvailableMapGoals( TEAM.AXIS, true, {
		"ROUTE_.*",
		"HEALTHCAB_.*",
		"AMMOCAB_.*",
		"BUILD_Command_Post",
		"BUILD_Barrier_1",
		"BUILD_Tram_Door",
		"BUILD_Guardhouse",
		".*_Axis_start_.*",
	});

	SetAvailableMapGoals( TEAM.ALLIES, false, ".*" );

	SetAvailableMapGoals( TEAM.ALLIES, true, {
		"PLANT_Avalanche_Wall",
		"PLANT_Tunnel_Entrance",
		"DEFEND_Allied_start_.*",
		"CALLARTILLERY_Allied_start_.*",
		"ARTILLERY_S_Allied_start_.*",
		"AIRSTRIKE_Allied_start_33",
	});

	SetGoalPriority( "PLANT_Avalanche_Wall", 0.82, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_Tunnel_Entrance", 0.82, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "CHECKPOINT_firstflag", 0.82, TEAM.ALLIES, 0 );
	SetGoalPriority( "DEFEND_Bus_6", 0.81, TEAM.ALLIES, 0 );
	SetGoalPriority( "ATTACK_AlliedInHangar_.*", 0.51, TEAM.ALLIES, 0 );
	SetGoalPriority( "CAMP_Allied_At_Castle_Wall", 0.72, TEAM.ALLIES, 0 );
	SetGoalPriority( "PLANT_Guardhouse", 0.0, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "REPAIRMG42_.*", 0.60, TEAM.ALLIES, CLASS.ENGINEER );

	SetGoalPriority( "BUILD_Barrier_1", 0.66, TEAM.AXIS, CLASS.ENGINEER );
	SetGoalPriority( "BUILD_Constructible", 0.67, TEAM.AXIS, CLASS.ENGINEER );
	SetGoalPriority( "BUILD_Tram_Door", 0.69, TEAM.AXIS, CLASS.ENGINEER );
	SetGoalPriority( "BUILD_Command_Post", 0.68, TEAM.AXIS, CLASS.ENGINEER );
	SetGoalPriority( "AIRSTRIKE_Axis_start_31", 0.81, TEAM.AXIS, CLASS.FIELDOPS );
	SetGoalPriority( "PLANT_Bridge", 0.0, TEAM.AXIS, CLASS.COVERTOPS );
	SetGoalPriority( "DEFEND_Bus_.*", 0.53, TEAM.AXIS, 0 );
	SetGoalPriority( "CAMP_Axis_At_Castle_Wall", 0.54, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_Axis_FlagBus_.*", 0.52, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_Axis_Castle_Wall_Tunnel_.*", 0.51, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_Axis_Castle_Ladder", 0.51, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_BackAccessToHangar_.*", 0.51, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_AxisPastBarrier2_3", 0.515, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_AxisPastBarrier2_4", 0.515, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_AxisInHangar_.*", 0.52, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_AxisInHangar_3", 0.53, TEAM.AXIS, 0 );
	SetGoalPriority( "DEFEND_AxisInHangar_5", 0.53, TEAM.AXIS, 0 );
	SetGoalPriority( "PLANT_Constructible_1", 0.51, TEAM.AXIS, CLASS.ENGINEER );

	SetGoalPriority( "PLANT_Command_Post", 0.4, 0, CLASS.ENGINEER );

	Util.AddUseWp( "BUILD_Command_Post", "CP_1" );
	Util.AddUseWp( "BUILD_Command_Post", "CP_2" );
	Util.AddUseWp( "PLANT_Guardhouse", "Guardtowerplantwp" );
	Util.AddUseWp( "PLANT_Tram_Door", "TramDoorPlantWP_1" );
	Util.AddUseWp( "PLANT_Tram_Door", "TramDoorPlantWP_2" );
	Util.AddUseWp( "PLANT_Avalanche_Wall", "AvalancheWall" );
	Util.AddUseWp( "PLANT_Avalanche_Wall", "AvalancheWall_1" );
	Util.AddUseWp( "PLANT_Constructible", "Constructible_1" );
	Util.AddUseWp( "PLANT_Constructible", "Constructible" );
	Util.AddUseWp( "PLANT_Barrier_2", "Barrier_2_Plant_WP" );
	Util.AddUseWp( "PLANT_Castle_Steel_Door", "CSDPW_1" );
	Util.AddUseWp( "PLANT_Castle_Steel_Door", "CSDPW_2" );

	Util.SetGoalPosition(2248.457275, 19.052887, 1072.125000, "PLANT_Bridge");
	Util.SetGoalPosition(-3070.457764, -3637.221924, 2091.768799, "PLANT_Constructible_1");
	Util.SetGoalPosition(2766.367432, -833.827759, 1071.125000, "BUILD_Bridge");

	Util.SetGoalOffset( -120, 90, 0, "PLANT_Barrier_1" );

	Wp.SetWaypointFlag( "ally_1", "allies", true);
	Wp.SetWaypointFlag( "ally_3", "allies", true);
	Wp.SetWaypointFlag( "ally_4", "allies", true);
	Wp.SetWaypointFlag( "ally_5", "allies", true);
	Wp.SetWaypointFlag( "ally_6", "allies", true);
	Wp.SetWaypointFlag( "ally_7", "allies", true);
	Wp.SetWaypointFlag( "ally_8", "allies", true);
	Wp.SetWaypointFlag( "axi_1", "axis", true);
	Wp.SetWaypointFlag( "axi_2", "axis", true);
	Wp.SetWaypointFlag( "axi_3", "axis", true);
	Wp.SetWaypointFlag( "axi_4", "axis", true);
	Wp.SetWaypointFlag( "axi_5", "axis", true);
	Wp.SetWaypointFlag( "axi_6", "axis", true);

	Wp.SetWaypointFlag( "ally_11", "allies", true);
	Wp.SetWaypointFlag( "ally_12", "allies", true);
	Wp.SetWaypointFlag( "axi_11", "axis", true);
	Wp.SetWaypointFlag( "axi_12", "axis", true);

	Wp.SetWaypointFlag( "a", "closed", true);
	Wp.SetWaypointFlag( "b", "closed", true);
	Wp.SetWaypointFlag( "d", "jump", true);
	Wp.SetWaypointFlag( "e", "jump", true);
	Wp.SetWaypointFlag( "f", "jump", true);
	Wp.SetWaypointFlag( "g", "jump", true);
	Wp.SetWaypointFlag( "d", "closed", true);
	Wp.SetWaypointFlag( "e", "closed", true);
	Wp.SetWaypointFlag( "f", "closed", true);
	Wp.SetWaypointFlag( "g", "closed", true);
	Wp.SetWaypointFlag( "aaaa_1", "closed", false);
	Wp.SetWaypointFlag( "aaaa_2", "closed", false);
	Wp.SetWaypointFlag( "aaaa_3", "closed", false);
	Wp.SetWaypointFlag( "aaaa_4", "closed", false);
	Wp.SetWaypointFlag( "aaaa_5", "closed", false);
	Wp.SetWaypointFlag( "aaaa_6", "closed", false);
	Wp.SetWaypointFlag( "aaaa_7", "closed", false);
	Wp.SetWaypointFlag( "aaaa_8", "closed", false);
	Wp.SetWaypointFlag( "Low_Right_CbCWp", "closed", false);
	Wp.SetWaypointFlag( "Low_Left_CbCWp", "closed", true);
	Wp.SetWaypointFlag( "Upper_Left_CbCWp", "closed", false);
	Wp.SetWaypointFlag( "Upper_Right_CbCWp", "closed", true);
	Wp.SetWaypointFlag( "B_1", "closed", false);
	Wp.SetWaypointFlag( "B_2", "closed", false);
	Wp.SetWaypointFlag( "U", "jump", false);

	Util.SetMaxUsers( 1, "ARTILLERY_S_.*" );
	Util.SetMaxUsers( 1, "DEFEND_.*" );
	Util.SetMaxUsers( 1, "BUILD_.*" );
	Util.SetMaxUsers( 1, "MOUNTMG42_.*" );
	Util.SetMaxUsers( 2, "ATTACK_AlliedInHangar_.*" );
	Util.SetMaxUsers( 1, "PLANT_Barrier_2_1" );
	Util.SetMaxUsers( 1, "PLANT_Barrier_2" );
	Util.SetMaxUsers( 1, "DEFUSE_Hangar.*" );
	Util.SetMaxUsers( 2, "PLANT_Avalanche_Wall" );

	cablecar2Village = OnTriggerRegion(AABB(-3542.435,1102.475,1207.125,-3367.565,1157.571,1281.125), Map.cablecar2_in_Village);
	cablecar1Village = OnTriggerRegion(AABB(-3809.849,1073.718,1209.125,-3638.808,1157.433,1329.275), Map.cablecar1_in_Village);
	cablecar2Castle = OnTriggerRegion(AABB(-3538.931,-2064.870,1655.125,-3387.412,-1989.670,1785.125), Map.cablecar2_in_Castle);
	cablecar1Castle = OnTriggerRegion(AABB(-3776.556,-2048.875,1655.125,-3614.873,-1982.875,1785.125), Map.cablecar1_in_Castle);
	BusNearBarrier1 = OnTriggerRegion(AABB(-1115.252,-2848.516,1048.277,-697.273,-2799.238,1122.277), Map.Bus_Near_Barrier1);
	BusNearPlane = OnTriggerRegion(AABB(2687.127,3404.186,1048.125,2951.431,4256.872,1162.536), Map.Bus_Near_Plane);
	BusPastFirstBarrier = OnTriggerRegion(AABB(-1150.318,-3037.550,1040.574,-539.604,-2953.862,1122.125), Map.Bus_Past_First_Barrier);
	BusPastBarrier1 = OnTriggerRegion(AABB(-167.388,-3835.898,1046.125,212.633,-3536.205,1120.125), Map.Bus_Past_Barrier1);
	BusAtBridge = OnTriggerRegion(AABB(2288.865,-568.343,1015.125,2488.711,-417.035,1089.125), Map.Bus_At_Bridge);
	Bus__PastBridge = OnTriggerRegion(AABB(2265.561,-338.778,1049.125,2476.874,-261.059,1128.125), Map.Bus_Past_Bridge);
	BusAtBarrier2 = OnTriggerRegion(AABB(2325.546,859.912,1046.125,2715.242,1007.095,1123.125), Map.Bus_At_Barrier2);
	Bus__PastBarrier2 = OnTriggerRegion(AABB(2418.155,1138.260,1048.125,2741.224,1205.354,1122.125), Map.Bus_Past_Barrier2);
	NP3 = OnTriggerRegion(AABB(-3626.779,-2047.619,1713.125,-3530.653,-1709.460,1787.125), RegionTrigger.DisableBotPush);
	NP4 = OnTriggerRegion(AABB(-3636.634,768.209,1201.288,-3528.036,1127.533,1291.125), RegionTrigger.DisableBotPush);
	NP5 = OnTriggerRegion(AABB(-2951.207,-2306.470,1167.805,-2324.253,-2161.532,2349.505), RegionTrigger.DisableBotPush);
	NP6 = OnTriggerRegion(AABB(-3332.604,1292.581,1377.125,-2990.686,1605.574,1545.604), RegionTrigger.DisableBotPush);
	NP7 = OnTriggerRegion(AABB(-1725.755,1855.125,1255.268,-589.589,1963.942,1416.786), RegionTrigger.DisableBotPush);
	NP8 = OnTriggerRegion(AABB(-1298.772,927.125,1048.125,-933.661,1881.724,1204.310), RegionTrigger.DisableBotPush);
	NP9 = OnTriggerRegion(AABB(-2342.243,386.359,1048.125,-1802.846,660.130,1122.125), RegionTrigger.DisableBotPush);
	NP10 = OnTriggerRegion(AABB(2258.946,-816.443,1035.304,2476.875,-108.163,1209.309), RegionTrigger.DisableBotPush);
	DCM3 = OnTriggerRegion(AABB(-3626.779,-2047.619,1713.125,-3530.653,-1709.460,1787.125), RegionTrigger.DisableCombatMovement);
	DCM4 = OnTriggerRegion(AABB(-3636.634,768.209,1201.288,-3528.036,1127.533,1291.125), RegionTrigger.DisableCombatMovement);
	DCM5 = OnTriggerRegion(AABB(-2951.207,-2306.470,1167.805,-2324.253,-2161.532,2349.505), RegionTrigger.DisableCombatMovement);
	DCM6 = OnTriggerRegion(AABB(-3332.604,1292.581,1377.125,-2990.686,1605.574,1545.604), RegionTrigger.DisableCombatMovement);
	DCM7 = OnTriggerRegion(AABB(-3184.543,-3734.044,1200.357,-2823.185,-3480.940,2215.269), RegionTrigger.DisableCombatMovement);
	DCM8 = OnTriggerRegion(AABB(-1725.755,1855.125,1255.268,-589.589,1963.942,1416.786), RegionTrigger.DisableCombatMovement);
	DCM9 = OnTriggerRegion(AABB(-1298.772,927.125,1048.125,-933.661,1881.724,1204.310), RegionTrigger.DisableCombatMovement);
	DCM10 = OnTriggerRegion(AABB(-2342.243,386.359,1048.125,-1802.846,660.130,1122.125), RegionTrigger.DisableCombatMovement);
	DCM11 = OnTriggerRegion(AABB(-4137.289,-4458.153,2033.125,-3961.310,-4323.936,2497.221), RegionTrigger.DisableCombatMovement);
	DCM12 = OnTriggerRegion(AABB(2258.946,-816.443,1035.304,2476.875,-108.163,1209.309), RegionTrigger.DisableCombatMovement);

	Map.cablecar_1_position = -1;
	Map.cablecar_2_position = -1;

	SetMapGoalProperties( "ATTACK_.*", {mincamptime=3, maxcamptime=5} );
	SetMapGoalProperties( "DEFEND_.*", {mincamptime=180, maxcamptime=240} );
	SetMapGoalProperties( "MOUNTMG42_.*", {mincamptime=240, maxcamptime=300} );

	Util.FixMoverPos("truck", Vec3(-1876.000, -2184.000, 1124.001), Vec3(-2152.000, -2184.000, 920.000));
};

global InitializeRoutes = function()
{
	MapRoutes =
	{
		CHECKPOINT_firstflag =
		{
			ROUTE_AlliesStartSpawn =
			{
				ROUTE_TunnelEntrance =
				{
					ROUTE_GuardTowerWay =
					{

					},
					ROUTE_StationRoofWay =
					{

					},
				},
				ROUTE_AvalancheWall =
				{

				},
			},
			ROUTE_AlliesStartSpawn1 =
			{
				ROUTE_TunnelEntrance =
				{
					ROUTE_GuardTowerWay =
					{

					},
					ROUTE_StationRoofWay =
					{

					},
				},
				ROUTE_AvalancheWall =
				{

				},
			},
			ROUTE_AlliesStartSpawn2 =
			{
				ROUTE_TunnelEntrance =
				{
					ROUTE_GuardTowerWay =
					{

					},
					ROUTE_StationRoofWay =
					{

					},
				},
				ROUTE_AvalancheWall =
				{

				},
			},
			ROUTE_AlliesStartSpawn3 =
			{
				ROUTE_TunnelEntrance =
				{
					ROUTE_GuardTowerWay =
					{

					},
					ROUTE_StationRoofWay =
					{

					},
				},
				ROUTE_AvalancheWall =
				{

				},
			},
		},
		CHECKPOINT_secondflag =
		{
			ROUTE_AllySpawn1 =
			{
				ROUTE_Tram1 =
				{
					ROUTE_Cablecar_Left =
					{
						ROUTE_Tram2 =
						{

						},
					},
					ROUTE_Cablecar_Right =
					{
						ROUTE_Tram2 =
						{

						},
					},
				},
				ROUTE_AllySpawn1Stairs =
				{
					Weight = 2,
					ROUTE_StoneBridge =
					{
						ROUTE_Constructible =
						{
							Weight = 2,
						},
						ROUTE_ConstructibleLadder =
						{
							ROUTE_ConstructibleLadder1 =
							{
								ROUTE_SteelDoor =
								{

								},
								ROUTE_UpperStairs =
								{
									ROUTE_FlagStairs =
									{

									},
									ROUTE_FlagDoor =
									{
										ROUTE_UpperHealth2 =
										{

										},
									},
								},
							},
						},
					},
				},
			},
		},
		PLANT_Road_MG =
		{
			ROUTE_AxisPlaneSpawn =
			{
				ROUTE_Back_1 =
				{
					ROUTE_Back_2 =
					{
						ROUTE_Back_3 =
						{
							ROUTE_Back_4 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_6 =
									{
										ROUTE_Back_7 =
										{
											ROUTE_Back_8 =
											{

											},
										},
									},
								},
							},
						},
					},
				},
			},
			ROUTE_AxisPlaneSpawn1 =
			{
				ROUTE_Back_1 =
				{
					ROUTE_Back_2 =
					{
						ROUTE_Back_3 =
						{
							ROUTE_Back_4 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_6 =
									{
										ROUTE_Back_7 =
										{
											ROUTE_Back_8 =
											{

											},
										},
									},
								},
							},
						},
					},
				},
			},
			ROUTE_AxisPlaneSpawn_2 =
			{
				ROUTE_Back_1 =
				{
					ROUTE_Back_2 =
					{
						ROUTE_Back_3 =
						{
							ROUTE_Back_4 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_6 =
									{
										ROUTE_Back_7 =
										{
											ROUTE_Back_8 =
											{

											},
										},
									},
								},
							},
						},
					},
				},
			},
		},
		CAPPOINT_Bus =
		{
			ROUTE_BusFuelFlag =
			{
				ROUTE_FFlagDoor =
				{
					ROUTE_FlagDoor =
					{
						ROUTE_UpperHealth2 =
						{
							ROUTE_BackTunnel1 =
							{
								ROUTE_Constructible =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
					ROUTE_BackTunnel1 =
					{
						Weight = 2,
						ROUTE_Constructible =
						{
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay1 =
							{
								ROUTE_BackFlagWay2 =
								{

								},
							},
						},
					},
					ROUTE_UpperStairs =
					{
						ROUTE_jump =
						{
							ROUTE_FrontLadder =
							{

							},
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay2 =
							{
								Weight = 2,
							},
						},
					},
				},
				ROUTE_SpiralStairs =
				{
					ROUTE_SpiralStairs2 =
					{
						ROUTE_Window =
						{
							ROUTE_jump =
							{
								ROUTE_FrontLadder =
								{

								},
								ROUTE_SideLadder =
								{
									ROUTE_Roof =
									{

									},
								},
								ROUTE_BackFlagWay2 =
								{
									Weight = 2,
								},
							},
							ROUTE_ConstructibleLadder1 =
							{
								Weight = 2,
								ROUTE_ConstructibleLadder =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
				},
			},
			ROUTE_BusDocFlag =
			{
				ROUTE_FFlagDoor =
				{
					ROUTE_FlagDoor =
					{
						ROUTE_UpperHealth2 =
						{
							ROUTE_BackTunnel1 =
							{
								ROUTE_Constructible =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
					ROUTE_BackTunnel1 =
					{
						Weight = 2,
						ROUTE_Constructible =
						{
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay1 =
							{
								ROUTE_BackFlagWay2 =
								{

								},
							},
						},
					},
					ROUTE_UpperStairs =
					{
						ROUTE_jump =
						{
							ROUTE_FrontLadder =
							{

							},
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay2 =
							{
								Weight = 2,
							},
						},
					},
				},
				ROUTE_SpiralStairs =
				{
					ROUTE_SpiralStairs2 =
					{
						ROUTE_Window =
						{
							ROUTE_jump =
							{
								ROUTE_FrontLadder =
								{

								},
								ROUTE_SideLadder =
								{
									ROUTE_Roof =
									{

									},
								},
								ROUTE_BackFlagWay2 =
								{
									Weight = 2,
								},
							},
							ROUTE_ConstructibleLadder1 =
							{
								Weight = 2,
								ROUTE_ConstructibleLadder =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
				},
			},
			ROUTE_AtFlagTable =
			{
				ROUTE_FFlagDoor =
				{
					ROUTE_FlagDoor =
					{
						ROUTE_UpperHealth2 =
						{
							ROUTE_BackTunnel1 =
							{
								ROUTE_Constructible =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
					ROUTE_BackTunnel1 =
					{
						Weight = 2,
						ROUTE_Constructible =
						{
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay1 =
							{
								ROUTE_BackFlagWay2 =
								{

								},
							},
						},
					},
					ROUTE_UpperStairs =
					{
						ROUTE_jump =
						{
							ROUTE_FrontLadder =
							{

							},
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay2 =
							{
								Weight = 2,
							},
						},
					},
				},
				ROUTE_SpiralStairs =
				{
					ROUTE_SpiralStairs2 =
					{
						ROUTE_Window =
						{
							ROUTE_jump =
							{
								ROUTE_FrontLadder =
								{

								},
								ROUTE_SideLadder =
								{
									ROUTE_Roof =
									{

									},
								},
								ROUTE_BackFlagWay2 =
								{
									Weight = 2,
								},
							},
							ROUTE_ConstructibleLadder1 =
							{
								Weight = 2,
								ROUTE_ConstructibleLadder =
								{
									ROUTE_SideLadder =
									{
										ROUTE_Roof =
										{

										},
									},
									ROUTE_BackFlagWay1 =
									{
										ROUTE_BackFlagWay2 =
										{

										},
									},
								},
							},
						},
					},
				},
			},
		},
		BUILD_Constructible =
		{
			ROUTE_AxisCastleSpawn =
			{
				ROUTE_UpperStairs =
				{
					Weight = 2,
					ROUTE_FlagStairs =
					{
						Weight = 3,
						ROUTE_BackTunnel1 =
						{
							ROUTE_Constructible =
							{

							},
						},
					},
				},
				ROUTE_SteelDoor =
				{
					Weight = 4,
					ROUTE_BackTunnel1 =
					{
						ROUTE_Constructible =
						{

						},
					},
				},
				ROUTE_jump =
				{
					ROUTE_FrontLadder =
					{

					},
				},
			},
			ROUTE_AxisCastleSpawn_1 =
			{
				ROUTE_UpperStairs =
				{
					Weight = 2,
					ROUTE_FlagStairs =
					{
						Weight = 3,
						ROUTE_BackTunnel1 =
						{
							ROUTE_Constructible =
							{

							},
						},
					},
				},
				ROUTE_SteelDoor =
				{
					Weight = 4,
					ROUTE_BackTunnel1 =
					{
						ROUTE_Constructible =
						{

						},
					},
				},
				ROUTE_jump =
				{
					ROUTE_FrontLadder =
					{

					},
				},
			},
			ROUTE_AxisCastleSpawn_2 =
			{
				ROUTE_UpperStairs =
				{
					Weight = 2,
					ROUTE_FlagStairs =
					{
						Weight = 3,
						ROUTE_BackTunnel1 =
						{
							ROUTE_Constructible =
							{

							},
						},
					},
				},
				ROUTE_SteelDoor =
				{
					Weight = 4,
					ROUTE_BackTunnel1 =
					{
						ROUTE_Constructible =
						{

						},
					},
				},
				ROUTE_jump =
				{
					ROUTE_FrontLadder =
					{

					},
				},
			},
		},
		PLANT_Hangar =
		{
			ROUTE_Allied5Spawn =
			{
				ROUTE_Back_8 =
				{
					Weight = 3,
					ROUTE_Back_7 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_Back_4 =
								{

								},
							},
						},
					},
				},
				ROUTE_FrontBridge_1 =
				{
					ROUTE_FrontBridge_2 =
					{
						ROUTE_Runway_1 =
						{
							Weight = 2,
							ROUTE_Runway_2 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_4 =
									{

									},
								},
							},
						},
						ROUTE_FrontRunway_1 =
						{
							ROUTE_FrontRunway_2 =
							{
								ROUTE_FrontRunway_3 =
								{

								},
							},
						},
					},
				},
			},
			ROUTE_Allied5Spawn1 =
			{
				ROUTE_Back_8 =
				{
					Weight = 3,
					ROUTE_Back_7 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_Back_4 =
								{

								},
							},
						},
					},
				},
				ROUTE_FrontBridge_1 =
				{
					ROUTE_FrontBridge_2 =
					{
						ROUTE_Runway_1 =
						{
							Weight = 2,
							ROUTE_Runway_2 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_4 =
									{

									},
								},
							},
						},
						ROUTE_FrontRunway_1 =
						{
							ROUTE_FrontRunway_2 =
							{
								ROUTE_FrontRunway_3 =
								{

								},
							},
						},
					},
				},
			},
			ROUTE_Allied5Spawn2 =
			{
				ROUTE_Back_8 =
				{
					Weight = 3,
					ROUTE_Back_7 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_Back_4 =
								{

								},
							},
						},
					},
				},
				ROUTE_FrontBridge_1 =
				{
					ROUTE_FrontBridge_2 =
					{
						ROUTE_Runway_1 =
						{
							Weight = 2,
							ROUTE_Runway_2 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_4 =
									{

									},
								},
							},
						},
						ROUTE_FrontRunway_1 =
						{
							ROUTE_FrontRunway_2 =
							{
								ROUTE_FrontRunway_3 =
								{

								},
							},
						},
					},
				},
			},
			ROUTE_Allied5Spawn3 =
			{
				ROUTE_Back_8 =
				{
					Weight = 3,
					ROUTE_Back_7 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_Back_4 =
								{

								},
							},
						},
					},
				},
				ROUTE_FrontBridge_1 =
				{
					ROUTE_FrontBridge_2 =
					{
						ROUTE_Runway_1 =
						{
							Weight = 2,
							ROUTE_Runway_2 =
							{
								ROUTE_Back_5 =
								{
									ROUTE_Back_4 =
									{

									},
								},
							},
						},
						ROUTE_FrontRunway_1 =
						{
							ROUTE_FrontRunway_2 =
							{
								ROUTE_FrontRunway_3 =
								{

								},
							},
						},
					},
				},
			},
		},
		CAPPOINT_Plane =
		{
			ROUTE_FlagBusFuel =
			{
				ROUTE_Back_8 =
				{
					Weight = 2,
					ROUTE_Back_7 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_FlagBusFuel2 =
								{
									ROUTE_FlagBusFuel6 =
									{

									},
								},
							},
							ROUTE_FlagBusFuel5 =
							{

							},
						},
					},
				},
				ROUTE_FlagBusFuel3 =
				{
					Weight = 2,
					ROUTE_FlagBusFuel4 =
					{
						ROUTE_Back_6 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_FlagBusFuel2 =
								{
									ROUTE_FlagBusFuel6 =
									{

									},
								},
							},
							ROUTE_FlagBusFuel5 =
							{

							},
						},
					},
				},
				ROUTE_FrontBridge_2 =
				{
					ROUTE_Runway_1 =
					{
						ROUTE_Runway_2 =
						{
							ROUTE_Back_5 =
							{
								ROUTE_FlagBusFuel2 =
								{
									ROUTE_FlagBusFuel6 =
									{

									},
								},
							},
						},
						ROUTE_FlagBusFuel5 =
						{

						},
					},
					ROUTE_FrontRunway_1 =
					{
						ROUTE_FrontRunway_2 =
						{
							ROUTE_FrontRunway_3 =
							{

							},
						},
					},
				},
			},
		},
		FLAG_tcr_fuel_scriptname =
		{
			ROUTE_AlliesCastleSpawn =
			{
				ROUTE_UpperHealth2 =
				{
					ROUTE_Balcony1 =
					{
						ROUTE_Balcony2 =
						{
							ROUTE_Balcony3 =
							{
								ROUTE_SpiralStairs =
								{

								},
							},
							ROUTE_handrailing =
							{

							},
						},
					},
				},
				ROUTE_FlagStairs =
				{

				},
			},
			ROUTE_AlliesCastleSpawn1 =
			{
				ROUTE_UpperHealth2 =
				{
					ROUTE_Balcony1 =
					{
						ROUTE_Balcony2 =
						{
							ROUTE_Balcony3 =
							{
								ROUTE_SpiralStairs =
								{

								},
							},
							ROUTE_handrailing =
							{

							},
						},
					},
				},
				ROUTE_FlagStairs =
				{

				},
			},
			ROUTE_AlliesCastleSpawn2 =
			{
				ROUTE_UpperHealth2 =
				{
					ROUTE_Balcony1 =
					{
						ROUTE_Balcony2 =
						{
							ROUTE_Balcony3 =
							{
								ROUTE_SpiralStairs =
								{

								},
							},
							ROUTE_handrailing =
							{

							},
						},
					},
				},
				ROUTE_FlagStairs =
				{

				},
			},
			ROUTE_AlliesCastleSpawn_3 =
			{
				ROUTE_UpperHealth2 =
				{
					ROUTE_Balcony1 =
					{
						ROUTE_Balcony2 =
						{
							ROUTE_Balcony3 =
							{
								ROUTE_SpiralStairs =
								{

								},
							},
							ROUTE_handrailing =
							{

							},
						},
					},
				},
				ROUTE_FlagStairs =
				{

				},
			},
			ROUTE_AlliesCastleSpawn_4 =
			{
				ROUTE_UpperHealth2 =
				{
					ROUTE_Balcony1 =
					{
						ROUTE_Balcony2 =
						{
							ROUTE_Balcony3 =
							{
								ROUTE_SpiralStairs =
								{

								},
							},
							ROUTE_handrailing =
							{

							},
						},
					},
				},
				ROUTE_FlagStairs =
				{

				},
			},
		},
	};
	MapRoutes[".*_Axis_FlagBus_.*"] =
	{
		ROUTE_AxisCastleSpawn =
		{
			ROUTE_Tunnel_To_Library =
			{

			},
		},
		ROUTE_AxisCastleSpawn_1 =
		{
			ROUTE_Tunnel_To_Library =
			{

			},
		},
		ROUTE_AxisCastleSpawn_2 =
		{
			ROUTE_Tunnel_To_Library =
			{

			},
		},
	};

	MapRoutes[".*_AxisInHangar_.*"] =
	{
		ROUTE_AxisPlaneSpawn =
		{
			ROUTE_Back_1 =
			{
				ROUTE_Back_2 =
				{
					ROUTE_Back_3 =
					{

					},
				},
			},
		},
		ROUTE_AxisPlaneSpawn1 =
		{
			ROUTE_Back_1 =
			{
				ROUTE_Back_2 =
				{
					ROUTE_Back_3 =
					{

					},
				},
			},
		},
		ROUTE_AxisPlaneSpawn_2 =
		{
			ROUTE_Back_1 =
			{
				ROUTE_Back_2 =
				{
					ROUTE_Back_3 =
					{

					},
				},
			},
		},
	};
	MapRoutes[".*_Bus_.*"] =
	{
		ROUTE_AtFlagTable =
		{
			ROUTE_FFlagDoor =
			{
				ROUTE_FlagDoor =
				{
					ROUTE_UpperHealth2 =
					{
						ROUTE_BackTunnel1 =
						{
							ROUTE_Constructible =
							{
								ROUTE_SideLadder =
								{
									ROUTE_Roof =
									{

									},
								},
								ROUTE_BackFlagWay1 =
								{
									ROUTE_BackFlagWay2 =
									{

									},
								},
							},
						},
					},
				},
				ROUTE_BackTunnel1 =
				{
					Weight = 2,
					ROUTE_Constructible =
					{
						ROUTE_SideLadder =
						{
							ROUTE_Roof =
							{

							},
						},
						ROUTE_BackFlagWay1 =
						{
							ROUTE_BackFlagWay2 =
							{

							},
						},
					},
				},
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_SideLadder =
						{
							ROUTE_Roof =
							{

							},
						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 2,
						},
					},
				},
			},
			ROUTE_SpiralStairs =
			{
				ROUTE_SpiralStairs2 =
				{
					ROUTE_Window =
					{
						ROUTE_jump =
						{
							ROUTE_FrontLadder =
							{

							},
							ROUTE_SideLadder =
							{
								ROUTE_Roof =
								{

								},
							},
							ROUTE_BackFlagWay2 =
							{
								Weight = 2,
							},
						},
						ROUTE_ConstructibleLadder1 =
						{
							Weight = 2,
							ROUTE_ConstructibleLadder =
							{
								ROUTE_SideLadder =
								{
									ROUTE_Roof =
									{

									},
								},
								ROUTE_BackFlagWay1 =
								{
									ROUTE_BackFlagWay2 =
									{

									},
								},
							},
						},
					},
				},
			},
		},
		ROUTE_AxisCastleSpawn =
		{
			ROUTE_jump =
			{
				ROUTE_FrontLadder =
				{

				},
				ROUTE_BackFlagWay2 =
				{
					Weight = 3,
				},
			},
			ROUTE_UpperStairs =
			{
				Weight = 3,
				ROUTE_BackTunnel1 =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
		},
		ROUTE_AxisCastleSpawn_1 =
		{
			ROUTE_jump =
			{
				ROUTE_FrontLadder =
				{

				},
				ROUTE_BackFlagWay2 =
				{
					Weight = 3,
				},
			},
			ROUTE_UpperStairs =
			{
				Weight = 3,
				ROUTE_BackTunnel1 =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
		},
		ROUTE_AxisCastleSpawn_2 =
		{
			ROUTE_jump =
			{
				ROUTE_FrontLadder =
				{

				},
				ROUTE_BackFlagWay2 =
				{
					Weight = 3,
				},
			},
			ROUTE_UpperStairs =
			{
				Weight = 3,
				ROUTE_BackTunnel1 =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
		},
		ROUTE_AlliesCastleSpawn =
		{
			ROUTE_BackTunnel1 =
			{
				Weight = 3,
				ROUTE_Constructible =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
			ROUTE_FlagStairs =
			{
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 3,
						},
					},
				},
			},
		},
		ROUTE_AlliesCastleSpawn1 =
		{
			ROUTE_BackTunnel1 =
			{
				Weight = 3,
				ROUTE_Constructible =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
			ROUTE_FlagStairs =
			{
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 3,
						},
					},
				},
			},
		},
		ROUTE_AlliesCastleSpawn2 =
		{
			ROUTE_BackTunnel1 =
			{
				Weight = 3,
				ROUTE_Constructible =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
			ROUTE_FlagStairs =
			{
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 3,
						},
					},
				},
			},
		},
		ROUTE_AlliesCastleSpawn_3 =
		{
			ROUTE_BackTunnel1 =
			{
				Weight = 3,
				ROUTE_Constructible =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
			ROUTE_FlagStairs =
			{
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 3,
						},
					},
				},
			},
		},
		ROUTE_AlliesCastleSpawn_4 =
		{
			ROUTE_BackTunnel1 =
			{
				Weight = 3,
				ROUTE_Constructible =
				{
					ROUTE_SideLadder =
					{

					},
					ROUTE_BackFlagWay1 =
					{
						ROUTE_BackFlagWay2 =
						{

						},
					},
				},
			},
			ROUTE_FlagStairs =
			{
				ROUTE_UpperStairs =
				{
					ROUTE_jump =
					{
						ROUTE_FrontLadder =
						{

						},
						ROUTE_BackFlagWay2 =
						{
							Weight = 3,
						},
					},
				},
			},
		},
	};

	MapRoutes.FLAG_tcr_docs_scriptname = MapRoutes.FLAG_tcr_fuel_scriptname;
	MapRoutes.ATTACK_Allied_secondflag_1 = MapRoutes.CHECKPOINT_secondflag;
	MapRoutes.ATTACK_Allied_secondflag_2 = MapRoutes.CHECKPOINT_secondflag;
	MapRoutes.ATTACK_Allied_secondflag_3 = MapRoutes.CHECKPOINT_secondflag;
	MapRoutes.ATTACK_Allied_secondflag_4 = MapRoutes.CHECKPOINT_secondflag;
	MapRoutes.ATTACK_Allied_secondflag_5 = MapRoutes.CHECKPOINT_secondflag;
	MapRoutes.MOBILEMG42_Axis_AtFlagDoc = MapRoutes[".*_Axis_FlagBus_.*"];
	MapRoutes.CALLARTILLERY_AxisPastBarrier2_1 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_3 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_4 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_6 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_7 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_8 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes.DEFEND_AxisPastBarrier2_9 = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes[".*_BackAccessToHangar_.*"] = MapRoutes[".*_AxisInHangar_.*"];
	MapRoutes["ATTACK_Allied_firstflag_.*"] = MapRoutes.CHECKPOINT_firstflag;

	Util.Routes(MapRoutes);

	SetAvailableMapGoals( TEAM.ALLIES, false, {
		"ROUTE_ConstructibleLadder",
		"ROUTE_ConstructibleLadder1",
		"ROUTE_FlagBusFuel5",
		"ROUTE_TunnelEntrance",
		"ROUTE_AvalancheWall",
	});

	Util.MapDebugPrint( "^3Omni-bot map script by ^1n^2a^4t^8i^3v^5e12 ^3for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{
	bot.TargetBreakableDist = 300.0;
};
