#include <define.h>

//#define NAME                    SCRIPT_

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



procedure start;
#include <push.h>
procedure do_dialogue;
procedure zack00;
procedure zack01;
procedure zack02;
procedure zack03;
procedure zack04;
procedure zack05;

variable HEREBEFORE;


procedure start
begin
	variable LVar0 := 0;
	if (script_action == talk_proc) then begin
		call do_dialogue;
		detach;
	end
	else begin
		if (script_action == look_at_proc) then begin
			script_overrides;
			display_msg("You see Zack Barstow, an Initiate of the Childred of the Cathedral.");
			detach;
		end
		else begin
			if (script_action == critter_proc) then begin
				detach;
			end
			else begin
				if (script_action == combat_proc) then begin
					detach;
				end
			end
		end
	end
end

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

procedure zack00
begin
	sayReply(0, "Welcome to the Children of the Cathedral. How might I help you today?");
	if (-get_critter_stat(dude_obj, 4) >= -5) then begin
		sayOption("Urrrooo?", zack04);
	end
	if (get_critter_stat(dude_obj, 4) >= 14) then begin
		sayOption("What is the meaning of the universe?", zack04);
	end
	if (get_critter_stat(dude_obj, 4) >= 6) then begin
		sayOption("I'm hurt pretty bad. Think you can help me?", zack03);
	end
	if (get_critter_stat(dude_obj, 4) >= 10) then begin
		sayOption("How do you fix the water pump?", zack02);
	end
	if (get_critter_stat(dude_obj, 4) >= 6) then begin
		sayOption("Can you tell me something about this place?", zack01);
	end
end

procedure zack01
begin
	sayMessage(0, "I am ill-suited for that. Perhaps if you talk to Laura, she will be willing give you the information you need to know.");
end

procedure zack02
begin
	sayMessage(0, "Oh, fixing water pumps is easy. It's just a flag.");
end

procedure zack03
begin
	sayMessage(0, "I don't have the tools to assist you with that problem. Please talk to one of my superiors.");
end

procedure zack04
begin
	sayMessage(0, "Oh, that. That's just a flag.");
end

procedure zack05
begin
	sayMessage(0, "Please consult with Laura. I have told you all I know.");
end