//========================================================================================== // // flame-guards.gm // // Who When What //------------------------------------------------------------------------------------------ // Qiki 19 August 2012 Initial Script // Native12 16.12.2012 Ready to test // Native12 25.12.2012 Added Routes and more improvements // // Associated files: flame-guards.way 26.12.2012 234 kB (238 865 b) // flame-guards_goals.gm 25.12.2012 139 kB (141 880 b) // //========================================================================================== // global Map = { Debug = 0, Barricade_Dyno = 0, Barricade_1_Dyno = 0, Command_Post_Dyno = 0, Generator_Dyno = 0, Generator_Protection_Net_Dyno = 0, Side_Gate_Dyno = 0, basement_gate_Dyno = 0, basement_gate_1_Dyno = 0, blast_door_Dyno = 0, gun_Dyno = 0, sewer_exit_gate_Dyno = 0, warehouse_blast_door_Dyno = 0, gunm = 0, gunmTaken = 0, gun = 0, gun_ready = 0, Explosive = 0, WoodenBarrier1_Exploded = false, WoodenBarrier2_Exploded = false, Phase_1 = true, Phase_2 = false, Phase_3 = false, Phase_4 = false, Phase_5 = false, Phase_6 = false, WarehouseBlastDoorDestroyed = false, Axis_InPhase2 = 0, Gunmaterial_Secured = false, GunBarricadeDestroyed = true, FlagAlliesCaptured = true, AmmoTaken = false, AmmoSecured = false, GeneratorProtectionNetBuilt = false, AlliedCP = false, Door_opened = false, KT_InsideNet = 0, KeyCardTaken = false, RocketDestroyed = false, Somebody_Near_Inside_Switch = 0, KT_SomebodyNearInsideSwitch = 0, Somebody_Near_Outside_Switch = 0, KT_SomebodyNearOutsideSwitch = 0, HatchExploded = false, HatchToFlagExploded = false, KT_NQMod_1 = 0, KT_NQMod_2 = 0, KT_NQMod_3 = 0, Navigation = { // /bot waypoint_setproperty paththrough Navigation_PT:ladderinaxisspawn ladderinaxisspawn = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("ladderinaxisspawn", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); yield(); yield(); _this.Bot.HoldButton(BTN.FORWARD, 2.5); sleep(2.5); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:box_jump box_jump = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Box_Jump", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.15); _this.Bot.HoldButton(BTN.FORWARD, 0.75); _this.Bot.HoldButton(BTN.JUMP, 0.75); sleep(0.75); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:metal_case metal_case = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Metal_Case", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); _this.Bot.HoldButton(BTN.FORWARD, 0.5); _this.Bot.HoldButton(BTN.JUMP, 0.5); sleep(0.5); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:jump_a jump_a = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Jump_A", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.15); _this.Bot.HoldButton(BTN.FORWARD, 0.95); _this.Bot.HoldButton(BTN.SPRINT, 0.95); sleep(0.17); _this.Bot.HoldButton(BTN.JUMP, 0.78); sleep(0.78); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:ladderinaxisspawn_1 ladderinaxisspawn_1 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("ladderinaxisspawn_1", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); yield(); yield(); _this.Bot.HoldButton(BTN.FORWARD, 2.5); sleep(2.5); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:ladderinaxisspawn_2 ladderinaxisspawn_2 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("ladderinaxisspawn_2", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); yield(); yield(); _this.Bot.HoldButton(BTN.FORWARD, 2.5); sleep(2.5); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:spawnbox spawnbox = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("spawnbox", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); yield(); _this.Bot.HoldButton(BTN.FORWARD, 0.55); _this.Bot.HoldButton(BTN.JUMP, 0.55); sleep(0.55); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:elevator_rope elevator_rope = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Elevator_Rope", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); yield(); _this.Bot.HoldButton(BTN.FORWARD, 2.7); sleep(2.7); _this.Bot.HoldButton(BTN.STRAFE_L, 1); _this.Bot.HoldButton(BTN.FORWARD, 0.5); sleep(1); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:jump jump = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Jump", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.15); _this.Bot.HoldButton(BTN.JUMP, 1.1); _this.Bot.HoldButton(BTN.FORWARD, 1.1); sleep(2.5); _this.Bot.HoldButton(BTN.JUMP, 1.1); _this.Bot.HoldButton(BTN.FORWARD, 1.1); sleep(1.1); _this.Bot.HoldButton(BTN.STRAFE_L, 0.8); sleep(0.8); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:box_1 box_1 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Box_1", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.1); _this.Bot.HoldButton(BTN.JUMP, 0.55); _this.Bot.HoldButton(BTN.FORWARD, 0.55); sleep(0.55); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:box_2 box_2 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Box_2", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.1); _this.Bot.HoldButton(BTN.JUMP, 0.55); _this.Bot.HoldButton(BTN.FORWARD, 0.55); sleep(0.3); _this.Bot.HoldButton(BTN.CROUCH, 0.55); sleep(0.55); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:box_3 box_3 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Box_3", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.1); _this.Bot.HoldButton(BTN.JUMP, 0.55); _this.Bot.HoldButton(BTN.FORWARD, 0.55); sleep(0.55); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:box_4 box_4 = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Box_4", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.VeryHigh, "facing", wpTable.facing); sleep(0.1); _this.Bot.HoldButton(BTN.JUMP, 0.55); _this.Bot.HoldButton(BTN.FORWARD, 0.55); sleep(0.3); _this.Bot.HoldButton(BTN.CROUCH, 0.3); _this.Bot.HoldButton(BTN.FORWARD, 0.3); sleep(0.85); } }, }, // /bot waypoint_setproperty paththrough Navigation_PT:outside_switch outside_switch = { gotowp = "outside_switch", // waypoint for the bot to go to before doing anything else EvalFunc = function() // if this function returns false, navigation will not run { return !Map.Door_opened; }, navigate = function(_this) { if ( Map.Door_opened ) { yield(); return; } _this.AddAimRequest(Priority.VeryHigh, "position", Vector3(-870.886047, 6265.479492, -135.875000)); _this.AddAimRequest(Priority.High, "facing", Vector3(0.810086, 0.584466, 0.046482)); sleep(0.5); while( !Map.Door_opened ) { _this.Bot.HoldButton(BTN.USE, 0.3); sleep(1.5); } sleep(1); _this.ReleaseAimRequest(); }, }, // /bot waypoint_setproperty paththrough Navigation_PT:inside_switch inside_switch = { gotowp = "inside_switch", // waypoint for the bot to go to before doing anything else EvalFunc = function() // if this function returns false, navigation will not run { return !Map.Door_opened; }, navigate = function(_this) { if ( Map.Door_opened ) { yield(); return; } _this.AddAimRequest(Priority.High, "facing", Vector3(-0.002607,0.937636,-0.347610)); sleep(0.5); while( !Map.Door_opened ) { _this.Bot.HoldButton(BTN.USE, 0.3); sleep(1.5); } sleep(1); _this.ReleaseAimRequest(); }, }, // /bot waypoint_setproperty paththrough Navigation_PT:hatchover_generator hatchover_generator = { EvalFunc = function() // if this function returns false, navigation will not run { return !Map.HatchExploded; }, navigate = function(_this) { if ( Map.HatchExploded ) { yield(); return; } _this.AddWeaponRequest(Priority.High, WEAPON.KNIFE); _this.AddAimRequest(Priority.High, "facing", Vector3(0.042744,0.057507,-0.997430)); while( !Map.HatchExploded ) { _this.Bot.HoldButton(BTN.CROUCH, 1); _this.Bot.HoldButton(BTN.ATTACK1, 1); yield(); } _this.ReleaseAimRequest(); }, }, // /bot waypoint_setproperty paththrough Navigation_PT:hatch_toflagexploded hatch_toflagexploded = { gotowp = "Hatch", // waypoint for the bot to go to before doing anything else EvalFunc = function() // if this function returns false, navigation will not run { return !Map.HatchToFlagExploded; }, navigate = function(_this) { if ( Map.HatchToFlagExploded ) { yield(); return; } _this.AddWeaponRequest(Priority.High, WEAPON.LUGER); _this.AddAimRequest(Priority.High, "facing", Vector3(0.003915,-0.972331,0.233576)); while( !Map.HatchToFlagExploded ) { _this.Bot.PressButton(BTN.ATTACK1); yield(); } _this.ReleaseAimRequest(); sleep(0.5); }, }, // /bot waypoint_setproperty paththrough Navigation_PT:jumptotunnel jumptotunnel = { navigate = function(_this) { wpTable = {}; Wp.GetWaypointByName("Tunnel", wpTable); if ( _this.Goto(wpTable.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Vector3(0.003915,-0.972331,0.233576)); sleep(0.3); _this.Bot.HoldButton(BTN.FORWARD, 0.5); _this.Bot.HoldButton(BTN.JUMP, 0.5); sleep(0.3); _this.Bot.HoldButton(BTN.CROUCH, 0.5); _this.Bot.HoldButton(BTN.FORWARD, 0.5); sleep(0.5); } }, }, }, Wooden_Barrier_1_Exploded = function( trigger ) { if ( Map.Phase_1 ) { Map.WoodenBarrier1_Exploded = true; SetAvailableMapGoals( TEAM.AXIS, true, "ROUTE_WoodenBarrier_1" ); if ( !Map.WoodenBarrier2_Exploded ) { SetAvailableMapGoals( TEAM.AXIS, true, "ROUTE_Under_Ladders" ); sleep(1.5); SetAvailableMapGoals( TEAM.AXIS, false, "CAMP_Axis_Start_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, { "PLANT_sewer_exit_gate", ".*_Axis_SewerExitGate_.*", }); } } Util.MapDebugPrint( "^3Wooden_Barrier_1_Exploded" ); }, Wooden_Barrier_2_Exploded = function( trigger ) { if ( Map.Phase_1 ) { Map.WoodenBarrier2_Exploded = true; SetAvailableMapGoals( TEAM.AXIS, true, { "ROUTE_WoodenBarrier_2", "ROUTE_WaterTunnel", }); if ( !Map.WoodenBarrier1_Exploded ) { SetAvailableMapGoals( TEAM.AXIS, true, "ROUTE_Under_Ladders" ); sleep(1.5); SetAvailableMapGoals( TEAM.AXIS, false, "CAMP_Axis_Start_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, { "PLANT_sewer_exit_gate", ".*_Axis_SewerExitGate_.*", }); } } Util.MapDebugPrint( "^3Wooden_Barrier_2_Exploded" ); }, sewer_exit_gate_Planted = function( trigger ) { Map.sewer_exit_gate_Dyno += 1; Util.MapDebugPrint( "^3sewer_exit_gate_Planted" ); }, sewer_exit_gate_Defused = function( trigger ) { Map.sewer_exit_gate_Dyno -= 1; Util.MapDebugPrint( "^3sewer_exit_gate_Defused" ); }, sewer_exit_gate_Destroyed = function( trigger ) { if ( Map.Phase_1 ) { if ( Map.sewer_exit_gate_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_sewer_exit_gate_.*" ); } Map.sewer_exit_gate_Dyno = 0; SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_SewerExitGate_06", "DEFEND_Allies_SewerExitGate_07", "DEFEND_Allies_SewerExitGate_08", "DEFEND_Allies_SewerExitGate_10", }); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_BasementGate_.*" ); sleep(2); SetAvailableMapGoals( TEAM.AXIS, false, { "ATTACK_Axis_SewerExitGate_01", "ATTACK_Axis_SewerExitGate_02", "ATTACK_Axis_SewerExitGate_08", "ATTACK_Axis_SewerExitGate_09", }); SetAvailableMapGoals( TEAM.AXIS, true, { "PLANT_basement_gate", "ATTACK_Axis_BasementGate_.*", }); } Util.MapDebugPrint( "^3sewer_exit_gate_Destroyed" ); }, basement_gate_Planted = function( trigger ) { if ( Map.Phase_1 ) { Map.basement_gate_Dyno += 1; Util.MapDebugPrint( "^3basement_gate_Planted" ); } }, basement_gate_Defused = function( trigger ) { if ( Map.Phase_1 ) { Map.basement_gate_Dyno -= 1; Util.MapDebugPrint( "^3basement_gate_Defused" ); } }, basement_gate_Destroyed = function( trigger ) { if ( Map.Phase_1 ) { if ( Map.basement_gate_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_basement_gate_.*" ); } Map.basement_gate_Dyno = 0; Map.KT_NQMod_1 = OnTriggerRegion(AABB(1679.125,-880.874,-94.875,4921.839,4576.874,664.131), RegionTrigger.KillTrigger ); Map.KT_NQMod_2 = OnTriggerRegion(AABB(-6243.708,3455.949,-318.875,1532.845,7952.875,247.152), RegionTrigger.KillTrigger ); Map.KT_NQMod_3 = OnTriggerRegion(AABB(-6248.875,5311.125,-318.875,-2287.125,7952.875,139.031), RegionTrigger.KillTrigger ); ETUtil.SuicideSpawn( TEAM.ALLIES, 0, -1, 0 ); Util.ChangeSpawn( TEAM.AXIS, 2 ); Map.Phase_1 = false; Map.Phase_2 = true; print( "^3Phase 2" ); sleep(2); Util.DisableGoal( ".*", true ); SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_GunMaterial_01", "BUILD_Barricade", "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", ".*_Forward_Spawn", ".*_Courtryard", "DEFEND_Allies_CourtyYard_.*", "MOBILEMG42_Allies_CourtyYard_.*", }); SetAvailableMapGoals( TEAM.AXIS, true, { "CHECKPOINT_flag1", ".*_Forward_Spawn", "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", "PLANT_warehouse_blast_door", "FLAG_gunm", ".*_Axis_CourtyYard_.*", "ATTACK_Flag_.*", }); Util.MapDebugPrint( "^3basement_gate_Destroyed" ); } }, Axis_In_Phase_2 = { Name = "Axis_In_Phase_2", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { if ( Map.Phase_2 ) { if( GetEntTeam(ent) == TEAM.AXIS ) { Map.Axis_InPhase2 += 1; if ( Map.FlagAlliesCaptured ) { if ( Map.Axis_InPhase2 == 1 ) //it will run only once { Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2" ); sleep(5); if ( Map.Gunmaterial_Secured ) //Map.gunm == 3 => wall destroyed { SetAvailableMapGoals( TEAM.ALLIES, false, ".*_Allies_CourtyYard_.*" ); SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_Gun_.*", "MOBILEMG42_Allies_Gun_05", "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", ".*_Forward_Spawn", ".*_Courtryard", "DEFEND_Allies_CourtyYard_2", "DEFEND_Allies_CourtyYard_3", "DEFEND_Allies_CourtyYard_4", "DEFEND_Allies_CourtyYard_12", }); if ( !Map.AmmoSecured and !Map.AmmoTaken ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_Ammo_.*" ); Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2, Gunmaterial_Secured, AmmoNotSecured, AmmoNotTaken" ); } } else { if ( Map.gunmTaken > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_Gun_01", "DEFEND_Allies_Gun_02", "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", ".*_Forward_Spawn", ".*_Courtryard", "DEFEND_Allies_CourtyYard_.*", "MOBILEMG42_Allies_CourtyYard_.*", }); if ( Map.WarehouseBlastDoorDestroyed ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_.*" ); SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_05", "DEFEND_Allies_CourtyYard_06", "DEFEND_Allies_CourtyYard_07", "DEFEND_Allies_CourtyYard_08", "DEFEND_Allies_CourtyYard_09", }); Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2, GunmaterialNotSecured, gunmTaken, WarehouseBlastDoorDestroyed" ); } else { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_01" ); SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_05", "DEFEND_Allies_CourtyYard_06", }); Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2, GunmaterialNotSecured, gunmTaken, WarehouseBlastDoorNotDestroyed" ); } } else { SetAvailableMapGoals( TEAM.ALLIES, true, { "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", ".*_Forward_Spawn", ".*_Courtryard", "DEFEND_Allies_CourtyYard_.*", "MOBILEMG42_Allies_CourtyYard_.*", }); if ( Map.WarehouseBlastDoorDestroyed ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_.*" ); SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_07", "DEFEND_Allies_CourtyYard_08", "DEFEND_Allies_CourtyYard_09", }); Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2, GunmaterialNotSecured, gunmNotTaken, WarehouseBlastDoorDestroyed" ); } else { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_01" ); Util.MapDebugPrint( "^5Axis entered into trigger Axis_In_Phase_2, GunmaterialNotSecured, gunmNotTaken, WarehouseBlastDoorNotDestroyed" ); } } } } } } } }, OnExit = function(ent) { if ( Map.Phase_2 ) { if( GetEntTeam(ent) == TEAM.AXIS ) { Map.Axis_InPhase2 -= 1; if ( Map.Axis_InPhase2 == 0 ) { if ( Map.FlagAlliesCaptured ) { SetAvailableMapGoals( TEAM.ALLIES, false, ".*" ); SetAvailableMapGoals( TEAM.ALLIES, true, "ROUTE_.*" ); if ( Map.warehouse_blast_door_Dyno > 0 and !Map.WarehouseBlastDoorDestroyed ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFUSE_warehouse_blast_door_.*" ); } if ( !Map.GunBarricadeDestroyed and Map.Barricade_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFUSE_Barricade_.*" ); } if ( Map.GunBarricadeDestroyed ) { SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Barricade" ); } SetAvailableMapGoals( TEAM.ALLIES, true, { "AMMOCAB_north_ammocabinet_1", "AMMOCAB_north_ammocabinet_2", "HEALTHCAB_north_healthcabinet_2", "HEALTHCAB_north_healthcabinet_4", ".*_Forward_Spawn", ".*_Courtryard", "DEFEND_Allies_CourtyYard_.*", "MOBILEMG42_Allies_CourtyYard_.*", }); Util.MapDebugPrint( "^5Axis left trigger Axis_In_Phase_2" ); } } } } }, }, Hatch_To_Flag_Exploded = function( trigger ) { if ( Map.Phase_2 ) { Map.HatchToFlagExploded = true; Util.MapDebugPrint( "^3Hatch_To_Flag_Exploded" ); } }, Gun_Barricade_Built = function( trigger ) { if ( Map.Phase_2 ) { Map.GunBarricadeDestroyed = false; SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Barricade" ); SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Barricade" ); Util.MapDebugPrint( "^3Gun_Barricade_Built" ); } }, Gun_Barricade_Planted = function( trigger ) { if ( Map.Phase_2 ) { Map.Barricade_Dyno += 1; Util.MapDebugPrint( "^3Gun_Barricade_Planted" ); } }, Gun_Barricade_Defused = function( trigger ) { if ( Map.Phase_2 ) { Map.Barricade_Dyno -= 1; Util.MapDebugPrint( "^3Gun_Barricade_Defused" ); } }, Gun_Barricade_Destroyed = function( trigger ) { if ( Map.Phase_2 ) { Map.GunBarricadeDestroyed = true; if ( Map.Barricade_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Barricade_.*" ); } Map.Barricade_Dyno = 0; SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Barricade" ); SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Barricade" ); Util.MapDebugPrint( "^3Gun_Barricade_Destroyed" ); } }, flag1_Allies_Captured = function( trigger ) { Map.FlagAlliesCaptured = true; Util.ChangeSpawn( TEAM.AXIS, 2 ); SetAvailableMapGoals( TEAM.ALLIES, false, { "CHECKPOINT_flag1", "ATTACK_Flag_.*", }); SetAvailableMapGoals( TEAM.AXIS, false, "SMOKEBOMB_Axis_CourtyYardFlag_10" ); SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_CourtyYard_02", "DEFEND_Allies_CourtyYard_03", "DEFEND_Allies_CourtyYard_04", ".*_Forward_Spawn", }); SetAvailableMapGoals( TEAM.AXIS, true, { "SMOKEBOMB_Axis_CourtyYard_.*", "CHECKPOINT_flag1", "ATTACK_Flag_.*", }); Util.MapDebugPrint( "^3flag1_Allies_Captured" ); }, flag1_Axis_Captured = function( trigger ) { Map.FlagAlliesCaptured = false; Util.ChangeSpawn( TEAM.AXIS, 4 ); SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_02", "DEFEND_Allies_CourtyYard_03", "DEFEND_Allies_CourtyYard_04", ".*_Forward_Spawn", }); SetAvailableMapGoals( TEAM.AXIS, false, { "CHECKPOINT_flag1", "ATTACK_Flag_.*", "SMOKEBOMB_Axis_CourtyYard_.*", }); SetAvailableMapGoals( TEAM.AXIS, true, "SMOKEBOMB_Axis_CourtyYardFlag_10" ); SetAvailableMapGoals( TEAM.ALLIES, true, { "CHECKPOINT_flag1", "ATTACK_Flag_.*", }); Util.MapDebugPrint( "^3flag1_Axis_Captured" ); }, warehouse_blast_door_Planted = function( trigger ) { Map.warehouse_blast_door_Dyno += 1; Util.MapDebugPrint( "^3warehouse_blast_door_Planted" ); }, warehouse_blast_door_Defused = function( trigger ) { Map.warehouse_blast_door_Dyno -= 1; Util.MapDebugPrint( "^3warehouse_blast_door_Defused" ); }, warehouse_blast_door_Destroyed = function( trigger ) { if ( Map.warehouse_blast_door_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_warehouse_blast_door_.*" ); } Map.WarehouseBlastDoorDestroyed = true; Map.warehouse_blast_door_Dyno = 0; SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_07", "DEFEND_Allies_CourtyYard_08", "DEFEND_Allies_CourtyYard_09", }); SetAvailableMapGoals( TEAM.AXIS, true, "ROUTE_Warehouse" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_.*" ); Util.MapDebugPrint( "^3warehouse_blast_door_Destroyed" ); }, gunm_Taken = function( trigger ) { Map.gunmTaken += 1; SetAvailableMapGoals( TEAM.ALLIES, false, { "DEFEND_Allies_CourtyYard_05", "DEFEND_Allies_CourtyYard_06", }); SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_GunMat" ); if ( Map.gunmTaken < 3 ) { SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_Gun_01", "DEFEND_Allies_Gun_02", }); SetAvailableMapGoals( TEAM.AXIS, true, { "ATTACK_Axis_Gun_01", "ATTACK_Axis_Gun_04", }); } else { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_GunMaterial_.*" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_Gun_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_Axis_Gun_.*" ); } Util.MapDebugPrint( "^3gunm_Taken" ); }, gunm_Returned = function( trigger ) { Map.gunmTaken -= 1; if ( Map.WarehouseBlastDoorDestroyed ) { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_.*" ); } else { SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_GunMaterial_01" ); } if ( Map.gunmTaken == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_Gun_.*" ); SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_Axis_Gun_.*" ); SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_CourtyYard_05", "DEFEND_Allies_CourtyYard_06", }); } Util.MapDebugPrint( "^3gunm_Returned" ); }, gunm_Secured = function( trigger ) { Map.gunm += 1; if ( Map.gunm == 3 ) { Map.Gunmaterial_Secured = true; SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMG42_Allies_CourtyYard_01" ); SetAvailableMapGoals( TEAM.AXIS, false, { "FLAG_gunm", "CAPPOINT_GunMat", }); SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_gun" ); sleep(2); SetAvailableMapGoals( TEAM.ALLIES, true, { "MOBILEMG42_Allies_Gun_05", "DEFEND_Allies_Ammo_.*", }); SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_ammo" ); } Util.MapDebugPrint( "^3gunm_Secured" ); }, gun_Built = function( trigger ) { if ( Map.Phase_2 ) { Map.gun = 1; SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_gun" ); SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_gun" ); if ( Map.AmmoTaken ) { SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Gun" ); } if ( Map.gun_ready == 1 ) { SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_Gun" ); } Util.MapDebugPrint( "^3gun_Built" ); } }, gun_Planted = function( trigger ) { if ( Map.Phase_2 ) { Map.gun_Dyno += 1; Util.MapDebugPrint( "^3gun_Planted" ); } }, gun_Defused = function( trigger ) { if ( Map.Phase_2 ) { Map.gun_Dyno -= 1; Util.MapDebugPrint( "^3gun_Defused" ); } }, gun_Destroyed = function( trigger ) { if ( Map.Phase_2 ) { Map.gun_Dyno = 0; Map.gun = 0; SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_gun" ); SetAvailableMapGoals( TEAM.AXIS, false, "SWITCH_Gun" ); SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_gun" ); if ( Map.AmmoTaken ) { SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Gun" ); } Util.MapDebugPrint( "^3gun_Destroyed" ); } }, ammo_Taken = function( trigger ) { Map.AmmoTaken = true; SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_Ammo_.*" ); if ( Map.gun == 1 ) { SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Gun" ); } Util.MapDebugPrint( "^3ammo_Taken" ); }, ammo_Returned = function( trigger ) { Map.AmmoTaken = false; SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_Ammo_.*" ); SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Gun" ); Util.MapDebugPrint( "^3ammo_Returned" ); }, ammo_Secured = function( trigger ) { Map.AmmoSecured = true; Map.AmmoTaken = false; SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Gun" ); Util.MapDebugPrint( "^3ammo_Secured" ); }, Gun_Ready = function( trigger ) { Map.gun_ready = 1; if ( Map.gun == 1 ) //built { SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_Gun" ); } Util.MapDebugPrint( "^3Gun_Ready" ); }, Trainyard_Tunnel_Destroyed = function( trigger ) { DeleteTriggerRegion( Map.KT_NQMod_1 ); ETUtil.SuicideSpawn( TEAM.ALLIES, 0, -1, 0 ); Util.ChangeSpawn( TEAM.AXIS, 1 ); Map.Phase_2 = false; Map.Phase_3 = true; sleep(2); Util.DisableGoal( ".*", true ); SetAvailableMapGoals( TEAM.ALLIES, true, { "GRENADE_Barrels", "GRENADE_Elevator_Cover", ".*_t382_1", ".*_t382_3", "BUILD_Side_Gate", "BUILD_Barricade_1", ".*_Allies_BlastDoor_.*", }); SetAvailableMapGoals( TEAM.AXIS, true, { "PLANT_blast_door", "GRENADE_Fence", ".*_Axis_BlastDoor_.*", }); Util.MapDebugPrint( "^3Trainyard_Tunnel_Destroyed" ); }, Trainyard_Barricade_Built = function( trigger ) { if ( Map.Phase_3 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Barricade_1" ); SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Barricade_1" ); Util.MapDebugPrint( "^3Trainyard_Barricade_Built" ); } }, Trainyard_Barricade_Planted = function( trigger ) { if ( Map.Phase_3 ) { Map.Barricade_1_Dyno += 1; SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Barricade_1_.*" ); Util.MapDebugPrint( "^3Trainyard_Barricade_Planted" ); } }, Trainyard_Barricade_Defused = function( trigger ) { if ( Map.Phase_3 ) { Map.Barricade_1_Dyno -= 1; Util.MapDebugPrint( "^3Trainyard_Barricade_Defused" ); } }, Trainyard_Barricade_Destroyed = function( trigger ) { if ( Map.Phase_3 ) { Map.Barricade_1_Dyno = 0; SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Barricade_1" ); SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Barricade_1" ); Util.MapDebugPrint( "^3Trainyard_Barricade_Destroyed" ); } }, Side_Gate_Built = function( trigger ) { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Side_Gate" ); if ( Map.Phase_3 ) { SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Side_Gate" ); } Util.MapDebugPrint( "^3Side_Gate_Built" ); }, Side_Gate_Planted = function( trigger ) { Map.Side_Gate_Dyno += 1; SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Side_Gate_.*" ); Util.MapDebugPrint( "^3Side_Gate_Planted" ); }, Side_Gate_Defused = function( trigger ) { Map.Side_Gate_Dyno -= 1; Util.MapDebugPrint( "^3Side_Gate_Defused" ); }, Side_Gate_Destroyed = function( trigger ) { Map.Side_Gate_Dyno = 0; SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Side_Gate" ); if ( Map.Phase_3 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Side_Gate" ); } Util.MapDebugPrint( "^3Side_Gate_Destroyed" ); }, Fence_Exploded = function( trigger ) { if ( Map.Phase_3 ) { Util.MapDebugPrint( "^3Fence_Exploded" ); } }, blast_door_Planted = function( trigger ) { Map.blast_door_Dyno += 1; Util.MapDebugPrint( "^3blast_door_Planted" ); }, blast_door_Defused = function( trigger ) { Map.blast_door_Dyno -= 1; Util.MapDebugPrint( "^3blast_door_Defused" ); }, blast_door_Destroyed = function( trigger ) { Map.blast_door_Dyno = 0; DeleteTriggerRegion( Map.KT_NQMod_2 ); foreach ( id and bot in BotTable ) { if ( bot.GetTeam() == TEAM.ALLIES ) { if ( bot.GetReinforceTime() < 10 ) { ETUtil.SuicideSpawn( TEAM.ALLIES, 0, -1, 0 ); } } } Util.ChangeSpawn( TEAM.AXIS, 3 ); Map.Phase_3 = false; Map.Phase_4 = true; sleep(2); Util.DisableGoal( ".*", true ); SetAvailableMapGoals( TEAM.ALLIES, true, { "DEFEND_Allies_InsideNet_01", ".*_Allies_Generator_.*", "BUILD_Generator_Protection_Net", "BUILD_Command_Post", ".*_t382_2", "HEALTHCAB_north_healthcabinet", "AMMOCAB_north_ammocabinet", }); SetAvailableMapGoals( TEAM.AXIS, true, { "ATTACK_Axis_Generator_.*", "PLANT_Generator", "BUILD_Command_Post", "HEALTHCAB_north_healthcabinet", "AMMOCAB_north_ammocabinet", }); Util.MapDebugPrint( "^3blast_door_Destroyed" ); }, Allied_CP_Built = function( trigger ) { if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { Map.AlliedCP = true; SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Command_Post" ); Util.MapDebugPrint( "^3Allied_CP_Built" ); } }, Axis_CP_Built = function( trigger ) { if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Command_Post" ); Util.MapDebugPrint( "^3Axis_CP_Built" ); } }, Command_Post_Planted = function( trigger ) { Map.Command_Post_Dyno += 1; if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { if ( Map.AlliedCP ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_Command_Post_.*" ); } else { SetAvailableMapGoals( TEAM.AXIS, false, "DEFUSE_Command_Post_.*" ); } Util.MapDebugPrint( "^3Command_Post_Planted" ); } }, Command_Post_Defused = function( trigger ) { if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { Map.Command_Post_Dyno -= 1; Util.MapDebugPrint( "^3Command_Post_Defused" ); } }, Allied_CP_Destroyed = function( trigger ) { if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { Map.AlliedCP = false; SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Command_Post" ); SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Command_Post" ); Util.MapDebugPrint( "^3Allied_CP_Destroyed" ); } }, Axis_CP_Destroyed = function( trigger ) { if ( Map.Phase_4 or Map.Phase_5 or Map.Phase_6 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "PLANT_Command_Post" ); SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Command_Post" ); SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Command_Post" ); Util.MapDebugPrint( "^3Axis_CP_Destroyed" ); } }, Generator_Protection_Net_Built = function( trigger ) { if ( Map.Phase_4 ) { Map.GeneratorProtectionNetBuilt = true; SetAvailableMapGoals( TEAM.ALLIES, false, { "BUILD_Generator_Protection_Net", "DEFEND_Allies_InsideNet_01", }); SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Generator" ); SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Generator_Protection_Net" ); Util.MapDebugPrint( "^3Generator_Protection_Net_Built" ); while ( Map.Generator_Dyno > 0 ) { yield(); } Map.KT_InsideNet = OnTriggerRegion(AABB(-2112.596,6214.298,-310.875,-1683.455,6600.875,-110.689), RegionTrigger.KillTrigger ); Util.MapDebugPrint( "^3KillTrigger created" ); sleep(1); DeleteTriggerRegion( Map.KT_InsideNet ); Util.MapDebugPrint( "^3KillTrigger deleted" ); } }, Generator_Protection_Net_Planted = function( trigger ) { if ( Map.Phase_4 ) { Map.Generator_Protection_Net_Dyno += 1; Util.MapDebugPrint( "^3Generator_Protection_Net_Planted" ); } }, Generator_Protection_Net_Defused = function( trigger ) { if ( Map.Phase_4 ) { Map.Generator_Protection_Net_Dyno -= 1; Util.MapDebugPrint( "^3Generator_Protection_Net_Defused" ); } }, Generator_Protection_Net_Destroyed = function( trigger ) { if ( Map.Phase_4 ) { Map.Generator_Protection_Net_Dyno = 0; Map.GeneratorProtectionNetBuilt = false; SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Generator_Protection_Net" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_Generator_.*" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_InsideNet_01" ); SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Generator" ); if ( Map.Generator_Dyno == 0 ) { if ( Map.Axis_Inside_GeneratorProtectionNet == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Generator_Protection_Net" ); } else { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Generator_Protection_Net" ); } } else { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Generator_Protection_Net" ); } yield(); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_Generator_.*" ); Util.MapDebugPrint( "^3Generator_Protection_Net_Destroyed" ); } }, Axis_InsideGeneratorProtectionNet = { Name = "Axis_InsideGeneratorProtectionNet", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { if ( Map.Phase_4 ) { if( GetEntTeam(ent) == TEAM.AXIS ) { if ( GetEntClass(ent) == CLASS.ENGINEER ) { Map.Axis_Inside_GeneratorProtectionNet += 1; Util.BotChat( TEAM.ALLIES, "sayteam", "^1Axis engs are near generator! Defend generator!", 2 ); if ( !Map.GeneratorProtectionNetBuilt ) { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Generator_Protection_Net" ); } Util.MapDebugPrint( "^3Axis engs are inside protection net" ); } } } }, OnExit = function(ent) { if ( Map.Phase_4 ) { if( GetEntTeam(ent) == TEAM.AXIS ) { if ( GetEntClass(ent) == CLASS.ENGINEER ) { Map.Axis_Inside_GeneratorProtectionNet -= 1; } if ( Map.Axis_Inside_GeneratorProtectionNet == 0 ) { Util.BotChat( TEAM.ALLIES, "sayteam", "^5Generator is safe.", 2 ); if ( !Map.GeneratorProtectionNetBuilt and Map.Generator_Dyno == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Generator_Protection_Net" ); } Util.MapDebugPrint( "^3Generator is safe" ); } } } }, }, Somebody_Near_InsideSwitch = { Name = "Somebody_Near_InsideSwitch", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { if ( Map.Phase_4 ) { Map.Somebody_Near_Inside_Switch += 1; if ( Map.Door_opened ) { SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_Outside" ); } if ( Map.Somebody_Near_Inside_Switch == 1 ) { if ( Map.Somebody_Near_Outside_Switch == 0 ) { Map.KT_SomebodyNearOutsideSwitch = OnTriggerRegion(AABB(-906.768,6231.125,-174.875,-831.125,6332.197,-68.875), RegionTrigger.KillTrigger ); Util.MapDebugPrint( "^3KillTrigger KT_SomebodyNearOutsideSwitch created" ); } } } }, OnExit = function(ent) { if ( Map.Phase_4 ) { Map.Somebody_Near_Inside_Switch -= 1; if ( Map.Somebody_Near_Inside_Switch == 0 ) { DeleteTriggerRegion( Map.KT_SomebodyNearOutsideSwitch ); Util.MapDebugPrint( "^3KillTrigger KT_SomebodyNearOutsideSwitch deleted" ); if ( Map.Door_opened ) { SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_Outside" ); } } } }, }, Somebody_Near_OutsideSwitch = { Name = "Somebody_Near_OutsideSwitch", TriggerOnClass = CLASS.ANYPLAYER, OnEnter = function(ent) { if ( Map.Phase_4 ) { Map.Somebody_Near_Outside_Switch += 1; if ( Map.Door_opened ) { SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_Inside" ); } if ( Map.Somebody_Near_Outside_Switch == 1 ) { if ( Map.Somebody_Near_Inside_Switch == 0 ) { Map.KT_SomebodyNearInsideSwitch = OnTriggerRegion(AABB(-1136.907,6133.141,-142.875,-1034.381,6208.874,-68.875), RegionTrigger.KillTrigger ); Util.MapDebugPrint( "^3KillTrigger KT_SomebodyNearInsideSwitch created" ); } } } }, OnExit = function(ent) { if ( Map.Phase_4 ) { Map.Somebody_Near_Outside_Switch -= 1; if ( Map.Somebody_Near_Outside_Switch == 0 ) { DeleteTriggerRegion( Map.KT_SomebodyNearInsideSwitch ); Util.MapDebugPrint( "^3KillTrigger KT_SomebodyNearInsideSwitch deleted" ); if ( Map.Door_opened ) { SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_Inside" ); } } } }, }, Door_open = function( trigger ) { if ( Map.Phase_4 ) { vel = ToVector(trigger.Action); if ( vel[ 0 ] == 15 ) { Map.Door_opened = true; Util.MapDebugPrint( "^3Door_open" ); sleep(2.5); if ( Map.Somebody_Near_Outside_Switch == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_Inside" ); } if ( Map.Somebody_Near_Inside_Switch == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_Outside" ); } } else if ( vel[ 0 ] == -15 ) { Map.Door_opened = false; SetAvailableMapGoals( TEAM.ALLIES, false, { "SWITCH_Inside", "SWITCH_Outside", }); Util.MapDebugPrint( "^3Door_close" ); } } }, Hatch_Exploded = function( trigger ) { if ( Map.Phase_4 ) { Map.HatchExploded = true; } }, Generator_Planted = function( trigger ) { if ( Map.Phase_4 ) { Map.Generator_Dyno += 1; if ( !Map.GeneratorProtectionNetBuilt ) { SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Generator_Protection_Net" ); } Util.MapDebugPrint( "^3Generator_Planted" ); } }, Generator_Defused = function( trigger ) { if ( Map.Phase_4 ) { Map.Generator_Dyno -= 1; if ( Map.Generator_Dyno == 0 and !Map.GeneratorProtectionNetBuilt and Map.Axis_Inside_GeneratorProtectionNet == 0 ) { SetAvailableMapGoals( TEAM.ALLIES, true, "BUILD_Generator_Protection_Net" ); } Util.MapDebugPrint( "^3Generator_Defused" ); } }, Generator_Destroyed = function( trigger ) { Map.Generator_Dyno = 0; Map.Phase_4 = false; Map.Phase_5 = true; DeleteTriggerRegion( Map.KT_NQMod_3 ); Util.ChangeSpawn( TEAM.AXIS, 6 ); Util.DisableGoal( ".*", true ); sleep(5); SetAvailableMapGoals( TEAM.ALLIES, true, { "HEALTHCAB_north_healthcabinet_1", ".*_Allies_KeyCard_.*", }); SetAvailableMapGoals( TEAM.AXIS, true, { "PLANT_basement_gate_1", "HEALTHCAB_north_healthcabinet_1", ".*_Axis_KeyCard_.*", }); Util.MapDebugPrint( "^3Generator_Destroyed" ); }, basement_gate_1_Planted = function( trigger ) { if ( Map.Phase_5 ) { Map.basement_gate_1_Dyno += 1; Util.MapDebugPrint( "^3basement_gate_1_Planted" ); } }, basement_gate_1_Defused = function( trigger ) { if ( Map.Phase_5 ) { Map.basement_gate_1_Dyno -= 1; Util.MapDebugPrint( "^3basement_gate_1_Defused" ); } }, basement_gate_1_Destroyed = function( trigger ) { if ( Map.basement_gate_1_Dyno > 0 ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFUSE_basement_gate_1_.*" ); } Map.basement_gate_1_Dyno = 0; Map.Phase_5 = false; Map.Phase_6 = true; SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_gold2" ); Util.MapDebugPrint( "^3basement_gate_1_Destroyed" ); }, KeyCard_Taken = function( trigger ) { Map.KeyCardTaken = true; SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_gold2" ); SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Armory" ); Util.MapDebugPrint( "^3KeyCard_Taken" ); sleep(2); if ( Map.KeyCardTaken ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_KeyCard_.*" ); } SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_Allies_Armory_.*" ); }, KeyCard_Returned = function( trigger ) { Map.KeyCardTaken = false; SetAvailableMapGoals( TEAM.ALLIES, false, "ATTACK_Allies_Armory_.*" ); SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Armory" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_KeyCard_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_gold2" ); Util.MapDebugPrint( "^3KeyCard_Returned" ); }, KeyCard_Secured = function( trigger ) { Map.Phase_6 = false; sleep(2); Util.DisableGoal( ".*", true ); SetAvailableMapGoals( TEAM.ALLIES, true, ".*_Allies_Rocket_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, { "FLAG_gold", ".*_Axis_Rocket_.*", }); Util.MapDebugPrint( "^3KeyCard_Secured" ); }, gold_Taken = function( trigger ) { SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Detonator" ); Util.MapDebugPrint( "^3gold_Taken" ); }, gold_Returned = function( trigger ) { Util.MapDebugPrint( "^3gold_Returned" ); }, gold_Secured = function( trigger ) { Map.Explosive += 1; if ( Map.Explosive == 5 ) { SetAvailableMapGoals( TEAM.AXIS, false, { "FLAG_gold", "CAPPOINT_Detonator", }); SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_Detonator" ); } Util.MapDebugPrint( "^3gold_Secured" ); }, Bomb_Ready = function( trigger ) { Util.MapDebugPrint( "^3Bomb_Ready" ); }, Countdown_Activated = function( trigger ) { SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Allies_Rocket_.*" ); SetAvailableMapGoals( TEAM.AXIS, false, "SWITCH_Detonator" ); SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_Detonator" ); yield(); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Allies_Rocket_.*" ); Util.MapDebugPrint( "^3Countdown_Activated" ); }, Countdown_Interrupted = function( trigger ) { SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_Detonator" ); SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_Axis_Rocket_.*" ); SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_Detonator" ); yield(); SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_Axis_Rocket_.*" ); Util.MapDebugPrint( "^3Countdown_Interrupted" ); }, Rocket_Destroyed = function( trigger ) { Map.RocketDestroyed = true; Util.MapDebugPrint( "^5Axis_Win" ); sleep(1); ETUtil.WinningChat( TEAM.AXIS ); sleep(1.5); ETUtil.LosingChat( TEAM.ALLIES ); Util.MapDebugPrint( "^3Rocket_Destroyed" ); }, Thirty_second = function( trigger ) { Util.MapDebugPrint( "^5Thirty_second" ); sleep(30); if ( !Map.RocketDestroyed ) { Util.MapDebugPrint( "^5Allies_Win" ); sleep(1); ETUtil.WinningChat( TEAM.ALLIES ); sleep(1.5); ETUtil.LosingChat( TEAM.AXIS ); } }, }; global OnMapLoad = function() { OnTrigger( "GRENADE_Wooden_Barrier_1 Exploded.", Map.Wooden_Barrier_1_Exploded ); OnTrigger( "GRENADE_Wooden_Barrier_2 Exploded.", Map.Wooden_Barrier_2_Exploded ); OnTrigger( "Planted at the sewer exit gate.", Map.sewer_exit_gate_Planted ); OnTrigger( "Planted at sewer exit gate.", Map.sewer_exit_gate_Planted ); //for N!tmod OnTrigger( "Defused at the sewer exit gate.", Map.sewer_exit_gate_Defused ); OnTrigger( "Defused at sewer exit gate.", Map.sewer_exit_gate_Defused ); //for N!tmod OnTrigger( "^dAxis have breached the sewer gate!", Map.sewer_exit_gate_Destroyed ); OnTrigger( "Planted at the basement gate.", Map.basement_gate_Planted ); OnTrigger( "Planted at basement gate.", Map.basement_gate_Planted ); //for N!tmod OnTrigger( "Defused at the basement gate.", Map.basement_gate_Defused ); OnTrigger( "Defused at basement gate.", Map.basement_gate_Defused ); //for N!tmod OnTrigger( "^dAxis have breached the basement gate!", Map.basement_gate_Destroyed ); OnTrigger( "GRENADE_Hatch_To_Flag Exploded.", Map.Hatch_To_Flag_Exploded ); OnTrigger( "Barricade constructed", Map.Gun_Barricade_Built ); OnTrigger( "Planted at Barricade.", Map.Gun_Barricade_Planted ); OnTrigger( "Defused at Barricade.", Map.Gun_Barricade_Defused ); OnTrigger( "^1WARNING: ^3Barricade destroyed", Map.Gun_Barricade_Destroyed ); OnTrigger( "^3Axis have captured the forward spawn", Map.flag1_Axis_Captured ); OnTrigger( "^3Allies have reclaimed the forward spawn", Map.flag1_Allies_Captured ); OnTrigger( "Planted at the warehouse blast door.", Map.warehouse_blast_door_Planted ); OnTrigger( "Planted at warehouse blast door.", Map.warehouse_blast_door_Planted ); //for N!tmod OnTrigger( "Defused at the warehouse blast door.", Map.warehouse_blast_door_Defused ); OnTrigger( "Defused at warehouse blast door.", Map.warehouse_blast_door_Defused ); //for N!tmod OnTrigger( "^dAxis have breached the warehouse blast door!", Map.warehouse_blast_door_Destroyed ); OnTrigger( "Axis have stolen The Gun Materials!", Map.gunm_Taken ); OnTrigger( "^4Allies have returned the gun materials !", Map.gunm_Returned ); OnTrigger( "^1Axis have installed a set of gun materials !", Map.gunm_Secured ); OnTrigger( "^dAxis team has built the Gun!", Map.gun_Built ); OnTrigger( "Planted at gun.", Map.gun_Planted ); OnTrigger( "Defused at gun.", Map.gun_Defused ); OnTrigger( "^dAllied team has destroyed the Gun!", Map.gun_Destroyed ); OnTrigger( "Axis have stolen The Gun Ammo!", Map.ammo_Taken ); OnTrigger( "^4Allies have returned the ammo !", Map.ammo_Returned ); OnTrigger( "^1Axis have loaded the gun !", Map.ammo_Secured ); OnTrigger( "^dThe gun is ready to fire!", Map.Gun_Ready ); OnTrigger( "^4The trainyard access tunnel has been breached", Map.Trainyard_Tunnel_Destroyed ); OnTrigger( "Trainyard Barricade constructed", Map.Trainyard_Barricade_Built ); OnTrigger( "Planted at Barricade.", Map.Trainyard_Barricade_Planted ); OnTrigger( "Defused at Barricade.", Map.Trainyard_Barricade_Defused ); OnTrigger( "^1WARNING: ^3Trainyard Barricade destroyed", Map.Trainyard_Barricade_Destroyed ); OnTrigger( "GRENADE_Fence Exploded.", Map.Fence_Exploded ); OnTrigger( "Trainyard Side Gate constructed", Map.Side_Gate_Built ); OnTrigger( "Planted at Side Gate.", Map.Side_Gate_Planted ); OnTrigger( "Defused at Side Gate.", Map.Side_Gate_Defused ); OnTrigger( "^1WARNING: ^3Trainyard Side Gate destroyed", Map.Side_Gate_Destroyed ); OnTrigger( "Planted at the blast door.", Map.blast_door_Planted ); OnTrigger( "Planted at blast door.", Map.blast_door_Planted ); //for N!tmod OnTrigger( "Defused at the blast door.", Map.blast_door_Defused ); OnTrigger( "Defused at blast door.", Map.blast_door_Defused ); //for N!tmod OnTrigger( "^dAxis have breached the trainyard depot blast door!", Map.blast_door_Destroyed ); OnTrigger( "Allied Command Post constructed. Charge speed increased!", Map.Allied_CP_Built ); OnTrigger( "Axis Command Post constructed. Charge speed increased!", Map.Axis_CP_Built ); OnTrigger( "Planted at the Command Post.", Map.Command_Post_Planted ); OnTrigger( "Planted at Command Post.", Map.Command_Post_Planted ); //for N!tmod OnTrigger( "Defused at the Command Post.", Map.Command_Post_Defused ); OnTrigger( "Defused at Command Post.", Map.Command_Post_Defused ); //for N!tmod OnTrigger( "Axis team has destroyed the Allied Command Post!", Map.Allied_CP_Destroyed ); OnTrigger( "Allied team has destroyed the Axis Command Post!", Map.Axis_CP_Destroyed ); OnTrigger( "Generator protection constructed", Map.Generator_Protection_Net_Built ); OnTrigger( "Planted at Generator Protection Net.", Map.Generator_Protection_Net_Planted ); OnTrigger( "Defused at Generator Protection Net.", Map.Generator_Protection_Net_Defused ); OnTrigger( "^1WARNING: ^3Generator protection destroyed", Map.Generator_Protection_Net_Destroyed ); OnTrigger( "portedouble_droite_goto", Map.Door_open ); OnTrigger( "GRENADE_HatchOverGenerator Exploded.", Map.Hatch_Exploded ); OnTrigger( "Planted at the Generator.", Map.Generator_Planted ); OnTrigger( "Planted at Generator.", Map.Generator_Planted ); //for N!tmod OnTrigger( "Defused at the Generator.", Map.Generator_Defused ); OnTrigger( "Defused at Generator.", Map.Generator_Defused ); //for N!tmod OnTrigger( "Allies have destroyed the power generator!!!!", Map.Generator_Destroyed ); OnTrigger( "Planted at the basement gate.", Map.basement_gate_1_Planted ); OnTrigger( "Planted at basement gate.", Map.basement_gate_1_Planted ); //for N!tmod OnTrigger( "Defused at the basement gate.", Map.basement_gate_1_Defused ); OnTrigger( "Defused at basement gate.", Map.basement_gate_1_Defused ); //for N!tmod OnTrigger( "Allies have destroyed the keycard room gate!!!!", Map.basement_gate_1_Destroyed ); OnTrigger( "Axis have stolen the armory keycard!", Map.KeyCard_Taken ); OnTrigger( "^6The keycard have been returned!!!!", Map.KeyCard_Returned ); OnTrigger( "^6The armory has been opened!!!!", Map.KeyCard_Secured ); OnTrigger( "Axis have stolen The explosive charge!", Map.gold_Taken ); OnTrigger( "Flag returned gold!", Map.gold_Returned ); OnTrigger( "Axis captured goldbar_holder", Map.gold_Secured ); OnTrigger( "^6The bomb is ready to be armed!!!!", Map.Bomb_Ready ); OnTrigger( "^6Countdown activated", Map.Countdown_Activated ); OnTrigger( "^6Countdown interrupted", Map.Countdown_Interrupted ); OnTrigger( "^6The rocket has been blown to pieces !!!", Map.Rocket_Destroyed ); OnTrigger( "thirty second warning.", Map.Thirty_second ); Util.ChangeSpawn( TEAM.AXIS, 5 ); DCM1 = OnTriggerRegion(AABB(-4970.875,3626.056,-702.875,-4667.292,3738.317,-76.012), RegionTrigger.DisableCombatMovement); DCM2 = OnTriggerRegion(AABB(-5248.873,-1472.875,-590.875,-4871.125,-1279.125,286.508), RegionTrigger.DisableCombatMovement); DCM3 = OnTriggerRegion(AABB(-3345.883,483.544,385.125,-3213.369,647.250,504.639), RegionTrigger.DisableCombatMovement); DCM4 = OnTriggerRegion(AABB(-3176.710,1226.645,412.528,-2983.613,1369.710,587.125), RegionTrigger.DisableCombatMovement); DCM5 = OnTriggerRegion(AABB(-1214.934,1444.258,65.125,-1094.545,1822.689,355.125), RegionTrigger.DisableCombatMovement); DCM6 = OnTriggerRegion(AABB(-1812.839,1663.126,281.125,-1687.127,1876.412,523.125), RegionTrigger.DisableCombatMovement); DCM7 = OnTriggerRegion(AABB(-1928.872,1413.297,61.835,-1635.626,1748.877,400.339), RegionTrigger.DisableCombatMovement); DCM8 = OnTriggerRegion(AABB(1335.336,-618.909,257.125,1584.875,-327.350,395.125), RegionTrigger.DisableCombatMovement); DCM9 = OnTriggerRegion(AABB(-5450.875,3475.781,-702.875,-5143.493,3741.505,-116.872), RegionTrigger.DisableCombatMovement); DCM10 = OnTriggerRegion(AABB(-6136.875,-1400.874,-702.875,-5700.385,734.896,-584.803), RegionTrigger.DisableCombatMovement); DCM11 = OnTriggerRegion(AABB(294.771,610.241,1.125,432.962,837.270,201.669), RegionTrigger.DisableCombatMovement); DCM12A = OnTriggerRegion(AABB(-2074.825,6025.766,-246.875,-1507.487,6238.606,66.784), RegionTrigger.DisableCombatMovement); NP1 = OnTriggerRegion(AABB(-4970.875,3626.056,-702.875,-4667.292,3738.317,-76.012), RegionTrigger.DisableBotPush); NP2 = OnTriggerRegion(AABB(-5248.873,-1472.875,-590.875,-4871.125,-1279.125,286.508), RegionTrigger.DisableBotPush); NP3 = OnTriggerRegion(AABB(-3345.883,483.544,385.125,-3213.369,647.250,504.639), RegionTrigger.DisableBotPush); NP4 = OnTriggerRegion(AABB(-3176.710,1226.645,412.528,-2983.613,1369.710,587.125), RegionTrigger.DisableBotPush); NP5 = OnTriggerRegion(AABB(-1214.934,1444.258,65.125,-1094.545,1822.689,355.125), RegionTrigger.DisableBotPush); NP6 = OnTriggerRegion(AABB(-1812.839,1663.126,281.125,-1687.127,1876.412,523.125), RegionTrigger.DisableBotPush); NP7 = OnTriggerRegion(AABB(-1928.872,1413.297,61.835,-1635.626,1748.877,400.339), RegionTrigger.DisableBotPush); NP8 = OnTriggerRegion(AABB(1335.336,-618.909,257.125,1584.875,-327.350,395.125), RegionTrigger.DisableBotPush); NP9 = OnTriggerRegion(AABB(-5450.875,3475.781,-702.875,-5143.493,3741.505,-116.872), RegionTrigger.DisableBotPush); NP10 = OnTriggerRegion(AABB(-6136.875,-1400.874,-702.875,-5700.385,734.896,-584.803), RegionTrigger.DisableBotPush); NP11 = OnTriggerRegion(AABB(294.771,610.241,1.125,432.962,837.270,201.669), RegionTrigger.DisableBotPush); NP12 = OnTriggerRegion(AABB(-2461.896,1663.127,1.125,-2348.951,1776.376,168.760), RegionTrigger.DisableBotPush); NP12A = OnTriggerRegion(AABB(-2074.825,6025.766,-246.875,-1507.487,6238.606,66.784), RegionTrigger.DisableBotPush); AxisInPhase2 = OnTriggerRegion(AABB(-2536.869,-1904.282,-174.875,1652.349,2624.875,432.704), Map.Axis_In_Phase_2 ); AxisInsideGeneratorProtectionNet = OnTriggerRegion(AABB(-2112.596,6214.298,-310.875,-1683.455,6600.875,-110.689), Map.Axis_InsideGeneratorProtectionNet ); SomebodyNearInsideSwitch = OnTriggerRegion(AABB(-1095.477,6170.773,-142.875,-1080.477,6188.773,-68.875), Map.Somebody_Near_InsideSwitch ); SomebodyNearOutsideSwitch = OnTriggerRegion(AABB(-869.871,6266.662,-158.875,-851.871,6284.662,-84.875), Map.Somebody_Near_OutsideSwitch ); Util.DisableGoal( ".*", true ); SetAvailableMapGoals( TEAM.AXIS, false, { "ROUTE_Under_Ladders", "ROUTE_WoodenBarrier_1", "ROUTE_WoodenBarrier_2", "ROUTE_WaterTunnel", }); SetAvailableMapGoals( TEAM.AXIS, true, { "GRENADE_Wooden_Barrier_.*", "HEALTHCAB_north_healthcabinet_3", "CAMP_Axis_Start_.*", }); SetAvailableMapGoals( TEAM.ALLIES, true, { "REPAIRMG42_t382", "MOUNTMG42_t382", "PLANTMINE_Allies_Start_.*", ".*_Allies_SewerExitGate_.*", }); ETUtil.LimitToClass("PLANT_Side_Gate", TEAM.AXIS, CLASS.ENGINEER); Util.AddUseWp( "PLANT_sewer_exit_gate", "WP_sewer_exit_gate" ); Util.AddUseWp( "PLANT_basement_gate", "Plant_basementGate" ); Util.AddUseWp( "PLANT_Barricade", "Barricade_Plant_WP_1" ); Util.AddUseWp( "PLANT_Barricade", "Barricade_Plant_WP_2" ); Util.AddUseWp( "PLANT_Side_Gate", "Side_Gate_Plant_WP_1" ); Util.AddUseWp( "PLANT_Side_Gate", "Side_Gate_Plant_WP_2" ); Util.AddUseWp( "PLANT_gun", "Gun_Plant_WP" ); Util.AddUseWp( "PLANT_Generator_Protection_Net", "Generator_Protection_Net_Plant_WP" ); Util.AddUseWp( "PLANT_Generator_Protection_Net", "PlantProtection_1" ); Util.AddUseWp( "PLANT_Generator_Protection_Net", "PlantProtection_2" ); Util.AddUseWp( "PLANT_Generator", "Generator_Plant_WP" ); SetGoalPriority( "GRENADE_.*", 0.99, 0, 0 ); SetGoalPriority( "GRENADE_.*", 0.75, 0, CLASS.ENGINEER ); SetGoalPriority( "PLANT_Command_Post", 0.52, 0, CLASS.ENGINEER ); SetGoalPriority( "BUILD_Command_Post", 0.52, 0, CLASS.ENGINEER ); SetGoalPriority( "ATTACK_Flag_.*", 0.52, 0, 0 ); SetGoalPriority( "ATTACK_Axis_SewerExitGate_01", 0.52, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_SewerExitGate_03", 0.52, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_SewerExitGate_04", 0.51, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_BasementGate_1", 0.54, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_BasementGate_2", 0.54, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_BasementGate_3", 0.53, TEAM.AXIS, 0 ); SetGoalPriority( "CHECKPOINT_flag1", 0.8, TEAM.AXIS, 0 ); SetGoalPriority( "FLAG_gunm", 0.79, TEAM.AXIS, 0 ); SetGoalPriority( "SMOKEBOMB_Axis_CourtyYard_.*", 0.82, TEAM.AXIS, CLASS.COVERTOPS ); SetGoalPriority( "ATTACK_Axis_CourtyYard_08", 0.51, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_Gun_.*", 0.52, TEAM.AXIS, 0 ); SetGoalPriority( "PLANT_Barricade", 0.55, TEAM.AXIS, CLASS.ENGINEER ); SetGoalPriority( "PLANT_Barricade_1", 0.55, TEAM.AXIS, CLASS.ENGINEER ); SetGoalPriority( "PLANT_Generator_Protection_Net", 0.56, TEAM.AXIS, CLASS.ENGINEER ); SetGoalPriority( "ATTACK_Axis_BlastDoor_04", 0.51, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_BlastDoor_09", 0.51, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_Generator_04", 0.51, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_Generator_01", 0.52, TEAM.AXIS, 0 ); SetGoalPriority( "ATTACK_Axis_Generator_03", 0.52, TEAM.AXIS, 0 ); SetGoalPriority( "DEFEND_Allies_SewerExitGate_02", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_SewerExitGate_04", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_SewerExitGate_04", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BasementGate_1", 0.54, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BasementGate_3", 0.54, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BasementGate_2", 0.53, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_CourtyYard_02", 0.53, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_CourtyYard_04", 0.53, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_CourtyYard_03", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_CourtyYard_12", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_GunMaterial_01", 0.72, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_GunMaterial_02", 0.7, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Gun_01", 0.55, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Gun_02", 0.55, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Gun_03", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Gun_04", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Ammo_.*", 0.53, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BlastDoor_04", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BlastDoor_05", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_BlastDoor_11", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Generator_09", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Generator_01", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Generator_02", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_InsideNet_01", 0.53, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_KeyCard_03", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_KeyCard_02", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_KeyCard_04", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Rocket_10", 0.51, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Rocket_02", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "DEFEND_Allies_Rocket_03", 0.52, TEAM.ALLIES, 0 ); SetGoalPriority( "MOUNTMG42_t382_1", 0.71, TEAM.ALLIES, 0 ); SetGoalPriority( "BUILD_Generator_Protection_Net", 0.91, TEAM.ALLIES, CLASS.ENGINEER ); Util.SetMaxUsers( 1, "DEFEND_.*" ); Util.SetMaxUsers( 1, "GRENADE_.*" ); Util.SetMaxUsers( 1, "SWITCH_.*" ); Util.SetMaxUsers( 2, "SWITCH_Detonator" ); Util.SetMaxUsers( 1, "MOUNTMG42_.*" ); Util.SetMaxUsers( 3, "FLAG_gunm" ); Util.SetMaxUsers( 1, "FLAG_gold" ); Util.SetMaxUsers( 2, "FLAG_ammo" ); Util.SetMaxUsers( 2, "CHECKPOINT_flag1" ); Util.SetMaxUsers( 1, "BUILD_Barricade" ); MapRoutes = { CAMP_Axis_Start_01 = { ROUTE_Axis_Spawn = { ROUTE_Ladder_In_Axis_Spawn_2 = { }, ROUTE_Ladder_In_Axis_Spawn_3 = { }, ROUTE_Ladder_In_Axis_Spawn_1 = { }, }, ROUTE_Axis_spawn_Exit = { ROUTE_Ladder_In_Axis_Spawn_2 = { }, ROUTE_Ladder_In_Axis_Spawn_3 = { }, ROUTE_Ladder_In_Axis_Spawn_1 = { }, }, }, ATTACK_Axis_SewerExitGate_01 = { ROUTE_Under_Ladders = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, ROUTE_Axis_Spawn = { ROUTE_Ladder_In_Axis_Spawn_2 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, ROUTE_Ladder_In_Axis_Spawn_3 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, ROUTE_Ladder_In_Axis_Spawn_1 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, }, ROUTE_Axis_spawn_Exit = { ROUTE_Ladder_In_Axis_Spawn_2 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, ROUTE_Ladder_In_Axis_Spawn_3 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, ROUTE_Ladder_In_Axis_Spawn_1 = { ROUTE_WoodenBarrier_1 = { }, ROUTE_WoodenBarrier_2 = { ROUTE_WaterTunnel = { }, }, }, }, }, CHECKPOINT_flag1 = { ROUTE_OutsideSpawn = { ROUTE_Direct = { ROUTE_Room1 = { Weight = 3, ROUTE_RoomTunnel = { }, }, ROUTE_Courtyard1 = { Weight = 2, ROUTE_Courtyard2 = { ROUTE_Courtyard3 = { }, }, ROUTE_Courtyard4 = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Window = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Detour = { ROUTE_Direct = { ROUTE_Room1 = { Weight = 3, ROUTE_RoomTunnel = { }, }, ROUTE_Courtyard1 = { Weight = 2, ROUTE_Courtyard2 = { ROUTE_Courtyard3 = { }, }, ROUTE_Courtyard4 = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Window = { ROUTE_Courtyard3 = { }, }, }, }, }, ROUTE_OutsideSpawn1 = { ROUTE_Direct = { ROUTE_Room1 = { Weight = 3, ROUTE_RoomTunnel = { }, }, ROUTE_Courtyard1 = { Weight = 2, ROUTE_Courtyard2 = { ROUTE_Courtyard3 = { }, }, ROUTE_Courtyard4 = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Window = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Detour = { ROUTE_Direct = { ROUTE_Room1 = { Weight = 3, ROUTE_RoomTunnel = { }, }, ROUTE_Courtyard1 = { Weight = 2, ROUTE_Courtyard2 = { ROUTE_Courtyard3 = { }, }, ROUTE_Courtyard4 = { ROUTE_Courtyard3 = { }, }, }, ROUTE_Window = { ROUTE_Courtyard3 = { }, }, }, }, }, }, CAPPOINT_GunMat = { ROUTE_FlagGunm = { ROUTE_Warehouse = { Weight = 2, ROUTE_LadderToGun = { }, }, ROUTE_AroundMG42 = { ROUTE_LadderToGun = { }, }, }, }, FLAG_ammo = { ROUTE_CourtyardSpawn = { ROUTE_Balcony = { ROUTE_UndergroundTunnel1 = { Weight = 2, ROUTE_UndergroundTunnelLadder = { }, ROUTE_UndergroundTunnelExit = { }, }, ROUTE_Passage = { Weight = 2, }, ROUTE_Courtyard3 = { ROUTE_Courtyard2 = { ROUTE_Courtyard5 = { }, }, }, }, }, }, CAPPOINT_Gun = { ROUTE_FlagAmmoMat = { ROUTE_Passage = { ROUTE_LadderToGun2 = { }, }, ROUTE_UndergroundTunnelExit = { ROUTE_UndergroundTunnel1 = { ROUTE_LadderToGun2 = { }, }, }, ROUTE_Courtyard6 = { ROUTE_LadderToGun = { }, }, }, }, PLANT_Generator_Protection_Net = { ROUTE_BlastDoorSpawn = { ROUTE_UnderCP = { ROUTE_LowerVentilationShaft = { }, ROUTE_UpperVentilationShaft = { }, }, ROUTE_AroundCP = { }, }, }, CAPPOINT_Detonator = { ROUTE_FlagDetonator = { ROUTE_RightDetonatorWay = { }, ROUTE_LeftDetonatorWay = { }, ROUTE_UpperDetonatorWay = { }, }, }, }; MapRoutes["ATTACK_Axis_Generator_.*"] = { ROUTE_BlastDoorSpawn = { ROUTE_AroundCP = { Weight = 2, }, ROUTE_UnderCP = { ROUTE_OutsideStairs = { }, }, }, }; MapRoutes[".*_Axis_CourtyYard_.*"] = { ROUTE_OutsideSpawn = { ROUTE_Direct = { ROUTE_Courtyard1 = { Weight = 2, }, ROUTE_Window = { }, }, ROUTE_Detour = { ROUTE_Direct = { ROUTE_Courtyard1 = { Weight = 2, }, ROUTE_Window = { }, }, }, }, ROUTE_OutsideSpawn1 = { ROUTE_Direct = { ROUTE_Courtyard1 = { Weight = 2, }, ROUTE_Window = { }, }, ROUTE_Detour = { ROUTE_Direct = { ROUTE_Courtyard1 = { Weight = 2, }, ROUTE_Window = { }, }, }, }, }; MapRoutes["ATTACK_Axis_Rocket_.*"] = { ROUTE_LastAxisSpawn = { ROUTE_RightDetonatorWay = { }, ROUTE_LeftDetonatorWay = { }, ROUTE_UpperDetonatorWay = { }, }, }; MapRoutes["CAMP_Axis_Start_.*"] = MapRoutes.CAMP_Axis_Start_01; MapRoutes["ATTACK_Axis_SewerExitGate_.*"] = MapRoutes.ATTACK_Axis_SewerExitGate_01; MapRoutes.PLANT_sewer_exit_gate = MapRoutes.ATTACK_Axis_SewerExitGate_01; MapRoutes.PLANT_Generator = MapRoutes.PLANT_Generator_Protection_Net; MapRoutes["ATTACK_Axis_Rocket_.*"] = MapRoutes.CAPPOINT_Detonator; SetAvailableMapGoals( TEAM.AXIS, false, "ROUTE_Warehouse" ); Util.Routes(MapRoutes); print( "^3Omni-bot map script by ^1Q^2i^3k^4i^3 for " + GetMapName() + " executed." ); }; global OnBotJoin = function( bot ) { bot.TargetBreakableDist = 350.0; if ( Map.Phase_6 or Map.Phase_5 ) { Util.ChangeBotSpawn( bot, TEAM.AXIS, 6 ); } else if ( Map.Phase_4 ) { Util.ChangeBotSpawn( bot, TEAM.AXIS, 3 ); } else if ( Map.Phase_3 ) { Util.ChangeBotSpawn( bot, TEAM.AXIS, 1 ); } else if ( Map.Phase_2 ) { if ( Map.FlagAlliesCaptured ) { Util.ChangeBotSpawn( bot, TEAM.AXIS, 2 ); } else { Util.ChangeBotSpawn( bot, TEAM.AXIS, 4 ); } } else { Util.ChangeBotSpawn( bot, TEAM.AXIS, 5 ); } WeaponTable.SetWeaponAvailability( CLASS.SOLDIER, WEAPON.FLAMETHROWER, false ); WeaponTable.SetWeaponAvailability( CLASS.SOLDIER, WEAPON.MORTAR, false ); WeaponTable.SetWeaponAvailability( CLASS.SOLDIER, WEAPON.MORTAR_SET, false ); WeaponTable.SetWeaponTeamAvailability ( TEAM.AXIS, CLASS.SOLDIER, WEAPON.MOBILE_MG42, false ); wpn = bot.GetWeapon(WEAPON.MOBILE_MG42); if(wpn) { wpn.PrimaryFire.LowAmmoPriority = 0.8; } Util.ChangeSpawn( TEAM.ALLIES, 0 ); };