/*
Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.
*/
/*
Name: Broken Hills Village
Location: Broken Hills
Description: This is the Map Script for the Village of Broken Hills
Log:
Created: July 2, 1998
Updated:
*/
/* Include Files */
/* Note, the Following Lines need to be in this order so that
the script will be compilable. The define Name is referenced
in a module from define.h and used in command.h. Please do
not change the ordering.
-rwh2 11/13/97
*/
#include "..\headers\define.h"
#include "..\headers\broken.h"
#include "..\headers\broken1.h"
#include "..\headers\broken2.h"
#include "..\headers\updatmap.h"
#define NAME SCRIPT_BROKEN1
#include "..\headers\command.h"
procedure start;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure map_exit_p_proc;
export variable broken_hills_liz_box;
export variable broken_hills_jacob_box;
export variable broken_hills_doc_box;
export variable broken_hills_outfitter_box;
export variable broken_hills_temp_box;
export variable Jacob_Ptr;
export variable Aileen_Ptr;
export variable Manson_Ptr;
export variable Frank_Ptr;
export variable Phil_Ptr;
export variable Jail_Door_1;
export variable Jail_Door_2;
export variable Female_Mutant;
export variable Guard_Ptr;
variable k;
/*
variable cow_ptr;
variable cow_hex;
variable smiley_ptr;
variable smiley_hex;
*/
procedure start begin
end
procedure map_enter_p_proc begin
override_map_start_hex(17947,0,3);
if (map_first_run) then begin
display_msg(mstr(100));
end
if ((map_var(MVAR_Made_Car) == 0) and (global_var(GVAR_PLAYER_GOT_CAR) != 0) and (car_current_town == AREA_BROKEN_HILLS)) then begin
set_map_var(MVAR_Made_Car,1);
Create_Car(CAR_BROKEN_HILLS_HEX,CAR_BROKEN_HILLS_ELEV)
end
else if ((map_var(MVAR_Made_Car) == 1) and (car_current_town != AREA_BROKEN_HILLS)) then begin
set_map_var(MVAR_Made_Car,0);
Dest_Car(CAR_BROKEN_HILLS_HEX,CAR_BROKEN_HILLS_ELEV)
end
/*
if (global_var(GVAR_SMILEY_SUCCESS) == 1) then begin
// if (1) then begin
set_global_var(GVAR_SMILEY_SUCCESS,2);
debug_msg("Making Smiley");
smiley_ptr := create_object_sid(PID_MALE_TRAPPER,0,0,SCRIPT_KCSMILEY);
critter_add_trait(smiley_ptr,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_TOUGH_CITIZEN);
smiley_hex := 23686; //try to put him somewhere in buckner house
critter_attempt_placement(smiley_ptr,smiley_hex, 0);
end
if (global_var(GVAR_RUSTLE_SUCCESS) == 1) then begin
set_global_var(GVAR_RUSTLE_SUCCESS,2);
k := MAX_BRAHMIN - global_var(GVAR_TORR_BRAHMIN_KILLED);
debug_msg("Making cows"+k);
cow_ptr := create_object_sid(PID_BRAHMIN,0,0,SCRIPT_ACBRAHMN);
critter_add_trait(cow_ptr,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_GENERIC_BRAHMIN);
cow_hex := 12093;
critter_attempt_placement(cow_ptr,cow_hex, 0);
if (k > 1) then begin
cow_ptr := create_object_sid(PID_BRAHMIN,0,0,SCRIPT_ACBRAHMN);
critter_add_trait(cow_ptr,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_GENERIC_BRAHMIN);
cow_hex := 11700;
critter_attempt_placement(cow_ptr,cow_hex, 0);
end
if (k > 2) then begin
cow_ptr := create_object_sid(PID_BRAHMIN,0,0,SCRIPT_ACBRAHMN);
critter_add_trait(cow_ptr,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_GENERIC_BRAHMIN);
cow_hex := 12483;
critter_attempt_placement(cow_ptr,cow_hex, 0);
end
if (k > 3) then begin
cow_ptr := create_object_sid(PID_BRAHMIN,0,0,SCRIPT_ACBRAHMN);
critter_add_trait(cow_ptr,TRAIT_OBJECT,OBJECT_AI_PACKET,AI_GENERIC_BRAHMIN);
cow_hex := 13100;
critter_attempt_placement(cow_ptr,cow_hex, 0);
end
end //rustle_success
*/
if( elevation( dude_obj ) == 0 ) then
Lighting;
else
Basement_Lighting;
set_global_var(GVAR_LOAD_MAP_INDEX,0);
end
procedure map_update_p_proc begin
if( elevation( dude_obj ) == 0 ) then
Lighting;
else
Basement_Lighting;
end
procedure map_exit_p_proc begin
set_map_var( MVAR_Came_From_Broken2, 0 );
end