#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure lasher00;
procedure lasher01;
procedure lasher02;
procedure lasher03;
procedure lasher04;
procedure lasher05;
procedure lasher06;
procedure lasher06a;
procedure lasher07;
procedure lasher07a;
procedure lasher08;
procedure lasher08a;
procedure lasher09;
procedure lasher10;
procedure lasher10a;
procedure lasher11;
procedure lasher12;
procedure lasher13;
procedure lasher14;
procedure lasher14a;
procedure lasher15;
procedure lasher16;
procedure lasher17;
procedure lasher17a;
procedure lasher18;
procedure lasher19;
procedure lasher20_1;
procedure lasher20_2;
procedure lasher21;
procedure lasher22;
procedure lasher23;
procedure lasher24;
procedure lasher25;
procedure lasher26;
procedure lasher26a;
procedure lasher27;
procedure lasher28;
procedure lasher29;
procedure lasher30;
procedure lasher31;
procedure lasher32;
procedure lasher33;
procedure lasher34;
procedure lasher35;
procedure lasher36;
procedure lasher37;
procedure lasher38;
procedure lasher39;
procedure lasher40_1;
procedure lasher40_2;
procedure lasher41_1;
procedure lasher41_2;
procedure lasher42;
procedure lasher43;
procedure lasher44;
procedure lasherend;
procedure combat;

variable Hostile;
variable Lasher_Abuse;


procedure start
begin
	if ((script_action == look_at_proc) or (script_action == description_proc)) then begin
		script_overrides;
		display_msg(message_str(SCRIPT_LASHER, 100));
	end
	else begin
		if (script_action == destroy_proc) then begin
			if (source_obj == dude_obj) then begin
				set_global_var(GVAR_BAD_MONSTER, global_var(GVAR_BAD_MONSTER) + 1);
				if ((global_var(GVAR_BAD_MONSTER) % 7) == 0) then begin
					set_global_var(GVAR_PLAYER_REPUTATION, global_var(GVAR_PLAYER_REPUTATION) + 1);
				end
			end
		end
		else begin
			if (script_action == talk_proc) then begin
				script_overrides;
				start_gdialog(SCRIPT_LASHER, self_obj, 4, -1, -1);
				gsay_start;
				call lasher04;
				gsay_end;
				end_dialogue;
			end
		end
	end
end

procedure lasher00
begin
	if (dude_is_male) then begin
		gsay_reply(SCRIPT_LASHER, 101);
	end
	else begin
		gsay_reply(SCRIPT_LASHER, 102);
	end
	gsay_option(SCRIPT_LASHER, 223, lasherend, NEUTRAL_REACTION);
end

procedure lasher01
begin
	gsay_message(SCRIPT_LASHER, 103, NEUTRAL_REACTION);
	call combat;
end

procedure lasher02
begin
	gsay_message(SCRIPT_LASHER, 104, NEUTRAL_REACTION);
	call combat;
end

procedure lasher03
begin
	gsay_reply(SCRIPT_LASHER, 105);
	gsay_option(SCRIPT_LASHER, 223, lasherend, NEUTRAL_REACTION);
end

procedure lasher04
begin
	gsay_reply(SCRIPT_LASHER, 106);
	giq_option(7, SCRIPT_LASHER, 107, lasher08, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 108, lasher09, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 109, lasher10, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 110, lasher11, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 111, lasher12, NEUTRAL_REACTION);
	end
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 112, lasher02, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_LASHER, 113, lasher13, NEUTRAL_REACTION);
end

procedure lasher05
begin
	gsay_reply(SCRIPT_LASHER, 114);
	giq_option(7, SCRIPT_LASHER, 115, lasher14, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_LASHER, 116, lasher15, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 117, lasher12, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 118, lasher16, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 119, lasher11, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 120, lasher02, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_LASHER, 121, lasher13, NEUTRAL_REACTION);
end

procedure lasher06
begin
	if (dude_is_male) then begin
		gsay_reply(SCRIPT_LASHER, 122);
	end
	else begin
		gsay_reply(SCRIPT_LASHER, 123);
	end
	giq_option(7, SCRIPT_LASHER, 124, lasher06a, NEUTRAL_REACTION);
	giq_option(7, SCRIPT_LASHER, 125, lasher15, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 126, lasher12, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 127, lasher16, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 128, lasher11, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 129, lasher02, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_LASHER, 130, lasher13, NEUTRAL_REACTION);
end

procedure lasher06a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher17;
	end
	else begin
		call lasher18;
	end
end

procedure lasher07
begin
	gsay_reply(SCRIPT_LASHER, 131);
	giq_option(7, SCRIPT_LASHER, 132, lasher07a, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 133, lasher12, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 134, lasher19, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 135, lasher11, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 136, lasher02, NEUTRAL_REACTION);
	end
	giq_option(-3, SCRIPT_LASHER, 137, lasher13, NEUTRAL_REACTION);
end

procedure lasher07a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher17;
	end
	else begin
		call lasher18;
	end
end

procedure lasher08
begin
	gsay_reply(SCRIPT_LASHER, 138);
	giq_option(7, SCRIPT_LASHER, 139, lasher08a, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 140, lasher12, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 141, lasher19, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 142, lasher22, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 143, lasher13, NEUTRAL_REACTION);
	end
end

procedure lasher08a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher20_1;
	end
	else begin
		call lasher18;
	end
end

procedure lasher09
begin
	gsay_reply(SCRIPT_LASHER, 144);
	gsay_option(SCRIPT_LASHER, 223, lasherend, NEUTRAL_REACTION);
end

procedure lasher10
begin
	gsay_reply(SCRIPT_LASHER, 145);
	giq_option(7, SCRIPT_LASHER, 146, lasher10a, NEUTRAL_REACTION);
	if (Lasher_Abuse) then begin
		giq_option(4, SCRIPT_LASHER, 147, lasher26, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 148, lasher27, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 149, lasher28, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 150, lasher29, NEUTRAL_REACTION);
	end
end

procedure lasher10a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher24;
	end
	else begin
		call lasher25;
	end
end

procedure lasher11
begin
	gsay_reply(SCRIPT_LASHER, 151);
	giq_option(4, SCRIPT_LASHER, 152, lasher09, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 153, lasher30, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 154, lasher02, NEUTRAL_REACTION);
	end
end

procedure lasher12
begin
	gsay_reply(SCRIPT_LASHER, 155);
	giq_option(7, SCRIPT_LASHER, 156, lasher31, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 157, lasher30, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 158, lasher02, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 159, lasher32, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 160, lasher33, NEUTRAL_REACTION);
	end
end

procedure lasher13
begin
	gsay_message(SCRIPT_LASHER, 161, NEUTRAL_REACTION);
end

procedure lasher14
begin
	if (dude_is_male) then begin
		gsay_reply(SCRIPT_LASHER, 163);
	end
	else begin
		gsay_reply(SCRIPT_LASHER, 162);
	end
	giq_option(7, SCRIPT_LASHER, 164, lasher31, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 165, lasher30, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 166, lasher02, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 167, lasher33, NEUTRAL_REACTION);
	end
end

procedure lasher14a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher34;
	end
	else begin
		call lasher18;
	end
end

procedure lasher15
begin
	gsay_reply(SCRIPT_LASHER, 168);
	giq_option(7, SCRIPT_LASHER, 169, lasher18, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 170, lasher35, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 171, lasher36, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 172, lasher09, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 173, lasher37, NEUTRAL_REACTION);
	end
end

procedure lasher16
begin
	gsay_message(SCRIPT_LASHER, 174, NEUTRAL_REACTION);
end

procedure lasher17
begin
	gsay_reply(SCRIPT_LASHER, 175);
	if (global_var(GVAR_MORPHEUS_KNOWN) == 1) then begin
		giq_option(7, SCRIPT_LASHER, 176, lasher17a, NEUTRAL_REACTION);
	end
	giq_option(4, SCRIPT_LASHER, 177, lasher40_1, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 178, lasher41_1, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 179, lasher12, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 180, lasher35, NEUTRAL_REACTION);
	end
end

procedure lasher17a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher38;
	end
	else begin
		call lasher39;
	end
end

procedure lasher18
begin
	gsay_message(SCRIPT_LASHER, 181, NEUTRAL_REACTION);
end

procedure lasher19
begin
	gsay_message(SCRIPT_LASHER, 182, NEUTRAL_REACTION);
end

procedure lasher20_1
begin
	gsay_message(SCRIPT_LASHER, message_str(SCRIPT_LASHER, 183) + message_str(SCRIPT_LASHER, 183), NEUTRAL_REACTION);
end

procedure lasher20_2
begin
end

procedure lasher21
begin
	gsay_message(SCRIPT_LASHER, 186, NEUTRAL_REACTION);
end

procedure lasher22
begin
	gsay_message(SCRIPT_LASHER, 187, NEUTRAL_REACTION);
end

procedure lasher23
begin
	gsay_message(SCRIPT_LASHER, 188, NEUTRAL_REACTION);
end

procedure lasher24
begin
	variable LVar0 := 0;
	LVar0 := create_object_sid(142, 0, 0, -1);
	add_obj_to_inven(dude_obj, LVar0);
	gsay_message(SCRIPT_LASHER, 189, NEUTRAL_REACTION);
end

procedure lasher25
begin
	gsay_message(SCRIPT_LASHER, 190, NEUTRAL_REACTION);
end

procedure lasher26
begin
	gsay_reply(SCRIPT_LASHER, 191);
	giq_option(7, SCRIPT_LASHER, 192, lasher26a, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 193, lasher25, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 194, lasher27, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 195, lasher28, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 196, lasher23, NEUTRAL_REACTION);
	end
end

procedure lasher26a
begin
	if (is_success(roll_vs_skill(dude_obj, 14, 0))) then begin
		call lasher24;
	end
	else begin
		call lasher25;
	end
end

procedure lasher27
begin
	gsay_message(SCRIPT_LASHER, 197, NEUTRAL_REACTION);
end

procedure lasher28
begin
	gsay_message(SCRIPT_LASHER, 198, NEUTRAL_REACTION);
end

procedure lasher29
begin
	gsay_message(SCRIPT_LASHER, 199, NEUTRAL_REACTION);
end

procedure lasher30
begin
	gsay_message(SCRIPT_LASHER, 200, NEUTRAL_REACTION);
end

procedure lasher31
begin
	gsay_message(SCRIPT_LASHER, 201, NEUTRAL_REACTION);
end

procedure lasher32
begin
	gsay_reply(SCRIPT_LASHER, 202);
	giq_option(7, SCRIPT_LASHER, 203, lasher21, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 204, lasher42, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 205, lasher43, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 206, lasher44, NEUTRAL_REACTION);
	giq_option(4, SCRIPT_LASHER, 207, lasher28, NEUTRAL_REACTION);
	if (((global_var(GVAR_BAD_MONSTER) + global_var(GVAR_GOOD_MONSTER)) > 34) 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_LASHER, 208, lasher35, NEUTRAL_REACTION);
	end
end

procedure lasher33
begin
	if (dude_is_female) then begin
		gsay_message(SCRIPT_LASHER, 209, NEUTRAL_REACTION);
	end
	else begin
		gsay_message(SCRIPT_LASHER, 210, NEUTRAL_REACTION);
	end
end

procedure lasher34
begin
	gsay_message(SCRIPT_LASHER, 211, NEUTRAL_REACTION);
end

procedure lasher35
begin
	gsay_message(SCRIPT_LASHER, 212, NEUTRAL_REACTION);
end

procedure lasher36
begin
	gsay_message(SCRIPT_LASHER, 213, NEUTRAL_REACTION);
end

procedure lasher37
begin
	gsay_message(SCRIPT_LASHER, 214, NEUTRAL_REACTION);
end

procedure lasher38
begin
	gsay_message(SCRIPT_LASHER, 224, NEUTRAL_REACTION);
end

procedure lasher39
begin
	gsay_message(SCRIPT_LASHER, 215, NEUTRAL_REACTION);
end

procedure lasher40_1
begin
	gsay_message(SCRIPT_LASHER, message_str(SCRIPT_LASHER, 216) + message_str(SCRIPT_LASHER, 217), NEUTRAL_REACTION);
end

procedure lasher40_2
begin
end

procedure lasher41_1
begin
	gsay_message(SCRIPT_LASHER, message_str(SCRIPT_LASHER, 218) + message_str(SCRIPT_LASHER, 219), NEUTRAL_REACTION);
end

procedure lasher41_2
begin
end

procedure lasher42
begin
	gsay_message(SCRIPT_LASHER, 220, NEUTRAL_REACTION);
end

procedure lasher43
begin
	gsay_message(SCRIPT_LASHER, 221, NEUTRAL_REACTION);
end

procedure lasher44
begin
	gsay_message(SCRIPT_LASHER, 222, NEUTRAL_REACTION);
end

procedure lasherend
begin
end

procedure combat
begin
	Hostile := 1;
end