#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure critter_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure map_enter_p_proc;
procedure talk_p_proc;
procedure timed_event_p_proc;
procedure use_obj_on_p_proc;
procedure Tycho01;
procedure Tycho02;
procedure Tycho03;
procedure Tycho04;
procedure Tycho05;
procedure Tycho06;
procedure Tycho07;
procedure Tycho08;
procedure Tycho09;
procedure Tycho10;
procedure Tycho11;
procedure Tycho12;
procedure Tycho13;
procedure Tycho14;
procedure Tycho15;
procedure Tycho16;
procedure Tycho17;
procedure Tycho18;
procedure Tycho19;
procedure Tycho20;
procedure Tycho21;
procedure Tycho22;
procedure Tycho23;
procedure Tycho24;
procedure Tycho25;
procedure Tycho26;
procedure Tycho27;
procedure Tycho28;
procedure Tycho29;
procedure Tycho30;
procedure Tycho31;
procedure Tycho32;
procedure follow_player;
procedure TychoEnd;
procedure TychoCombat;
procedure TychoJoins;
procedure TychoTactics;
procedure TychoClose;
procedure TychoModerate;
procedure TychoFar;
procedure sleeping;

variable night_person;
variable wake_time;
variable sleep_time;
variable home_tile;
variable sleep_tile;
variable hostile1;
variable item;
variable unwield_flag;
variable cola2_ptr;
variable prev_tile;
variable dest_tile1;
variable line08flag;

procedure Get_Reaction;
procedure React_To_Level;
procedure Level_To_React;
procedure Up_React;
procedure Down_React;
procedure Bottom_React;
procedure Top_React;
procedure Big_Up_React;
procedure Big_Down_React;
procedure Up_React_Level;
procedure Down_React_Level;
procedure Goodbyes;

variable exit_line;


procedure start
begin
	if (script_action == critter_proc) then begin
		call critter_p_proc;
	end
	else begin
		if (script_action == destroy_proc) then begin
			call destroy_p_proc;
		end
		else begin
			if (script_action == look_at_proc) then begin
				call look_at_p_proc;
			end
			else begin
				if (script_action == map_enter_proc) then begin
					call map_enter_p_proc;
				end
				else begin
					if (script_action == talk_proc) then begin
						call talk_p_proc;
					end
					else begin
						if (script_action == timed_event_proc) then begin
							call timed_event_p_proc;
						end
						else begin
							if (script_action == use_obj_on_proc) then begin
								call use_obj_on_p_proc;
							end
						end
					end
				end
			end
		end
	end
end

procedure critter_p_proc
begin
	if (hostile1) then begin
		hostile1 := 0;
		attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
	end
	else begin
		if (global_var(GVAR_HERNANDEZ_STATUS) < 2) then begin
			call sleeping;
		end
	end
end

procedure destroy_p_proc
begin
	set_global_var(GVAR_HERNANDEZ_STATUS, 3);
	if (source_obj == dude_obj) then begin
		if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) >= 25) and ((global_var(GVAR_GOOD_MONSTER) > (2 * global_var(GVAR_BAD_MONSTER))) or (global_var(GVAR_BERSERKER_REPUTATION) == 1))) then begin
			set_global_var(GVAR_BERSERKER_REPUTATION, 1);
			set_global_var(GVAR_CHAMPION_REPUTATION, 0);
		end
		if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) >= 25) and ((global_var(GVAR_BAD_MONSTER) > (3 * global_var(GVAR_GOOD_MONSTER))) or (global_var(GVAR_CHAMPION_REPUTATION) == 1))) then begin
			set_global_var(GVAR_CHAMPION_REPUTATION, 1);
			set_global_var(GVAR_BERSERKER_REPUTATION, 0);
		end
		set_global_var(GVAR_GOOD_MONSTER, global_var(GVAR_GOOD_MONSTER) + 1);
		if ((global_var(GVAR_GOOD_MONSTER) % 2) == 0) then begin
			set_global_var(GVAR_PLAYER_REPUTATION, global_var(GVAR_PLAYER_REPUTATION) - 1);
		end
	end
end

procedure look_at_p_proc
begin
	script_overrides;
	if (global_var(GVAR_HERNANDEZ_STATUS) > 0) then begin
		display_msg(message_str(SCRIPT_TYCHO, 101));
	end
	else begin
		display_msg(message_str(SCRIPT_TYCHO, 100));
	end
end

procedure map_enter_p_proc
begin
	sleep_time := 2200;
	wake_time := 1600;
	home_tile := 19690;
	sleep_tile := 7000;
	if (obj_is_carrying_obj_pid(self_obj, 106) >= 2) then begin
		cola2_ptr := obj_carrying_pid_obj(self_obj, 106);
	end
	if (global_var(GVAR_HERNANDEZ_STATUS) == 2) then begin
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 0);
		add_timer_event(self_obj, game_ticks(1), 1);
	end
	else begin
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 26);
	end
end

procedure talk_p_proc
begin
	call Get_Reaction;
	start_gdialog(SCRIPT_TYCHO, self_obj, 4, -1, -1);
	gsay_start;
	if (global_var(GVAR_HERNANDEZ_STATUS) == 3) then begin
		call Tycho28;
	end
	else begin
		if (global_var(GVAR_HERNANDEZ_STATUS) == 2) then begin
			call Tycho22;
		end
		else begin
			if (global_var(GVAR_HERNANDEZ_STATUS) == 0) then begin
				call Tycho01;
			end
			else begin
				if ((global_var(GVAR_HIRED_BY_GIZMO) == 1) and (global_var(GVAR_HIRED_BY_KILLIAN) == 0)) then begin
					call Tycho19;
				end
				else begin
					if (local_var(1) < 2) then begin
						call Tycho14;
					end
					else begin
						call Tycho15;
					end
				end
			end
		end
	end
	gsay_end;
	end_dialogue;
	if (global_var(GVAR_HERNANDEZ_STATUS) == 2) then begin
		if (global_var(GVAR_DESTROY_MASTER_10) == 0) then begin
			display_msg(message_str(SCRIPT_TYCHO, 173));
			give_exp_points(300);
			set_global_var(GVAR_DESTROY_MASTER_10, 1);
		end
	end
	if (unwield_flag == 1) then begin
		unwield_flag := 0;
		inven_unwield;
	end
end

procedure timed_event_p_proc
begin
	if (global_var(GVAR_HERNANDEZ_STATUS) == 2) then begin
		call follow_player;
	end
end

procedure use_obj_on_p_proc
begin
	if (global_var(GVAR_HERNANDEZ_STATUS) == 2) then begin
		item := obj_pid(obj_being_used_with);
		if ((item != 40) and (item != 47) and (item != 91)) then begin
			script_overrides;
			if (obj_item_subtype(obj_being_used_with) != 3) then begin
				rm_obj_from_inven(dude_obj, obj_being_used_with);
				add_obj_to_inven(self_obj, obj_being_used_with);
			end
			else begin
				if ((item == 8) or (item == 18) or (item == 143) or (item == 10) or (item == 94) or (item == 7) or (item == 21) or (item == 234) or (item == 235) or (item == 24) or (item == 16) or (item == 120) or (item == 242)) then begin
					rm_obj_from_inven(dude_obj, obj_being_used_with);
					add_obj_to_inven(self_obj, obj_being_used_with);
				end
				else begin
					float_msg(self_obj, message_str(SCRIPT_MODREACT, 109), FLOAT_MSG_GREEN);
				end
			end
		end
	end
end

procedure Tycho01
begin
	gsay_reply(SCRIPT_TYCHO, 102);
	giq_option(4, SCRIPT_TYCHO, 103, TychoEnd, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 104, Tycho02, NEUTRAL_REACTION);
	giq_option(-3, SCRIPT_TYCHO, 105, Tycho03, NEUTRAL_REACTION);
end

procedure Tycho02
begin
	if (obj_is_carrying_obj_pid(self_obj, obj_pid(cola2_ptr))) then begin
		rm_obj_from_inven(self_obj, cola2_ptr);
		add_obj_to_inven(dude_obj, cola2_ptr);
	end
	gsay_reply(SCRIPT_TYCHO, 106);
	giq_option(4, SCRIPT_TYCHO, 107, Tycho04, NEUTRAL_REACTION);
end

procedure Tycho03
begin
	gsay_message(SCRIPT_TYCHO, 108, NEUTRAL_REACTION);
end

procedure Tycho04
begin
	gsay_reply(SCRIPT_TYCHO, 109);
	giq_option(4, SCRIPT_TYCHO, 110, Tycho05, NEUTRAL_REACTION);
	giq_option(6, SCRIPT_TYCHO, 111, Tycho06, NEUTRAL_REACTION);
end

procedure Tycho05
begin
	gsay_reply(SCRIPT_TYCHO, 112);
	giq_option(4, SCRIPT_TYCHO, 113, Tycho07, NEUTRAL_REACTION);
	giq_option(6, SCRIPT_TYCHO, 114, Tycho08, NEUTRAL_REACTION);
end

procedure Tycho06
begin
	gsay_reply(SCRIPT_TYCHO, 115);
	giq_option(4, SCRIPT_TYCHO, 116, Tycho11, NEUTRAL_REACTION);
	giq_option(6, SCRIPT_TYCHO, 117, Tycho09, NEUTRAL_REACTION);
end

procedure Tycho07
begin
	gsay_reply(SCRIPT_TYCHO, 118);
	giq_option(4, SCRIPT_TYCHO, 119, Tycho11, NEUTRAL_REACTION);
end

procedure Tycho08
begin
	gsay_reply(SCRIPT_TYCHO, 120);
	if (line08flag) then begin
		call Goodbyes;
		giq_option(4, SCRIPT_TYCHO, exit_line, TychoEnd, NEUTRAL_REACTION);
	end
	else begin
		line08flag := 1;
		giq_option(4, SCRIPT_TYCHO, 121, Tycho11, NEUTRAL_REACTION);
	end
end

procedure Tycho09
begin
	gsay_reply(SCRIPT_TYCHO, 122);
	giq_option(4, SCRIPT_TYCHO, 123, Tycho10, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 116, Tycho11, NEUTRAL_REACTION);
end

procedure Tycho10
begin
	gsay_reply(SCRIPT_TYCHO, 124);
	giq_option(4, SCRIPT_TYCHO, 125, Tycho17, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 126, Tycho11, NEUTRAL_REACTION);
end

procedure Tycho11
begin
	set_global_var(GVAR_HERNANDEZ_STATUS, 1);
	gsay_reply(SCRIPT_TYCHO, 127);
	giq_option(4, SCRIPT_TYCHO, message_str(SCRIPT_TYCHO, 128) + proto_data(obj_pid(dude_obj), 1) + message_str(SCRIPT_TYCHO, 129), Tycho12, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 130, Tycho13, NEUTRAL_REACTION);
end

procedure Tycho12
begin
	call Up_React;
	gsay_message(SCRIPT_TYCHO, 131, NEUTRAL_REACTION);
end

procedure Tycho13
begin
	call Down_React;
	gsay_reply(SCRIPT_TYCHO, 132);
	giq_option(4, SCRIPT_TYCHO, 133, TychoCombat, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 134, TychoEnd, NEUTRAL_REACTION);
end

procedure Tycho14
begin
	gsay_reply(SCRIPT_TYCHO, 135);
	giq_option(4, SCRIPT_TYCHO, 136, Tycho13, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 137, Tycho08, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 138, Tycho16, NEUTRAL_REACTION);
end

procedure Tycho15
begin
	gsay_reply(SCRIPT_TYCHO, 139);
	giq_option(4, SCRIPT_TYCHO, 137, Tycho08, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 138, Tycho16, NEUTRAL_REACTION);
	if (global_var(GVAR_HIRED_BY_KILLIAN)) then begin
		giq_option(4, SCRIPT_TYCHO, 140, Tycho18, NEUTRAL_REACTION);
	end
end

procedure Tycho16
begin
	gsay_reply(SCRIPT_TYCHO, 141);
	call Goodbyes;
	giq_option(4, SCRIPT_TYCHO, exit_line, TychoEnd, NEUTRAL_REACTION);
end

procedure Tycho17
begin
	gfade_out(600);
	critter_mod_skill(dude_obj, 17, 5);
	game_time_advance(game_ticks(120));
	gsay_reply(SCRIPT_TYCHO, 142);
	gfade_in(600);
	call Goodbyes;
	giq_option(4, SCRIPT_TYCHO, exit_line, Tycho11, NEUTRAL_REACTION);
end

procedure Tycho18
begin
	if (dude_is_male) then begin
		gsay_message(SCRIPT_TYCHO, 168, GOOD_REACTION);
	end
	else begin
		gsay_message(SCRIPT_TYCHO, 169, GOOD_REACTION);
	end
	call TychoJoins;
end

procedure Tycho19
begin
	gsay_reply(SCRIPT_TYCHO, 144);
	giq_option(4, SCRIPT_TYCHO, 145, Tycho20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TYCHO, 146, Tycho21, NEUTRAL_REACTION);
	giq_option(-3, SCRIPT_TYCHO, 105, TychoEnd, NEUTRAL_REACTION);
end

procedure Tycho20
begin
	gsay_message(SCRIPT_TYCHO, 147, NEUTRAL_REACTION);
end

procedure Tycho21
begin
	call Down_React;
	gsay_message(SCRIPT_TYCHO, 148, NEUTRAL_REACTION);
end

procedure Tycho22
begin
	gsay_reply(SCRIPT_TYCHO, 149);
	if (cur_map_index == MAP_FOOT) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho23, GOOD_REACTION);
	end
	if (cur_map_index == MAP_GLOWENT) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho25, GOOD_REACTION);
	end
	if (cur_map_index == MAP_DETHCLAW) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho26, GOOD_REACTION);
	end
	if (cur_map_index == MAP_HALLDED) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho30, GOOD_REACTION);
	end
	if (cur_map_index == MAP_MBSTRG12) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho31, GOOD_REACTION);
	end
	if (cur_map_index == MAP_MBVATS12) then begin
		giq_option(4, SCRIPT_TYCHO, 150, Tycho32, GOOD_REACTION);
	end
	giq_option(4, SCRIPT_TYCHO, 151, Tycho24, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 159, TychoTactics, GOOD_REACTION);
	giq_option(4, SCRIPT_IAN, 200, Tycho29, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 164, Tycho27, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 166, TychoEnd, GOOD_REACTION);
end

procedure Tycho23
begin
	gsay_message(SCRIPT_TYCHO, 152, GOOD_REACTION);
end

procedure Tycho24
begin
	rm_timer_event(self_obj);
	party_remove(self_obj);
	set_global_var(GVAR_HERNANDEZ_STATUS, 3);
	gsay_message(SCRIPT_TYCHO, 153, GOOD_REACTION);
end

procedure Tycho25
begin
	gsay_message(SCRIPT_TYCHO, 154, GOOD_REACTION);
end

procedure Tycho26
begin
	gsay_message(SCRIPT_TYCHO, 155, GOOD_REACTION);
end

procedure Tycho27
begin
	gsay_message(SCRIPT_TYCHO, 165, GOOD_REACTION);
end

procedure Tycho28
begin
	gsay_reply(SCRIPT_TYCHO, 170);
	giq_option(4, SCRIPT_TYCHO, 171, TychoJoins, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 172, TychoEnd, NEUTRAL_REACTION);
	giq_option(-3, SCRIPT_TYCHO, 105, TychoEnd, NEUTRAL_REACTION);
end

procedure Tycho29
begin
	gsay_message(SCRIPT_IAN, 201, GOOD_REACTION);
	unwield_flag := 1;
	call Tycho22;
end

procedure Tycho30
begin
	gsay_message(SCRIPT_TYCHO, 158, GOOD_REACTION);
end

procedure Tycho31
begin
	gsay_message(SCRIPT_TYCHO, 157, GOOD_REACTION);
end

procedure Tycho32
begin
	gsay_message(SCRIPT_TYCHO, 156, GOOD_REACTION);
end

procedure follow_player
begin
	variable LVar0 := 0;
	prev_tile := dest_tile1;
	LVar0 := (has_trait(1, dude_obj, 10) + random(2, 4)) % 6;
	dest_tile1 := tile_num_in_direction(tile_num(dude_obj), LVar0, (global_var(GVAR_DESTROY_VATS_6) * 2) + random(1, 2));
	if ((tile_distance_objs(self_obj, dude_obj) > ((global_var(GVAR_DESTROY_VATS_6) + 1) * 2)) or (random(0, 3) == 3)) then begin
		if (tile_distance(prev_tile, tile_num(dude_obj)) > tile_distance(dest_tile1, tile_num(dude_obj))) then begin
			if (tile_distance_objs(self_obj, dude_obj) > 8) then begin
				animate_move_obj_to_tile(self_obj, dest_tile1, ANIMATE_RUN bwor 16);
			end
			else begin
				animate_move_obj_to_tile(self_obj, dest_tile1, ANIMATE_WALK bwor 16);
			end
		end
		else begin
			if (tile_distance_objs(self_obj, dude_obj) > 8) then begin
				animate_move_obj_to_tile(self_obj, dest_tile1, ANIMATE_RUN);
			end
			else begin
				animate_move_obj_to_tile(self_obj, dest_tile1, ANIMATE_WALK);
			end
		end
	end
	add_timer_event(self_obj, game_ticks(1), 1);
end

procedure TychoEnd
begin
end

procedure TychoCombat
begin
	hostile1 := 1;
end

procedure TychoJoins
begin
	set_global_var(GVAR_HERNANDEZ_STATUS, 2);
	critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 0);
	party_add(self_obj);
	add_timer_event(self_obj, game_ticks(1), 1);
end

procedure TychoTactics
begin
	gsay_reply(SCRIPT_TYCHO, 160);
	giq_option(4, SCRIPT_TYCHO, 161, TychoClose, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 162, TychoModerate, GOOD_REACTION);
	giq_option(4, SCRIPT_TYCHO, 163, TychoFar, GOOD_REACTION);
end

procedure TychoClose
begin
	set_global_var(GVAR_DESTROY_VATS_6, 0);
end

procedure TychoModerate
begin
	set_global_var(GVAR_DESTROY_VATS_6, 1);
end

procedure TychoFar
begin
	set_global_var(GVAR_DESTROY_VATS_6, 2);
end

procedure sleeping
begin
	if (local_var(4) == 1) then begin
		if (not(night_person) and (game_time_hour >= wake_time) and (game_time_hour < sleep_time) or (night_person and ((game_time_hour >= wake_time) or (game_time_hour < sleep_time)))) then begin
			if (((game_time_hour - wake_time) < 10) and ((game_time_hour - wake_time) > 0)) then begin
				if (tile_num(self_obj) != home_tile) then begin
					animate_move_obj_to_tile(self_obj, home_tile, ANIMATE_WALK);
				end
				else begin
					set_local_var(4, 0);
				end
			end
			else begin
				move_to(self_obj, home_tile, elevation(self_obj));
				if (tile_num(self_obj) == home_tile) then begin
					set_local_var(4, 0);
				end
			end
		end
	end
	else begin
		if (night_person and (game_time_hour >= sleep_time) and (game_time_hour < wake_time) or (not(night_person) and ((game_time_hour >= sleep_time) or (game_time_hour < wake_time)))) then begin
			if (((game_time_hour - sleep_time) < 10) and ((game_time_hour - sleep_time) > 0)) then begin
				if (tile_num(self_obj) != sleep_tile) then begin
					animate_move_obj_to_tile(self_obj, self_obj, ANIMATE_WALK);
				end
				else begin
					set_local_var(4, 1);
				end
			end
			else begin
				if (tile_num(self_obj) != sleep_tile) then begin
					move_to(self_obj, sleep_tile, elevation(self_obj));
				end
				else begin
					set_local_var(4, 1);
				end
			end
		end
	end
end

procedure Get_Reaction
begin
	if (local_var(2) == 0) then begin
		set_local_var(0, 50);
		set_local_var(1, 2);
		set_local_var(2, 1);
		set_local_var(0, local_var(0) + (5 * get_critter_stat(dude_obj, 3)) - 25);
		set_local_var(0, local_var(0) + (10 * has_trait(0, dude_obj, 10)));
		if (has_trait(0, dude_obj, 39)) then begin
			if (global_var(GVAR_PLAYER_REPUTATION) > 0) then begin
				set_local_var(0, local_var(0) + global_var(GVAR_PLAYER_REPUTATION));
			end
			else begin
				set_local_var(0, local_var(0) - global_var(GVAR_PLAYER_REPUTATION));
			end
		end
		else begin
			if (local_var(3) == 1) then begin
				set_local_var(0, local_var(0) - global_var(GVAR_PLAYER_REPUTATION));
			end
			else begin
				set_local_var(0, local_var(0) + global_var(GVAR_PLAYER_REPUTATION));
			end
		end
		if (global_var(GVAR_CHILDKILLER_REPUTATION) > 2) then begin
			set_local_var(0, local_var(0) - 30);
		end
		if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) >= 25) and ((global_var(GVAR_BAD_MONSTER) > (3 * global_var(GVAR_GOOD_MONSTER))) or (global_var(GVAR_CHAMPION_REPUTATION) == 1))) then begin
			set_local_var(0, local_var(0) + 20);
		end
		if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) >= 25) and ((global_var(GVAR_GOOD_MONSTER) > (2 * global_var(GVAR_BAD_MONSTER))) or (global_var(GVAR_BERSERKER_REPUTATION) == 1))) then begin
			set_local_var(0, local_var(0) - 20);
		end
		call React_To_Level;
	end
end

procedure React_To_Level
begin
	if (local_var(0) <= 25) then begin
		set_local_var(1, 1);
	end
	else begin
		if (local_var(0) <= 75) then begin
			set_local_var(1, 2);
		end
		else begin
			set_local_var(1, 3);
		end
	end
end

procedure Level_To_React
begin
	if (local_var(1) == 1) then begin
		set_local_var(0, random(1, 25));
	end
	else begin
		if (local_var(1) == 2) then begin
			set_local_var(0, random(26, 75));
		end
		else begin
			set_local_var(0, random(76, 100));
		end
	end
end

procedure Up_React
begin
	set_local_var(0, local_var(0) + 10);
	call React_To_Level;
end

procedure Down_React
begin
	set_local_var(0, local_var(0) - 10);
	call React_To_Level;
end

procedure Bottom_React
begin
	set_local_var(1, 1);
	set_local_var(0, 1);
end

procedure Top_React
begin
	set_local_var(0, 100);
	set_local_var(1, 3);
end

procedure Big_Up_React
begin
	set_local_var(0, local_var(0) + 25);
	call React_To_Level;
end

procedure Big_Down_React
begin
	set_local_var(0, local_var(0) - 25);
	call React_To_Level;
end

procedure Up_React_Level
begin
	set_local_var(1, local_var(1) + 1);
	if (local_var(1) > 3) then begin
		set_local_var(1, 3);
	end
	call Level_To_React;
end

procedure Down_React_Level
begin
	set_local_var(1, local_var(1) - 1);
	if (local_var(1) < 1) then begin
		set_local_var(1, 1);
	end
	call Level_To_React;
end

procedure Goodbyes
begin
	exit_line := message_str(SCRIPT_MODREACT, random(100, 105));
end