#include <define.h>

//#define NAME                    SCRIPT_

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



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

variable Only_Once := 1;
variable spot1 := 17120;
variable field1;
variable swtch;

import variable contpan;
import variable Psy_Field_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
	end
	if (script_action == use_proc) then begin
		if (local_var(0)) then begin
			set_obj_visibility(Psy_Field_Ptr, 0);
			set_map_var(6, 0);
			set_local_var(0, 0);
		end
		else begin
			set_obj_visibility(Psy_Field_Ptr, 1);
			set_map_var(6, 1);
			set_local_var(0, 1);
		end
	end
	if (script_action == look_at_proc) then begin
		call look_at_p_proc;
	end
	if (script_action == map_exit_proc) then begin
	end
end

procedure look_at_p_proc
begin
	script_overrides;
end

procedure map_enter_p_proc
begin
	contpan := self_obj;
end

procedure map_update_p_proc
begin
	contpan := self_obj;
end