#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure critter_p_proc;
procedure damage_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure map_enter_p_proc;
procedure map_update_p_proc;
procedure talk_p_proc;
procedure Trish0;
procedure Trish1;
procedure Trish2;
procedure Trish3;
procedure Trish4;
procedure Trish5;
procedure Trish6;
procedure Trish6a;
procedure Trish7;
procedure Trish8;
procedure Trish9;
procedure Trish10;
procedure Trish11;
procedure Trish12;
procedure Trish13;
procedure Trish14;
procedure Trish15;
procedure Trish16;
procedure Trish17;
procedure Trish18;
procedure Trish19;
procedure Trish20;
procedure Trish21;
procedure Trish22;
procedure Trish23;
procedure Trish24;
procedure Trish25;
procedure Trish26;
procedure Trish27;
procedure Trish28;
procedure Trish29;
procedure TrishEnd;
procedure TrishCola;
procedure TrishBeer;
procedure TrishBooze;
procedure sleeping;

variable night_person;
variable wake_time;
variable sleep_time;
variable home_tile;
variable sleep_tile;
variable initialized1;

import variable Trish_ptr;

variable item;

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 == map_update_proc) then begin
						call map_update_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
								dialogue_system_enter;
							end
						end
					end
				end
			end
		end
	end
end

procedure critter_p_proc
begin
	if (cur_map_index == MAP_JUNKKILL) then begin
		if (obj_can_hear_obj(self_obj, dude_obj)) then begin
			if (not((global_var(GVAR_TRISH_STATUS) bwand 1) or (global_var(GVAR_TRISH_STATUS) bwand 4))) then begin
				anim(self_obj, 37, 0);
				set_local_var(4, 0);
				add_timer_event(self_obj, game_ticks(5), 1);
			end
		end
	end
	if (global_var(GVAR_TRISH_STATUS) bwand 32) then begin
		destroy_object(self_obj);
	end
	else begin
		call sleeping;
	end
	if (cur_map_index == MAP_JUNKCSNO) then begin
		if (obj_can_see_obj(self_obj, dude_obj)) then begin
			if ((map_var(0) == 1) and (map_var(1) == 1) and (tile_distance_objs(self_obj, dude_obj) < 12)) then begin
				dialogue_system_enter;
			end
		end
		if ((game_time_hour > (wake_time + 20)) or (game_time_hour < sleep_time)) then begin
			if (tile_num(self_obj) != home_tile) then begin
				if ((global_var(GVAR_DESTROY_VATS_10) == 0) or (global_var(GVAR_BUST_SKULZ) == 2)) then begin
					animate_move_obj_to_tile(self_obj, home_tile, ANIMATE_WALK);
				end
			end
		end
	end
	if (global_var(GVAR_ENEMY_JUNKTOWN) == 1) then begin
		if (obj_can_see_obj(self_obj, dude_obj)) then begin
			attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
		end
	end
end

procedure damage_p_proc
begin
	if (source_obj == dude_obj) then begin
		set_global_var(GVAR_ENEMY_JUNKTOWN, 1);
	end
end

procedure destroy_p_proc
begin
	if (source_obj == dude_obj) then begin
		set_global_var(GVAR_ENEMY_JUNKTOWN, 1);
		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
	set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 32);
end

procedure look_at_p_proc
begin
	script_overrides;
	if ((global_var(GVAR_TRISH_STATUS) bwand 1) or (global_var(GVAR_TRISH_STATUS) bwand 4)) then begin
		display_msg(message_str(SCRIPT_TRISH, 100));
	end
	else begin
		display_msg(message_str(SCRIPT_TRISH, 167));
	end
end

procedure map_enter_p_proc
begin
	night_person := 1;
	Trish_ptr := self_obj;
	critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 26);
	if (cur_map_index == MAP_JUNKCSNO) then begin
		sleep_tile := 7000;
		home_tile := 20083;
	end
	else begin
		sleep_tile := 16297;
		home_tile := 19960;
	end
	sleep_time := 330;
	wake_time := 1400;
end

procedure map_update_p_proc
begin
	if (global_var(GVAR_TRISH_STATUS) bwand 32) then begin
		destroy_object(self_obj);
	end
end

procedure talk_p_proc
begin
	call Get_Reaction;
	if (local_var(4)) then begin
		float_msg(self_obj, message_str(SCRIPT_TRISH, 151), FLOAT_MSG_NORMAL);
	end
	else begin
		if (cur_map_index == MAP_JUNKKILL) then begin
			if (not((global_var(GVAR_TRISH_STATUS) bwand 1) or (global_var(GVAR_TRISH_STATUS) bwand 4))) then begin
				call Trish0;
			end
			else begin
				if ((global_var(GVAR_TRISH_STATUS) bwand 4) and not(global_var(GVAR_TRISH_STATUS) bwand 1)) then begin
					call Trish11;
				end
				else begin
					if ((global_var(GVAR_SAUL_STATUS) == 3) and not(local_var(7))) then begin
						call Trish17;
					end
					else begin
						if ((global_var(GVAR_SAUL_STATUS) == 1) and not(local_var(5))) then begin
							call Trish3;
						end
						else begin
							if ((global_var(GVAR_TRISH_STATUS) bwand 8) and not(local_var(6))) then begin
								call Trish16;
							end
							else begin
								call Trish15;
							end
						end
					end
				end
			end
		end
		else begin
			if ((game_time_hour >= 1300) and (game_time_hour < 1600)) then begin
				float_msg(self_obj, message_str(SCRIPT_TRISH, 152), FLOAT_MSG_NORMAL);
			end
			else begin
				call Trish25;
			end
		end
	end
	if (not(global_var(GVAR_TRISH_STATUS) bwand 16) and (global_var(GVAR_TRISH_STATUS) bwand 8)) then begin
		set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 16);
		display_msg(message_str(SCRIPT_TRISH, 173));
		set_global_var(GVAR_PLAYER_REPUTATION, global_var(GVAR_PLAYER_REPUTATION) + 2);
		give_exp_points(250);
	end
end

procedure Trish0
begin
	start_gdialog(SCRIPT_TRISH, self_obj, 4, -1, -1);
	gsay_start;
	if (not(global_var(GVAR_TRISH_STATUS) bwand 1)) then begin
		set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 1);
	end
	gsay_reply(SCRIPT_TRISH, 101);
	giq_option(-3, SCRIPT_TRISH, 102, Trish1, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 103, Trish2, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 104, TrishEnd, NEUTRAL_REACTION);
	gsay_end;
	end_dialogue;
end

procedure Trish1
begin
	gsay_message(SCRIPT_TRISH, 105, NEUTRAL_REACTION);
end

procedure Trish2
begin
	gsay_message(SCRIPT_TRISH, 106, NEUTRAL_REACTION);
end

procedure Trish3
begin
	start_gdialog(SCRIPT_TRISH, self_obj, 4, -1, -1);
	gsay_start;
	set_local_var(5, 1);
	gsay_reply(SCRIPT_TRISH, 107);
	giq_option(-3, SCRIPT_TRISH, 108, Trish1, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 109, Trish2, NEUTRAL_REACTION);
	giq_option(5, SCRIPT_TRISH, 110, Trish4, NEUTRAL_REACTION);
	gsay_end;
	end_dialogue;
end

procedure Trish4
begin
	gsay_reply(SCRIPT_TRISH, 111);
	giq_option(5, SCRIPT_TRISH, 112, Trish5, NEUTRAL_REACTION);
	giq_option(5, SCRIPT_TRISH, 113, Trish6, NEUTRAL_REACTION);
end

procedure Trish5
begin
	gsay_reply(SCRIPT_TRISH, 114);
	giq_option(5, SCRIPT_TRISH, 115, Trish9, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_TRISH, 116, Trish10, NEUTRAL_REACTION);
end

procedure Trish6
begin
	gsay_reply(SCRIPT_TRISH, 117);
	giq_option(5, SCRIPT_TRISH, 118, Trish6a, NEUTRAL_REACTION);
	giq_option(5, SCRIPT_TRISH, 119, Trish7, NEUTRAL_REACTION);
	giq_option(6, SCRIPT_TRISH, 169, Trish8, NEUTRAL_REACTION);
end

procedure Trish6a
begin
	call Down_React;
	call Trish7;
end

procedure Trish7
begin
	gsay_message(SCRIPT_TRISH, 120, NEUTRAL_REACTION);
end

procedure Trish8
begin
	variable LVar0 := 0;
	LVar0 := message_str(SCRIPT_TRISH, 121);
	if (not(global_var(GVAR_GIZMO_DEAD))) then begin
		LVar0 := LVar0 + message_str(SCRIPT_TRISH, 168);
	end
	gsay_message(SCRIPT_TRISH, LVar0, GOOD_REACTION);
	set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 8);
end

procedure Trish9
begin
	gsay_reply(SCRIPT_TRISH, 122);
	giq_option(5, SCRIPT_TRISH, 123, Trish8, NEUTRAL_REACTION);
	giq_option(5, SCRIPT_TRISH, 124, Trish7, NEUTRAL_REACTION);
end

procedure Trish10
begin
	gsay_reply(SCRIPT_TRISH, 125);
	giq_option(5, SCRIPT_TRISH, 126, Trish8, NEUTRAL_REACTION);
end

procedure Trish11
begin
	if (not(global_var(GVAR_TRISH_STATUS) bwand 1)) then begin
		set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 1);
	end
	start_gdialog(SCRIPT_TRISH, self_obj, 4, -1, -1);
	gsay_start;
	gsay_reply(SCRIPT_TRISH, 127);
	giq_option(-3, SCRIPT_TRISH, 128, Trish7, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 129, Trish12, NEUTRAL_REACTION);
	giq_option(5, SCRIPT_TRISH, 130, Trish13, NEUTRAL_REACTION);
	gsay_end;
	end_dialogue;
end

procedure Trish12
begin
	call Down_React;
	gsay_message(SCRIPT_TRISH, 131, NEUTRAL_REACTION);
end

procedure Trish13
begin
	gsay_reply(SCRIPT_TRISH, 132);
	giq_option(5, SCRIPT_TRISH, 133, TrishEnd, NEUTRAL_REACTION);
end

procedure Trish14
begin
	float_msg(self_obj, message_str(SCRIPT_TRISH, random(134, 136)), FLOAT_MSG_NORMAL);
end

procedure Trish15
begin
	float_msg(self_obj, message_str(SCRIPT_TRISH, 137), FLOAT_MSG_NORMAL);
end

procedure Trish16
begin
	set_local_var(6, 1);
	float_msg(self_obj, message_str(SCRIPT_TRISH, 138), FLOAT_MSG_NORMAL);
end

procedure Trish17
begin
	set_local_var(7, 1);
	float_msg(self_obj, message_str(SCRIPT_TRISH, 139), FLOAT_MSG_NORMAL);
end

procedure Trish18
begin
	set_local_var(8, 1);
	gsay_reply(SCRIPT_TRISH, 140);
	giq_option(-3, SCRIPT_TRISH, 141, TrishEnd, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 142, TrishEnd, NEUTRAL_REACTION);
	giq_option(6, SCRIPT_TRISH, 143, Trish19, NEUTRAL_REACTION);
end

procedure Trish19
begin
	gsay_reply(SCRIPT_TRISH, 144);
	giq_option(6, SCRIPT_TRISH, 145, Trish20, NEUTRAL_REACTION);
	if (not(global_var(GVAR_GIZMO_STATUS) == 3)) then begin
		giq_option(6, SCRIPT_TRISH, 146, Trish21, NEUTRAL_REACTION);
	end
	if ((local_var(12) == 0) and (global_var(GVAR_TRISH_STATUS) bwand 2)) then begin
		giq_option(6, SCRIPT_TRISH, 147, Trish22, NEUTRAL_REACTION);
	end
	giq_option(6, SCRIPT_TRISH, 148, TrishEnd, NEUTRAL_REACTION);
end

procedure Trish20
begin
	set_local_var(10, 1);
	gsay_reply(SCRIPT_TRISH, 149);
	call Trish24;
end

procedure Trish21
begin
	variable LVar0 := 0;
	set_local_var(11, 1);
	LVar0 := message_str(SCRIPT_TRISH, 154);
	if (not(global_var(GVAR_KILLIAN_DEAD))) then begin
		LVar0 := LVar0 + message_str(SCRIPT_TRISH, 155);
	end
	gsay_reply(SCRIPT_TRISH, LVar0);
	call Trish24;
end

procedure Trish22
begin
	set_local_var(12, 1);
	gsay_reply(SCRIPT_TRISH, 158);
	call Trish24;
end

procedure Trish23
begin
	if (global_var(GVAR_GIZMO_STATUS) == 3) then begin
		gsay_reply(SCRIPT_TRISH, 162);
	end
	else begin
		gsay_reply(SCRIPT_TRISH, 163);
	end
	call Trish24;
end

procedure Trish24
begin
	if (not(local_var(10))) then begin
		giq_option(6, SCRIPT_TRISH, 145, Trish20, NEUTRAL_REACTION);
	end
	if (not(local_var(11))) then begin
		if (not(global_var(GVAR_GIZMO_DEAD))) then begin
			giq_option(6, SCRIPT_TRISH, 146, Trish21, NEUTRAL_REACTION);
		end
	end
	if ((local_var(12) == 0) and (global_var(GVAR_TRISH_STATUS) bwand 2)) then begin
		giq_option(6, SCRIPT_TRISH, 147, Trish22, NEUTRAL_REACTION);
	end
	giq_option(6, SCRIPT_TRISH, 148, TrishEnd, NEUTRAL_REACTION);
end

procedure Trish25
begin
	start_gdialog(SCRIPT_TRISH, self_obj, 4, -1, -1);
	gsay_start;
	if (not(global_var(GVAR_TRISH_STATUS) bwand 4)) then begin
		set_global_var(GVAR_TRISH_STATUS, global_var(GVAR_TRISH_STATUS) + 4);
	end
	gsay_reply(SCRIPT_TRISH, 156);
	giq_option(4, SCRIPT_TRISH, 157, Trish26, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 159, Trish27, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 153, TrishEnd, NEUTRAL_REACTION);
	giq_option(-3, SCRIPT_TRISH, 170, Trish28, NEUTRAL_REACTION);
	gsay_end;
	end_dialogue;
end

procedure Trish26
begin
	gsay_reply(SCRIPT_TRISH, 161);
	giq_option(4, SCRIPT_TRISH, 164, TrishCola, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 165, TrishBeer, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 166, TrishBooze, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_TRISH, 153, TrishEnd, NEUTRAL_REACTION);
end

procedure Trish27
begin
	if (local_var(1) < 2) then begin
		gsay_message(SCRIPT_TRISH, 160, BAD_REACTION);
	end
	else begin
		call Trish19;
	end
end

procedure Trish28
begin
	gsay_message(SCRIPT_TRISH, 171, NEUTRAL_REACTION);
end

procedure Trish29
begin
	float_msg(self_obj, message_str(SCRIPT_TRISH, 140), FLOAT_MSG_NORMAL);
	display_msg(message_str(SCRIPT_TRISH, 172));
	give_exp_points(250);
	call Big_Up_React;
	set_map_var(1, 0);
	set_map_var(0, 0);
end

procedure TrishEnd
begin
end

procedure TrishCola
begin
	if (item_caps_total(dude_obj) >= 3) then begin
		item_caps_adjust(dude_obj, -3);
		item := create_object_sid(106, 0, 0, -1);
		add_obj_to_inven(dude_obj, item);
		gsay_message(SCRIPT_TRISH, 174, NEUTRAL_REACTION);
	end
end

procedure TrishBeer
begin
	if (item_caps_total(dude_obj) >= 5) then begin
		item_caps_adjust(dude_obj, -5);
		item := create_object_sid(124, 0, 0, -1);
		add_obj_to_inven(dude_obj, item);
		gsay_message(SCRIPT_TRISH, 174, NEUTRAL_REACTION);
	end
end

procedure TrishBooze
begin
	if (item_caps_total(dude_obj) >= 20) then begin
		item_caps_adjust(dude_obj, -20);
		item := create_object_sid(125, 0, 0, -1);
		add_obj_to_inven(dude_obj, item);
		gsay_message(SCRIPT_TRISH, 174, NEUTRAL_REACTION);
	end
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