//========================================================================================== // // western.gm // // Who When What //------------------------------------------------------------------------------------------ // ^1{WeB}^7*^4GA^1NG$^4TA^7* 23 June 2015 Initial Script // //========================================================================================== // global Map = { ShowMovers = false, Debug = 0, Movers = { "MOVER_piano", "MOVER_vulture_1", "MOVER_vulture_2", "MOVER_vulture_3", "MOVER_vulture_4", "MOVER_vulture_5", "MOVER_vulture_6", "MOVER_clay_counter", "MOVER_pistol_counter", "MOVER_pistol_target_1", "MOVER_pistol_target_2", "MOVER_pistol_target_3", "MOVER_pistol_target_4", "MOVER_pistol_target_5", "MOVER_pistol_target_6", "MOVER_pistol_target_7", "MOVER_pistol_target_8", "MOVER_bell_hammer", "MOVER_bell_rope", "MOVER_hang_lever", }, gun_door_Destroyed = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "gun_door_Destroyed" ); }, dyno_Taken = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Jail_2" ); Util.MapDebugPrint( "dyno_Taken" ); }, detokit_Taken = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Jail" ); Util.MapDebugPrint( "detokit_Taken" ); }, detokit_Returned = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "detokit_Returned" ); }, dyno_Returned = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "dyno_Returned" ); }, detokit_Secured = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Jail_2" ); SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_Jail" ); SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_deto" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_gun_1" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_gun_2" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_1" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_2" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_3" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_4" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_5" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_6" ); SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_bank_door_7" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_deto_obj_1" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_deto_obj_2" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_deto_obj_3" ); SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_deto_obj_4" ); Util.MapDebugPrint( "detokit_Secured" ); }, dyno_Secured = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_Jail_2" ); Util.MapDebugPrint( "dyno_Secured" ); }, detokit_Built = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_deto" ); SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_deto_obj_1" ); SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_deto_obj_2" ); SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_deto_obj_3" ); SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_deto_obj_4" ); SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_jail_1" ); SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_jail_1" ); Util.MapDebugPrint( "detokit_Built" ); }, Detonator_Enabled = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.ALLIES, true, "SWITCH_jail_1" ); SetAvailableMapGoals( TEAM.AXIS, false, "SWITCH_jail_1" ); Util.MapDebugPrint( "Detonator_Enabled" ); }, Detonator_Disabled = function( trigger ) { if ( TestMap ) { return; } SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_jail_1" ); SetAvailableMapGoals( TEAM.AXIS, true, "SWITCH_jail_1" ); Util.MapDebugPrint( "Detonator_Disabled" ); }, }; global OnMapLoad = function() { if ( TestMapOn ) { Util.AutoTestMap(); } // Register callback functions OnTrigger( "Axis have breached the Gunsmith's door!", Map.gun_door_Destroyed ); OnTrigger( "Axis have stolen Detonator kit!", Map.detokit_Taken ); OnTrigger( "Axis have stolen Dynamite!", Map.dyno_Taken ); OnTrigger( "Allies have returned Detonator kit!", Map.detokit_Returned ); OnTrigger( "Allies have returned Dynamite!", Map.dyno_Returned ); OnTrigger( "Axis have captured the Detonator kit!", Map.detokit_Secured ); OnTrigger( "First Dynamite secured!", Map.dyno_Secured ); OnTrigger( "Second Dynamite secured!", Map.dyno_Secured ); OnTrigger( "Detonator is prepared!", Map.detokit_Built ); OnTrigger( "Detonator is prepared!", Map.detokit_Built ); OnTrigger( "Detonator turned ^1ON^w", Map.Detonator_Enabled ); OnTrigger( "Detonator turned ^1OFF^w", Map.Detonator_Disabled ); SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_deto" ); SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_deto" ); SetAvailableMapGoals( TEAM.AXIS, false, "SWITCH_jail_1" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_deto_obj_1" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_deto_obj_2" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_deto_obj_3" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_deto_obj_4" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_deto_obj_1" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_deto_obj_2" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_deto_obj_3" ); SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_deto_obj_4" ); SetAvailableMapGoals( TEAM.ALLIES, false, "SWITCH_jail_1" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_raid_1" ); SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_raid_2" ); SetGoalPriority( "BUILD_deto", 0.95 ); SetGoalPriority( "SWITCH_jail_1", 0.81 ); SetGoalPriority( "DEFEND_deto_obj_1", 0.70 ); SetGoalPriority( "DEFEND_deto_obj_2", 0.70 ); SetGoalPriority( "DEFEND_deto_obj_3", 0.70 ); SetGoalPriority( "DEFEND_deto_obj_4", 0.70 ); SetGoalPriority( "DEFEND_gun_1", 0.91 ); SetGoalPriority( "DEFEND_gun_2", 0.91 ); SetGoalPriority( "DEFEND_raid_1", 0.90 ); SetGoalPriority( "DEFEND_raid_2", 0.90 ); SetGoalPriority( "PLANT_Gunsmiths_Door", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_1", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_2", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_3", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_4", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_5", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_6", 0.91 ); SetGoalPriority( "PLANTMINE_bank_door_7", 0.91 ); //~Util.DisableGoal( ".*", true ); // all but routes //~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" ); //~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" ); // Max users per goal //Util.SetMaxUsers( 1, "DEFEND_.*" ); //Util.SetMaxUsers( 1, "GRENADE_.*" ); //Util.SetMaxUsers( 1, "MOUNTMG42_.*" ); // 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; bot.IgnoreTarget( GetGoal("MOVER_vulture_1").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_vulture_2").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_vulture_3").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_vulture_4").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_vulture_5").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_vulture_6").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_clay_counter").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_counter").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_1").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_2").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_3").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_4").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_5").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_6").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_7").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_pistol_target_8").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_piano").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_hang_lever").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_bell_hammer").GetEntity(), 9999 ); bot.IgnoreTarget( GetGoal("MOVER_bell_rope").GetEntity(), 9999 ); }; global InitializeRoutes = function() { MapRoutes = { FLAG_detokit = { }, FLAG_dyno = { }, }; Util.Routes(MapRoutes); };