#include <define.h>

//#define NAME                    SCRIPT_

#include <command.h>
//#include <ModReact.h>



procedure start;
#include <push.h>
procedure description_p_proc;
procedure map_enter_p_proc;
procedure use_p_proc;

variable initialized1;

import variable vault_door_ptr;


procedure start
begin
	if (script_action == description_proc) then begin
		call description_p_proc;
	end
	else begin
		if (script_action == map_enter_proc) then begin
			call map_enter_p_proc;
		end
		else begin
			if (script_action == use_proc) then begin
				call use_p_proc;
			end
		end
	end
end

procedure description_p_proc
begin
	display_msg(message_str(SCRIPT_V13DOOR, 100));
end

procedure map_enter_p_proc
begin
	vault_door_ptr := self_obj;
	if (obj_is_open(self_obj)) then begin
		use_obj(self_obj);
	end
end

procedure use_p_proc
begin
	if (source_obj == dude_obj) then begin
		script_overrides;
		display_msg(message_str(SCRIPT_V13DOOR, 100));
	end
end