// TOWN DIALOGUE SCRIPT
//    Town 0: Pergamos, part 1

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

begintalkscript;

variables;

short i;

// *** Father Antipas ***
begintalknode 1;
	state = -1;
	personality = 9;
	nextstate = 2;
	condition = 1;
	question = "Father Antipas";
	text1 = "A stately priest is bustling around the church.  He stops as he sees you.";
	text2 = "_Children, I am Father Antipas._ he states quietly.";
	text3 = "_May I be of assistance?_";
	text5 = "Father Antipas stops what he is doing as you approach.";
	text6 = "_Are you in need of assistance?_ he inquires.";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 9;
	nextstate = -1;
	condition = (get_flag(0, 6) == 0);
	question = "What assistance can you provide?";
	text1 = "Father Antipas answers _I can provide healing to those in need for a small donation of 50 coins._";
	text2 = "_I also pray for all people who travel through Pergamos._";
	code =
		set_flag(0, 6, 1);
	break;

begintalknode 3;
	state = 2;
	personality = 9;
	nextstate = -1;
	condition = (get_flag(0, 6) > 0);
	question = "I need some healing please (50 coins).";
	text1 = "Father Antipas turns away saying _I am sorry, but I need a 50 coin donation before performing any healing._";
	text3 = "He smiles _That is good that you don't need any healing after all._";
	text5 = "Father Antipas places his hand on your head.  You feel your energy and strength returning.  With a flash, you are completely healed.";
	code =
		clear_strings();
		if (coins_amount() < 50)
			add_string(1);
		else if (run_select_a_pc(1) == 0)
			add_string(3);
		else {
			play_sound(24);
			add_string(5);
			restore_pc(get_selected_pc());
			change_coins(-50);
		}
	break;

begintalknode 4;
	state = 2;
	personality = 9;
	nextstate = -1;
	condition = (get_flag(50, 6) == 1);
	question = "I have a message for you.";
	text1 = "Father Antipas takes the Mayor's message from you and reads it.";
	text2 = "_Ah, good news._ he says.  _Tell the mayor thank you from me._";
	code =
		set_flag(50, 6, 2);
	break;

begintalknode 5;
	state = 2;
	personality = 9;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Father Antipas returns to the task he was working before.";
	text2 = "_Feel free to come back if you need my assistance._ he says.";
	action = END_TALK;

// *** Wendy ***
begintalknode 6;
	state = -1;
	personality = 14;
	nextstate = 7;
	condition = 1;
	question = "Wendy Miller";
	text1 = "Behind the counter, an attractive woman is busy laying out clothes for display.";
	text2 = "She looks up as you approach.  _Hello, I'm Wendy, proprietor of Pergamos clothes._ she says.";
	text3 = "_Can I help you find your style?_";
	text4 = "Noticing you're naked, she says _You really need my services._";
	text5 = "Wendy stops stocking long enough to say _Welcome back._";
	text6 = "_Let me know if you need help with any fitting._";
	text7 = "_I see you really do need some clothes._ she says, noticing you're naked.";
	action = INTRO;
	code =
		if (get_flag(100, 0) > 0) {
			remove_string(3);
			remove_string(6);
		}
		else {
			remove_string(4);
			remove_string(7);
		}
	break;

begintalknode 7;
	state = 7;
	personality = 14;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Wendy chuckles _I sell clothes to those that are looking here in Pergamos._";
	text2 = "_I have a vast selection of clothing in all sizes._";
	text3 = "_Take a look around and let me know if I can help you._ she adds.";

begintalknode 8;
	state = 7;
	personality = 14;
	nextstate = -1;
	condition = 1;
	question = "Can I see your goods?";
	text1 = "You finish looking through the clothes racks.";
	code =
		begin_shop_mode("Wendy's Clothes", "Wendy sells clothes in all sizes to those looking.  The prices are not extreme.", 4, 3, -1);
	break;

begintalknode 9;
	state = 7;
	personality = 14;
	nextstate = -1;
	condition = 1;
	question = "What do you do for fun around here?";
	text1 = "Wendy grins _Oh, mainly hang around the house, sometimes check out the spring or fall festivals._";
	text2 = "_Nothing like seeing the mayor dance a jig._ she adds.";
	text3 = "_There is also a large library and a sculpture museum that are worth checking out._";

begintalknode 10;
	state = 7;
	personality = 14;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye.  Come back and see me if you decide to get more clothes._ Wendy says.";
	action = END_TALK;

// *** Brian ***
begintalknode 11;
	state = -1;
	personality = 15;
	nextstate = 12;
	condition = 1;
	question = "Brian Shannon";
	text1 = "A burly man wearing robes is working behind the counter of the shop.";
	text2 = "_Hello, I'm Brian._ he says.";
	text3 = "_Can I show you something tasty?_";
	text5 = "Brian watches as you approach.";
	text6 = "_Back for more?_ he asks.";
	action = INTRO;

begintalknode 12;
	state = 12;
	personality = 15;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Brian answers _I sell food, mainly meat to anyone who wants to buy._";
	text2 = "_Are you hungry?  If so, I got what you need._ he says.";

begintalknode 13;
	state = 12;
	personality = 15;
	nextstate = -1;
	condition = 1;
	question = "Can I see your meat?";
	text1 = "You finish shopping at Brian's shop.";
	code =
		begin_shop_mode("Brian's Meats", "Brian sells meats to hungry customers.  The prices are not extreme.", 1, 3, -1);
	break;

begintalknode 14;
	state = 12;
	personality = 15;
	nextstate = -1;
	condition = 1;
	question = "Do you know why I'm here?";
	text1 = "Brian squints a little staring at you.";
	text2 = "He replies _Not really, but maybe something at the library will clue you in._";
	text3 = "_What makes you think that I would know what you are up to?_ he mutters under his breath.";

begintalknode 15;
	state = 12;
	personality = 15;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Goodbye and good luck._ Brian says.";
	text2 = "_Come on back if you get hungry._";
	action = END_TALK;

// *** Martha ***
begintalknode 16;
	state = -1;
	personality = 16;
	nextstate = 17;
	condition = 1;
	question = "Martha Martinez";
	text1 = "An older woman is busy putting price tags on several items behind the counter.";
	text2 = "_Hola, I'm Martha._ she says cheerily.";
	text3 = "_Looking for something for the house?_";
	text5 = "Martha smiles as you get close.";
	text6 = "_Need something else?_ she asks.";
	action = INTRO;

begintalknode 17;
	state = 17;
	personality = 16;
	nextstate = -1;
	condition = 1;
	question = "What is it you sell here?";
	text1 = "Martha replies _Anything you need for the home, I have it here._";
	text2 = "_Need special accents, new lamps, whatever you can think of, it's here._";
	text3 = "_Moving into a new place or just upgrading your existing home?_ she asks.";

begintalknode 18;
	state = 17;
	personality = 16;
	nextstate = -1;
	condition = 1;
	question = "Can I see your home wares?";
	text1 = "You finish looking at home wares.";
	code =
		begin_shop_mode("Martha's Accents", "Martha sells home wares to people looking to accent their house.  The prices are somewhat high.", 5, 4, -1);
	break;

begintalknode 19;
	state = 17;
	personality = 16;
	nextstate = -1;
	condition = 1;
	question = "What would draw someone here?";
	text1 = "Martha answers _Depends.  We have a large library, a museum and lots of industry._";
	text2 = "_Most likely, the library or the museum would be places to check out first._";
	text3 = "_What brought you to town?_ she adds.";

begintalknode 20;
	state = 17;
	personality = 16;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Adios.  If you need more house wares, let me know._ she says.";
	text2 = "Martha starts working with another customer as you leave.";
	action = END_TALK;

// *** Generic Child ***
begintalknode 21;
	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.";
	action = END_TALK;
	code =
		remove_string(1);
		remove_string(2);
		remove_string(3);
		remove_string(4);
		remove_string(5);
		remove_string(6);
		i = get_ran(1, 1, 6);
		add_string(i);
	break;

// *** Ben ***
begintalknode 25;
	state = -1;
	personality = 21;
	nextstate = 26;
	condition = 1;
	question = "Ben";
	text1 = "A muscular man is banging on some metal with a large hammer.";
	text2 = "He stops, wipes some sweat off with a rag, and says _Howdy, I'm Ben._";
	text3 = "_Need something repaired or made?_ he asks.";
	text5 = "Ben stops molding the metal piece he is working on.";
	text6 = "_Need something else?_ he asks.";
	action = INTRO;

begintalknode 26;
	state = 26;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Ben points around the foundry _I'm a metal smith here at our foundry._";
	text2 = "_My wife, Jeri, and I work here creating or repairing metal items._";
	text3 = "_Are you in need of a metal worker?_ he asks.";

begintalknode 27;
	state = 26;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "What is the 'lever house'?";
	text1 = "Ben replies _The place across the street?  I don't know._";
	text2 = "_It's always been locked up and I've never seen anybody go in or out since I've been here._";
	text3 = "_Rumor has it, there is a key hidden in the museum that will unlock it._ he adds.";
	text4 = "_Though none have found it, even after extensively searching._";

begintalknode 28;
	state = 26;
	personality = 21;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Ben waves at you and then starts beating on a piece of metal.";
	action = END_TALK;

// *** Jeri ***
begintalknode 35;
	state = -1;
	personality = 22;
	nextstate = 36;
	condition = 1;
	question = "Jeri";
	text1 = "A tall, dark haired woman is moving around a hot piece of metal with a long pole.";
	text2 = "She wipes a little sweat off her brow when you get close.";
	text3 = "_Hi, I'm Jeri._ she says holding out her hand.";
	text5 = "Jeri is still manipulating metal with a long pole.";
	text6 = "_Hi again._ she says.";
	action = INTRO;

begintalknode 36;
	state = 36;
	personality = 22;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jeri replies _I am a metal smith here at our foundry._";
	text2 = "My husband, Ben, and I work here creating or repairing metal items._";
	text3 = "_Do you need something repaired?_ she asks.";

begintalknode 37;
	state = 36;
	personality = 22;
	nextstate = 39;
	condition = 1;
	question = "Anything special around town?";
	text1 = "Jeri answers _There are a lot of special places, library, museum, school, shops.  Depends on what you are looking for._";
	text2 = "_Of course, if you are looking for mysterious, there's the locked lever house and a house without doors._";

begintalknode 38;
	state = 36;
	personality = 22;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Jeri smiles and waves before turning back to her work.";
	action = END_TALK;

begintalknode 39;
	state = 39;
	personality = 22;
	nextstate = -1;
	condition = 1;
	question = "Lever house?";
	text1 = "Jeri says _It's the building across the street.  It's been locked up tight for a long while now._";
	text2 = "_There is a rumor that there is a key hidden in the museum, but no one has ever found it._";
	text3 = "_Most people just ignore the place, though it appears as if someone, sometime, maintains it._";

begintalknode 40;
	state = 39;
	personality = 22;
	nextstate = -1;
	condition = 1;
	question = "House without doors?";
	text1 = "Jeri says _Over by the school, there is a house that was built a long time ago that has no doors or windows._";
	text2 = "_Nobody knows much about it, it was there when Pergamos spread out in that area._";
	text3 = "_Why would someone build a house without a door or window is beyond me._ she adds.";

// *** Helga ***
begintalknode 45;
	state = -1;
	personality = 23;
	nextstate = 46;
	condition = 1;
	question = "Helga";
	text1 = "An old woman is washing some dishes in the house.";
	text2 = "She seems shocked that you are entering her house without knocking.";
	text3 = "_Eeek! Robbers!_ she shouts out before realizing you are just cads.";
	text4 = "_Name's Helga.  What are you doing in my house?_ she asks.";
	text5 = "_Well, just don't stand there, say something._ Helga says.";
	text6 = "She does not have a high opinion of you.";
	action = INTRO;

begintalknode 46;
	state = 46;
	personality = 23;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Helga answers _You bother me with a question like that?  Are you daft?_";
	text2 = "You can just tell her opinion of you is getting lower.";

begintalknode 47;
	state = 46;
	personality = 23;
	nextstate = -1;
	condition = 1;
	question = "My memory is not so good.";
	text1 = "Helga gives a short chuckle _That's obvious from your behavior._";
	text2 = "_What do think I'll do for you?_ she asks.";
	text3 = "Your standing is getting shorter in her eyes.";

begintalknode 48;
	state = 46;
	personality = 23;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "Helga snorts _'Bout time you stopped bothering old ladies and leave them be._";
	text2 = "She pretends to ignore you.";
	action = END_TALK;
