#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 field_change;


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
	script_overrides;
	display_msg(message_str(SCRIPT_FORCECON, 100));
end

procedure use_p_proc
begin
	field_change := "toggle";
	if (cur_map_index == MAP_MBSTRG12) then begin
		if (elevation(self_obj) == 0) then begin
			if (tile_num(self_obj) == 16308) then begin
				use_obj(map_var(0));
			end
			else begin
				if (tile_num(self_obj) == 16280) then begin
					use_obj(map_var(1));
				end
				else begin
					if (tile_num(self_obj) == 25912) then begin
						use_obj(map_var(2));
					end
					else begin
						if (tile_num(self_obj) == 25878) then begin
							use_obj(map_var(7));
						end
						else begin
							if (tile_num(self_obj) == 21664) then begin
								use_obj(map_var(8));
							end
						end
					end
				end
			end
		end
		else begin
			if (elevation(self_obj) == 1) then begin
				if (tile_num(self_obj) == 15502) then begin
					use_obj(map_var(10));
				end
				else begin
					if (tile_num(self_obj) == 26706) then begin
						use_obj(map_var(11));
					end
				end
			end
		end
	end
	else begin
		if (cur_map_index == MAP_MBVATS12) then begin
			if (elevation(self_obj) == 0) then begin
				if (tile_num(self_obj) == 17120) then begin
					use_obj(map_var(0));
				end
				else begin
					if (tile_num(self_obj) == 24326) then begin
						use_obj(map_var(1));
					end
				end
			end
		end
	end
end