/******************************************************************************* Filename: over_the_top.gm Created by: >WES< P!NNAN Assistance: >WES< GRANNY Last Updated: Sat, 8 November 2009 Updated by: >WES< P!NNAN Assistance: Change log: Tweaking and stuckage fixing. -------------------------------------------------------------------------------- Map description : The Allies have to take 2 Goldcrates , save it to the truck and escape with truck ! To do that they must either: -Get access to the Castlebasement 1.Built the Ramp 2.Destroy the Securitydoor 3.Destroy the Castlebasement -Escape with the Goldcrates 1.Steal the Goldcrates 1 + 2 2.Save the Gold to the waiting Truck 3.Escort the Truck to Gate 4.Get the Switch to open escaping Gate 5.Escape with the Truck -------------------------------------------------------------------------------- *** MAP GOALS *** //MG-Objects MOUNTMG42_mg42_90 //TowerMG /// ALLIES GOALS /// BUILD_Ramp //Ramp PLANT_Security_Door //Securitydoor BUILD_Truck //Truckrepair MOVER_truck //Truckmoving BUILD_Command_Post //Allied CP PLANT_Castle_Basement //Castlebasement FLAG_goldbars //Goldcrates SNIPE_s_hill_2 SNIPE_s_castle_1 SNIPE_s_spawn SNIPE_s_cabinet_1 SNIPE_s_cabinet_2 /// AXIS GOALS /// MOUNTMG42_mgpos //MG42mounting REPAIRMG42_mgpos //MG42repair PLANT_Command_Post //Allied CP destroying BUILD_Command_Post //Axis CP SNIPE_s_castle_1 SNIPE_s_cabinet_1 SNIPE_s_cabinet_2 ***************************************************************************************/ global Map = { Quiet = true, Talk = true, TruckPos = "Start", Truck_Damaged = false, Escorting = false, ShouldEscort = false, Liftdown = true, Buttonout = true, Buttonin = false, Gateclosed = true, LiftMoving = "", GateDoor = "closed", TruckForGate = false, GoldReady = false, Ammo_Cabinet_south_ammocabinet = "AMMOCAB_south_ammocabinet", Health_Cabinet_south_healthcabinet = "HEALTHCAB_south_healthcabinet", Call_Artillery_ar_call_al_1 = "CALLARTILLERY_ar_call_al_1", Call_Artillery_ar_call_al_2 = "CALLARTILLERY_ar_call_al_2", Call_Artillery_ar_call_axis_1 = "CALLARTILLERY_ar_call_axis_1", Call_Artillery_ar_castle_top_1 = "CALLARTILLERY_ar_castle_top_1", Call_Artillery_ar_castle_top_2 = "CALLARTILLERY_ar_castle_top_2", Call_Artillery_ar_hill_east = "CALLARTILLERY_ar_hill_east", Call_Artillery_ar_hill_east_1 = "CALLARTILLERY_ar_hill_east_1", Call_Artillery_ar_hill_west = "CALLARTILLERY_ar_hill_west", Call_Artillery_ar_tower = "CALLARTILLERY_ar_tower", Artillery_S_13 = "ARTILLERY_S_13", Artillery_S_20 = "ARTILLERY_S_20", Artillery_S_374 = "ARTILLERY_S_374", Artillery_S_458 = "ARTILLERY_S_458", Artillery_S_ar_axis_1 = "ARTILLERY_S_ar_axis_1", Artillery_S_ar_place_ax_1 = "ARTILLERY_S_ar_place_ax_1", Artillery_S_ar_place_al_1 = "ARTILLERY_S_ar_place_al_1", Artillery_S_ar_place_al_2 = "ARTILLERY_S_ar_place_al_2", Flag_goldbars = "FLAG_goldbars", Cappoint_Dropoff = "CAPPOINT_Dropoff", Build_Command_Post = "BUILD_Command_Post", Build_Ramp = "BUILD_Ramp", Build_Truck = "BUILD_Truck", Plant_Castle_Basement = "PLANT_Castle_Basement", Plant_Command_Post = "PLANT_Command_Post", Plant_Ramp = "PLANT_Ramp", Plant_Security_Door = "PLANT_Security_Door", Mount_mgpos = "MOUNTMG42_mgpos", Repair_mgpos = "REPAIRMG42_mgpos", Mobile_MG42_s_pilar = "MOBILEMG42_s_pilar", Mobile_MG42_mg_al_1 = "MOBILEMG42_mg_al_1", Snipe_s_alspawn = "SNIPE_s_alspawn", Snipe_s_cabinet_left = "SNIPE_s_cabinet_left", Snipe_s_cabinet_right = "SNIPE_s_cabinet_right", Snipe_s_castle_top_1 = "SNIPE_s_castle_top_1", Snipe_s_castle_top_2 = "SNIPE_s_castle_top_2", Snipe_s_church = "SNIPE_s_church", Snipe_s_hill_east = "SNIPE_s_hill_east", Snipe_s_hill_east2 = "SNIPE_s_hill_east2", Snipe_s_leftcastle = "SNIPE_s_leftcastle", Snipe_s_leftroom = "SNIPE_s_leftroom", Snipe_s_pilar = "SNIPE_s_pilar", Snipe_s_westhill_1 = "SNIPE_s_westhill_1", Mover_truck = "MOVER_truck", Plant_Mine_184 = "PLANTMINE_184", Plant_Mine_185 = "PLANTMINE_185", Navigation = { // cs: TODO: remove these hacks and make it part of useswitch paththrough lift_pt = { navigate = function (_this) { if ( !Map.RLiftUpInfo ) { Map.RLiftUpInfo= Util.WpNameInfo("r_lift_up"); } if ( _this.Goto(Map.RLiftUpInfo.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Map.RLiftUpInfo.facing); sleep (2); _this.Bot.HoldButton(BTN.USE, 1); sleep(16); } }, }, liftswitch_2_pt = { navigate = function (_this) { if ( !Map.LiftSwitch2Info ) { Map.LiftSwitch2Info = Util.WpNameInfo("Liftswitch_2"); } if ( _this.Goto(Map.LiftSwitch2Info.position) == EVENT.PATH_SUCCESS ) { _this.AddAimRequest(Priority.High, "facing", Map.LiftSwitch2Info.facing); sleep(2); _this.Bot.HoldButton(BTN.USE, 0.3); sleep (1); } }, }, }, Switches = { LiftSwitch1 = { WaypointName = "Liftswitch_1", Enabled = true, LimitTeam = (1< 80 ) { //Enable escort truck Map.GateDoor = "open"; Map.Gateopen = true; SetAvailableMapGoals( TEAM.ALLIES, true, { "MOBILEMG42_mg_al_1", "ESCORT_truck", }); } //Door close if ( vec.z < -80 ) { //Disable escort truck Map.Gateclosed = true; Map.GateDoor = "closed"; SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMG42_mg_al_1" ); if ( Map.TruckAtGate ) { SetAvailableMapGoals( TEAM.ALLIES, false, "ESCORT_truck" ); } if ( Map.Handleleft ) { Map.Switches.GateSwitch.LimitTeam = (1< 160 ) { Map.Switches.GateSwitch.LimitTeam = (1< 10 ) { Map.Buttonin = true; Map.Button = "in" ; Map.Switches.LiftSwitch1.LimitTeam = 0; Map.Switches.LiftSwitch2.LimitTeam = 0; Map.Switches.LiftSwitch3.LimitTeam = 0; Map.Switches.LiftSwitch4.LimitTeam = 0; Util.MapDebugPrint( "Button not ready", true); } if ( vec.y < 10 ) { Map.Buttonout = true; Map.Button = "out"; } Util.MapDebugPrint( "Button is: " + Map.Button, true ); }, //Lift moving lift_goto = function( trigger ) { vec = ToVector(trigger.Action); //value z lift is 100 or -100 if ( vec.z > 50 ) { Map.LiftMoving = "up"; } if ( vec.z < 50 ) { Map.LiftMoving = "down"; } Util.MapDebugPrint( "lift is moving: " + Map.LiftMoving, true ); }, //Lift doors lift_door1_goto = function( trigger ) { vec = ToVector(trigger.Action); //Lift door moving: //value x door is 70.04 or -70.04 if ( vec.x < 50 ) { Map.Button = "out"; } //Prevent bots jumping in if ( vec.x > 50 ) //value x door is 70.04 or -70.04 { if (Map.LiftMoving == "up") { Map.Liftup = true; Map.LiftPos = "elevator_up"; if ( Map.Buttonout && Map.Liftup ) { Map.Switches.LiftSwitch2.LimitTeam = 0; //Button disabled for Allies Util.MapDebugPrint( "Switch2 disabled" ); Map.Switches.LiftSwitch4.LimitTeam = (1<