//========================================================================================== // // bremen_truckmod.gm // // Who When What //------------------------------------------------------------------------------------------ // ^8=^KF^8|^KA^8=^KBuckwild 05 March 2015 Initial Script // //========================================================================================== // global Map = { Debug = 0, // please set to zero before distributing your script ShowMovers = false, Main_Gate_Dyno = 0, Neutral_Command_Post_Dyno = 0, Side_Door_Dyno = 0, Truck_Barrier_1_Dyno = 0, Truck_Barrier_2_Dyno = 0, Neutral_Command_Post_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Neutral_Command_Post_Built" ); }, Side_Door_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Side_Door_Built" ); }, Truck_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Truck_Built" ); }, Truck_Barrier_1_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Truck_Barrier_1_Built" ); }, Truck_Barrier_2_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "Truck_Barrier_2_Built" ); }, Main_Gate_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Main_Gate_Dyno += 1; Util.MapDebugPrint( "Main_Gate_Planted" ); }, Neutral_Command_Post_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Neutral_Command_Post_Dyno += 1; Util.MapDebugPrint( "Neutral_Command_Post_Planted" ); }, Side_Door_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Side_Door_Dyno += 1; Util.MapDebugPrint( "Side_Door_Planted" ); }, Truck_Barrier_1_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_1_Dyno += 1; Util.MapDebugPrint( "Truck_Barrier_1_Planted" ); }, Truck_Barrier_2_Planted = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_2_Dyno += 1; Util.MapDebugPrint( "Truck_Barrier_2_Planted" ); }, Main_Gate_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Main_Gate_Dyno -= 1; Util.MapDebugPrint( "Main_Gate_Defused" ); }, Neutral_Command_Post_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Neutral_Command_Post_Dyno -= 1; Util.MapDebugPrint( "Neutral_Command_Post_Defused" ); }, Side_Door_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Side_Door_Dyno -= 1; Util.MapDebugPrint( "Side_Door_Defused" ); }, Truck_Barrier_1_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_1_Dyno -= 1; Util.MapDebugPrint( "Truck_Barrier_1_Defused" ); }, Truck_Barrier_2_Defused = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_2_Dyno -= 1; Util.MapDebugPrint( "Truck_Barrier_2_Defused" ); }, Main_Gate_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Main_Gate_Dyno = 0; Util.MapDebugPrint( "Main_Gate_Destroyed" ); }, Neutral_Command_Post_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Neutral_Command_Post_Dyno = 0; Util.MapDebugPrint( "Neutral_Command_Post_Destroyed" ); }, Side_Door_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Side_Door_Dyno = 0; Util.MapDebugPrint( "Side_Door_Destroyed" ); }, Truck_Barrier_1_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_1_Dyno = 0; Util.MapDebugPrint( "Truck_Barrier_1_Destroyed" ); }, Truck_Barrier_2_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.Truck_Barrier_2_Dyno = 0; Util.MapDebugPrint( "Truck_Barrier_2_Destroyed" ); }, keycard_flag_Taken = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "keycard_flag_Taken" ); }, keycard_flag_Returned = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "keycard_flag_Returned" ); }, keycard_flag_Secured = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "keycard_flag_Secured" ); }, flag1_flag_Axis_Captured = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "flag1_flag_Axis_Captured" ); }, flag1_flag_Allies_Captured = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "flag1_flag_Allies_Captured" ); }, }; global OnMapLoad = function() { if ( TestMapOn ) { Util.AutoTestMap(); } // Register callback functions OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Built ); OnTrigger( "MISSING_STRING", Map.Side_Door_Built ); OnTrigger( "MISSING_STRING", Map.Truck_Built ); OnTrigger( "MISSING_STRING", Map.Truck_Barrier_1_Built ); OnTrigger( "MISSING_STRING", Map.Truck_Barrier_2_Built ); OnTrigger( "Planted at the MISSING_STRING.", Map.Main_Gate_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.Neutral_Command_Post_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.Side_Door_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.Truck_Barrier_1_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.Truck_Barrier_2_Planted ); OnTrigger( "Defused at the MISSING_STRING.", Map.Main_Gate_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.Neutral_Command_Post_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.Side_Door_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.Truck_Barrier_1_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.Truck_Barrier_2_Defused ); OnTrigger( "MISSING_STRING", Map.Main_Gate_Destroyed ); OnTrigger( "MISSING_STRING", Map.Neutral_Command_Post_Destroyed ); OnTrigger( "MISSING_STRING", Map.Side_Door_Destroyed ); OnTrigger( "MISSING_STRING", Map.Truck_Barrier_1_Destroyed ); OnTrigger( "MISSING_STRING", Map.Truck_Barrier_2_Destroyed ); OnTrigger( "MISSING_STRING", Map.keycard_flag_Taken ); OnTrigger( "MISSING_STRING", Map.keycard_flag_Returned ); OnTrigger( "MISSING_STRING", Map.keycard_flag_Secured ); OnTrigger( "MISSING_STRING", Map.flag1_flag_Axis_Captured ); OnTrigger( "MISSING_STRING", Map.flag1_flag_Allies_Captured ); //~Util.DisableGoal( ".*", true ); // all but routes //~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" ); //~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" ); // Max users per goal Util.SetMaxUsers( 1, "ATTACK_.*" ); Util.SetMaxUsers( 1, "DEFEND_.*" ); Util.SetMaxUsers( 1, "GRENADE_.*" ); Util.SetMaxUsers( 1, "SNIPE_.*" ); Util.SetMaxUsers( 1, "MOUNTMG42_.*" ); Util.SetMaxUsers( 1, "MOBILEMG42_.*" ); Util.SetMaxUsers( 1, "MOBILEMORTAR_.*" ); Util.SetMaxUsers( 1, "AIRSTRIKE_.*" ); Util.SetMaxUsers( 1, "CALLARTILLERY_.*" ); // 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 = { BUILD_Side_Door = { }, BUILD_Truck_Barrier_1 = { }, BUILD_Truck = { }, BUILD_Truck_Barrier_2 = { }, BUILD_Neutral_Command_Post = { }, PLANT_Truck_Barrier_1 = { }, PLANT_Main_Gate = { }, PLANT_Truck_Barrier_2 = { }, PLANT_Side_Door = { }, PLANT_Neutral_Command_Post = { }, FLAG_keycard_flag = { }, CHECKPOINT_flag1_flag = { }, }; Util.Routes(MapRoutes); };