global Map = { Talk = true, // set to false if you don't want the bots to use voice chat Debug = 0, HQ_is_cleared = false, StationIsSecured = false, DepotIsCleared = false, ElevatorDoorStatus = 0, // closed StationEntranceStatus = 1, // intact DefendingTeam = TEAM.AXIS, Focus = null, Depot_Side_Door_Dyno = 0, Neutral_Command_Post_Dyno = 0, Station_Entrance_Dyno = 0, Assault_Ramp_Dyno = 0, Ammo_Cabinet_first_ammocabinet = "AMMOCAB_first_ammocabinet", Health_Cabinet_first_healthcabinet = "HEALTHCAB_first_healthcabinet", Checkpoint_flag_axisHQ = "CHECKPOINT_flag_axisHQ", Checkpoint_flag_bank = "CHECKPOINT_flag_bank", Checkpoint_flag_depot = "CHECKPOINT_flag_depot", Checkpoint_flag_hotel = "CHECKPOINT_flag_hotel", Checkpoint_flag_library = "CHECKPOINT_flag_library", Checkpoint_flag_shop = "CHECKPOINT_flag_shop", Checkpoint_flag_station = "CHECKPOINT_flag_station", Build_Depot_Side_Door = "BUILD_Depot_Side_Door", Build_Neutral_Command_Post = "BUILD_Neutral_Command_Post", Build_Station_Barricade = "BUILD_Station_Barricade", Plant_Depot_Side_Door = "PLANT_Depot_Side_Door", Plant_Neutral_Command_Post = "PLANT_Neutral_Command_Post", Plant_Station_Entrance = "PLANT_Station_Entrance", Explode_Station_Barricade = "EXPLODE_Station_Barricade", Mount_Hotel_MG = "MOUNTMG42_181", Mount_Factory_MG = "MOUNTMG42_1316", Repair_Hotel_MG = "REPAIRMG42_181", Repair_Factory_MG = "REPAIRMG42_1316", /*** TRIGGER REGIONS ***/ station_dyno_trigger = { Name = "station_dyno_trigger", TriggerOnClass = CLASS.ENGINEER, OnEnter = function(ent) { if( GetEntTeam(ent) == TEAM.ALLIES && Map.StationEntranceStatus == 1 && !Map.StationIsSecured ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_dyno_station.*" ); } Util.MapDebugPrint(GetEntName(ent) + " near station dyno", true); }, OnExit = function(ent) { Util.MapDebugPrint(GetEntName(ent) + " leaves station dyno", true); }, }, factory_mg_trigger = { Name = "factory_mg_trigger", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { if( GetEntTeam(ent) == TEAM.AXIS ) { SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_anti_mg" ); } Util.MapDebugPrint( "factory mg manned", true ); }, OnExit = function(ent) { SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_anti_mg" ); Util.MapDebugPrint( "factory mg unmanned", true ); }, }, // disable bot pushing and combat movement in this region. disablepush = { Name = "disablepush", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { b = Util.IsBot(ent); if (b) { b.DisableBotPush(true); b.DisableCombatMovement = true; } Util.MapDebugPrint( "disablepush", true ); }, OnExit = function(ent) { b = Util.IsBot(ent); if (b) { b.DisableBotPush(false); b.DisableCombatMovement = false; } }, }, /*** SWITCHES ***/ Switches = { //uses paththrough elevator_switch = { Enabled = true, Priority = 0.0, WaypointName = "elevator_switch", Timeout = 1500, AimPosition = Vector3(6193.875,6963.353,75.186), Wait = function() { if ( Map.ElevatorDoorStatus == 1 ) { sleep(2); return true; } return false; }, }, elevator_switch2 = { Enabled = false, Priority = 0.6, WaypointName = "elevator_switch2", Timeout = 1500, LimitDistance = 1000, LimitBots = 1, LimitTeam = (1< 5 ) { if ( bot.GetTeam() == TEAM.AXIS ) { sleep( 10 - rand ); if ( bot.GetNearestAlly(CAT.PLAYER, CLASS.ENGINEER) && bot.GetClass() != CLASS.ENGINEER ) { if ( rand == 7 ) { bot.ExecCommand("vsay_team FTDeployLandmines"); } } else if ( bot.GetNearestAlly(CAT.PLAYER, CLASS.SOLDIER) && bot.GetClass() != CLASS.SOLDIER ) { if ( rand == 6 ) { bot.SayVoice(VOICE.DEFEND_OBJECTIVE); } else if ( rand == 7 ) { bot.ExecCommand("vsay_team FTMortar"); } } return; } else if ( bot.GetTeam() == TEAM.ALLIES ) { sleep( 10 - rand ); if ( bot.GetNearestAlly(CAT.PLAYER, CLASS.COVERTOPS) && bot.GetClass() != CLASS.COVERTOPS ) { if ( rand == 6 ) { bot.SayVoice(VOICE.CLEAR_PATH); } else if ( rand == 7 ) { bot.ExecCommand("vsay_team FTProvideSniperCover"); } else if ( rand == 8 ) { bot.ExecCommand("vsay_team FTGoUndercover"); } else if ( rand == 9 ) { bot.ExecCommand("vsay_team FTExploreArea"); } else if ( rand == 10 ) { bot.ExecCommand("vsay_team FTInfiltrate "); } } else if ( bot.GetNearestAlly(CAT.PLAYER, CLASS.ENGINEER) && bot.GetClass() != CLASS.ENGINEER ) { if ( rand == 6 ) { bot.SayVoice(VOICE.CLEAR_PATH); } else if ( rand == 7 ) { bot.ExecCommand("vsay_team FTDisarmLandmines"); } else if ( rand == 8 ) { bot.ExecCommand("vsay_team FTClearMines"); } } return; } } };