#include <define.h>

//#define NAME                    SCRIPT_

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



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

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 == use_proc) then begin
			call use_p_proc;
		end
	end
end

procedure description_p_proc
begin
	display_msg(message_str(SCRIPT_V13COMP, 103));
end

procedure use_p_proc
begin
	script_overrides;
	if ((game_time / (10 * 60 * 60 * 24)) == 0) then begin
		if (local_var(0)) then begin
			display_msg(message_str(SCRIPT_V13COMP, 101));
			float_msg(self_obj, message_str(SCRIPT_V13COMP, 102), FLOAT_MSG_NORMAL);
		end
		else begin
			display_msg(message_str(SCRIPT_V13COMP, 100));
			set_local_var(0, 1);
		end
		play_sfx("SLDOORSO");
	end
	else begin
		use_obj(vault_door_ptr);
	end
end