#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure do_dialogue;
procedure social_skills;
procedure slummer00;
procedure slummer01;
procedure slummer02;
procedure slummer03;
procedure slummer03a;
procedure slummer04;
procedure slummer04a;
procedure slummer05;
procedure slummer06;
procedure slummer07;
procedure slummer07a;
procedure slummer08;
procedure slummer09;
procedure slummer10;
procedure slummer10a;
procedure slummer11;
procedure slummer12;
procedure slummer13;
procedure slummer13a;
procedure slummer13b;
procedure slummer13c;
procedure slummer14;
procedure slummer15;
procedure slummer16;
procedure slummer17;
procedure slummer17a;
procedure slummer18;
procedure slummer19;
procedure slummer19a;
procedure slummer20;
procedure slummer21;
procedure slummer21a;
procedure slummer22;
procedure slummer23;
procedure slummer24;
procedure slummer25;
procedure slummer25a;
procedure slummer26;
procedure slummer26a;
procedure slummer27;
procedure slummer28;
procedure slummer29;
procedure slummer30;
procedure slummer31;
procedure slummer32;
procedure slummer33;
procedure slummer34;
procedure slummer35;
procedure slummer36;
procedure slummer36a;
procedure slummer36b;
procedure slummer37;
procedure slummer38a;
procedure slummer38;
procedure slummer39;
procedure slummer40;
procedure slummer41;
procedure slummer42;
procedure slummer43;
procedure slummer44;
procedure slummer45;
procedure slummer46;
procedure slummer47;
procedure slummer48;
procedure slummer49;
procedure slummer50;
procedure slummer51;
procedure slummer51a;
procedure slummer52;
procedure slummer52a;
procedure slummer53;
procedure slummer54;
procedure slummer54a;
procedure slummer55;
procedure slummer56;
procedure slummer57;
procedure slummer58;
procedure slummer59;
procedure slummer60;
procedure slummer61;
procedure slummer62;
procedure slummer63;
procedure slummer64;
procedure slummer65;
procedure slummer65a;
procedure slummer66;
procedure slummer67;
procedure slummerdone;
procedure slummerend;
procedure slummercombat;
procedure weapon_check;

variable hostile1;
variable armed;
variable LASHERKNOWN;
variable Only_Once := 1;

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 (Only_Once) then begin
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, 20);
		critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_AI_PACKET, AI_CHILDREN_TRUE);
		Only_Once := 0;
	end
	if (script_action == talk_proc) then begin
		call do_dialogue;
	end
	else begin
		if ((script_action == look_at_proc) or (script_action == description_proc)) then begin
			script_overrides;
			display_msg(message_str(SCRIPT_SLUMMER, 100));
		end
		else begin
			if (script_action == destroy_proc) then begin
				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_BAD_MONSTER, global_var(GVAR_BAD_MONSTER) + 1);
					if ((global_var(GVAR_BAD_MONSTER) % 6) == 0) then begin
						set_global_var(GVAR_PLAYER_REPUTATION, global_var(GVAR_PLAYER_REPUTATION) + 1);
					end
				end
			end
			else begin
				if (script_action == pickup_proc) then begin
					hostile1 := 1;
				end
				else begin
					if (script_action == critter_proc) then begin
						if (hostile1) then begin
							hostile1 := 0;
							attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
						end
					end
				end
			end
		end
	end
end

procedure do_dialogue
begin
	call Get_Reaction;
	call weapon_check;
	start_gdialog(-1, self_obj, 4, -1, -1);
	gsay_start;
	if (obj_pid(critter_inven_obj(dude_obj, 0)) == 113) then begin
		if (local_var(4) == 0) then begin
			if (armed == 1) then begin
				call slummer02;
			end
			else begin
				call slummer03;
			end
		end
		else begin
			set_local_var(4, 1);
			call slummer01;
		end
	end
	else begin
		set_local_var(4, 1);
		if (global_var(GVAR_CATHEDRAL_ENEMY) == 1) then begin
			call slummer00;
		end
		else begin
			if (armed == 1) then begin
				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
					call slummer04;
				end
				else begin
					if ((global_var(GVAR_CHILDKILLER_REPUTATION) > 2) or (((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
						call slummer06;
					end
					else begin
						call slummer05;
					end
				end
			end
			else begin
				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
					call slummer07;
				end
				else begin
					if ((global_var(GVAR_CHILDKILLER_REPUTATION) > 2) or (((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
						call slummer09;
					end
					else begin
						call slummer08;
					end
				end
			end
		end
	end
	gsay_end;
	end_dialogue;
end

procedure social_skills
begin
	script_overrides;
	call Get_Reaction;
	call do_dialogue;
end

procedure slummer00
begin
	gsay_message(SCRIPT_SLUMMER, 101, NEUTRAL_REACTION);
end

procedure slummer01
begin
	gsay_message(SCRIPT_SLUMMER, 102, NEUTRAL_REACTION);
end

procedure slummer02
begin
	gsay_reply(SCRIPT_SLUMMER, 103);
	giq_option(7, SCRIPT_SLUMMER, 104, slummer10, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 105, slummer11, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 106, slummer13, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 107, slummer15, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 108, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 109, slummer18, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 110, slummer14, NEUTRAL_REACTION);
end

procedure slummer03
begin
	gsay_reply(SCRIPT_SLUMMER, 111);
	giq_option(7, SCRIPT_SLUMMER, 112, slummer03a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 113, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 114, slummer21, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 115, slummer22, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 116, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 117, slummer17, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 118, slummer23, NEUTRAL_REACTION);
end

procedure slummer03a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer19;
	end
	else begin
		call slummer49;
	end
end

procedure slummer04
begin
	gsay_reply(SCRIPT_SLUMMER, 119);
	giq_option(7, SCRIPT_SLUMMER, 120, slummer04a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 121, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 122, slummer26, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 123, slummer27, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 124, slummer15, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 125, slummer16, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 126, slummer28, NEUTRAL_REACTION);
end

procedure slummer04a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 20))) then begin
		call slummer25;
	end
	else begin
		call slummer49;
	end
end

procedure slummer05
begin
	gsay_reply(SCRIPT_SLUMMER, 127);
	giq_option(7, SCRIPT_SLUMMER, 128, slummer29, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 129, slummer30, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 130, slummer31, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 131, slummer16, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 132, slummer28, NEUTRAL_REACTION);
end

procedure slummer06
begin
	gsay_reply(SCRIPT_SLUMMER, 133);
	giq_option(7, SCRIPT_SLUMMER, 134, slummer29, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 135, slummer32, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 136, slummer31, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 137, slummer34, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 138, slummer34, NEUTRAL_REACTION);
	end
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 139, slummer16, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 140, slummer28, NEUTRAL_REACTION);
end

procedure slummer07
begin
	gsay_reply(SCRIPT_SLUMMER, 141);
	giq_option(7, SCRIPT_SLUMMER, 142, slummer07a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 143, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 144, slummer33, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 145, slummer16, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 146, slummer16, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 147, slummer35, NEUTRAL_REACTION);
end

procedure slummer07a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer29;
	end
	else begin
		call slummer49;
	end
end

procedure slummer08
begin
	gsay_reply(SCRIPT_SLUMMER, 148);
	giq_option(7, SCRIPT_SLUMMER, 149, slummer07a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 150, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 151, slummer36, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 152, slummer37, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 153, slummer15, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 154, slummer16, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 155, slummer35, NEUTRAL_REACTION);
end

procedure slummer09
begin
	gsay_message(SCRIPT_SLUMMER, 156, NEUTRAL_REACTION);
end

procedure slummer10
begin
	gsay_reply(SCRIPT_SLUMMER, 157);
	giq_option(7, SCRIPT_SLUMMER, 158, slummer10a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 159, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 160, slummer36, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 161, slummer37, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 162, slummer16, NEUTRAL_REACTION);
	end
end

procedure slummer10a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer38;
	end
	else begin
		call slummer61;
	end
end

procedure slummer11
begin
	LASHERKNOWN := 1;
	gsay_message(SCRIPT_SLUMMER, 163, NEUTRAL_REACTION);
end

procedure slummer12
begin
end

procedure slummer13
begin
	gsay_reply(SCRIPT_SLUMMER, 165);
	giq_option(7, SCRIPT_SLUMMER, 166, slummer13a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 167, slummer13b, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 168, slummer13c, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 169, slummer43, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 170, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer13a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, -20))) then begin
		call slummer42;
	end
	else begin
		call slummer43;
	end
end

procedure slummer13b
begin
	if (is_success(roll_vs_skill(dude_obj, 14, -20))) then begin
		call slummer39;
	end
	else begin
		call slummer43;
	end
end

procedure slummer13c
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer14;
	end
	else begin
		call slummer43;
	end
end

procedure slummer14
begin
	gsay_message(SCRIPT_SLUMMER, 171, NEUTRAL_REACTION);
end

procedure slummer15
begin
	gsay_message(SCRIPT_SLUMMER, 172, NEUTRAL_REACTION);
end

procedure slummer16
begin
	gsay_reply(SCRIPT_SLUMMER, 173);
	giq_option(7, SCRIPT_SLUMMER, 174, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 175, slummer45, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 176, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer17
begin
	gsay_reply(SCRIPT_SLUMMER, 177);
	giq_option(7, SCRIPT_SLUMMER, 178, slummer17a, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 179, slummerend, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 180, slummercombat, NEUTRAL_REACTION);
end

procedure slummer17a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, -30))) then begin
		call slummer46;
	end
	else begin
		call slummer49;
	end
end

procedure slummer18
begin
	gsay_message(SCRIPT_SLUMMER, 181, NEUTRAL_REACTION);
end

procedure slummer19
begin
	gsay_reply(SCRIPT_SLUMMER, 182);
	giq_option(7, SCRIPT_SLUMMER, 183, slummer19a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 184, slummer47, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 185, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 186, slummer44, NEUTRAL_REACTION);
	end
end

procedure slummer19a
begin
	call slummer49;
end

procedure slummer20
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	gsay_reply(SCRIPT_SLUMMER, 187);
	giq_option(7, SCRIPT_SLUMMER, 188, slummer47, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 189, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 190, slummer44, NEUTRAL_REACTION);
	end
end

procedure slummer21
begin
	gsay_reply(SCRIPT_SLUMMER, 191);
	giq_option(7, SCRIPT_SLUMMER, 192, slummer21a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 193, slummer11, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 194, slummer20, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 195, slummer15, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 196, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 197, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer21a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer25;
	end
	else begin
		call slummer49;
	end
end

procedure slummer22
begin
	LASHERKNOWN := 1;
	gsay_reply(SCRIPT_SLUMMER, 198);
	giq_option(7, SCRIPT_SLUMMER, 199, slummer50, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 200, slummer49, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 201, slummer33, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 202, slummer20, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 203, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 204, slummer44, NEUTRAL_REACTION);
	end
end

procedure slummer23
begin
	gsay_message(SCRIPT_SLUMMER, 205, NEUTRAL_REACTION);
end

procedure slummer24
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	gsay_message(SCRIPT_SLUMMER, 206, NEUTRAL_REACTION);
end

procedure slummer25
begin
	gsay_reply(SCRIPT_SLUMMER, 207);
	giq_option(7, SCRIPT_SLUMMER, 208, slummer25a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 209, slummer52, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 210, slummer33, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 211, slummer54, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 212, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 213, slummer24, NEUTRAL_REACTION);
	end
end

procedure slummer25a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer51;
	end
	else begin
		call slummer49;
	end
end

procedure slummer26
begin
	gsay_reply(SCRIPT_SLUMMER, 214);
	giq_option(7, SCRIPT_SLUMMER, 215, slummer26a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 216, slummer33, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 217, slummer55, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 218, slummer54, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 219, slummer24, NEUTRAL_REACTION);
	end
end

procedure slummer26a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer51;
	end
	else begin
		call slummer49;
	end
end

procedure slummer27
begin
	gsay_reply(SCRIPT_SLUMMER, 220);
	giq_option(7, SCRIPT_SLUMMER, 221, slummer56, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 222, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 223, slummer57, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 224, slummer54, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 225, slummer16, NEUTRAL_REACTION);
	end
end

procedure slummer28
begin
	gsay_reply(SCRIPT_SLUMMER, 226);
	giq_option(-3, SCRIPT_SLUMMER, 227, slummer44, NEUTRAL_REACTION);
	giq_option(-3, SCRIPT_SLUMMER, 228, slummer49, NEUTRAL_REACTION);
end

procedure slummer29
begin
	gsay_reply(SCRIPT_SLUMMER, 229);
	giq_option(7, SCRIPT_SLUMMER, 230, slummer58, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 231, slummer59, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 232, slummer01, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 233, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 234, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer30
begin
	gsay_message(SCRIPT_SLUMMER, 235, NEUTRAL_REACTION);
end

procedure slummer31
begin
	gsay_reply(SCRIPT_SLUMMER, 236);
	giq_option(7, SCRIPT_SLUMMER, 237, slummer52, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 238, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 239, slummer18, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 240, slummer20, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 241, slummer24, NEUTRAL_REACTION);
	end
end

procedure slummer32
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	LASHERKNOWN := 1;
	gsay_message(SCRIPT_SLUMMER, 242, NEUTRAL_REACTION);
end

procedure slummer33
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	gsay_reply(SCRIPT_SLUMMER, 243);
	giq_option(7, SCRIPT_SLUMMER, 244, slummer47, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 245, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 246, slummer45, NEUTRAL_REACTION);
end

procedure slummer34
begin
	gsay_reply(SCRIPT_SLUMMER, 247);
	giq_option(7, SCRIPT_SLUMMER, 248, slummer43, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 249, slummer60, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 250, slummer43, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 251, slummercombat, NEUTRAL_REACTION);
end

procedure slummer35
begin
	gsay_message(SCRIPT_SLUMMER, 252, NEUTRAL_REACTION);
end

procedure slummer36
begin
	gsay_reply(SCRIPT_SLUMMER, 253);
	giq_option(4, SCRIPT_SLUMMER, 254, slummer18, NEUTRAL_REACTION);
	if (obj_pid(critter_inven_obj(dude_obj, 0)) == 113) then begin
		giq_option(7, SCRIPT_SLUMMER, 255, slummer36a, NEUTRAL_REACTION);
		giq_option(4, SCRIPT_SLUMMER, 256, slummer52, NEUTRAL_REACTION);
	end
	else begin
		giq_option(7, SCRIPT_SLUMMER, 257, slummer36b, NEUTRAL_REACTION);
		giq_option(4, SCRIPT_SLUMMER, 258, slummer20, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 259, slummer24, NEUTRAL_REACTION);
	end
end

procedure slummer36a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer29;
	end
	else begin
		call slummer49;
	end
end

procedure slummer36b
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer26;
	end
	else begin
		call slummer49;
	end
end

procedure slummer37
begin
	gsay_message(SCRIPT_SLUMMER, 260, NEUTRAL_REACTION);
end

procedure slummer38a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer52;
	end
	else begin
		call slummer52;
	end
end

procedure slummer38
begin
	gsay_reply(SCRIPT_SLUMMER, 261);
	giq_option(7, SCRIPT_SLUMMER, 262, slummer38a, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 263, slummer01, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 264, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 265, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer39
begin
	gsay_message(SCRIPT_SLUMMER, 266, NEUTRAL_REACTION);
end

procedure slummer40
begin
	gsay_message(SCRIPT_SLUMMER, 267, NEUTRAL_REACTION);
end

procedure slummer41
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	gsay_message(SCRIPT_SLUMMER, 268, NEUTRAL_REACTION);
end

procedure slummer42
begin
	gsay_reply(SCRIPT_SLUMMER, 269);
	giq_option(4, SCRIPT_SLUMMER, 270, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 271, slummer50, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 272, slummer49, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_SLUMMER, 273, slummer48, NEUTRAL_REACTION);
end

procedure slummer43
begin
	gsay_message(SCRIPT_SLUMMER, 274, BAD_REACTION);
	call slummercombat;
end

procedure slummer44
begin
	gsay_message(SCRIPT_SLUMMER, 275, NEUTRAL_REACTION);
end

procedure slummer45
begin
	gsay_message(SCRIPT_SLUMMER, 276, NEUTRAL_REACTION);
end

procedure slummer46
begin
	gsay_reply(SCRIPT_SLUMMER, 277);
	giq_option(7, SCRIPT_SLUMMER, 278, slummer61, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 279, slummer41, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 280, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 281, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 282, slummer44, NEUTRAL_REACTION);
	end
end

procedure slummer47
begin
	gsay_message(SCRIPT_SLUMMER, 283, NEUTRAL_REACTION);
end

procedure slummer48
begin
	gsay_message(SCRIPT_SLUMMER, 284, NEUTRAL_REACTION);
end

procedure slummer49
begin
	gsay_message(SCRIPT_SLUMMER, 285, NEUTRAL_REACTION);
end

procedure slummer50
begin
	gsay_message(SCRIPT_SLUMMER, 286, NEUTRAL_REACTION);
end

procedure slummer51
begin
	gsay_reply(SCRIPT_SLUMMER, 287);
	giq_option(7, SCRIPT_SLUMMER, 288, slummer51a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 289, slummer63, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 290, slummer64, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 291, slummer54, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 292, slummer24, NEUTRAL_REACTION);
	end
end

procedure slummer51a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer62;
	end
	else begin
		call slummer49;
	end
end

procedure slummer52
begin
	gsay_reply(SCRIPT_SLUMMER, 293);
	giq_option(7, SCRIPT_SLUMMER, 294, slummer52a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 295, slummer53, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 296, slummer41, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 297, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 298, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer52a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer65;
	end
	else begin
		call slummer49;
	end
end

procedure slummer53
begin
	set_global_var(GVAR_MORPHEUS_KNOWN, 1);
	gsay_message(SCRIPT_SLUMMER, 299, NEUTRAL_REACTION);
end

procedure slummer54
begin
	gsay_reply(SCRIPT_SLUMMER, 300);
	giq_option(7, SCRIPT_SLUMMER, 301, slummer54a, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 302, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 303, slummer44, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 304, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 305, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer54a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer51;
	end
	else begin
		call slummer49;
	end
end

procedure slummer55
begin
	gsay_reply(SCRIPT_SLUMMER, 306);
	giq_option(7, SCRIPT_SLUMMER, 307, slummer66, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 308, slummer66, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 309, slummer44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 310, slummer41, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 311, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 312, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer56
begin
	gsay_reply(SCRIPT_SLUMMER, 313);
	giq_option(7, SCRIPT_SLUMMER, 314, slummer33, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 315, slummer54, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 316, slummer41, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 317, slummer44, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 318, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 319, slummer45, NEUTRAL_REACTION);
	end
end

procedure slummer57
begin
	gsay_message(SCRIPT_SLUMMER, 320, NEUTRAL_REACTION);
end

procedure slummer58
begin
	gsay_message(SCRIPT_SLUMMER, 321, NEUTRAL_REACTION);
end

procedure slummer59
begin
	gsay_message(SCRIPT_SLUMMER, 322, NEUTRAL_REACTION);
end

procedure slummer60
begin
	gsay_reply(SCRIPT_SLUMMER, 323);
	giq_option(4, SCRIPT_SLUMMER, 324, slummerdone, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 325, slummer40, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 326, slummercombat, NEUTRAL_REACTION);
end

procedure slummer61
begin
	gsay_message(SCRIPT_SLUMMER, 327, NEUTRAL_REACTION);
end

procedure slummer62
begin
	gsay_reply(SCRIPT_SLUMMER, 328);
	giq_option(7, SCRIPT_SLUMMER, 329, slummer58, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_SLUMMER, 330, slummer59, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 331, slummer01, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 332, slummer44, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 333, slummercombat, NEUTRAL_REACTION);
	end
end

procedure slummer63
begin
	gsay_reply(SCRIPT_SLUMMER, 334);
	giq_option(7, SCRIPT_SLUMMER, 335, slummer67, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 336, slummer41, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 337, slummer44, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 338, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 339, slummer35, NEUTRAL_REACTION);
	end
end

procedure slummer64
begin
	gsay_message(SCRIPT_SLUMMER, 340, NEUTRAL_REACTION);
end

procedure slummer65
begin
	gsay_reply(SCRIPT_SLUMMER, 341);
	giq_option(7, SCRIPT_SLUMMER, 342, slummer65a, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 343, slummer41, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_SLUMMER, 344, slummer44, NEUTRAL_REACTION);
	if (global_var(GVAR_ALOCHOL_ADDICT) == 1) then begin
		giq_option(4, SCRIPT_SLUMMER, 345, slummer16, NEUTRAL_REACTION);
	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
		giq_option(4, SCRIPT_SLUMMER, 346, slummer35, NEUTRAL_REACTION);
	end
end

procedure slummer65a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call slummer49;
	end
	else begin
		call slummer49;
	end
end

procedure slummer66
begin
	gsay_message(SCRIPT_SLUMMER, 347, NEUTRAL_REACTION);
end

procedure slummer67
begin
	gsay_message(SCRIPT_SLUMMER, 348, NEUTRAL_REACTION);
end

procedure slummerdone
begin
	gsay_option(SCRIPT_SLUMMER, 349, slummerend, NEUTRAL_REACTION);
end

procedure slummerend
begin
end

procedure slummercombat
begin
	set_global_var(GVAR_CATHEDRAL_ENEMY, 1);
	hostile1 := 1;
end

procedure weapon_check
begin
	if ((obj_item_subtype(critter_inven_obj(dude_obj, 1)) == 3) or (obj_item_subtype(critter_inven_obj(dude_obj, 2)) == 3)) then begin
		armed := 1;
	end
	else begin
		armed := 0;
	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