// TOWN DIALOGUE SCRIPT
//    Town 3: Pergamos, part 3

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short i;

// *** Laurie ***
begintalknode 1;
	state = -1;
	personality = 38;
	nextstate = 2;
	condition = 1;
	question = "Laurie Kendrick";
	text1 = "A woman is busy checking in and out books, putting items back and answering questions.";
	text2 = "She puts her finger to her lips and says softly _Please be quiet._";
	text3 = "_I'm Laurie if you need help looking up things._ she adds.";
	text5 = "Laurie is busy helping a patron.";
	text6 = "_Please wait, I'll be right with you._ she says.";
	text7 = "Eventually, she directs her attention your way.  _Can I assist you with something?_ she inquires.";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "What do you do here?";
	text1 = "Laurie answers quietly _I am the librarian here in Pergamos._";
	text2 = "_I check out books, manage the resources and answer questions, if I can._";
	text3 = "_What can I help you with?_ she asks.";

begintalknode 3;
	state = 2;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "Why would I be here?";
	text1 = "_Why are you asking me that?_ Laurie asks.";
	text2 = "_How would I know the answer to that question, since I don't know you?_";
	text3 = "_You should take a look at some books to see if something interests you or strikes a chord._ she adds.";
	text4 = "_If you're in town for the museum, there are some books of the statues background in the stacks._";

begintalknode 4;
	state = 2;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "What else is there to do around here?";
	text1 = "Laurie replies _There is a festival that happens in the Spring and in the Fall._";
	text2 = "_But the next one is not for a while yet._";
	text3 = "_If you have no further questions, I need to get back to work._ she says.";

begintalknode 5;
	state = 2;
	personality = 38;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye and let me know if I can be of further assistance._ Laurie says.";
	text2 = "_Please be quiet if you are going to browse through the books._ she adds.";
	action = END_TALK;

// *** Nancy ***
begintalknode 10;
	state = -1;
	personality = 39;
	nextstate = 11;
	condition = 1;
	question = "Nancy";
	text1 = "A woman is reading a book behind the counter.";
	text2 = "She puts it down as you enter and approach.";
	text3 = "_Hello visitors, I'm Nancy._ she says.  _Don't forget to sign in._";
	text5 = "Nancy is still reading her book behind the reception desk.";
	text6 = "She reluctantly puts it down and asks _Can I help you?_";
	action = INTRO;
	code =
		set_flag(3, 3, 1);
	break;

begintalknode 11;
	state = 11;
	personality = 39;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Nancy looks annoyed at the question, obviously itching to get back at her book.";
	text2 = "_I assist the visitors to Pergamos school, sign them in and out._ she says.";
	text3 = "_You will need to sign in to visit._";
	text4 = "_You will need to sign out to leave._";
	code =
		if (get_flag(3, 2) == 0)
			remove_string(4);
		else
			remove_string(3);
	break;

begintalknode 12;
	state = 11;
	personality = 39;
	nextstate = -1;
	condition = (get_flag(3, 2) == 0);
	question = "I'd like to sign in.";
	text1 = "Nancy gives you a pen and points to a line on the sign-in sheet.";
	text2 = "_Please sign in here._ she says.";
	code =
		set_flag(3, 2, 1);
	break;

begintalknode 13;
	state = 11;
	personality = 39;
	nextstate = -1;
	condition = (get_flag(3, 2) > 0);
	question = "I'd like to sign out.";
	text1 = "Nancy gives you a pen and points to a space next to your data on the sign-in sheet.";
	text2 = "_Please sign out here._ she says.";
	code =
		set_flag(3, 2, 0);
	break;

begintalknode 14;
	state = 11;
	personality = 39;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye and have a nice day._ Nancy says.";
	text2 = "She then breaks open her book again and starts reading.";
	action = END_TALK;

// *** Julie ***
begintalknode 15;
	state = -1;
	personality = 311;
	nextstate = 16;
	condition = 1;
	question = "Julie";
	text1 = "A woman is busy sorting paper behind the counter.";
	text2 = "She stops, smiles and says _I'm Julie._";
	text3 = "_Do you need office supplies?_";
	text5 = "Julie appears to be putting ink bottles in a rack.";
	text6 = "She turns towards you and asks _Need more office supplies?_";
	action = INTRO;

begintalknode 16;
	state = 16;
	personality = 311;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Julie replies _I own and manage Paper and Pens, the office supply store in Pergamos._";
	text2 = "_I carry all of your office supply needs._ she says waving her hand around the store.";
	text3 = "_Can I help you find something?_ she asks.";

begintalknode 17;
	state = 16;
	personality = 311;
	nextstate = 20;
	condition = 1;
	question = "What would bring someone to town?";
	text1 = "Julie seems surprised by the question.";
	text2 = "_I'm not sure I understand._ she says.  _Though there is a lot of attractions in Pergamos._";
	text3 = "_Why do you ask?_ she asks.";
	code =
		set_flag(3, 10, 0);
	break;

begintalknode 18;
	state = 16;
	personality = 311;
	nextstate = -1;
	condition = 1;
	question = "Can I see your goods?";
	text1 = "You finish looking over Julie's office supplies.";
	code =
		begin_shop_mode("Julie's Paper and Pens", "Julie sells office supplies to those in need.  The prices are pretty expensive.", 9, 4, -1);
	break;

begintalknode 19;
	state = 16;
	personality = 311;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Bye._ Julie says cheerily as you walk away.";
	action = END_TALK;

begintalknode 20;
	state = 20;
	personality = 311;
	nextstate = -1;
	condition = (get_flag(3, 10) == 0);
	question = "I don't know why I'm here.";
	text1 = "Julie smiles and says _I'm not sure any of us know why we are here._";
	text2 = "_Perhaps the priest may help._ she adds.";
	text3 = "You don't think so, but thank her anyway.";
	code =
		set_flag(3, 10, 1);
	break;

begintalknode 21;
	state = 20;
	personality = 311;
	nextstate = -1;
	condition = (get_flag(3, 10) == 0);
	question = "Oh, no reason, just curious.";
	text1 = "Julie looks at you a little suspicious, _OK._ she says.";
	text2 = "_Let me know if you want to look at some office supplies._ she adds.";
	code =
		set_flag(3, 10, 1);
	break;

// *** Generic Child ***
begintalknode 25;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Generic Child";
	text1 = "The child looks suspiciously at you _I don't talk to strangers!_";
	text2 = "_Leave me alone or I'll scream._ the child says loudly.";
	text3 = "The child appears to be scared of you.  _Go away, I don't want to talk._ the child says.";
	text4 = "The child starts screaming.  You leave before you attract too much attention.";
	text5 = "The child kicks you and then runs off shouting something about 'pervs'.";
	text6 = "The child pulls out a whistle and starts blowing.  You're sure it's not good so you leave.";
	text7 = "The child continues to play, ignoring you.";
	text8 = "The child moves away from you without looking at you.";
	action = END_TALK;
	code =
		remove_string(1);
		remove_string(2);
		remove_string(3);
		remove_string(4);
		remove_string(5);
		remove_string(6);
		remove_string(7);
		remove_string(8);
		i = get_ran(1, 1, 8);
		add_string(i);
	break;

// *** Phil ***
begintalknode 30;
	state = -1;
	personality = 315;
	nextstate = 31;
	condition = 1;
	question = "Phil";
	text1 = "A large man is working in the trees with an axe.";
	text2 = "He doesn't appear to notice you at first, continuing to chop at a log.";
	text3 = "He suddenly stops and holds out his hand _My name is Phil, how do you do?_";
	text5 = "You see Phil chopping at a log, removing branches from it.";
	text6 = "Once he notices you, he says _Hold on, just about done._";
	text7 = "He finishes the task and turns to you saying _Do you need some help?_.";
	action = INTRO;

begintalknode 31;
	state = 31;
	personality = 315;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Phil replies _I cut trees and create timber for various uses around Pergamos and beyond._";
	text2 = "He hefts the axe up a little and says _I'm a woodsman._";
	text3 = "Phil is proud of his vocation.";

begintalknode 32;
	state = 31;
	personality = 315;
	nextstate = -1;
	condition = 1;
	question = "What is up with the house on the hill?";
	text1 = "Phil answers _I don't know._";
	text2 = "_It was built seemingly with out windows or doors a while back._";
	text3 = "_There has never been any activity around it as far as I can tell._ Phil adds.";
	text4 = "_Kind of mysterious if you ask me._ Phil says.";

begintalknode 33;
	state = 31;
	personality = 315;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Phil waves at you and gets back to work chopping at some wood.";
	text2 = "He appears to be whistling a tune as he chops.";
	action = END_TALK;

// *** Wren ***
begintalknode 35;
	state = -1;
	personality = 317;
	nextstate = 36;
	condition = 1;
	question = "Wren";
	text1 = "A young woman is working on a lesson while walking around the school.";
	text2 = "She seems startled as you get close.  _I'm Wren, a teacher here._ she says.";
	text3 = "_Who are you and why are you here?_ she asks.";
	text5 = "You see Wren directing a child.";
	text6 = "She stops when you get close and says _You're back, why?_";
	action = INTRO;

begintalknode 36;
	state = 36;
	personality = 317;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_I've already stated, I am a teacher here._ Wren replies.";
	text2 = "_You still haven't answered what you are doing here._ she says.";
	code =
		if (get_flag(3, 9) > 0) {
			remove_string(2);
		}
	break;

begintalknode 37;
	state = 36;
	personality = 317;
	nextstate = 40;
	condition = 1;
	question = "Is there something special about the school?";
	text1 = "Wren seems surprised by the question.  _I don't think so, this is just a school._ she says.";
	text2 = "_Is there something special you are looking for?_ she asks.";
	code =
		set_flag(3, 9, 1);
	break;

begintalknode 38;
	state = 36;
	personality = 317;
	nextstate = -1;
	condition = 1;
	question = "What is that house with no doors?";
	text1 = "Wren replies _I don't know.  We just keep the kids away and let it be._";
	text2 = "_You'd do well to stay away also._ she adds.";

begintalknode 39;
	state = 36;
	personality = 317;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye._ Wren answers.";
	action = END_TALK;

begintalknode 40;
	state = 40;
	personality = 317;
	nextstate = -1;
	condition = 1;
	question = "No, not really.";
	text1 = "_Well, you are disrupting class, so could I get you to leave?_ Wren asks.";
	text2 = "She seems to be pointing to the door before opening a textbook she was carrying.";
	action = END_TALK;

begintalknode 41;
	state = 40;
	personality = 317;
	nextstate = 42;
	condition = 1;
	question = "Kind of don't know how I got here.";
	text1 = "Wren seems puzzled.  _So you think there might be something in the school that can help you?_";
	text2 = "_Where would you have picked up something like that?_ she asks.";

begintalknode 42;
	state = 42;
	personality = 317;
	nextstate = 43;
	condition = 1;
	question = "Somebody in town told me.";
	text1 = "Wren is amused.  _You always believe anything anybody tells you._";
	text2 = "_Perhaps you should ask someone else about special places in town._ she adds.";

begintalknode 43;
	state = 43;
	personality = 317;
	nextstate = -1;
	condition = 1;
	question = "Is there any special places in town?";
	text1 = "Wren answers _Of course, the library, the museum, shops here and there, take your pick._";
	text2 = "_I really think that you've distracted the students long enough, perhaps you should leave._ she says.";
	text3 = "She points at the door and starts helping a nearby student.";
	action = END_TALK;
