//========================================================================================== // // warehouse.gm // // Who When What //------------------------------------------------------------------------------------------ // ^4Tardis 24 June 2014 Initial Script // TO DO Switches , Routes ,Defend Spots //========================================================================================== // global Map = { Debug = 1, // please set to zero before distributing your script ShowMovers = false, Bomb_Dyno = 0, Command_Post_Dyno = 0, MG42_Dyno = 0, Security_Doors_Dyno = 0, Service_Door_Dyno = 0, Allied_Command_Post_Built = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Command_Post" ); Util.MapDebugPrint( "Allied_Command_Post_Built" ); }, Allied_Command_Post_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Command_Post_Dyno += 1; Util.MapDebugPrint( "Allied_Command_Post_Planted" ); }, Allied_Command_Post_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Command_Post_Dyno -= 1; Util.MapDebugPrint( "Allied_Command_Post_Defused" ); }, Allied_Command_Post_Destroyed = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Allied_Command_Post_Destroyed" ); }, Axis_Command_Post_Built = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" ); Util.MapDebugPrint( "Axis_Command_Post_Built" ); }, Axis_Command_Post_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Command_Post_Dyno += 1; Util.MapDebugPrint( "Axis_Command_Post_Planted" ); }, Axis_Command_Post_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Command_Post_Dyno -= 1; Util.MapDebugPrint( "Axis_Command_Post_Defused" ); }, Axis_Command_Post_Destroyed = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Axis_Command_Post_Destroyed" ); }, MG42_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "MG42_Built" ); }, Service_Door_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Service_Door_Built" ); }, Bomb_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Bomb_Dyno += 1; Util.MapDebugPrint( "Bomb_Planted" ); }, MG42_Planted = function( trigger ) { if ( TestMap ) { return; } Map.MG42_Dyno += 1; Util.MapDebugPrint( "MG42_Planted" ); }, Security_Doors_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Security_Doors_Dyno += 1; Util.MapDebugPrint( "Security_Doors_Planted" ); }, Service_Door_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Service_Door_Dyno += 1; Util.MapDebugPrint( "Service_Door_Planted" ); }, Bomb_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Bomb_Dyno -= 1; Util.MapDebugPrint( "Bomb_Defused" ); }, MG42_Defused = function( trigger ) { if ( TestMap ) { return; } Map.MG42_Dyno -= 1; Util.MapDebugPrint( "MG42_Defused" ); }, Security_Doors_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Security_Doors_Dyno -= 1; Util.MapDebugPrint( "Security_Doors_Defused" ); }, Service_Door_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Service_Door_Dyno -= 1; Util.MapDebugPrint( "Service_Door_Defused" ); }, Bomb_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Bomb_Dyno = 0; Util.MapDebugPrint( "Bomb_Destroyed" ); }, MG42_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.MG42_Dyno = 0; Util.MapDebugPrint( "MG42_Destroyed" ); }, Security_Doors_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Security_Doors_Dyno = 0; Util.MapDebugPrint( "Security_Doors_Destroyed" ); }, Service_Door_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Service_Door_Dyno = 0; Util.MapDebugPrint( "Service_Door_Destroyed" ); }, officeflag_Axis_Captured = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "officeflag_Axis_Captured" ); }, officeflag_Allies_Captured = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "officeflag_Allies_Captured" ); }, }; global OnMapLoad = function() { if ( TestMapOn ) { Util.AutoTestMap(); } // Register callback functions OnTrigger( "Axis team has built the mg42!", Map.MG42_Built ); OnTrigger( "Axis team has rebuilt the Service Door!", Map.Service_Door_Built ); OnTrigger( "Allied Command Post constructed. Charge speed increased!", Map.Allied_Command_Post_Built ); OnTrigger( "Axis Command Post constructed. Charge speed increased!", Map.Axis_Command_Post_Built ); OnTrigger( "Planted at the Bomb.", Map.Bomb_Planted ); OnTrigger( "Planted at the MG42.", Map.MG42_Planted ); OnTrigger( "Planted at the Security Doors.", Map.Security_Doors_Planted ); OnTrigger( "Planted at the Service Door.", Map.Service_Door_Planted ); OnTrigger( "Planted at the Allied Command Post!", Map.Allied_Command_Post_Planted ); OnTrigger( "Planted at the Axis Command Post!", Map.Axis_Command_Post_Planted ); OnTrigger( "Defused at the Bomb.", Map.Bomb_Defused ); OnTrigger( "Defused at the Axis Command Post.", Map.Axis_Command_Post_Defused ); OnTrigger( "Defused at the Allied Command Post.", Map.Allied_Command_Post_Defused ); OnTrigger( "Defused at the MG42.", Map.MG42_Defused ); OnTrigger( "Defused at the Security Doors.", Map.Security_Doors_Defused ); OnTrigger( "Defused at the Service Door.", Map.Service_Door_Defused ); OnTrigger( "Allies have disabled the bomb", Map.Bomb_Destroyed ); OnTrigger( "Axis team has destroyed the Allied Command Post!", Map.Allied_Command_Post_Destroyed ); OnTrigger( "Allied team has destroyed the Axis Command Post!", Map.Axis_Command_Post_Destroyed ); OnTrigger( "Allied team has destroyed the mg42!", Map.MG42_Destroyed ); OnTrigger( "Allies have breached the security door", Map.Security_Doors_Destroyed ); OnTrigger( "Allied team has destroyed the Service Door!", Map.Service_Door_Destroyed ); OnTrigger( "Axis reclaim the offices!", Map.officeflag_Axis_Captured ); OnTrigger( "Allies capture the offices!", Map.officeflag_Allies_Captured ); //~Util.DisableGoal( ".*", true ); // all but routes SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_.*" ); SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_.*" ); // Max users per goal //Util.SetMaxUsers( 1, "DEFEND_.*" ); //Util.SetMaxUsers( 1, "GRENADE_.*" ); //Util.SetMaxUsers( 1, "MOUNTMG42_.*" ); // Dyno on Truck Barrier Util.AddUseWp("PLANT_Security_Doors", "secdoor"); Util.AddUseWp("PLANT_Security_Doors", "secdoor1"); Util.AddUseWp("PLANT_Security_Doors", "secdoor2"); // Camp times SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=15, MaxCampTime=90} ); SetMapGoalProperties( "MOBILEMG42_.*", {MinCampTime=10, MaxCampTime=60} ); Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." ); }; 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 = { CHECKPOINT_officeflag = { }, BUILD_Command_Post = { }, PLANT_Command_Post = { }, PLANT_Security_Doors = { }, BUILD_MG42 = { }, PLANT_MG42 = { }, PLANT_Bomb = { }, BUILD_Service_Door = { }, PLANT_Service_Door = { }, }; Util.Routes(MapRoutes); };