#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure do_dialogue;
procedure dumar00;
procedure dumar01;
procedure dumar02;
procedure dumar03;
procedure dumar04;
procedure dumar05;
procedure dumar06;
procedure dumar07;
procedure dumarend;

variable rndx;
variable HEREBEFORE;
variable mad;


procedure start
begin
	variable LVar0 := 0;
	if (script_action == talk_proc) then begin
		call do_dialogue;
		if (mad == 1) then begin
			attack_complex(dude_obj, 0, 1, 0, 0, 30000, 0, 0);
		end
	end
	else begin
		if (script_action == look_at_proc) then begin
			script_overrides;
			display_msg("You see Dumar, an Acrolyte of the Children of the Cathedral.");
		end
		else begin
			if (script_action == description_proc) then begin
				script_overrides;
				display_msg("You see Dumar, an Acrolyte of the Children of the Cathedral.");
			end
			else begin
				if (script_action == damage_proc) then begin
					display_msg("Dumar pleads with you so cease your vicious attacks.");
				end
			end
		end
	end
end

procedure do_dialogue
begin
	start_gdialog(-1, self_obj, 4, -1, -1);
	sayStart;
	if (HEREBEFORE) then begin
		call dumar05;
	end
	else begin
		HEREBEFORE := 1;
		call dumar00;
	end
	sayEnd;
	end_dialogue;
end

procedure dumar00
begin
	sayReply(0, "Greetings traveler. We have heard tales of one who traverses the Wasteland. How might we be of service to you today?");
	if (-get_critter_stat(dude_obj, 4) >= -3) then begin
		sayOption("Uh? Arrooo?", dumar04);
	end
	if (get_critter_stat(dude_obj, 4) >= 6) then begin
		sayOption("The Wasteland is a rough place. I have been injured pretty bad. Can you you help me out with that?", dumar03);
	end
	if (get_critter_stat(dude_obj, 4) >= 4) then begin
		sayOption("I want you and your kinda slaughtered!", dumar06);
	end
	if (get_critter_stat(dude_obj, 4) >= 4) then begin
		sayOption("Tell me a story.", dumar07);
	end
	if (get_critter_stat(dude_obj, 4) >= 4) then begin
		sayOption("Huh? Can't hear you. Can you speak up please?", dumar00);
	end
	if (get_critter_stat(dude_obj, 4) >= 5) then begin
		sayOption("Who might I consult in order to become a member of this establishment?", dumar05);
	end
	if (get_critter_stat(dude_obj, 4) >= 6) then begin
		sayOption("I wish to comprehend the wisdom upon which you and your fellow followers have based this establishment of beliefs.", dumar02);
	end
end

procedure dumar01
begin
	sayMessage(0, "I'm sorry, but I am a bit too busy at the moment to relate the entire tale of the Children of the Cathedral. They are having me clean off the pews. Talk to Laura if you need information.");
	call dumarend;
end

procedure dumar02
begin
	sayMessage(0, "I am sorry, but your words are far to above me to understand what you said. Perhaps our wiser followers, like Laura, might be able to help you better than I.");
	call dumarend;
end

procedure dumar03
begin
	sayMessage(0, "I am truly sorry to hear about your ailment. Alas, I am merely an acrolyte and am unable to assist with your healing. Only the full members are granted training in the healing arts. ");
	call dumarend;
end

procedure dumar04
begin
	sayMessage(0, "Ah, child, it seems that you and I are speaking at different levels. Maybe if you talk to Laura, she can help you better than I can. Peace with you child.");
	call dumarend;
end

procedure dumar05
begin
	sayMessage(0, "Please talk to Laura. She can help you better than I can.");
	call dumarend;
end

procedure dumar06
begin
	sayMessage(0, "We are really a peaceful people. Please do not shed blood within this holy place.");
	mad := 1;
	call dumarend;
end

procedure dumar07
begin
	sayMessage(0, "Once upon a time, there was a little traveller who walked around the world. He walked up to a young lady named Laura and asked her to tell him a story. The end.");
	call dumarend;
end

procedure dumarend
begin
end