global Map =
{
	Talk = true, // set to false if you want silent bots
	Answer1 = false,
	Sidegate_open = false,
	safe_open = false,
	Phase = 1,
	InnerSpawn = 0,
	DefendingTeam = TEAM.AXIS,

	// region triggers
	iw1 = 0,
	iw2 = 0,
	iw3 = 0,
	iw4 = 0,
	iw5 = 0,
	iw6 = 0,
	iw7 = 0,
	iw8 = 0,

	TrainPos = -1, // 1: south, 2: north, 3: stores, 4: armoury, -1: moving
	EastSwitchPos = 1, // 1: default, 2: train going to stores
	WestSwitchPos = 1, // 1: default, 2: train going to stores
	FocusOn = 1, // 1: armoury, 2: stores, 3: cappoint

	Switches =
	{
		Safe =
		{
			WaypointName = "safe",
			Enabled = false,
			LimitBots = 3,
			LimitDistance = 400,
			Priority = 0.8,
			LimitTeam = (1<<TEAM.ALLIES),
			LimitClass = (1<<CLASS.SOLDIER) | (1<<CLASS.COVERTOPS) | (1<<CLASS.FIELDOPS) | (1<<CLASS.MEDIC) | (1<<CLASS.ENGINEER),
		},

		East_Switch =
		{
			WaypointName = "east_switch",
			Enabled = false,
			LimitBots = 1,
			LimitDistance = 800,
			Priority = 0.7,
			LimitTeam = (1<<TEAM.ALLIES),
			LimitClass = (1<<CLASS.SOLDIER) | (1<<CLASS.COVERTOPS) | (1<<CLASS.FIELDOPS) | (1<<CLASS.MEDIC) | (1<<CLASS.ENGINEER),
		},

		West_Switch =
		{
			WaypointName = "west_switch",
			Enabled = false,
			LimitBots = 1,
			LimitDistance = 800,
			Priority = 0.7,
			LimitTeam = (1<<TEAM.ALLIES),
			LimitClass = (1<<CLASS.SOLDIER) | (1<<CLASS.COVERTOPS) | (1<<CLASS.FIELDOPS) | (1<<CLASS.MEDIC) | (1<<CLASS.ENGINEER),
		},
	},

/*
	// d00d: RideMovers doesn't work atm. I've cleared all RideMovers paththrough
	// properties in the waypoint file because the bots have a hell of a time
	// boarding the wagon. Otherwise, the following data should be OK.
	// Feel free to experiment.

	RideMovers =
	{
		train_south =
		{
			movergoal = "MOVER_train",
			rideposition = Vector3(-10,-102,28),
			stance = BTN.CROUCH,
			startwp = "train_south",
			exitwp = null,
			board = function(_this)
			{
				if ( Map.TrainPos == 1 )
					{ return true; }
				return false;
			},
			leave = function(_this)
			{
				if ( Map.TrainPos == 3 )
				{
					Map.RideMovers.train_south.exitwp = "patrol2";
					return true;
				}
				if ( Map.TrainPos == 4 )
				{
					Map.RideMovers.train_south.exitwp = "train_armoury";
					return true;
				}
				return false;
			},
		},
	},
*/

	train_south =
	{
		Name = "train_south",
		TriggerOnClass = CLASS.VEHICLE_NODAMAGE,
		OnEnter = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " arrives south", true);
			Map.TrainPos = 1;
		},
		OnExit = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " exit south", true);
			Map.TrainPos = -1;
		},
	},

	train_north =
	{
		Name = "train_north",
		TriggerOnClass = CLASS.VEHICLE_NODAMAGE,
		OnEnter = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " arrives north", true);
			Map.TrainPos = 2;
		},
		OnExit = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " exit north", true);
			Map.TrainPos = -1;
		},
	},

	train_stores =
	{
		Name = "train_stores",
		TriggerOnClass = CLASS.VEHICLE_NODAMAGE,
		OnEnter = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " at stores", true);
			Map.TrainPos = 3;
		},
		OnExit = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " exit stores", true);
			Map.TrainPos = -1;
		},
	},

	train_armoury =
	{
		Name = "train_armoury",
		TriggerOnClass = CLASS.VEHICLE_NODAMAGE,
		OnEnter = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " at armoury", true);
			Map.TrainPos = 4;
		},
		OnExit = function(ent)
		{
			Util.MapDebugPrint(GetEntName(ent) + " exit armoury", true);
			Map.TrainPos = -1;
		},
	},

	east_Switch_Moving = function( trigger )
	{
		vec = ToVector(trigger.Action);
		if ( vec.x > 0 )
		{
			Map.EastSwitchPos = 1;
			Util.MapDebugPrint("east_Switch in start pos., train going to armoury", true);
			if( Map.Phase == 1 )
			{
				Map.Switches.East_Switch.Enabled = false;
			}
			else if( Map.Phase == 3 )
			{
				Map.Switches.East_Switch.Enabled = true;
			}
			else
			{
				Map.Switches.East_Switch.Enabled = false;
			}
		}
		else
		{
			Map.EastSwitchPos = 2;
			Util.MapDebugPrint("east_Switch in 2nd pos., train going to stores", true);
			if( Map.Phase == 1 )
			{
				Map.Switches.East_Switch.Enabled = true;
			}
			else
			{
				Map.Switches.East_Switch.Enabled = false;
			}
		}
	},

	west_Switch_Moving = function( trigger )
	{
		vec = ToVector(trigger.Action);
		if ( vec.y < 0 )
		{
			Map.WestSwitchPos = 1;
			Util.MapDebugPrint("west_Switch in start pos., train going to armoury", true);
			//Map.Switches.West_Switch.Enabled = false;
		}
		else
		{
			Map.WestSwitchPos = 2;
			Util.MapDebugPrint("west_Switch in 2nd pos., train going to stores", true);
			//Map.Switches.West_Switch.Enabled = true;
		}
	},

	AlliesWon = function( trigger )
	{
		ETUtil.WinningChat( TEAM.ALLIES );
		ETUtil.LosingChat( TEAM.AXIS );

		Util.MapDebugPrint("AlliesWon");
	},

	KeyStolen = function( trigger )
	{
		Map.iw5 = OnTriggerRegion( AABB(6764.630,1791.888,-167.221,6894.037,2031.099,-38.568), RegionTrigger.IntrusionWarning );
		Map.iw6 = OnTriggerRegion( AABB(6652.040,2515.511,-185.796,6824.801,2734.915,-31.176), RegionTrigger.IntrusionWarning );
		Map.iw7 = OnTriggerRegion( AABB(6375.917,1799.979,-184.977,6578.432,1962.003,-45.000), RegionTrigger.IntrusionWarning );
		Map.iw8 = OnTriggerRegion( AABB(6533.235,1374.481,-202.566,6719.447,1595.966,-25.316), RegionTrigger.IntrusionWarning );

		Map.Phase = 2;

		SetAvailableMapGoals(TEAM.AXIS, false, {
			"MOBILEMORTAR_axis_start.*",
			"ATTACK.*gate.*",
			"ATTACK.*key.*",
		});
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"ATTACK_keys1",
			"ATTACK_keys2",
		});
		//SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_flag.*");
		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK.*gate.*");
		SetAvailableMapGoals(TEAM.ALLIES, true, "ATTACK_safe3");
		SetAvailableMapGoals(TEAM.ALLIES, false, {
			"ATTACK.*start.*",
			"ATTACK_x1",
		});
		SetAvailableMapGoals(TEAM.AXIS, false, {
			"ATTACK_x1",
			"ATTACK.*start.*",
			"SNIPE_axis_start.*",
		});
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_safe.*");

		SetGoalPriority("ATTACK_safe.*", 0.6);
		SetGoalPriority("ATTACK_flag.*", 0.55);

		Util.MapDebugPrint("KeyStolen");
	},

	KeyDropped = function( trigger )
	{
		sleep(0.5);
		SetGoalPriority("FLAGRETURN_key_dropped", 0.8);
		Util.MapDebugPrint("KeyDropped");
	},

	KeyReturned = function( trigger )
	{
		if ( Map.InnerSpawn != 2 )
		{
			SetAvailableMapGoals(TEAM.AXIS, true, {
				"ATTACK_axis_start.*",
				"SNIPE_axis_start.*",
			});
		}
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_key.*");
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_safe.*");
		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK_safe.*");
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"ATTACK_axis_start2",
			"ATTACK_axis_start1",
		});

		Util.MapDebugPrint("KeyReturned");
	},

	SafeOpen = function( trigger )
	{
		DeleteTriggerRegion( Map.iw1 );
		DeleteTriggerRegion( Map.iw2 );
		DeleteTriggerRegion( Map.iw3 );
		DeleteTriggerRegion( Map.iw4 );

		Map.Phase = 3;
		Map.safe_open = true;

		SetAvailableMapGoals(TEAM.ALLIES, false, {
			"ATTACK_keys.*",
			"CAPPOINT_safe",
		});
		SetAvailableMapGoals(TEAM.ALLIES, true, {
			"CAPPOINT_halftrack",
			"ATTACK_safe3",
		});
		Map.Switches.Safe.Enabled = true;
		//SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_patrol.*");

		SetAvailableMapGoals(TEAM.AXIS, false, {
			"ATTACK.*start.*",
			"ATTACK_keys.*",
		});
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"ATTACK_safe.*",
			"ATTACK_axis_start2",
			"ATTACK_axis_start1",
		});
		SetGoalPriority("ATTACK_safe.*", 0.6 );
		SetGoalPriority("CHECKPOINT_forward_spawn", 0.6);

		Util.MapDebugPrint("SafeOpen");
	},

	DocStolen = function( trigger )
	{
		Map.Phase = 4;
		Map.Switches.Safe.Enabled = false;

		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK_keys.*");
		SetAvailableMapGoals(TEAM.ALLIES, true, {
			"CAPPOINT_halftrack",
			"FLAG_case",
		});
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_halftrack.*");
		SetAvailableMapGoals(TEAM.AXIS, false, {
			"ATTACK_keys.*",
			"MOBILEMG42_axis_start.*",
		});
		SetAvailableMapGoals(TEAM.ALLIES, true, "ATTACK_halftrack.*");
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_patrol.*");
		//SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_axis_start.*");
		//SetGoalPriority("ATTACK_axis_start.*", 0.9);
		SetGoalPriority("ATTACK_halftrack.*", 0.75);
		SetGoalPriority("ATTACK_flag.*", 0.0 );

		Util.MapDebugPrint("DocStolen");
	},

	DocDropped = function( trigger )
	{
		sleep(0.5);
		SetGoalPriority("ATTACK_halftrack.*", 0.7);
		SetGoalPriority("FLAG_case_dropped", 0.8);
		SetGoalPriority("FLAGRETURN_case_dropped", 0.8);
		//SetAvailableMapGoals(TEAM.AXIS, true, "FLAG_case_dropped");

		Util.MapDebugPrint("DocDropped");
	},

	DocReturned = function( trigger )
	{
		Map.Phase = 3;
		SetGoalPriority("ATTACK_safe.*", 0.7);
		//SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_patrol.*");
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"MOBILEMG42_axis_start2",
			"MOBILEMG42_axis_start8",
		});
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_axis_start.*");
		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK_keys.*");
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_keys.*");
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"ATTACK_axis_start2",
			"ATTACK_axis_start1",
		});
		SetAvailableMapGoals(TEAM.ALLIES, false, "FLAG_case");
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_halftrack.*");
		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK_halftrack.*");
		SetGoalPriority("ATTACK_flag.*", 0.8);
		Map.Switches.Safe.Enabled = true;
		sleep(0.2);

		if ( Map.Talk && MAP_TALK )
		{
			foreach ( id and bot in BotTable )
			{
				r = RandRange(0,10);
				if ( bot.GetTeam() == TEAM.AXIS )
				{
					if( r < 1 )
					{
						sleep(RandFloat(0.1, 0.3));
						bot.SayVoice(VOICE.G_CHEER);
						//break;
					}
				}
			}
		}

		Util.MapDebugPrint("DocReturned");
	},

	GarageAxis = function( trigger )
	{
		Map.InnerSpawn = 1;
		SetAvailableMapGoals(TEAM.ALLIES, true, "ATTACK_flag.*");
		SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_flag.*");
		if ( Map.Phase == 1 )
		{
			SetAvailableMapGoals(TEAM.AXIS, true, {
				"CALLARTILLERY_axis_start.*",
				"CALLARTILLERY_gate.*",
				"MOBILEMORTAR_axis_start.*",
				"SNIPE_axis_start.*",
			});
			SetAvailableMapGoals(TEAM.ALLIES, true, "ATTACK_allies_start.*");
			SetGoalPriority("ATTACK_keys.*", 0.55);
			SetGoalPriority("ATTACK_axis_start.*", 0.6);
			SetGoalPriority("ATTACK_axis_gate.*", 0.6);
			Util.SetMaxUsersInProgress( 1, "FLAG_key");
			Util.SetMaxUsersInProgress( 2, "CHECKPOINT_forward_spawn");
		}

		Util.MapDebugPrint("GarageAxis");
	},

	GarageAllies = function( trigger )
	{
		Map.InnerSpawn = 2;
		SetAvailableMapGoals(TEAM.AXIS, false, {
			"CALLARTILLERY_axis_start.*",
			"CALLARTILLERY_gate.*",
			"MOBILEMORTAR_axis_start.*",
		});
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_flag.*");
		SetAvailableMapGoals(TEAM.AXIS, false, "SNIPE_axis_start.*");
		SetAvailableMapGoals(TEAM.ALLIES, false, {
			"ATTACK_flag.*",
			"ATTACK_allies_start.*",
		});
		Util.SetMaxUsersInProgress( 3, "FLAG_key");
		Util.SetMaxUsersInProgress( 1, "CHECKPOINT_forward_spawn");
		if ( Map.Phase == 1 )
		{
			SetGoalPriority("ATTACK_keys.*", 0.6);
			SetGoalPriority("ATTACK_axis_start.*", 0.5);
			SetGoalPriority("ATTACK_axis_gate.*", 0.5);
		}

		if (Map.safe_open) {
			Util.MapDebugPrint("GarageAllies");
			return;
		}

		SetAvailableMapGoals(TEAM.ALLIES, true, "FLAG_key");
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_keys.*");
		SetAvailableMapGoals(TEAM.ALLIES, true, {
			"ATTACK_keys3",
			"ATTACK_keys5",
		});
		SetGoalPriority("ATTACK_key.*", 0.6);

		Util.MapDebugPrint("GarageAllies");
	},

	SideGate = function( trigger )
	{
		//SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK.*gate.*");
		Map.Sidegate_open = true;
		SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK.*gate.*");
		SetAvailableMapGoals(TEAM.AXIS, true, {
			"ATTACK_gate",
			"ATTACK_flag2",
		});
		SetAvailableMapGoals(TEAM.ALLIES, true, "ATTACK_gate");
		SetAvailableMapGoals(TEAM.AXIS, true, "ATTACK_keys.*");
		SetAvailableMapGoals(TEAM.ALLIES, true, {
			"ATTACK_keys3",
			"ATTACK_keys5",
		});
		SetGoalPriority("ATTACK_flag.*", 0.6);

		if ( Map.Talk && MAP_TALK )
		{
			foreach ( id and bot in BotTable )
			{
				if ( bot.GetTeam() == TEAM.ALLIES && bot.GetClass() == CLASS.ENGINEER  )
				{
					r = RandRange(0,10);
					if( r < 5 )
					{
						bot.SayVoice(VOICE.PATH_CLEARED);
						break;
					}
					else if( r > 8 && Map.Answer1 )
					{
						bot.SayVoice(VOICE.COMMAND_COMPLETED);
						break;
					}
				}
			}
		}
		Map.Answer1 = false;

		Util.MapDebugPrint("SideGate");
	},
};

global OnMapLoad = function()
{
	ts = OnTriggerRegion( Vector3(3072,2314,0), 40, Map.train_south );
	tn = OnTriggerRegion( Vector3(2777,3459,220), 40, Map.train_north );
	ta = OnTriggerRegion( Vector3(4834,4076,-20), 40, Map.train_armoury );
	tt = OnTriggerRegion( Vector3(6336,2690,-130), 70, Map.train_stores );

	Map.iw1 = OnTriggerRegion( AABB(4795.339,4379.173,-56.225,4978.581,4524.813,81.320), RegionTrigger.IntrusionWarning );
	Map.iw2 = OnTriggerRegion( AABB(4377.626,4422.766,-77.392,4616.378,4538.027,77.860), RegionTrigger.IntrusionWarning );
	Map.iw3 = OnTriggerRegion( AABB(4079.565,4113.782,-97.033,4249.600,4297.807,62.722), RegionTrigger.IntrusionWarning );
	Map.iw4 = OnTriggerRegion( AABB(4196.791,4394.988,-68.587,4368.760,4566.788,96.422), RegionTrigger.IntrusionWarning );

	OnTrigger("llever_c_goto", Map.east_Switch_Moving);
	OnTrigger("hlever_c_goto", Map.west_Switch_Moving);
	OnTrigger("Allies have destroyed the Side Gate!!", Map.SideGate);
	OnTrigger("Allies control the Garage!", Map.GarageAllies);
	OnTrigger("Axis control the Garage!", Map.GarageAxis);
	OnTrigger("Allied team has stolen the Safe Keys!", Map.KeyStolen);
	OnTrigger("Flag key_dropped deleted", Map.KeyDropped);
	OnTrigger("Axis team has returned the Safe Keys!", Map.KeyReturned);
	OnTrigger("Allied team has opened the Safe!", Map.SafeOpen);
	OnTrigger("Allied team has stolen the Documents!", Map.DocStolen);
	OnTrigger("Flag case_dropped deleted", Map.DocDropped);
	OnTrigger("Axis team has returned the Documents!", Map.DocReturned);
	OnTrigger("Allied team has run off with the Documents!", Map.AlliesWon);

	SetAvailableMapGoals(TEAM.ALLIES, false, {
		".*_axis_.*",
		"ATTACK_halftrack.*",
		"ATTACK_keys.*",
		"ATTACK_safe.*",
		"CAPPOINT_halftrack",
		"FLAG_case",
	});
	//SetAvailableMapGoals(TEAM.ALLIES, false, "FLAG_key");
	SetAvailableMapGoals(TEAM.ALLIES, false, "ATTACK_patrol.*");
	SetAvailableMapGoals(TEAM.ALLIES, true, {
		"ATTACK_flag.*",
		"ATTACK_x1",
	});
	SetAvailableMapGoals(TEAM.ALLIES, false, {
		"MOBILEMG42_axis_.*",
		"CALLARTILLERY_axis.*",
		"CALLARTILLERY_gate.*",
		"MOBILEMORTAR_axis.*",
	});

	SetAvailableMapGoals(TEAM.AXIS, false, {
		".*allies.*",
		"ATTACK_gate",
		"ATTACK_safe.*",
		"ATTACK_patrol.*",
	});
	//SetAvailableMapGoals(TEAM.AXIS, false, "ATTACK_keys.*");
	SetAvailableMapGoals(TEAM.AXIS, false, {
		"ATTACK_halftrack.*",
		"ATTACK_flag.*",
	});
	//SetAvailableMapGoals(TEAM.AXIS, true, "FLAG_key_dropped");
	//SetAvailableMapGoals(TEAM.AXIS, true, "FLAG_case_dropped");
	SetAvailableMapGoals(TEAM.AXIS, true, {
		"ATTACK_flag1",
		"MOBILEMG42_axis_start2",
	});
	SetAvailableMapGoals(TEAM.AXIS, false, {
		"ATTACK_x1",
		"BUILD_Side_Gate",
		"CAPPOINT_halftrack",
	});

	SetGoalPriority("ATTACK_x1", 0.5);
	SetGoalPriority("ATTACK_keys.*", 0.55);
	SetGoalPriority("ATTACK_axis_start.*", 0.6);
	SetGoalPriority("ATTACK_axis_gate.*", 0.6);
	SetGoalPriority("MOBILEMG42_axis_start.*", 0.7);
	SetGoalPriority("CHECKPOINT_forward_spawn", 0.7);
	SetGoalPriority("FLAG_key", 0.7);
	SetMapGoalProperties( "ATTACK_.*", {MinCampTime=0, MaxCampTime=20} );
	SetMapGoalProperties( "ATTACK_flag.*", {MinCampTime=0, MaxCampTime=5} );
	SetMapGoalProperties( "MOBILEMG42_.*", {MinCampTime=10, MaxCampTime=180} );

	Util.SetMaxUsersInProgress( 1, "SNIPE_.*");
	Util.SetMaxUsersInProgress( 1, "PLANT_.*");
	Util.SetMaxUsersInProgress( 1, "ATTACK_.*");
	Util.SetMaxUsersInProgress( 3, "ATTACK_halftrack.*");
	Util.SetMaxUsersInProgress( 2, "FLAG_key");
	Util.SetMaxUsersInProgress( 3, "CHECKPOINT_forward_spawn");
	Util.SetGoalOffset( -50, 0, 0, "PLANT_Side_Gate" );
	Util.UpdateSwitchData();

	/*** ROUTES ***/
	MapRoutes =
	{
		PLANT_Side_Gate =
		{
			ROUTE_allied_spawn =
			{
				ROUTE_south_route1 = {},
				ROUTE_south_route2 = {},
			}
		},
		CHECKPOINT_forward_spawn =
		{
			ROUTE_allied_spawn =
			{
				ROUTE_south_route1 = {},
				ROUTE_north_route1 = {},
				ROUTE_allies_start2 = {},
			}
		},
		CAPPOINT_safe =
		{
			ROUTE_key =
			{
				ROUTE_key_right =
				{
				},
				ROUTE_key_left =
				{
				},
				ROUTE_forking =
				{
				}
			}
		},
		CAPPOINT_halftrack =
		{
			ROUTE_route_safe =
			{
				ROUTE_route_left =
				{
					ROUTE_forking_right = {},
					ROUTE_axis_start5 = {},
					ROUTE_axis_start2 = {},
				},
				ROUTE_route_right =
				{
					ROUTE_forking_right = {},
					ROUTE_axis_start5 = {},
					ROUTE_axis_start2 = {},
				},
				ROUTE_patrol1 =
				{
					ROUTE_forking_right = {},
					ROUTE_axis_start5 = {},
					ROUTE_axis_start2 = {},
				},
			},
		},
		ATTACK_safe3 =
		{
			ROUTE_flag2 =
			{
				ROUTE_forking_right = {},
				ROUTE_axis_start2 = {},
				ROUTE_axis_start5 =
				{
					ROUTE_forking = {},
				},
			},
		},
	};
	MapRoutes.FLAG_key = MapRoutes.ATTACK_safe3;
	MapRoutes.FLAG_case = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_halftrack = MapRoutes.CAPPOINT_halftrack;
	MapRoutes.ATTACK_halftrack2 = MapRoutes.CAPPOINT_halftrack;
	MapRoutes.ATTACK_safe1 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe2 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe4 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe5 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe6 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe7 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe8 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_safe9 = MapRoutes.ATTACK_safe3;
	MapRoutes.ATTACK_keys3 = MapRoutes.ATTACK_safe3;

	Util.Routes(MapRoutes);
	Util.MapDebugPrint("Omni-bot map script for Alpine Assault executed.");
};

global OnBotJoin = function( bot )
{
	if ( Map.Talk && MAP_TALK )
	{
		r = RandRange(0,20);
		if( r < 1 )
		{
			bot.SayVoice(VOICE.LETS_GO);
		}
		else if( r < 2 )
		{
			bot.SayVoice(VOICE.WHERE_TO);
		}
		else if( r < 4 && !Map.Sidegate_open && bot.GetTeam() == TEAM.ALLIES && bot.GetClass() != CLASS.ENGINEER && bot.GetClass() != CLASS.COVERTOPS )
		{
			if( r < 3 )
			{
				bot.SayVoice(VOICE.CLEAR_PATH);
				Map.Answer1 = true;
			}
			else if( r < 4 )
			{
				bot.SayVoice(VOICE.DESTROY_CONST);
				Map.Answer1 = true;
			}
		}
	}
};
