/******************************************************** Script and waypoints made by >WES< P!NNAN & >WES< GRANNY ********************************************************/ global Map = { Debug = false, Quiet = true, //set Talk to false if you don't want the bots to talk ingame ! Talk = true, Plane1 = false, Plane2 = false, Plane3 = false, BigDoor = false, Lift1Status = "up", Lift2Status = "up", SwitchOneStatus = "up", Pulled1 = false, SwitchThreeStatus = "up", Pulled3 = false, Ammo_Cabinet_misc_cabinet_supply_1 = "AMMOCAB_misc_cabinet_supply_1", Ammo_Cabinet_misc_cabinet_supply_10 = "AMMOCAB_misc_cabinet_supply_10", Ammo_Cabinet_misc_cabinet_supply_11 = "AMMOCAB_misc_cabinet_supply_11", Ammo_Cabinet_misc_cabinet_supply_2 = "AMMOCAB_misc_cabinet_supply_2", Ammo_Cabinet_misc_cabinet_supply_3 = "AMMOCAB_misc_cabinet_supply_3", Ammo_Cabinet_misc_cabinet_supply_4 = "AMMOCAB_misc_cabinet_supply_4", Ammo_Cabinet_misc_cabinet_supply_5 = "AMMOCAB_misc_cabinet_supply_5", Ammo_Cabinet_misc_cabinet_supply_6 = "AMMOCAB_misc_cabinet_supply_6", Health_Cabinet_misc_cabinet_health_1 = "HEALTHCAB_misc_cabinet_health_1", Health_Cabinet_misc_cabinet_health_10 = "HEALTHCAB_misc_cabinet_health_10", Health_Cabinet_misc_cabinet_health_11 = "HEALTHCAB_misc_cabinet_health_11", Health_Cabinet_misc_cabinet_health_2 = "HEALTHCAB_misc_cabinet_health_2", Health_Cabinet_misc_cabinet_health_3 = "HEALTHCAB_misc_cabinet_health_3", Health_Cabinet_misc_cabinet_health_4 = "HEALTHCAB_misc_cabinet_health_4", Health_Cabinet_misc_cabinet_health_5 = "HEALTHCAB_misc_cabinet_health_5", Call_Artillery_ar_al1_bunker = "CALLARTILLERY_ar_al1_bunker", Call_Artillery_ar_ax_call_bunker_1 = "CALLARTILLERY_ar_ax_call_bunker_1", Call_Artillery_ar_ax_spawn_1 = "CALLARTILLERY_ar_ax_spawn_1", Call_Artillery_ar_bunker_2 = "CALLARTILLERY_ar_bunker_2", Artillery_S_ar_al_axexit = "ARTILLERY_S_ar_al_axexit", Artillery_S_ar_ax_alexit_1 = "ARTILLERY_S_ar_ax_alexit_1", Artillery_S_ar_ax_alexit_2 = "ARTILLERY_S_ar_ax_alexit_2", Checkpoint_axis_flag = "CHECKPOINT_axis_flag", Flag_rocket_fuel = "FLAG_rocket_fuel", Flag_v2_docs = "FLAG_v2_docs", Cappoint_Dropoff = "CAPPOINT_Dropoff", Build_Command_Post = "BUILD_Command_Post", Build_NORTH_GATE = "BUILD_NORTH_GATE", Build_SOUTH_GATE = "BUILD_SOUTH_GATE", Plant_Command_Post = "PLANT_Command_Post", Plant_FX5U_PROJECT_ROOM_DOOR = "PLANT_FX5U_PROJECT_ROOM_DOOR", Plant_FX5U_SCHEMATICS = "PLANT_FX5U_SCHEMATICS", Plant_NORTH_GATE = "PLANT_NORTH_GATE", Plant_SOUTH_GATE = "PLANT_SOUTH_GATE", Plant_XF5U_1 = "PLANT_XF5U_1", Plant_XF5U_2 = "PLANT_XF5U_2", Plant_XF5U_3 = "PLANT_XF5U_3", Mount_291 = "MOUNTMG42_291", Mount_774 = "MOUNTMG42_774", Mount_r_bigdoor = "MOUNTMG42_r_bigdoor", Repair_291 = "REPAIRMG42_291", Repair_774 = "REPAIRMG42_774", Repair_r_bigdoor = "REPAIRMG42_r_bigdoor", Mobile_MG42_mg_al1_trees = "MOBILEMG42_mg_al1_trees", Mobile_MG42_mg_ax_projectdoor = "MOBILEMG42_mg_ax_projectdoor", Snipe_s_alliedbunker_1 = "SNIPE_s_alliedbunker_1", Snipe_s_alliedbunker_2 = "SNIPE_s_alliedbunker_2", Snipe_s_alliedbunker_3 = "SNIPE_s_alliedbunker_3", Snipe_s_alliedtop_1 = "SNIPE_s_alliedtop_1", Snipe_s_ax_cabinet_1 = "SNIPE_s_ax_cabinet_1", Snipe_s_ax_cabinet_2 = "SNIPE_s_ax_cabinet_2", Snipe_s_cp_1 = "SNIPE_s_cp_1", Snipe_s_cp_2 = "SNIPE_s_cp_2", Snipe_s_hangartop_1 = "SNIPE_s_hangartop_1", Snipe_s_hangartop_2 = "SNIPE_s_hangartop_2", Snipe_s_radio_1 = "SNIPE_s_radio_1", Snipe_s_radio_2 = "SNIPE_s_radio_2", Navigation = { // cs: TODO: use pt_useswitch instead of this unreliable hack opendoor = { navigate = function(_this) { if ( !Map.BigDoor ) { if ( !Map.BigDoorInfo ) { Map.BigDoorInfo = Util.WpNameInfo("bigdoorpt"); } if ( _this.Goto(Map.BigDoorInfo.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Map.BigDoorInfo.facing); while( !Map.BigDoor ) { _this.Bot.HoldButton(BTN.USE, 0.5); yield(); } } } sleep(1); }, }, waterway = { navigate = function(_this) { if (!Map.NoWay) { if ( !Map.TunnelWpInfo ) { Map.TunnelWpInfo = Util.WpNameInfo("tunnel"); } if ( _this.Goto(Map.TunnelWpInfo.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Map.TunnelWpInfo.facing); _this.Bot.HoldButton(BTN.FORWARD, 0.5); } } sleep(1); }, }, tunnelladder_1pt = { navigate = function(_this) { _this.Bot.HoldButton(BTN.FORWARD, 3); sleep(3); }, }, tunnelladder_2pt = { navigate = function(_this) { _this.Bot.HoldButton(BTN.FORWARD, 3); sleep(3); }, }, breakout_2pt = { navigate = function(_this) { if ( !Map.Breakout2Info ) { Map.Breakout2Info = Util.WpNameInfo("breakout_2"); } if ( _this.Goto(Map.Breakout2Info.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Map.Breakout2Info.facing); _this.Bot.HoldButton(BTN.FORWARD, 4); sleep(3); } }, }, }, Switches = { BigDoor = { Enabled = true, //Debug = true, WaypointName = "bigdoorpt", LimitBots = 1, LimitTeam = 0, // disabled initially. LimitClass = (1< 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTAttack"); } } if ( bot.GetTeam() == TEAM.ALLIES ) { r = RandRange(0,10); if( r < 2 ) { bot.SayVoice(VOICE.DEFEND_OBJECTIVE); } else if( r > 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTFallBack"); } } } } Util.MapDebugPrint( "all planes destroyed", true ); } Util.MapDebugPrint( "XF5U_1_Destroyed" ); }, XF5U_2_Destroyed = function( trigger ) { Map.Plane2 = "true"; if ( Map.Plane1 && Map.Plane3 ) { Map.Switches.BigDoor.LimitTeam = (1< 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTAttack"); } } if ( bot.GetTeam() == TEAM.ALLIES ) { r = RandRange(0,10); if( r < 2 ) { bot.SayVoice(VOICE.DEFEND_OBJECTIVE); } else if( r > 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTFallBack"); } } } } Util.MapDebugPrint( "all planes destroyed", true ); } Util.MapDebugPrint( "XF5U_2_Destroyed" ); }, XF5U_3_Destroyed = function( trigger ) { Map.Plane3 = "true"; if ( Map.Plane1 && Map.Plane2 ) { Map.Switches.BigDoor.LimitTeam = (1< 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTAttack"); } } if ( bot.GetTeam() == TEAM.ALLIES ) { r = RandRange(0,10); if( r < 2 ) { bot.SayVoice(VOICE.DEFEND_OBJECTIVE); } else if( r > 8 ) { sleep(1.2); bot.ExecCommand("vsay_team FTFallBack"); } } } } Util.MapDebugPrint( "all planes destroyed", true ); } Util.MapDebugPrint( "XF5U_3_Destroyed" ); }, //Gates NORTH_GATE_Built = function( trigger ) { Util.MapDebugPrint( "NORTH_GATE_Built" ); }, SOUTH_GATE_Built = function( trigger ) { Util.MapDebugPrint( "SOUTH_GATE_Built" ); }, NORTH_GATE_Destroyed = function( trigger ) { Util.MapDebugPrint( "NORTH_GATE_Destroyed" ); }, SOUTH_GATE_Destroyed = function( trigger ) { Util.MapDebugPrint( "SOUTH_GATE_Destroyed" ); }, //Detroyable doors FX5U_PROJECT_ROOM_DOOR_Destroyed = function( trigger ) { Groups.DisableAllies(Groups.group4); Groups.DisableAxis(Groups.group3); Groups.EnableAllies(Groups.group6); Groups.EnableAxis(Groups.group5); Util.MapDebugPrint( "FX5U_PROJECT_ROOM_DOOR_Destroyed" ); }, FX5U_SCHEMATICS_Destroyed = function( trigger ) { Util.MapDebugPrint( "FX5U_SCHEMATICS_Destroyed" ); }, //Objectives rocket_fuel_Taken = function( trigger ) { Groups.DisableAllies(Groups.group6); Groups.DisableAxis(Groups.group5); Groups.EnableAllies(Groups.group8); Groups.EnableAxis(Groups.group7); Util.MapDebugPrint( "rocket_fuel_Taken" ); }, rocket_fuel_Returned = function( trigger ) { Groups.DisableAllies(Groups.group8); Groups.DisableAxis(Groups.group7); Groups.EnableAllies(Groups.group6); Groups.EnableAxis(Groups.group5); Util.MapDebugPrint( "rocket_fuel_Returned" ); }, rocket_fuel_Captured = function( trigger ) { Groups.DisableAllies(Groups.group8); Groups.DisableAxis(Groups.group7); Groups.EnableAllies(Groups.group6); Groups.EnableAxis(Groups.group5); Map.Obj1 = "true"; if ( Map.Obj2 ) { ETUtil.WinningChat( TEAM.AXIS ); ETUtil.LosingChat( TEAM.ALLIES ); } Util.MapDebugPrint( "rocket_fuel_Captured" ); }, v2_docs_Taken = function( trigger ) { Groups.DisableAllies(Groups.group6); Groups.DisableAxis(Groups.group5); Groups.EnableAllies(Groups.group8); Groups.EnableAxis(Groups.group7); Util.MapDebugPrint( "v2_docs_Taken" ); }, v2_docs_Returned = function( trigger ) { Groups.DisableAllies(Groups.group8); Groups.DisableAxis(Groups.group7); Groups.EnableAllies(Groups.group6); Groups.EnableAxis(Groups.group5); Util.MapDebugPrint( "v2_docs_Returned" ); }, v2_docs_Captured = function( trigger ) { Groups.DisableAllies(Groups.group8); Groups.DisableAxis(Groups.group7); Groups.EnableAllies(Groups.group6); Groups.EnableAxis(Groups.group5); Map.Obj2 = "true"; if ( Map.Obj1 ) { ETUtil.WinningChat( TEAM.AXIS ); ETUtil.LosingChat( TEAM.ALLIES ); } Util.MapDebugPrint( "v2_docs_Captured" ); }, axis_flag_Axis_Captured = function( trigger ) { Map.Switches.Switch1.LimitTeam = 0; Map.Switches.Switch3.LimitTeam = 0; Util.MapDebugPrint( "axis_flag_Axis_Captured" ); }, axis_flag_Allies_Captured = function( trigger ) { Util.MapDebugPrint( "axis_flag_Allies_Captured" ); }, //Switchstuff and checks Lift1Move = function( trigger ) { vec = ToVector(trigger.Action); if ( vec.z > 38 ) { Util.MapDebugPrint( "lift 1 is coming up", true ); sleep(15.0); Map.Lift1Status = "up"; Map.Lift1Up = true; if ( Map.Lift1Up && Map.SwitchOneStatus == "up" ) { Wp.SetWaypointFlag("Lift1_1","closed",false); Wp.SetWaypointFlag("Lift1_2","closed",true); SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_a_lift1.*" ); Util.MapDebugPrint( "lift1 is ready upstairs", true ); } } else if ( vec.z < -38 ) { Util.MapDebugPrint( "lift 1 is going down", true ); sleep(15.0); Map.Lift1Status = "down"; Map.Lift1Down = true; if ( Map.Lift1Down && Map.Pulled1 ) { Wp.SetWaypointFlag("Lift1_2","closed",false); SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_a_lift1.*" ); Util.MapDebugPrint( "lift1 is ready downstairs", true ); } } }, Switch1Move = function( trigger ) { vec = ToVector(trigger.Action); if ( vec.z < -14 ) { //Util.MapDebugPrint( "switch1 pulled down" ); sleep(1.0); Wp.SetWaypointFlag("Lift1_1","closed",false); Map.SwitchOneStatus = "down"; Map.Pulled1 = true; Map.Switches.Switch1.LimitTeam = 0; Map.Switches.Switch2.LimitTeam = (1< 14 ) { //Util.MapDebugPrint( "switch1 pulled up" ); sleep(1.0); Map.SwitchOneStatus = "up"; Map.Switches.Switch1.LimitTeam = (1< 38 ) { Util.MapDebugPrint( "lift 2 is coming up", true ); sleep(15.0); Map.Lift2Status = "up"; Map.Lift2Up = true; if ( Map.Lift2Up && Map.SwitchThreeStatus == "up" ) { Wp.SetWaypointFlag("Lift2_1","closed",false); Wp.SetWaypointFlag("Lift2_2","closed",true); SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_a_lift2.*" ); Util.MapDebugPrint( "lift2 is ready upstairs", true ); } } else if ( vec.z < -38 ) { Util.MapDebugPrint( "lift 2 is going down", true ); sleep(15.0); Map.Lift2Status = "down"; Map.Lift2Down = true; if ( Map.Lift2Down && Map.Pulled3 ) { Wp.SetWaypointFlag("Lift2_2","closed",false); SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_a_lift2.*" ); Util.MapDebugPrint( "lift2 is ready downstairs", true ); } } }, Switch3Move = function( trigger ) { vec = ToVector(trigger.Action); if ( vec.z < -14 ) { //Util.MapDebugPrint( "switch3 pulled down" ); sleep(1.0); Wp.SetWaypointFlag("Lift2_1","closed",false); Map.SwitchThreeStatus = "down"; Map.Pulled3 = true; Map.Switches.Switch3.LimitTeam = 0; Map.Switches.Switch4.LimitTeam = (1< 14 ) { //Util.MapDebugPrint( "switch3 pulled up" ); sleep(1.0); Map.SwitchThreeStatus = "up"; Map.Switches.Switch3.LimitTeam = (1<