// TOWN DIALOGUE SCRIPT
//    Town 4: Silvar

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "Silvar is full of soldiers. Some of them were already stationed here, and some of them fled when Cotra was sacked. They are thin and poorly equipped, and they don't look like they're getting a lot of sleep.";
	text2 = "That is why the soldiers here welcome you wherever you go. To meet an actual hero doing actual things to help the war effort means a lot to them, and you try to be as friendly as possible. Time permitting.";

begintalknode;
	tag = 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "You talk to the refugees from Cotra. Most of them avoid you. A few share their tales of terror and woe from the night of the attack.";	
	text2 = "The main thing you get is complaints. Lack of food. Filthy buildings. And, worst of all, they are being harassed by a band of brigands hiding in Silvar.";
	text3 = "The few of them who speak with you are hugely grateful that you rid them of the band of brigands. They will be much safer now.";
	code = 
		if (gf(4,8) == 0)
			rs(3);
			else rs(2);
	break;
	
// Gary

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Gary";
	text1 = "You meet a heavy-set man with short, brown hair and a wild beard. He wears rough, homespun clothes and a silver hammer around his neck.";
	text2 = "He is polishing the bar when you enter. He's visibly relieved that you aren't a refugee. _Hi! I'm Gary. Welcome to the Silvar Arms. Always glad to see another soldier._";
	text5 = "Gary continues to wait on you. He still seems relieved to have a potential paying customer at last. _Need anything, soldier?_";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What services do you have here? And how much do they cost?_";
	text1 = "_I can give you a nice room. Very nice, only 5 coins. Also, I've been selling a lot of rations. Let me know if you want to buy some. It's good to see some genuine adventurers here._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_I'd like a room for the night._ Pay 5 coins.";
	condition = coins_amount() >= 5;
	text1 = "Gary takes your coins and takes you to a pleasant, warm room. The next morning, you are provided with a hearty breakfast. As Gary serves it, he says, _I have nothing against the refugees, but they don't pay. I need money to live. Very glad to have you._";
	action = END_TALK;
	code =
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),9,16,FALSE);
		relocate_char(get_pc_id(1),10,16,FALSE);
		relocate_char(get_pc_id(2),10,17,FALSE);
		relocate_char(get_pc_id(3),9,17,FALSE);
		sf(4,20,1);
	break;


begintalknode;
	state = 2;
	nextstate = -1;
	question = "_I could use some food._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Silvar Arms","Gary is relieved to finally have a customer who isn't a destitute refugee.",14,3,3);
	break;
	
begintalknode;
	state = 2;
	nextstate = 1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Oh._";

begintalknode;
	state = 1;
	nextstate = 3;
	question = "_A lot of soldiers in town?_";
	text1 = "_Yes. Soldiers and refugees. Warriors back from the front and refugees from Cotra. Everyone's destitute or lookin' for a fight!_ He bends close to you. _I'm always lookin' to help out the people who help us out._";
	text2 = "_So, if you want, you're welcome to keep your spare stuff in my storeroom._";
	
begintalknode;
	state = 3;
	nextstate = -1;
	condition = 1;
	question = "_Why so many soldiers here?_";
	text1 = "_Because Cotra fell, so we're next. We're not going to let them ambush us too. I hope._";

begintalknode;
	state = 3;
	nextstate = -1;
	condition = 1;
	question = "_Get a lot of refugees in here?_";
	text1 = "_Way too many. I have to throw them out. Breaks my heart, but I just don't have enough food for them._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_Where is your storeroom?_";
	text1 = "_Down the passage._ He points at a door to the south. _I ain't usin' the place, so I'm glad to share it. It's the room at the end of the hall. There are some cobwebs in there, but the supplies are good._";

begintalknode;
	state = 1;
	nextstate = -1;
	question = "_Any jobs I can do?_";
	text1 = "He sighs. _I am almost ashamed to ask it, but since my last business venture failed, I am trying to deal in surface items. I can be paid well for genuine sugar from the surface. I will pay you 200 coins for each bag of real sugar you bring me._";
	text2 = "_Real surface sugar, mind you, and pure. Not half-sand, like some mercenaries have tried to sell me._";
	action = SET_SDF 4 13 1;
	code =
		toggle_quest(36,1);
	break;
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(4,13) >= 1;
	question = "_You mentioned a business venture. What was it?_";
	text1 = "_I few years back, some adventurers found a natural hot spring for me, near Fort Draco. I was building a spa. Then the war started, and, well, everything fell apart._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = party_has_item(494) > 0 && gf(4,13) > 0;
	question = "_We have some sugar for you, as you asked._ (Sell for 200 coins each.)";
	code =
	run_hardcode(22);
	break;
	
begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_All right. Fight on, warrior._";
	action = END_TALK;

// Efram

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Efram";
	text1 = "An old man with sparse gray hair sits behind the counter.  He laboriously stands up to shake your hand. Then, with a groan, he settles back down again.";
	text2 = "_I'm Efram. Welcome to my shop._ There is a two-handed sword hanging on the wall behind him.";
	text5 = "Efram watches you sadly. He looks exhausted, with the translucent skin of a longtime Avernite. Unusually, he has a huge paunch. Most people in Avernum are very thin.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_What are you working on?_";
	text1 = "_Well, I'm a weaponsmith. You can sell me some weapons or buy some new ones of your own._";

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_That's a nice sword on the wall._";
	text1 = "_Oh, that?_ He looks back at the sword behind him. _That's Demonslayer!_ He chuckles. _Not the real Demonslayer. I just call it that. Fine blade though, Draco steel._";
	text2 = "_Nah, the real Demonslayer's in the Castle, I think, heavily guarded._";
	text3 = "_Fine blade. I even saw it once! Some adventurers passing through had it. Beautiful work._ He sighs.";
	text4 = "_Nothing like the real article, of course._";
	code =
		if (gf(4,19) == 0)
			rs(4);
			else {	
				rs(2); rs(3);
				}
	break;
	
begintalknode;
	state = 29;
	nextstate = -1;
	condition = gf(4,19) == 0;
	question = "_What did the adventurers do with it?_";
	text1 = "_After they reforged it and used it to slay this big demon called Grah-Hoth, they gave it to King Micah, and it got put away in the Castle, in the Great Cave. Or that's what I heard, anyway. Long ways away, to the southwest._";
	text2 = "He shakes his head. _They're probably afraid to let it out again, for fear the Empire will steal it. Oh well._";


begintalknode;
	state = 29;
	nextstate = -1;
	condition = party_has_item(304) > 0 && gf(4,19) == 0;
	question = "_I have the real Demonslayer._ (Show it to him.)";
	text1 = "He bends closer to look at it. _It is... it is beautiful. I had only seen it once. It is ... it is amazing._ His voice breaks with awe. It's as if your weapon is the most beautiful thing he has ever seen.";
	action = SET_SDF 4 19 1;
	code =
		change_reputation(1);
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_Let's do some trading._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Efram's Weaponry","Efram's weaponry is made from decent iron from Fort Draco. Nice stuff, but nothing like what you can get in the Great Cave.",53,4,3);
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Thank you. Come again!_";
	action = END_TALK;

// Oss-Ess

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Oss-Ess";
	text1 = "You meet a massive slith warrior. He bows in greeting as you approach.";
	text2 = "You introduce yourself, and he says, _Call me Oss-Ess. It isss easssier to say than my full name._";
	text5 = "Oss-Ess stands calmly, watching you with unblinking eyes. He shivers slightly as he talks with you. Silvar is not very warm, and sliths like a lot of heat.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = 58;
	question = "_What is your full name?_";
	text1 = "_It is Ossassatass'Esshassah._ His mouth handles the succession of hisses that make up his name effortlessly. You would have more trouble.";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_What does that mean?_";
	text1 = "_Ossassatass is my given name. 'Esshassah' means teacher. Usually it isss shortened. Even slithsss like the shorter version, in these lazy times._";

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_May I ask what services you provide?_";
	text1 = "_I am a teacher of waysss of warfare. I can train you, if you wish. It is my way of bringing peace._ His sibilant voice is hard to understand sometimes, but you manage.";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_Peace through preparedness, you mean?_";
	text1 = "_Yesss. Our peoplesss are both threatened by the Empire. The war between usss brought much hate, but by bringing our skillsss to you, we hope to show we truly want peace._";

begintalknode;
	state = 57;
	nextstate = 55;
	question = "_It would be nice to have more peace between our peoples._";
	text1 = "_It is not just nice. It isss needed, if we are to survive the Empire invasion._";
	text3 = "He nods to the slith in your group. _It is nice to see a slith fighting to help Avernum. To me, it means there is more hope for us._";
	code =
		if (species_in_party(3))
			rs(1);
			else rs(3);
	break;

begintalknode;
	state = 57;
	nextstate = 55;
	question = "_There would be more peace between us if so many of your kind weren't savages._";
	text1 = "Oss-Ess seems annoyed by this. _Some humans are savage, yesss? Yet you do not say humansss are worthlessss. If you do not want training, I have no more to say to you._ He turns away.";
	action = END_TALK;
	
begintalknode;
	state = 55;
	nextstate = -1;
	question = "_I'd like some training._";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Ossassatass",
		  "Ossassatass'Esshassah is very skilled in the slith arts of war.",
		  54,4,0);	
	break;

begintalknode;
	state = 55;
	nextstate = -1;
	condition = 1;
	question = "_I don't need any training._";
	text1 = "_Then I wish you victory over our foes._";
	action = END_TALK;

// Anastasia

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Anastasia";
	text1 = "You have to shake this woman awake. She had nodded off onto a breastplate on the counter. She sits up, shakes her head to clear it, and says, _Forgive me. The war gives me little time to rest._";
	text2 = "_I am Anastasia. Welcome to my shop._";
	text5 = "Anastasia is still very tired, but she is making a great effort to stay awake. Now that you can get a closer look, you can see that she is not just exhausted but a little ill.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_Why did you fall asleep?_";
	text1 = "_Things have been ... hectic. Here. Yes. Very tiring, both for me and my husband. You ... You can buy armor here._";

begintalknode;
	state = 83;
	nextstate = 84;
	question = "_What's worrying your husband?_";
	text1 = "_The whole business with the war and the refugees has been very hard. On my husband. Efram, I mean._ She smiles weakly. _If you see him, ask him about Demonslayer. It'll cheer him up._";

begintalknode;
	state = 84;
	nextstate = -1;
	question = "_Demonslayer? I take it that Efram is passionate about swords._";
	text1 = "_Efram runs the weapon shop. He so loves to talk about his sword Demonslayer. It's not the real one, of course. But it's large. He's very proud of it._";

begintalknode;
	state = 82;
	nextstate = -1;
	question = "_Can I purchase some armor?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Anastasia's Armor","Anastasia works tirelessly to make quality armor.",55,5,3);
	break;

begintalknode;
	state = 82;
	nextstate = 85;
	question = "_Are you feeling ill?_";
	text1 = "She coughs gently. _No more than expected._ Most people in Avernum start to get very ill after being there for a few years. It's a very harsh place to live. People tend to die young.";
	text2 = "_It doesn't help that I can't sleep._";

begintalknode;
	state = 85;
	nextstate = -1;
	condition = 1;
	question = "_Why can't you sleep?_";
	text1 = "_The endless work. I don't want a fellow Avernite to die because I was too lazy to make proper protection for him._";
	
// Captain Arlen

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 109;
	question = "Captain Arlen";
	text1 = "The commander of Silvar sits at the desk. He's a healthy man well into middle age. You note that, along with his military insignia, he's wearing the mayor's sash.";
	text2 = "He looks up, about to snap at you for interrupting him. Then he recognizes you. _Ahhhh ... The unexpected hero. Word of your travels travels ahead of you. I'm Captain Arlen, Commander and Acting Mayor of Silvar._";
	text5 = "As you speak with the commander, you see that, while he is strong, he is increasingly exhausted. Also, the way he moves, you suspect he's getting a bad back.";
	text6 = "He nervously picks at the mayor's sash as he speaks. _I'm quite busy, young hero. What can I help you with?_";
	action = INTRO;

begintalknode;
	state = 109;
	nextstate = 110;
	question = "_What has been happening lately?_";
	text1 = "_Well, I've been dealing nonstop with the refugees from the destruction of Cotra. Dealing with it every minute of every day, and so have all my men. We don't have a person to spare to deal with our other problems._";

begintalknode;
	state = 110;
	nextstate = -1;
	question = "_How was the Empire able to destroy Cotra?_";
	text1 = "_A difficult question, with tragic results. My guess is that the Empire has a base hidden on one of the islands near Cotra. That's the only way, I suspect, that they could have sent a sufficient force undetected._";


begintalknode;
	state = 110;
	nextstate = 111;
	question = "_Tell me about the refugees._";
	text1 = "_When Cotra was destroyed, they had to leave in an instant. Hardly any time to gather their possessions. We've erected a shantytown for them to the southeast. Try not to disturb them. They have enough problems as it is._";

begintalknode;
	state = 111;
	nextstate = 114;
	question = "_How was Cotra destroyed?_";
	text1 = "As he says what happens, his voice cracks with anger and frustration. _It only happened a few weeks ago, not long before the barriers went down. A force of crack troops arrived by sea. Soldiers on small boats, supported by a force of eyebeasts._";
	text2 = "_They blasted the inside of the town with spells as the soldiers landed. Then they began killing. They were inside the walls, so there were no proper defenses._";

begintalknode;
	state = 114;
	nextstate = -1;
	condition = 1;
	question = "_Is their force still there?_";
	text1 = "_Only the eyebeasts. The humans didn't try to hold the ruin. They just burned the place down with magical fire. It's a ruin now, little of value left. We still aren't sure where the attack came from._";

begintalknode;
	state = 109;
	nextstate = -1;
	condition = 1;
	question = "_You're the commander and the mayor?_";
	text1 = "_Temporarily. The mayor of Silvar was in Cotra when it was attacked. He failed to escape alive. I hold the sash until the Castle can select a replacement._";
	
begintalknode;
	state = 109;
	nextstate = 112;
	question = "_Any problems bothering you here?_";
	text1 = "_Plenty, inside and outside the walls. We think some brigands inside Silvar are harassing the refugees._ He thinks. _Wait! You're a soldier. If you want a mission, let me know. If you succeed, I can help you._";
	text3 = "_Nothing you can help with. I've put a word in for you at the Castle. If you go there, you might be able to get a higher security clearance._";
	action = DEP_ON_SDF 4 12 1;
	code =
		if (gf(4,12) < 2)
			rs(3);
			else rs(1);
	break;
	
begintalknode;
	state = 112;
	nextstate = 113;
	condition = gf(4,12) <= 1;
	question = "_I'll take any missions you can offer me._";
	text1 = "He explains the mission. _We've been working on a peace treaty with the nephilim tribes, uniting them with us against the Empire. We're close to success, but first they want help. They want us to free a bunch of nephilim slaves from a band of nepharim._";
	action = SET_SDF 4 12 1;
	code =
		toggle_quest(35,1);
	break;
	
begintalknode;
	state = 113;
	nextstate = -1;
	question = "_The nephilim enslaving each other? Unbelievable!_";
	text1 = "_Yeah, you heard right. One band of kitties enslaving another. And we're supposed to risk life and limb freeing them. But hey, if it works, the kitties would make good allies!_";
	text2 = "_Anyway, there's a nephil called Awrrm, or something in town. Ask him about the mission. He'll help you._";

begintalknode;
	state = 113;
	nextstate = -1;
	question = "_The nephilim would help against the Empire?_";
	text1 = "_The nephilim hate the Empire more than we do, if you can believe it. On the surface, the Empire has been slaughtering them. Either that, or sending all of them down here. The Empire won't be content until every nephil is dead._";
	text2 = "_And believe me, the nephilim take it very personally._";

begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(43,11) >= 1 && gf(4,12) == 1;
	question = "_I have done as you asked. We freed the nephilim slaves._";
	code =
	run_hardcode(118);
	break;

begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(4,8) >= 1 && gf(4,16) == 0;
	question = "_We killed some brigands. They were bothering the refugees._";
	text1 = "_I am glad to hear it. We've been trying to find them and spare the strength to dispatch them, but no luck. You've been a great help._ Though his words are kind, he seems irritated that you took care of the problem instead of him.";
	code =
		sf(4,16,1);
		award_party_xp(200,10);
	break;
	
// Elspeth

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 136;
	question = "Elspeth";
	text1 = "A small, lethal woman sits alone in this crude shantytown hovel. She watches you carefully, of course, even after she verifies you're an Avernite soldier and not some brigand.";
	text2 = "She has a wickedly sharp knife hanging from her belt and two more strapped to her thighs. This is a dangerous part of town. She gives you a little nod. _I'm Elspeth, soldier. What do you want?_";
	text5 = "Now that Elspeth knows that you aren't here to attack her, she relaxes. A little. She sharpens one of her many knives on a gray stone as she speaks with you.";
	action = INTRO;


begintalknode;
	state = 136;
	nextstate = 139;
	condition = 1;
	question = "_I mean you no harm._";
	text1 = "_I knew that when I looked you in the eyes. Have to be careful, though. This slum is a dangerous place for Cotrans, no matter what Commander Arlen says._";

begintalknode;
	state = 139;
	nextstate = -1;
	condition = 1;
	question = "_You fled Cotra?_";
	text1 = "_Most of us here did. The Empire came in from the sea, bringing steel and fire. Fortunately, it took them hours to encircle the town. Most of the people escaped, fleeing in all directions._";
	
begintalknode;
	state = 136;
	nextstate = 137;
	question = "_What are you doing back here?_";
	text1 = "She spits into the fire. _Keeping an eye out for the brigands. And keeping an eye on the refugees._";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_Are there brigands stalking the refugees?_";
	text1 = "_There is a band of them with a hidden lair in this slum. They are bothering the honest folk. It is none of your concern. We'll take care of it._ She pats her knives.";
	text3 = "_There were, until you took care of them. We could have handled the problem ourselves, but we appreciate your help. There will be more, though. Bet on it._";
	action = DEP_ON_SDF 4 8 0;

begintalknode;
	state = 137;
	nextstate = 138;
	question = "_Why do you have to keep an eye on the refugees?_";
	text1 = "_Someone has to. You'll be leaving soon enough, yes?_ She pauses to think. _You're a soldier, right? You travel? I'm looking for someone, maybe a refugee, her name's Nance._";
	text3 = "_Someone has to._";
	code =
		if (gf(4,11) > 1)
			rs(1);
			else {
				rs(3);
				sf(4,11,1);
				toggle_quest(34,1);
				}
	break;
	
begintalknode;
	state = 138;
	nextstate = -1;
	condition = gf(4,11) <= 1;
	question = "_Maybe I can find her for you._";
	text1 = "She seems pleased, though she takes pains to hide it. _I do not know if she is still safe, and it worries me terribly. I can't search for her, though. Refugees fled from Cotra in all directions, and she might be anywhere where they have gone._";
	action = SET_SDF 4 11 1;

begintalknode;
	state = 136;
	nextstate = -1;
	condition = gf(46,11) >= 1 && gf(4,11) == 1;
	question = "_I found Nance. She's alive, well, and in Fort Dranlon._";
	code =
	run_hardcode(117);
	break;

begintalknode;
	state = 138;
	nextstate = -1;
	question = "_Can you tell us more about Nance?_";
	text1 = "Elspeth's cold exterior cracks for a moment, revealing how worried she is about her missing friend. _She is ... is ... leave me be._ She turns away.";
	action = END_TALK;
	
// Asp

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 163;
	question = "Asp";
	text1 = "There is a dirty man wearing leather armor in this hovel. He doesn't trust you. He doesn't draw his sword, but keeps his hand near it. You ask his name. _They call me Asp. I'm from Cotra._";
	text5 = "Asp seems like he would strongly prefer to be alone to ponder his misfortune.";
	action = INTRO;

begintalknode;
	state = 163;
	nextstate = 164;
	question = "_Sorry about what happened to Cotra._";
	text1 = "_Yeah, well I guess that's more reason to hate the Empire.  But then again, these days I have enough to worry about with all of the brigands around town._";

begintalknode;
	state = 164;
	nextstate = -1;
	question = "_Do you know how Cotra was attacked?_";
	text1 = "_I was there when the whole mess happened. They hit us by sea. Crack troops and mages and a bunch of flying spell-casting monsters. They didn't want to hold the city, just tear it apart. They blasted everything with spells. Everything!_";
	text2 = "_I hear it's just a ruin now, with looters and monsters. And bodies. Bad place to be. Real bad._";

begintalknode;
	state = 164;
	nextstate = 165;
	question = "_I can help get rid of the brigands._";
	text1 = "_Thieves are all right, sometimes. But there's a group that's pickin' on the refugees, takin' what little they got! Total scum. They got a lair near here, somewhere in town. I'm trying to figger' out what to do about 'em._";
	text3 = "He smiles. _I heard what you did to those brigands. Word got around. Nice to know some Avernites still care about what happens to the refugees._";
	action = DEP_ON_SDF 4 8 0;

begintalknode;
	state = 165;
	nextstate = -1;
	condition = gf(4,8) == 0;
	question = "_Where are the brigands?_";
	text1 = "_I hear that they have a hidden lair in the slums in the corner of town. At least, that's the rumors. Don't get me wrong. I've done my share of thieving. But, to treat refugees like that in wartime? Disgusting._";

// Ruth

begintalknode;
	tag = 150;
	state = -1;
	nextstate = 190;
	question = "Ruth";
	text1 = "A sweaty woman wearing a leather jerkin rushes by you. Her toolbelt clatters loudly as she rushes around, directing the creation of several cave boats.";
	text2 = "You manage to flag her down. She has long, reddish hair, a round face, and a harried expression. _Hello. I'm Ruth. Are you interested in boats? We make boats._";
	text5 = "Ruth continues to direct her shop as she talks with you. Her workers are repairing one boat and making the frame of another. It looks like they're perpetually low on supplies, but they're trying to make boats as quickly as they can.";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = 191;
	question = "_What is your job?_";
	text1 = "_I'm the town shipwright. It's a busy time for us._ She wipes sweat off her forehead with the sleeve of her rough, handspun shirt.";

begintalknode;
	state = 191;
	nextstate = 193;
	question = "_Busy making boats for the army?_";
	text1 = "_Yes. Cotra got destroyed in an attack by boat and air. Same thing could happen to Silvar. We're making war boats to keep it from happening again._";

begintalknode;
	state = 193;
	nextstate = -1;
	condition = 1;
	question = "_How would that help?_";
	text1 = "_Cotra didn't have sentries out in the water. That's how the eyebeasts could fly in and not be seen until their spells hit the shore._";
	text2 = "_Of course, being a sea sentry is sort of suicidal. Still, better to lose a few boats than a whole city._";
	
begintalknode;
	state = 190;
	nextstate = 192;
	question = "_I could use a boat._";
	text1 = "_You're in luck. You're Avernum soldiers. If you weren't, I couldn't sell to you._";
	text2 = "_Well, we're busy making war boats. Obviously, you can't get any of those. However, we have a few small fishing boats. You could purchase one of those. Only 400 coins._";

begintalknode;
	state = 192;
	nextstate = 190;
	question = "_I'll take one._ (Pay 400 gold.)";
	text1 = "She takes your coins. _The boats are out at the docks. One of them is yours. They're not flashy, but they're good and stable. Good luck._";
	text3 = "_I know that four hundred coins is a lot, but that's the price. I can't give you a boat if you don't pay._";
	text5 = "There are no ships left.";
	code =
		clear_strings();
		if (coins_amount() >=400) {
			if (set_boat_range_property(8,10)) {
				add_string(1);
				change_coins(-1 * 400);
				}
				else add_string(5);
			}
			else add_string(3);
	break;

begintalknode;
	state = 192;
	nextstate = -1;
	question = "_That's way too expensive._";
	text1 = "_Then don't buy them. I know that you're big, strong soldiers, but I need to make a living. Good day._ She returns to work.";
	action = END_TALK;

begintalknode;
	state = 192;
	nextstate = -1;
	question = "_I don't need anything right now._";
	text1 = "_All right. If you need a boat, I'll still be here. I hope._ She returns to work.";
	action = END_TALK;

// Gibrain

begintalknode;
	tag = 170;
	state = -1;
	nextstate = 217;
	question = "Gibrain";
	text1 = "You meet an Avernite archer, about to embark on a major drinking spree. At the moment, he wants someone to talk to.";
	text2 = "He waves you over, takes a long pull of his ale, and says, _Have a seat. Call me Gibrain._";
	text5 = "Gibrain takes another long swig of ale. His alcohol-induced haze is deepening rapidly.";
	action = INTRO;

begintalknode;
	state = 217;
	nextstate = 218;
	question = "_Life's hard, I take it?_";
	text1 = "He takes a long pull of his ale and shakes his head sadly. _I been pulling patrols out west. Empire raiders are out there. They ain't takin' prisoners. They're just killing._";

begintalknode;
	state = 218;
	nextstate = -1;
	question = "_The Empire isn't taking prisoners?_";
	text1 = "_No. That's the lesson they taught us in Cotra. They don't want to take us over. They want revenge. The Empire wants revenge, and they aren't goin' to stop until there's nobody left down here. And they can do it too._ He takes a very long drink.";
	text2 = "_Damn the Empire. That's all I got ta' say. Damn the Empire._";

begintalknode;
	state = 218;
	nextstate = 219;
	question = "_Are Empire troops the only thing causing you problems?_";
	text1 = "He swigs again. _No, they ain't all that's out there. We stumbled on a big nest of sliths too! Barely got away alive!_";

begintalknode;
	state = 219;
	nextstate = 218;
	question = "_Sliths? I thought they were our allies?_";
	text1 = "_Most of them. Not all. We found this big hidden lair of 'em. Been tryin' to tell our superiors about it, but they don't even want to hear about it now!_ He drinks. _Hey! You're adventurers! Look, head roughly north of Cotra a long way and look for the four statues!_";
	text2 = "_They're out in the middle of nowhere. Stand in the middle of the statues and head straight west a ways and you'll find the sliths._ He drinks more ale. Much more. You don't have any more coherent conversation.";
	action = END_TALK;
	
// Angarahad

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 244;
	question = "Angarahad";
	text1 = "You meet a thin girl in her early teens. She is exploring the small park by herself, having as much fun as she can. She curtsies to you.";
	text2 = "_I'm Angarahad._ When you met her, she was playing a game involving throwing pebbles at rocks on the ground.";
	text5 = "Angarahad continues to play her game with the pebbles and rocks. You watch for a while, but you can't come up with even a guess of what the rules are.";
	action = INTRO;

begintalknode;
	state = 244;
	nextstate = 247;
	question = "_Tell me about this park._";
	text1 = "_It's small and lonely, but it's better than the slum._";

begintalknode;
	state = 247;
	nextstate = -1;
	condition = 1;
	question = "_The slum?_";
	text1 = "She points to the southeast. _My parents don't let me play in there. It's too rough. Out here it's boring and there's no kids, but it's safer._";
	
begintalknode;
	state = 244;
	nextstate = 245;
	question = "_What are you doing out here alone?_";
	text1 = "_Lookin' for friends._";

begintalknode;
	state = 245;
	nextstate = 246;
	question = "_There are no kids your age?_";
	text1 = "She sniffles. _All my friends were in Cotra, but we hadda' run away, and I can't find 'em now. Will you play with me?_";

begintalknode;
	state = 246;
	nextstate = -1;
	question = "_Sure, I can play with you._";
	text1 = "You play with her a little while. She tries to teach you the rules of an elaborate game involving throwing rocks and pebbles. It makes no sense. You gamely play with her the best you can.";
	text2 = "It makes her feel a little better, but not much. When you say you have to leave, she seems only a little sad about it.";
	action = END_TALK;

begintalknode;
	state = 246;
	nextstate = -1;
	question = "_I'm too busy to play. I have adventures to go on._";
	text1 = "She shrugs and continues to throw pebbles. She seems neither surprised nor disappointed by your response. You move on.";
	action = END_TALK;

// Gary

begintalknode;
	tag = 210;
	state = -1;
	nextstate = 271;
	question = "Gary";
	text1 = "There is a nephil sitting alone at the long table. He sips daintily at a cup of bitter cave cow milk. He turns his round, glittering eyes to you. _Rrrrr. Sit, soldier. I am Awrmm._";
	text5 = "Awrmm continues to work on his milk, lapping it up with long, slow strokes of his tongue. Occasionally he wipes and pats down a section of his fur. Nephilim, like cats, are fastidious creatures.";
	action = INTRO;

begintalknode;
	state = 271;
	nextstate = 274;
	condition = gf(4,12) == 0;
	question = "_How are you?_";
	text1 = "He bows his head. _Mrrrr. I have much sorrow, but my affairs are private for now. Am here for help._";

begintalknode;
	state = 274;
	nextstate = -1;
	condition = 1;
	question = "_Help with what?_";
	text1 = "_Be talk to Commander Arlen. Is he who knows help I am here for. Now leave me. Will eat in peace._";
	action = END_TALK;
	
begintalknode;
	state = 271;
	nextstate = 273;
	condition = gf(4,12) == 1 && gf(43,11) == 0;
	question = "_I was told that you could help us to free some nephilim slaves?_";
	text1 = "His eyes flash. _Mrrrrow! At last, ones to help us! My peoples are held by angry mule nepharim in cave far to north and a little east. If you were freeing them, they could revolt and help you! Mrrr. Nepharim not all bad, but these should die._";

begintalknode;
	state = 273;
	nextstate = -1;
	question = "_What are mule nepharim?_";
	text1 = "_Nepharim like what you humans call mules, bigger than us and sterile. These mules hate us and enslave us. Mrrrr. But kill their chief and may inspire nephilim to revolt, so you can free prisoners. To be tried, one hope!_";
	text2 = "_Rrr. To enslave us is evil bad. They must be punished._";

begintalknode;
	state = 273;
	nextstate = -1;
	question = "_Anything else you can tell us about the nepharim lair?_";
	text1 = "_Go north to Fort Duvno. Go east from there to big cave wall. Follow cave wall north and you find tunnel to bad nepharim lair._";

begintalknode;
	state = 271;
	nextstate = -1;
	condition = gf(43,11) >= 1;
	question = "_I freed the imprisoned nephilim._";
	text1 = "Awrmm sets down his milk and stands, thrilled. _You ... You are kindness. You save us much. I wish you great well. Now I go find people, so we can make again village. Thank you and luck._ He runs from the bar.";
	action = END_TALK;
	code =
		sf(4,18,1);
		erase_char(414);
	break;

begintalknode;
	state = 271;
	nextstate = -1;
	condition = species_in_party(2);
	question = "_You're staying in a human inn? Don't the nephilim hate humans?_";
	text1 = "_Rrr. I see nephil adventurer before me, fighting to defend humans. Defending Avernum. Not ask I how I can band with human to be safe._";

begintalknode;
	state = 271;
	nextstate = -1;
	condition = species_in_party(2) == 0;
	question = "_You're staying in a human inn? Don't the nephilim hate humans?_";
	text1 = "_Nephil and human have new peace. Empire kill us all. Must fight together._";

