//==========================================================================================
//
//	sage2.gm
//
//	Who	When		What
//------------------------------------------------------------------------------------------
//	ageS	19 October 2016	Initial Script
//
//==========================================================================================
//

global Map =
{
	Debug = 0, // please set to zero before distributing your script

	DispenseHealthTime = 1.0,
	DispenseAmmoTime = 1.0,

	Is_there_santa = 0,

	//Force the bots to stay inside the teletube!
	Navigation =
 	{
 		tele =
 		{
 			navigate = function(_this)
 			{
				//Not working :(
				sleep(100);

 			},


 		},

 	},

	Roles =
	{
		AXIS =
		{
			DEFENDER1 =
			{
				numbots = 1,
			},
			ATTACKER1 =
			{
				numbots = 1,
			},
			ATTACKER2 =
			{
				numbots = 1,
			},
		},
		ALLIES =
		{
			DEFENDER1 =
			{
				numbots = 1,
			},
			ATTACKER1 =
			{
				numbots = 1,
			},
			ATTACKER2 =
			{
				numbots = 1,
			},
		},
	},

	blue_flag1_Taken = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag1_Taken" );
	},

	blue_flag2_Taken = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag2_Taken" );
	},

	blue_flag3_Taken = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag3_Taken" );
	},

	blue_flag4_Taken = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag4_Taken" );
	},

	blue_flag5_Taken = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag5_Taken" );
	},

	red_flag1_Taken = function( trigger )
	{
		Util.MapDebugPrint( "red_flag1_Taken" );
	},

	red_flag2_Taken = function( trigger )
	{
		Util.MapDebugPrint( "red_flag2_Taken" );
	},

	red_flag3_Taken = function( trigger )
	{
		Util.MapDebugPrint( "red_flag3_Taken" );
	},

	red_flag4_Taken = function( trigger )
	{
		Util.MapDebugPrint( "red_flag4_Taken" );
	},

	red_flag5_Taken = function( trigger )
	{
		Util.MapDebugPrint( "red_flag5_Taken" );
	},

	blue_flag1_Returned = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag1_Returned" );
	},

	blue_flag2_Returned = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag2_Returned" );
	},

	blue_flag3_Returned = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag3_Returned" );
	},

	blue_flag4_Returned = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag4_Returned" );
	},

	blue_flag5_Returned = function( trigger )
	{
		Util.MapDebugPrint( "blue_flag5_Returned" );
	},

	red_flag1_Returned = function( trigger )
	{
		Util.MapDebugPrint( "red_flag1_Returned" );
	},

	red_flag2_Returned = function( trigger )
	{
		Util.MapDebugPrint( "red_flag2_Returned" );
	},

	red_flag3_Returned = function( trigger )
	{
		Util.MapDebugPrint( "red_flag3_Returned" );
	},

	red_flag4_Returned = function( trigger )
	{
		Util.MapDebugPrint( "red_flag4_Returned" );
	},

	red_flag5_Returned = function( trigger )
	{
		Util.MapDebugPrint( "red_flag5_Returned" );
	},

	blue_flag1_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_blue_flag1" );
		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_blue_flag2" );

		Util.MapDebugPrint( "blue_flag1_Secured" );
	},

	blue_flag2_Secured = function( trigger )
	{


		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_blue_flag2" );
		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_blue_flag3" );

		Util.MapDebugPrint( "blue_flag2_Secured" );
	},

	blue_flag3_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_blue_flag3" );
		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_blue_flag4" );

		Util.MapDebugPrint( "blue_flag3_Secured" );
	},

	blue_flag4_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_blue_flag4" );
		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_blue_flag5" );

		Util.MapDebugPrint( "blue_flag4_Secured" );
	},

	blue_flag5_Secured = function( trigger )
	{

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

		Util.MapDebugPrint( "blue_flag5_Secured" );
	},

	red_flag1_Secured = function( trigger )
	{

		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_red_flag1" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_red_flag2" );

		Util.MapDebugPrint( "red_flag1_Secured" );
	},

	red_flag2_Secured = function( trigger )
	{


		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_red_flag2" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_red_flag3" );

		Util.MapDebugPrint( "red_flag2_Secured" );
	},

	red_flag3_Secured = function( trigger )
	{

		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_red_flag3" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_red_flag4" );

		Util.MapDebugPrint( "red_flag3_Secured" );
	},

	red_flag4_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_red_flag4" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_red_flag5" );

		Util.MapDebugPrint( "red_flag4_Secured" );
	},

	red_flag5_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_red_flag5" );

		Util.MapDebugPrint( "red_flag5_Secured" );
	},

	round_start = function( trigger )
	{

		SetAvailableMapGoals( TEAM.AXIS, false, "CAMP_ax_tele.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CAMP_al_tele.*" );

		Util.MapDebugPrint( "round_start" );
	},

	round_end = function( trigger )
	{


		Util.MapDebugPrint( "round_end" );
	},

	get_ready = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, true, "CAMP_ax_tele.*" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "CAMP_al_tele.*" );

		Util.MapDebugPrint( "get_ready" );
	},

};

global OnMapLoad = function()
{
	// Register callback functions
	OnTrigger( "The round starts!", Map.round_start );
	OnTrigger( "^12 Points ^wfor Allied team!", Map.round_end );
	OnTrigger( "^12 Points ^wfor Axis team!", Map.round_end );
	OnTrigger( "^11 Point ^wfor Allied team!", Map.round_end );
	OnTrigger( "^11 Point ^wfor Axis team!", Map.round_end );
	OnTrigger( "Get ready!", Map.get_ready );

	OnTrigger( "MISSING_STRING", Map.blue_flag1_Taken );
	OnTrigger( "MISSING_STRING", Map.blue_flag2_Taken );
	OnTrigger( "MISSING_STRING", Map.blue_flag3_Taken );
	OnTrigger( "MISSING_STRING", Map.blue_flag4_Taken );
	OnTrigger( "MISSING_STRING", Map.blue_flag5_Taken );
	OnTrigger( "MISSING_STRING", Map.red_flag1_Taken );
	OnTrigger( "MISSING_STRING", Map.red_flag2_Taken );
	OnTrigger( "MISSING_STRING", Map.red_flag3_Taken );
	OnTrigger( "MISSING_STRING", Map.red_flag4_Taken );
	OnTrigger( "MISSING_STRING", Map.red_flag5_Taken );
	OnTrigger( "MISSING_STRING", Map.blue_flag1_Returned );
	OnTrigger( "MISSING_STRING", Map.blue_flag2_Returned );
	OnTrigger( "MISSING_STRING", Map.blue_flag3_Returned );
	OnTrigger( "MISSING_STRING", Map.blue_flag4_Returned );
	OnTrigger( "MISSING_STRING", Map.blue_flag5_Returned );
	OnTrigger( "MISSING_STRING", Map.red_flag1_Returned );
	OnTrigger( "MISSING_STRING", Map.red_flag2_Returned );
	OnTrigger( "MISSING_STRING", Map.red_flag3_Returned );
	OnTrigger( "MISSING_STRING", Map.red_flag4_Returned );
	OnTrigger( "MISSING_STRING", Map.red_flag5_Returned );
	OnTrigger( "Axis have Captured the 1st Blue Flag!", Map.blue_flag1_Secured );
	OnTrigger( "Axis have Captured the 2nd Blue Flag!", Map.blue_flag2_Secured );
	OnTrigger( "Axis have Captured the 3rd Blue Flag!", Map.blue_flag3_Secured );
	OnTrigger( "Axis have Captured the 4th Blue Flag!", Map.blue_flag4_Secured );
	OnTrigger( "Axis have Captured the 5th Blue Flag!", Map.blue_flag5_Secured );
	OnTrigger( "Allies have Captured the 1st Red Flag!", Map.red_flag1_Secured );
	OnTrigger( "Allies have Captured the 2nd Red Flag!", Map.red_flag2_Secured );
	OnTrigger( "Allies have Captured the 3rd Red Flag!", Map.red_flag3_Secured );
	OnTrigger( "Allies have Captured the 4th Red Flag!", Map.red_flag4_Secured );
	OnTrigger( "Allies have Captured the 5th Red Flag!", Map.red_flag5_Secured );

	//~Util.DisableGoal( ".*", true ); // all but routes
	//~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" );
	//~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" );

		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_red_flag1" );
		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"FLAG_red_flag2",
			"FLAG_red_flag3",
			"FLAG_red_flag4",
			"FLAG_red_flag5",
		});

		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_blue_flag1" );
		SetAvailableMapGoals( TEAM.AXIS, false, {
			"FLAG_blue_flag2",
			"FLAG_blue_flag3",
			"FLAG_blue_flag4",
			"FLAG_blue_flag5",
		});

		Util.SetMaxUsers( 1, "CAMP_al_tele.*" );
		Util.SetMaxUsers( 1, "CAMP_ax_tele.*" );
		Util.SetMaxUsersInUse( 1, "CAMP_al_tele.*" );
		Util.SetMaxUsersInUse( 1, "CAMP_ax_tele.*" );
		Util.SetMaxUsersInProgress( 1, "CAMP_al_tele.*" );
		Util.SetMaxUsersInProgress( 1, "CAMP_ax_tele.*" );

		SetAvailableMapGoals( TEAM.AXIS, false, "CAMP_ax_tele.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CAMP_al_tele.*" );





			//SetGoalPriority( "DEFEND.*", 1.2, 0, 0 ); //all teams and all classes
			//SetGoalPriority( "ATTACK_.*", 1.2, 0, 0 ); //all teams and all classes

		Util.SetMaxUsersInUse( 1, "FLAG.*" );
		Util.SetMaxUsersInProgress( 2, "FLAG.*" );
		Util.SetMaxUsersInUse( 1, "DEFEND.*" );
		Util.SetMaxUsersInProgress( 1, "DEFEND.*" );


	// Max users per goal
	//Util.SetMaxUsers( 1, "DEFEND_.*" );
	//Util.SetMaxUsers( 1, "GRENADE_.*" );
	//Util.SetMaxUsers( 1, "MOUNTMG42_.*" );

	// Camp times
	SetMapGoalProperties( "DEFEND_.*", {MinCampTime=5, MaxCampTime=10} );
	SetMapGoalProperties( "CAMP_al_tele.*", {MinCampTime=120, MaxCampTime=260} );
	SetMapGoalProperties( "CAMP_ax_tele.*", {MinCampTime=120, MaxCampTime=260} );

		 // hold crouch for 5 seconds
		//b.HoldButton(BTN.CROUCH, 5);

		//Util.SetGoalRange( "FLAG_red_flag1", 2000);
		//Util.SetGoalRange( "FLAG_red_flag2", 2000);
		//Util.SetGoalRange( "FLAG_red_flag3", 2000);
		//Util.SetGoalRange( "FLAG_red_flag4", 2000);
		//Util.SetGoalRange( "FLAG_red_flag5", 2000);

		//Util.SetGoalRange( "FLAG_blue_flag1", 2000);
		//Util.SetGoalRange( "FLAG_blue_flag2", 2000);
		//Util.SetGoalRange( "FLAG_blue_flag3", 2000);
		//Util.SetGoalRange( "FLAG_blue_flag4", 2000);
		//Util.SetGoalRange( "FLAG_blue_flag5", 2000);

		//Divided into zones: A= Own base (15x), B=Hole to Hill (15x) C=Hill (15x), D=Hill to Hole (10x) E=enemy line (5x), UG=underground (3x)
		//Bots should move ~~ zone by zone, because of range utility

		SetGoalPriority( "DEFEND_al_a*.*", 0.1, TEAM.ALLIES, 0 );
		SetGoalPriority( "DEFEND_al_b*.*", 0.15, TEAM.ALLIES, 0 );
		SetGoalPriority( "DEFEND_al_c*.*", 0.25, TEAM.ALLIES, 0 );
		SetGoalPriority( "DEFEND_al_d*.*", 0.55, TEAM.ALLIES, 0 );
		SetGoalPriority( "DEFEND_al_e*.*", 0.7, TEAM.ALLIES, 0 );

		SetGoalPriority( "DEFEND_ax_a*.*", 0.1, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_ax_b*.*", 0.15, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_ax_c*.*", 0.25, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_ax_d*.*", 0.55, TEAM.AXIS, 0 );
		SetGoalPriority( "DEFEND_ax_e*.*", 0.7, TEAM.AXIS, 0 );

		SetGoalPriority( "FLAG.*", 0.8, 0, 0 ); //all teams and all classes

		//SetGoalPriority( "CAMP_ax_tele.*", 0.2, 0, 0 ); //all teams and all classes
		//SetGoalPriority( "CAMP_al_tele.*", 0.2, 0, 0 ); //all teams and all classes

		Util.SetGoalRange( "DEFEND_al_a1", 2000);
		Util.SetGoalRange( "DEFEND_al_a2", 2000);
		Util.SetGoalRange( "DEFEND_al_a3", 2000);
		Util.SetGoalRange( "DEFEND_al_a4", 2000);
		Util.SetGoalRange( "DEFEND_al_a5", 2000);
		Util.SetGoalRange( "DEFEND_al_a6", 2000);
		Util.SetGoalRange( "DEFEND_al_a7", 2000);
		Util.SetGoalRange( "DEFEND_al_a8", 2000);
		Util.SetGoalRange( "DEFEND_al_a9", 2000);
		Util.SetGoalRange( "DEFEND_al_a10", 2000);
		Util.SetGoalRange( "DEFEND_al_a11", 2000);
		Util.SetGoalRange( "DEFEND_al_a12", 2000);
		Util.SetGoalRange( "DEFEND_al_a13", 2000);
		Util.SetGoalRange( "DEFEND_al_a14", 2000);
		Util.SetGoalRange( "DEFEND_al_a15", 2000);
		Util.SetGoalRange( "DEFEND_al_b1", 3000);
		Util.SetGoalRange( "DEFEND_al_b2", 3000);
		Util.SetGoalRange( "DEFEND_al_b3", 3000);
		Util.SetGoalRange( "DEFEND_al_b4", 3000);
		Util.SetGoalRange( "DEFEND_al_b5", 3000);
		Util.SetGoalRange( "DEFEND_al_b6", 3000);
		Util.SetGoalRange( "DEFEND_al_b7", 3000);
		Util.SetGoalRange( "DEFEND_al_b8", 3000);
		Util.SetGoalRange( "DEFEND_al_b9", 3000);
		Util.SetGoalRange( "DEFEND_al_b10", 3000);
		Util.SetGoalRange( "DEFEND_al_b11", 3000);
		Util.SetGoalRange( "DEFEND_al_b12", 3000);
		Util.SetGoalRange( "DEFEND_al_b13", 3000);
		Util.SetGoalRange( "DEFEND_al_b14", 3000);
		Util.SetGoalRange( "DEFEND_al_b15", 3000);
		Util.SetGoalRange( "DEFEND_al_c1", 3000);
		Util.SetGoalRange( "DEFEND_al_c2", 3000);
		Util.SetGoalRange( "DEFEND_al_c3", 3000);
		Util.SetGoalRange( "DEFEND_al_c4", 3000);
		Util.SetGoalRange( "DEFEND_al_c5", 3000);
		Util.SetGoalRange( "DEFEND_al_c6", 3000);
		Util.SetGoalRange( "DEFEND_al_c7", 3000);
		Util.SetGoalRange( "DEFEND_al_c8", 3000);
		Util.SetGoalRange( "DEFEND_al_c9", 3000);
		Util.SetGoalRange( "DEFEND_al_c10", 3000);
		Util.SetGoalRange( "DEFEND_al_c11", 3000);
		Util.SetGoalRange( "DEFEND_al_c12", 3000);
		Util.SetGoalRange( "DEFEND_al_c13", 3000);
		Util.SetGoalRange( "DEFEND_al_c14", 3000);
		Util.SetGoalRange( "DEFEND_al_c15", 3000);
		Util.SetGoalRange( "DEFEND_al_d1", 3000);
		Util.SetGoalRange( "DEFEND_al_d2", 3000);
		Util.SetGoalRange( "DEFEND_al_d3", 3000);
		Util.SetGoalRange( "DEFEND_al_d4", 3000);
		Util.SetGoalRange( "DEFEND_al_d5", 3000);
		Util.SetGoalRange( "DEFEND_al_d6", 3000);
		Util.SetGoalRange( "DEFEND_al_d7", 3000);
		Util.SetGoalRange( "DEFEND_al_d8", 3000);
		Util.SetGoalRange( "DEFEND_al_d9", 3000);
		Util.SetGoalRange( "DEFEND_al_d10", 3000);
		Util.SetGoalRange( "DEFEND_al_e1", 3000);
		Util.SetGoalRange( "DEFEND_al_e2", 3000);
		Util.SetGoalRange( "DEFEND_al_e3", 3000);
		Util.SetGoalRange( "DEFEND_al_e4", 3000);
		Util.SetGoalRange( "DEFEND_al_e5", 3000);
		Util.SetGoalRange( "DEFEND_al_e6", 3000);
		Util.SetGoalRange( "DEFEND_al_e7", 3000);
		Util.SetGoalRange( "DEFEND_al_e8", 3000);
		Util.SetGoalRange( "DEFEND_al_e9", 3000);
		Util.SetGoalRange( "DEFEND_al_e10", 3000);
		Util.SetGoalRange( "DEFEND_al_ug1", 3000);
		Util.SetGoalRange( "DEFEND_al_ug2", 3000);
		Util.SetGoalRange( "DEFEND_al_ug3", 3000);

		Util.SetGoalRange( "DEFEND_ax_a1", 2000);
		Util.SetGoalRange( "DEFEND_ax_a2", 2000);
		Util.SetGoalRange( "DEFEND_ax_a3", 2000);
		Util.SetGoalRange( "DEFEND_ax_a4", 2000);
		Util.SetGoalRange( "DEFEND_ax_a5", 2000);
		Util.SetGoalRange( "DEFEND_ax_a6", 2000);
		Util.SetGoalRange( "DEFEND_ax_a7", 2000);
		Util.SetGoalRange( "DEFEND_ax_a8", 2000);
		Util.SetGoalRange( "DEFEND_ax_a9", 2000);
		Util.SetGoalRange( "DEFEND_ax_a10", 2000);
		Util.SetGoalRange( "DEFEND_ax_a11", 2000);
		Util.SetGoalRange( "DEFEND_ax_a12", 2000);
		Util.SetGoalRange( "DEFEND_ax_a13", 2000);
		Util.SetGoalRange( "DEFEND_ax_a14", 2000);
		Util.SetGoalRange( "DEFEND_ax_a15", 2000);
		Util.SetGoalRange( "DEFEND_ax_b1", 3000);
		Util.SetGoalRange( "DEFEND_ax_b2", 3000);
		Util.SetGoalRange( "DEFEND_ax_b3", 3000);
		Util.SetGoalRange( "DEFEND_ax_b4", 3000);
		Util.SetGoalRange( "DEFEND_ax_b5", 3000);
		Util.SetGoalRange( "DEFEND_ax_b6", 3000);
		Util.SetGoalRange( "DEFEND_ax_b7", 3000);
		Util.SetGoalRange( "DEFEND_ax_b8", 3000);
		Util.SetGoalRange( "DEFEND_ax_b9", 3000);
		Util.SetGoalRange( "DEFEND_ax_b10", 3000);
		Util.SetGoalRange( "DEFEND_ax_b11", 3000);
		Util.SetGoalRange( "DEFEND_ax_b12", 3000);
		Util.SetGoalRange( "DEFEND_ax_b13", 3000);
		Util.SetGoalRange( "DEFEND_ax_b14", 3000);
		Util.SetGoalRange( "DEFEND_ax_b15", 3000);
		Util.SetGoalRange( "DEFEND_ax_c1", 3000);
		Util.SetGoalRange( "DEFEND_ax_c2", 3000);
		Util.SetGoalRange( "DEFEND_ax_c3", 3000);
		Util.SetGoalRange( "DEFEND_ax_c4", 3000);
		Util.SetGoalRange( "DEFEND_ax_c5", 3000);
		Util.SetGoalRange( "DEFEND_ax_c6", 3000);
		Util.SetGoalRange( "DEFEND_ax_c7", 3000);
		Util.SetGoalRange( "DEFEND_ax_c8", 3000);
		Util.SetGoalRange( "DEFEND_ax_c9", 3000);
		Util.SetGoalRange( "DEFEND_ax_c10", 3000);
		Util.SetGoalRange( "DEFEND_ax_c11", 3000);
		Util.SetGoalRange( "DEFEND_ax_c12", 3000);
		Util.SetGoalRange( "DEFEND_ax_c13", 3000);
		Util.SetGoalRange( "DEFEND_ax_c14", 3000);
		Util.SetGoalRange( "DEFEND_ax_c15", 3000);
		Util.SetGoalRange( "DEFEND_ax_d1", 3000);
		Util.SetGoalRange( "DEFEND_ax_d2", 3000);
		Util.SetGoalRange( "DEFEND_ax_d3", 3000);
		Util.SetGoalRange( "DEFEND_ax_d4", 3000);
		Util.SetGoalRange( "DEFEND_ax_d5", 3000);
		Util.SetGoalRange( "DEFEND_ax_d6", 3000);
		Util.SetGoalRange( "DEFEND_ax_d7", 3000);
		Util.SetGoalRange( "DEFEND_ax_d8", 3000);
		Util.SetGoalRange( "DEFEND_ax_d9", 3000);
		Util.SetGoalRange( "DEFEND_ax_d10", 3000);
		Util.SetGoalRange( "DEFEND_ax_e1", 3000);
		Util.SetGoalRange( "DEFEND_ax_e2", 3000);
		Util.SetGoalRange( "DEFEND_ax_e3", 3000);
		Util.SetGoalRange( "DEFEND_ax_e4", 3000);
		Util.SetGoalRange( "DEFEND_ax_e5", 3000);
		Util.SetGoalRange( "DEFEND_ax_e6", 3000);
		Util.SetGoalRange( "DEFEND_ax_e7", 3000);
		Util.SetGoalRange( "DEFEND_ax_e8", 3000);
		Util.SetGoalRange( "DEFEND_ax_e9", 3000);
		Util.SetGoalRange( "DEFEND_ax_e10", 3000);
		Util.SetGoalRange( "DEFEND_ax_ug1", 3000);
		Util.SetGoalRange( "DEFEND_ax_ug2", 3000);
		Util.SetGoalRange( "DEFEND_ax_ug3", 3000);





	Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{

	bot.MaxViewDistance = 3400;
};

global InitializeRoutes = function()
{
	MapRoutes =
	{
		DEFEND_al_a3 =
		{
			ROUTE_al_spawn =
			{
				ROUTE_al_spawn_front = {},
				ROUTE_al_spawn_back =
				{
					ROUTE_al_spawn_left = {},
					ROUTE_al_spawn_right = {},
				},
				ROUTE_al_spawn_left = {},
				ROUTE_al_spawn_right = {},
			}
		},

		DEFEND_ax_a3 =
		{
			ROUTE_ax_spawn =
			{
				ROUTE_ax_spawn_front = {},
				ROUTE_ax_spawn_back =
				{
					ROUTE_ax_spawn_left = {},
					ROUTE_ax_spawn_right = {},
				},
				ROUTE_ax_spawn_left = {},
				ROUTE_ax_spawn_right = {},
			}
		},

		CAPPOINT_red =
		{
			ROUTE_ax_spawn =
			{
				ROUTE_house_back1 =
				{
					ROUTE_house_back2 =
					{
						ROUTE_house_back3 =
						{
							ROUTE_house_back4 = {},
						},
					},
				},

				ROUTE_underground =
				{

				},

				ROUTE_ax_a_left =
				{
					ROUTE_house_front =
					{
						ROUTE_house_back4 = {},
					},
					ROUTE_hill_left = {},
					ROUTE_hill_center = {},
				},

				ROUTE_ax_a_right =
				{
					ROUTE_hill_right = {},
					ROUTE_hill_center = {},
				},

				ROUTE_ax_spawn_back =
				{
					ROUTE_trench1 =
					{
						ROUTE_trench2 =
						{
							ROUTE_trench3 =
							{
								ROUTE_trench4 =
								{
									ROUTE_trench5 =
									{
										ROUTE_trench6 =
										{
											ROUTE_al_spawn_back = {},
										},
									},
								},
							},
						},
					},
				},
			}
		},
		CAPPOINT_blue =
		{
			ROUTE_al_spawn =
			{
				ROUTE_house_back4 =
				{
					ROUTE_house_back3 =
					{
						ROUTE_house_back2 =
						{
							ROUTE_house_back1 = {},
						},
					},
				},

				ROUTE_underground =
				{

				},

				ROUTE_al_a_left =
				{
					ROUTE_house_front =
					{
						ROUTE_house_back1 = {},
					},
					ROUTE_hill_left = {},
					ROUTE_hill_center = {},
				},

				ROUTE_al_a_right =
				{
					ROUTE_hill_right = {},
					ROUTE_hill_center = {},
				},

				ROUTE_al_spawn_back =
				{
					ROUTE_trench6 =
					{
						ROUTE_trench5 =
						{
							ROUTE_trench4 =
							{
								ROUTE_trench3 =
								{
									ROUTE_trench2 =
									{
										ROUTE_trench1 =
										{
											ROUTE_ax_spawn_back = {},
										},
									},
								},
							},
						},
					},
				},
			}
		},
	};

	MapRoutes.DEFEND_al_a4 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a5 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a6 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a7 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a8 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a9 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a10 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a11 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a12 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a13 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a14 = MapRoutes.DEFEND_al_a3;
	MapRoutes.DEFEND_al_a15 = MapRoutes.DEFEND_al_a3;

	MapRoutes.DEFEND_ax_a4 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a5 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a6 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a7 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a8 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a9 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a10 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a11 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a12 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a13 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a14 = MapRoutes.DEFEND_ax_a3;
	MapRoutes.DEFEND_ax_a15 = MapRoutes.DEFEND_ax_a3;

	MapRoutes.FLAG_blue_flag1 = MapRoutes.CAPPOINT_red;
	MapRoutes.FLAG_blue_flag2 = MapRoutes.CAPPOINT_red;
	MapRoutes.FLAG_blue_flag3 = MapRoutes.CAPPOINT_red;
	MapRoutes.FLAG_blue_flag4 = MapRoutes.CAPPOINT_red;
	MapRoutes.FLAG_blue_flag5 = MapRoutes.CAPPOINT_red;

	MapRoutes.FLAG_red_flag1 = MapRoutes.CAPPOINT_blue;
	MapRoutes.FLAG_red_flag2 = MapRoutes.CAPPOINT_blue;
	MapRoutes.FLAG_red_flag3 = MapRoutes.CAPPOINT_blue;
	MapRoutes.FLAG_red_flag4 = MapRoutes.CAPPOINT_blue;
	MapRoutes.FLAG_red_flag5 = MapRoutes.CAPPOINT_blue;

	Util.Routes(MapRoutes);
};
