//==========================================================================================
//
//	villa_france_beta1.gm
//
//	Who                        	When		What
//------------------------------------------------------------------------------------------
//	^1C^2Y^3B^6E^5R^04^1W^2O^3L^6F	21 April 2022	Initial Script
// version TEST 1.02 May 18, 2022
//==========================================================================================
//

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

/////////////////////////////////////////////////////////////////////////////

// this seems to make bots give out health packs and ammo better than DEFAULT does
	DispenseHealthTime = 10.0,
	DispenseAmmoTime = 1.0,

//////////////////////////////////////////////////////////////////////

	Roles =
	{
		ALLIES =
		{
			AllBots = true, // each bot is considered for a role
			ATTACKER =	
			{
                spawnpt = 2,
				numbots = 9,
				crucialClass = CLASS.ENGINEER, CLASS.MEDIC,
			},
			ATTACKER1 =	
			{
                spawnpt = 2,
				numbots = 9,
				crucialClass = CLASS.ENGINEER, CLASS.COVERTOPS,
			},
			ATTACKER2 =	
			{
                                spawnpt = 2,
				numbots = 9,
				crucialClass = CLASS.ENGINEER, CLASS.SOLDIER,
			},
			ATTACKER3 =	
			{
                                spawnpt = 2,
				numbots = 9,
				crucialClass = CLASS.MEDIC, CLASS.FIELDOPS,
			},
		},
		
		AXIS =
		{
			AllBots = true, // each bot is considered for a role
			DEFENDER =	
			{
                spawnpt = 3,
				numbots = 9,
				//crucialClass = CLASS.FIELDOPS,
			},
			DEFENDER1 =	
			{
                spawnpt = 3,
				numbots = 9,
				//crucialClass = CLASS.COVERTOPS,
			},
			DEFENDER2 =	
			{
                spawnpt = 3,
				numbots = 9,
				//crucialClass = CLASS.ENGINEER,
			},
			DEFENDER3 =	
			{
                spawnpt = 3,
				numbots = 9,
				//crucialClass = CLASS.ENGINEER,
			},
		},
	},

//////////////////////////GO UP////////////////////////////////////////////////////////////////////

// Neutral Command Post


	CP_Owner = 0,
	CP_Dyno = 0,

	Set_CP = function(_p) // p = TEAM.ALLIES or TEAM.AXIS or 0 (unbuilt)
	{
		switch(_p)
		{
			case 0:
			{
				Map.CP_Owner = 0;
				SetAvailableMapGoals( TEAM.ALLIES, 1, "BUILD_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.ALLIES, 0, "PLANT_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.AXIS, 1, "BUILD_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.AXIS, 0, "PLANT_Neutral_Command_Post" );
		Util.ChangeSpawn(TEAM.ALLIES, 3, 9);
		Util.ChangeSpawn(TEAM.AXIS, 1, 9);
			}
			case TEAM.ALLIES:
			{
				Map.CP_Owner = TEAM.ALLIES;
				SetAvailableMapGoals( TEAM.ALLIES, 0, "BUILD_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.ALLIES, 0, "PLANT_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.AXIS, 1, "PLANT_Neutral_Command_Post" );
		Util.ChangeSpawn(TEAM.ALLIES, 2, 9);
		Util.ChangeSpawn(TEAM.AXIS, 1, 9);
			}
			case TEAM.AXIS:
			{
				Map.CP_Owner = TEAM.AXIS;
				SetAvailableMapGoals( TEAM.ALLIES, 0, "BUILD_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.ALLIES, 1, "PLANT_Neutral_Command_Post" );
				SetAvailableMapGoals( TEAM.AXIS, 0, "PLANT_Neutral_Command_Post" );
		Util.ChangeSpawn(TEAM.AXIS, 2, 9);
		Util.ChangeSpawn(TEAM.ALLIES, 3, 9);
			}
		}
		//Util.MapDebugPrint("^6CP Owner: " + Map.CP_Owner );
	},
	Allied_CP_Built = function( trigger )
	{
		Map.Set_CP(TEAM.ALLIES);
		Util.MapDebugPrint( "^6Allied_CP_Built" );
	},
	Allied_CP_Destroyed = function( trigger )
	{
		Map.CP_Dyno = 0;
		Map.Set_CP(0);
		Util.MapDebugPrint( "^6Allied_CP_Destroyed" );
	},
	Axis_CP_Built = function( trigger )
	{
		Map.Set_CP(TEAM.AXIS);
		Util.MapDebugPrint( "^6Axis_CP_Built" );
	},
	Axis_CP_Destroyed = function( trigger )
	{
		Map.CP_Dyno = 0;
		Map.Set_CP(0);
		Util.MapDebugPrint( "^6Axis_CP_Destroyed" );
	},
	CP_Planted = function( trigger )
	{
		Map.CP_Dyno += 1;
		Util.MapDebugPrint( "^6CP_Planted" );
	},
	CP_Defused = function( trigger )
	{
		Map.CP_Dyno -= 1;
		Util.MapDebugPrint( "^6CP_Defused" );
	},

// Command Post scriptEND 

/////////////////////////////////////////////////////////////////////////////////////////////////////////// 

	AAgun2_Destroyed = function( trigger )
	{
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_3" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_4" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_5" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_AAgun2" );
		Util.MapDebugPrint( "^6AAgun2_Destroyed" );
	},

	Dynamite_Wall_Of_The_Bridge_Destroyed = function( trigger )
	{
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_bridge_.*" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atgun_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atgun_2" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atgun_3" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_4" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_5" );

		//Util.ChangeSpawn(TEAM.ALLIES, 2, 9);
		//Util.ChangeSpawn(TEAM.AXIS, 1, 9);
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_cproom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_cproom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Neutral_Command_Post" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Neutral_Command_Post" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_AAgun2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Dynamite_Wall_Of_The_Bridge" );
    SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_.*" );
    SetAvailableMapGoals( TEAM.AXIS, true, "MOUNTMG42_.*" );
		Util.MapDebugPrint( "^6Dynamite_Wall_Of_The_Bridge_Destroyed" );
	},

	Gun1_Destroyed = function( trigger )
	{
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_gun1_.*" );

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

	SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_gun1call" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_4" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_5" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_6" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_7" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_8" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_9" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_10" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_11" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ARTILLERY_S_gun1_12" );

	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_3" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_4" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_5" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atbridge_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atbridge_1" );
		//Util.ChangeSpawn(TEAM.ALLIES, 3, 9);
		Util.ChangeSpawn(TEAM.AXIS, 2, 9);
	SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Neutral_Command_Post" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Gun1" );
	//SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Dynamite_Wall_Of_The_Bridge" );

		Util.MapDebugPrint( "^6Gun1_Destroyed" );
	},

	Documents_Taken = function( trigger )
	{
	SetAvailableMapGoals( TEAM.ALLIES, true, "CAPPOINT_docsradio" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_4" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_docs" );
		Util.MapDebugPrint( "^6Documents_Taken" );
	},

	Documents_Returned = function( trigger )
	{
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_3" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_4" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_docs" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_Documents" );
		Util.MapDebugPrint( "^6Documents_Returned" );
	},

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

	Documents_Dropped = function( trigger )
	{
Util.BotChat( 0, "say", "^1THE DOCUMENTS HAVE BEEN DROPPED!");
Util.BotChat( 0, "say", "^1THE DOCUMENTS HAVE BEEN DROPPED!");
		Util.MapDebugPrint( "^6Documents_Dropped" );
	},

	gate_open = function( trigger )
	{
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_docroom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_4" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_gate_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_gate_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_gate_3" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_gate_4" );
		Util.ChangeSpawn(TEAM.ALLIES, 3, 9);
		Util.ChangeSpawn(TEAM.AXIS, 1, 9);
	SetGoalPriority( "PLANT_Neutral_Command_Post", 0.97, TEAM.ALLIES, 0 );
	SetGoalPriority( "BUILD_Neutral_Command_Post", 0.97, TEAM.ALLIES, 0 );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_cproom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_cproom_2" );
	SetGoalPriority( "ATTACK_cproom_1", 0.79, TEAM.ALLIES, 0 );
	SetGoalPriority( "ATTACK_cproom_2", 0.79, TEAM.ALLIES, 0 );
	SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_docs" );
	SetGoalPriority( "SWITCH_docs", 0.99, TEAM.ALLIES, 0 );
    SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_.*" );
    SetAvailableMapGoals( TEAM.AXIS, false, "MOUNTMG42_.*" );
	SetGoalPriority( "FLAG_Documents", 0.99, TEAM.ALLIES, 0 );
	SetAvailableMapGoals( TEAM.ALLIES, true, "CAPPOINT_docsradio" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_Documents" );
		Util.MapDebugPrint( "^6gate_open" );
	},

};

global OnMapLoad = function()
{
	// Register callback functions
	//OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Built );
	//OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Destroyed );

// you need triggers-strings to make it work
	OnTrigger( "Allied Command Post constructed. Charge speed increased!", Map.Allied_CP_Built );
	OnTrigger( "Axis team has destroyed the Allied Command Post!", Map.Allied_CP_Destroyed );
	OnTrigger( "Axis Command Post constructed. Charge speed increased!", Map.Axis_CP_Built );
	OnTrigger( "Allied team has destroyed the Axis Command Post!", Map.Axis_CP_Destroyed );
	OnTrigger( "Planted at the Command Post.", Map.CP_Planted );
	OnTrigger( "Defused at the Command Post.", Map.CP_Defused );
/////////////////////////////////////////////////////////////////////////
////// The Final END of the neutral command post script Information /////
/////////////////////////////////////////////////////////////////////////
	OnTrigger( "bridge2_stop", Map.gate_open );

	OnTrigger( "AAgun2 Destroyed.", Map.AAgun2_Destroyed );
	OnTrigger( "Dynamite Wall Of The Bridge Destroyed.", Map.Dynamite_Wall_Of_The_Bridge_Destroyed );
	OnTrigger( "Gun1 Destroyed.", Map.Gun1_Destroyed );

	OnTrigger( "Flag dropped Documents!", Map.Documents_Dropped );
	OnTrigger( "Allies have stolen Documents!", Map.Documents_Taken );
	OnTrigger( "Flag returned Documents!", Map.Documents_Returned );
	OnTrigger( "Allies captured allied_obj1", Map.Documents_Secured );

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

	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_gun1_.*" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_bridge_.*" );

	SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Gun1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Dynamite_Wall_Of_The_Bridge" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_AAgun2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "CAPPOINT_docsradio" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_Documents" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_docs" );
	SetAvailableMapGoals( TEAM.AXIS, false, "SWITCH_docs" );

	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_docroom_4" );

	SetGoalPriority( "PLANT_Dynamite_Wall_Of_The_Bridge", 0.98, TEAM.ALLIES, 0 );
	SetGoalPriority( "PLANT_Gun1", 0.99, TEAM.ALLIES, 0 );
	SetGoalPriority( "PLANT_AAgun2", 0.98, TEAM.ALLIES, 0 );

	//Util.SetMaxUsersInProgress(1, "SWITCH_docs");
	//Util.SetMaxUsersInProgress(2, "FLAG_Documents");

	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_cproom_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_cproom_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Neutral_Command_Post" );
	SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Neutral_Command_Post" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Neutral_Command_Post" );

	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atbridge_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun2atbridge_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_3" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_4" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun2atgun_5" );

	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun1_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun1_2" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gun1_3" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_4" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gun1_5" );

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

	SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_gun1call" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_3" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_4" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_5" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_6" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_7" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_8" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_9" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_10" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_11" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "ARTILLERY_S_gun1_12" );

	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_gate_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_gate_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_gate_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_gate_4" );

	//SetAvailableMapGoals( TEAM.AXIS, true, "DEFUSE_Gun1" );
	//SetAvailableMapGoals( TEAM.AXIS, true, "DEFUSE_Dynamite_Wall_Of_The_Bridge" );
	SetGoalPriority( "DEFUSE_*.*", 1.97, TEAM.AXIS, 0 );

	SetGoalPriority( "PLANT_Neutral_Command_Post", 0.97, TEAM.ALLIES, 0 );
	SetGoalPriority( "BUILD_Neutral_Command_Post", 0.97, TEAM.ALLIES, 0 );

	Util.LimitToClass("ATTACK_cproom_1", TEAM.ALLIES, CLASS.COVERTOPS, CLASS.SOLDIER, CLASS.FIELDOPS);
	Util.LimitToClass("ATTACK_cproom_2", TEAM.ALLIES, CLASS.COVERTOPS, CLASS.SOLDIER, CLASS.FIELDOPS);
		//Util.ChangeSpawn(TEAM.AXIS, 3, 9);


	//Util.LimitToClass("PLANT_Command_Post", 0, CLASS.COVERTOPS);
    SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_.*" );
    SetAvailableMapGoals( TEAM.AXIS, false, "MOUNTMG42_.*" );

	Util.AddUseWp( "PLANT_Dynamite_Wall_Of_The_Bridge", "plantbridge_1" );
	Util.AddUseWp( "PLANT_Dynamite_Wall_Of_The_Bridge", "plantbridge_2" );
	Util.AddUseWp( "PLANT_Dynamite_Wall_Of_The_Bridge", "plantbridge_3" );
  	Util.LimitToClass("PLANT_Neutral_Command_Post", 0, CLASS.COVERTOPS);

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

	Util.SetMaxUsers( 1, "ATTACK_cproom_1" );
	Util.SetMaxUsers( 1, "ATTACK_cproom_2" );

	Util.SetMaxUsers( 1, "DEFEND_gun2atbridge_1" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atbridge_2" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atgun_1" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atgun_2" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atgun_3" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atgun_4" );
	Util.SetMaxUsers( 1, "DEFEND_gun2atgun_5" );

	Util.SetMaxUsers( 1, "DEFEND_gun1_1" );
	Util.SetMaxUsers( 1, "DEFEND_gun1_2" );
	Util.SetMaxUsers( 1, "DEFEND_gun1_3" );
	Util.SetMaxUsers( 1, "DEFEND_gun1_4" );
	Util.SetMaxUsers( 1, "DEFEND_gun1_5" );

	// Camp times
	//SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=15, MaxCampTime=90} );


		Util.MapDebugPrint( "^6ETS^4| ^2Custom ^1C ^04 ^1W ^3Omni-bot map script ^6Version ^1TEST ^11.02 ^3For the map: ^7" + GetMapName() + " executed." );
	print( "^6ETS^4| ^2Custom ^1C ^04 ^1W ^3Omni-bot map script ^6Version ^1TEST ^11.02 ^3For the map: ^7" + GetMapName() );
	
	Util.BotChat( 0, "say", "^6ETS^4| ^2Custom ^1C ^04 ^1W ^3Omni-bot map script ^6Version ^1TEST ^11.02 ^3For the map: ^7" + GetMapName(), 1 );
};

global OnBotJoin = function( bot )
{
	// Uncomment for shootable breakables
	bot.TargetBreakableDist = 90.0;
	// Only set MaxViewDistance on maps with limited sight (e.g. fog)
	//~bot.MaxViewDistance = 2400;
};

global InitializeRoutes = function()
{
	MapRoutes =
	{
		PLANT_Gun1 =
		{
		},
		PLANT_AAgun2 =
		{
		},
		FLAG_Documents =
		{
		},
		PLANT_Dynamite_Wall_Of_The_Bridge =
		{
		},
		BUILD_Neutral_Command_Post =
		{
		},
		PLANT_Neutral_Command_Post =
		{
		},
	};
	Util.Routes(MapRoutes);
};
