#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure map_update_p_proc;
procedure map_enter_p_proc;
procedure look_at_p_proc;

import variable term5_ptr;
import variable Vree_ptr;


procedure start
begin
	if (script_action == map_enter_proc) then begin
		call map_enter_p_proc;
	end
	else begin
		if (script_action == map_update_proc) then begin
			call map_update_p_proc;
		end
		else begin
			if (script_action == look_at_proc) then begin
				call look_at_p_proc;
			end
			else begin
				if (script_action == use_proc) then begin
					if (source_obj != Vree_ptr) then begin
						display_msg(message_str(SCRIPT_TERM, 101));
					end
					else begin
						float_msg(self_obj, message_str(SCRIPT_VREE, random(300, 308)), FLOAT_MSG_YELLOW);
					end
				end
			end
		end
	end
end

procedure map_update_p_proc
begin
	term5_ptr := self_obj;
end

procedure map_enter_p_proc
begin
	term5_ptr := self_obj;
end

procedure look_at_p_proc
begin
	script_overrides;
	display_msg(message_str(SCRIPT_TERM, 100));
end