// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,2) == 0;
	question = "special";
	text1 = "You near the western gates of Almaria. Almaria is another of Avernum's oldest cities, perched on the west shore of a deep river. It guards the only bridge over this river, and the tolls for crossing have long enriched the city's coffers.";
	text2 = "Even out here, you can hear the cacophonous tumult inside the city walls. Both a home for refugees and the main meeting point for merchants from north and south, Almaria is always a center of activity.";
	text3 = "A guard stands by the gate, which is closed. Traffic in and out of the Great Cave is highly restricted by order of the Castle. You will have to talk your way in.";
	action = SET_SDF 148 2 1;
	code =
		if (gf(148,20) > 0)
			rs(3);
	break;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,3) == 0;
	question = "special";
	text1 = "You enter Almaria and get a good look at its busy streets. Merchants direct their lizard-drawn carts through the streets, refugees look for new opportunities, and merchants hunt for ways to make money off of all of them.";
	text2 = "Not a few people on the streets look a bit tipsy. Almaria is legendary for the quality of its wine, which is, by surface standards, almost bearable.";
	text3 = "Considering how many soldiers are here, waiting to form caravans and head north to the war, you don't attract any attention at all.";
	action = SET_SDF 148 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,4) == 0;
	question = "special";
	text1 = "The northeast corner of Almaria looks like it was rebuilt only in the last few years. The walls look much newer and are not entirely completed. However, they have been put to use housing the many refugees in the city.";
	text2 = "It is as noisy and busy here as elsewhere in the city, but there is also great poverty and desperation. And a variety of unpleasant odors.";
	text3 = "The refugees watch you silently as you pass, making no move to ask for aid or charity. You doubt that they have been treated overly warmly at the hand of the city guard.";
	action = SET_SDF 148 4 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,5) == 0;
	question = "special";
	text1 = "Having navigated past the traps in the abandoned barracks, you step out into Almaria's sewer. Some of the river is diverted under the city, carrying away the garbage and waste. The smell is, of course, horrible.";
	text2 = "You listen carefully, trying to detect kidnappers or guards over the constant chittering of bats and rats.";
	text3 = "Sure enough, you hear something. Booted feet, on the stone to the northeast. There are guards patrolling in that direction.";
	action = SET_SDF 148 5 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,6) == 0;
	question = "special";
	text1 = "Almaria is the meeting point for caravans from north and south Avernum. Merchants haul their wares to the city. Then they come to this building to buy and sell goods wholesale.";
	text2 = "You get many annoyed looks when you enter. Even in wartime, tons of goods are traded. Representatives from the army and the Castle buy metal and cloth. Mages from the Tower Colony and Patrick's Tower haggle for crystals and herbs.";
	text3 = "Since you don't have any use for a ton of wood or iron, you won't be able to do much trading here. You'll have to find a shop somewhere else.";
	action = SET_SDF 148 6 1;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,7) == 0;
	question = "special";
	text1 = "This courtyard borders on the east gate of Almaria, which leads to the bridge across the river. For most people, it is necessary to pay a toll to pass. Fortunately, soldiers are exempt.";
	text2 = "You will still need to get them to open the gate. A soldier watches you through a window in the building to the north.";
	action = SET_SDF 148 7 1;

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,8) == 0 && gf(148,1) == 0 && gf(148,11) == 0 && gf(148,16) == 0;
	question = "special";
	text1 = "To the north, you can see a cookfire. The main camp of rogues (and their hostages) must be close. If you keep going in this direction, they will soon see you. This could be very bad for the hostages.";
	action = SET_SDF 148 8 1;

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,9) == 0 && gf(148,1) == 0 && gf(148,11) == 0 && gf(148,16) == 0;
	question = "special";
	text1 = "Down the corridor to the south, you can hear several drunken voices. You smell a haunch of lizard meat being roasted over a low cookfire. The main camp of rogues must be down there.";
	text2 = "Luckily, none of them are in this back corridor, but you can't count on this good fortune lasting for long.";
	action = SET_SDF 148 9 1;

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = get_sdf(148,10) == 0;
	question = "special";
	text1 = "You hear a crumbling sound to the south. Bricks fall to the ground as a section of wall collapses. You look up, ready to jump if the ceiling starts to cave in. Fortunately, most of the sewers are well constructed.";
	text2 = "As the dust and mold make you cough, you think you hear soft footprints skittering over the stone.";
	action = SET_SDF 148 10 1;
	code =
		set_terrain(1,542,663,0);
		set_terrain(1,543,663,0);
		set_terrain(1,544,663,0);
		set_floor(1,542,663,15);
		set_floor(1,543,663,16);
		set_floor(1,544,663,17);
		activate_hidden_group(33);
	break;

//


begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the brigand guards has seen you! He points at you and shouts an alarm. Then he turns and runs.";
	text2 = "If he gets back to his leader, they will know that you are here. That might not mean instant death for the hostages, but it will make a direct assault much more difficult.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You get close enough to the camp for one of the brigands to see you. he points and shouts an alarm. Panic is immediate. Everywhere, desperate rogues are grabbing weapons and preparing to defend themselves.";
	text2 = "This could be very bad news for the hostages. If they are not rescued, and soon, some desperate brigand is going to kill them. Even now, someone is probably going to secure their cell.";
	code =
		if (gf(148,11) > 0)
			rs(2);
	break;
	
begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You are confronted by the leader of the brigands. She is a young woman with leather armor and a long, wicked blade.";
	text2 = "She has a crazed, desperate look in her eyes. She must have been an accomplished fencer, before something drove her mad. She lets out a mad, barking laugh when she sees you. _You challenge Arilda, eh? Well, you'll find it hard to bring me down._";
	text3 = "You note that her blade is covered with blood. She has used it already.";
	text4 = "_Come on, soldier. Let's see what you got!_";
	code =
		if (gf(148,13) < 3)
			rs(3);
	break;
	
begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The brigand leader falls to the ground, mortally wounded. Driven mad with pain and anger, she attempts to drag herself up again, and again. It's a painful thing to watch. She refuses to surrender.";
	text2 = "But, finally, her body gives out. She collapses for the final time. The kidnapper of the Empire envoys has been punished for her crime.";

begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = gf(148,1) == 0 && gf(148,13) >= 3;
	question = "special";
	text1 = "You reach the room where the hostages were being held, only to find a bloody mess. It's horrifying. One of the exhausted, panicking brigands came back here and killed them. Your assault was too slow.";
	text2 = "You will have to report this failure back to the Castle. If you survive to escape.";
	code =
		sf(148,1,2);
	break;
	
begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = gf(148,11) == 0 && gf(148,1) == 0 && gf(148,13) < 3;
	question = "special";
	text1 = "You round the corner and find three unarmed people. They are exhausted and terrified, and their arms are bound behind their backs. Their clothes are filthy.";
	text2 = "One look at their faces tells you that they're from the surface. One of them says, in a quiet voice, _At last. Thank goodness. We are saved! Please untie us. We are ready to flee._";
	text3 = "You free them from their bonds. Another says, _Take us to the stairway up to city hall. And please, don't leave us behind!_";
	code =
		sf(148,11,1);
	break;

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the hostages stops moving. _Wait. I heard something. Did you?_";
	text2 = "And then you hear it. Someone shouts in the distance. Then more brigands join in. And then the echoes of dozens of booted feet running out of the bandit hideout and into the swamps.";
	text3 = "So much for a quick getaway. The bandits discovered that the hostages have been freed. Now they are hunting for you.";
	code =
		set_act_at_dist(15999,1);
		set_act_at_dist(16000,1);
		set_act_at_dist(16001,1);
		set_act_at_dist(16002,1);
		set_act_at_dist(16003,1);
		set_act_at_dist(16004,1);
		set_act_at_dist(16005,1);
		set_act_at_dist(16006,1);
		set_act_at_dist(16007,1);
		set_act_at_dist(16008,1);
		set_act_at_dist(16009,1);
		set_act_at_dist(16010,1);
	break;
	
begintalknode 17;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "A hostage climbs up the stairs to safety! The Castle will be very pleased. They will have something to show to calm the Empire's anger.";
	code =
		sf(148,1,1);
	break;
	
begintalknode 18;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The last of the three hostages falls. Your effort to rescue them has failed. The Castle will not be pleased.";
	code =
		sf(148,1,2);
	break;
	
begintalknode 19;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The hostage is far too tired and afraid to give you any useful information. _Please ... Just take me to the stairway out of this hell!_";

begintalknode 20;
	state = -1;
	nextstate = -1;
	condition = get_sdf(149,22) == 0;
	question = "special";
	text1 = "As promised, there are definitely rats down there. Big ones. You can see their vicious, beady little eyes staring at you from the shadows.";
	text2 = "But that isn't all. There is the distinct smell of sulfur in the air, and it's unnaturally warm down here.";
	text3 = "Gremlin wine is rare, powerful stuff, infused with wild magic. It's possible that its presence has drawn something here, something much bigger than a rat.";
	action = SET_SDF 149 22 1;

begintalknode 21;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This book of rituals has been placed here to train acolytes of the Church of the Prevailing Righteousness. Most of the chants are very simple, too weak or familiar to provide useful education.";
	text2 = "One prayer is interesting. It described how to summon holy energy to purge allies of poison and other afflictions. You study it. (Your skill with the spell Mass Curing increases.)";
	text3 = "You browse through the book a bit more, but you don't learn anything new.";
	text4 = "You browse through the book, but you can't understand any of it. You don't know enough magical lore. (Improve your Arcane Lore skill to understand books like these.)";
	code =
		if (gf(148,18) == 0) {
			rs(3);
			if (get_stat_total(13) < 8)
				rs(2);
				else {
					rs(4);
					sf(148,18,1);
					alter_stat(30000,71,1);
					}
			}
			else {
				rs(1); rs(2); rs(4);
				}
	break;

begintalknode 22; // guard
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Almaria's city guard is a tired, miserable lot. Poorly equipped, constantly dealing with drunk soldiers, merchants' disputes, and angry refugees. Not to mention skribbane.";
	text2 = "Your conversation mainly involves you listening to a lot of complaints, along with subtle digs about how easy people in the Castle have it. You eventually manage to pull yourself away.";
	text3 = "Now that the Great Portal is gone, conversations here tend to descend into morasses of doom and futility. You eventually manage to pull yourself away.";
	code =
		if (gf(170,1) < 12)
			rs(3);
			else rs(2);
	break;
	
begintalknode 23; // merch
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several merchants talking quietly here. You can't tell whether they are haggling, trading rumors, or just complaining about the difficulties of life on the road.";
	text2 = "When they realize that you are nearby, they get very quiet very quickly. Their conversation doesn't resume until you move away.";
	
begintalknode 24; // refugee
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several refugees nearby. You eavesdrop on their conversation:";
	text2 = "_Don't go to the Castle Food Depot. They won't give you anything. I bet their storerooms are completely empty._";
	text3 = "_You should take that problem to Edmund. He'll listen to you. Nobody else will._";
	text4 = "_Thank the Heavens for Mayor Regan. If we were in Dharmon, they probably would have beaten us and dumped us at the city gates by now._";
	text5 = "_I have to go through the portal soon. If not, I'll starve. Or go mad. I have to get out of here._";
	text6 = "_I've heard that there's a drake hiding in the ruins not far southeast of here. With a big pile of treasure. If only I hadn't had to pawn my sword._";
	text7 = "_No! Really! They kidnapped three envoys from the Empire. They're holding them somewhere in the sewers. The only question is how many people get killed before this gets settled._";
	text8 = "_That's right. I heard the brigands down below have been wiped out. They kidnapped someone from the Empire, and ... well. You know how that'll turn out._";
	code =
		clear_strings();
		as(1);
		i = get_ran(1,0,5);
		if ((gf(148,1) > 0) && (i == 5))
			i = 6;
		as(2 + i);
	break;
	
begintalknode 25; // acolyte
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is an acolyte of the Church of the Prevailing Righteousness sitting cross-legged on this mat, a sword lying across his lap. He meditates quietly, attempting to ascend to a state of pure warrior consciousness.";
	text2 = "You leave him alone.";
	
begintalknode 26;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Church of the Prevailing Righteousness";
	
begintalknode 27;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Fine Almarian Wines";

begintalknode 28;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Refugee Quadrant";
	text3 = "  Refugees stay here! Almarians stay out!";
	
begintalknode 29;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Serilda's Fine Arms";

// Mayor Regan

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "This old woman wears the sash of a mayor of Avernum. And, considering how things have been going, with the abandonment of Cotra and the loss of Formello, those sashes are becoming rarer by the day.";
	text2 = "She is obviously extremely nervous. She jumps when you enter, and she can't stop casting nervous glances at the door in the south wall. The goblet in front of her is half full of fine Almarian wine, and it will likely be empty soon.";
	text3 = "She snaps, _Who are you, soldier? I am Regan, mayor of Almaria, and my time is limited._";
	text5 = "Mayor Regan looks up from her papers at you. _What else do you want, soldier? Speak quickly. My city has troubles, and they double by the day._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = gf(149,20) == 0;
	question = "I want to know something about Almaria?";
	text1 = "_You jest! This is not like the early days, when any adventurer could walk in and trouble the leaders of Avernum with trivia! Move on, or I will have my guards eject you!_ You take her at her word.";
	text2 = "As you turn to leave, you see her cast a glance at the south door. Something through there truly worries her.";
	action = END_TALK;
	
begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = gf(149,20) == 0 && (gf(177,5) > 0 || gf(170,1) > 12);
	question = "I was sent here by the Castle. Something about some Empire hostages.";
	text1 = "Mayor Regan jumps to her feet. _Shush! Come in! Don't let anyone hear! This needs to be kept very quiet._";
	text2 = "She settles back down. _Yes, we need help with this situation, and quickly. The thugs holding the three Empire envoys seem more unstable by the day._";
	action = SET_SDF 149 20 1;

begintalknode 33;
	state = 30;
	nextstate = 31;
	condition = gf(149,20) > 0;
	question = "I'd like to know more about Almaria.";
	text1 = "She nods. _I suppose it is important for you to understand our city, if you are to help it. I can spare a moment._";
	text2 = "_Almaria is the key trading hub of Avernum, the gateway to the Great Cave. We guard the bridge over the river, and we provide a place for merchants to meet and trade. It is very rewarding._";
	text3 = "She grabs her goblet and drinks deeply. _And we make the best wine in Avernum._";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = gf(149,20) > 0;
	question = "How has your city been holding up in this crisis?";
	text1 = "_We have been very busy. Double the merchant caravans, four times the soldiers, packs of refugees, and the constant desperation on top of that._";
	text2 = "_We haven't had to be like those of Dharmon to maintain the law, but it is a constant struggle._";

begintalknode 35;
	state = 30;
	nextstate = 33;
	condition = gf(149,20) > 0 && gf(149,21) < 2 && gf(148,1) == 0;
	question = "I'm ready to help recover the hostages.";
	text1 = "_I am glad. And they really do need to be recovered. Eventually, we will be back in close contact with the surface. And, when we are, we do not want Emperor Redmark thinking we were careless with his envoys._";
	text2 = "_There are three of them. Important and wealthy Empire traders and merchants, with impressive connections in the government. And now they are being held by unstable ruffians in the sewers under our feet._";
	text3 = "_You need to find a way to get to them and escort them to safety. If you panic their captors, they will likely end up dead._";
	text4 = "_Fortunately, you may be able to learn more about their situation from others in Almaria. You should investigate. Quickly. When you are ready, I can open the way to the sewers._";
	code = 
		set_flag(149,21,1);
		toggle_quest(48,1);
	break;	


begintalknode 36;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Where do the merchants here come from?";
	text1 = "_Everywhere! They came from as far as the Northern Reaches, bearing crystals and ore. They traded their wares for food and goods needed out there, and then they head back._";
	text2 = "_All of that sort of trade takes place here. And, of course, we take a small percentage of every trade. As fair compensation for giving them a safe place to meet, where contracts are honored and law is enforced._";

begintalknode 37;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "How good is the wine?";
	text1 = "_Well, I've had surface wine, so ... Ummmm ... It's as good as pressed, fermented fungal juices could possibly be._";
	text2 = "_The fruit we make the wine from comes from trees that have resisted the Blight. Fortunately._";

begintalknode 38;
	state = 31;
	nextstate = 32;
	condition = 1;
	question = "Tell me about the bridge.";
	text1 = "_The bridge is the reason Almaria exists. It was only natural that a city formed around it. And we collect a toll for every soul that crosses it. Except for soldiers, of course. For maintenance._";

begintalknode 39;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "Does the bridge require much maintenance?";
	text1 = "_Well, a sea monster took a large bite out of it only last month. So I'd say yes._";

begintalknode 40;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "How exactly were they kidnapped?";
	text1 = "_The three envoys came to Almaria to arrange the purchase of raw materials not long before the Great Portal exploded. I warned them to be wary. They were not. They wandered our streets at all hours. They ... They drank heavily._";
	text2 = "_And then they disappeared. One night, they went out. The next morning, their beds had not been slept in. I ordered an immediate search, of course. To no avail._";
	text3 = "_And then a scroll was pushed up through one of the sewer grates. A guard found it and brought it to me, and thus I learned of the kidnapping, and the demands._";
	

begintalknode 41;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "What do the kidnappers want?";
	text1 = "She laughs. _Food. They risk a new war between Avernum and the Empire, for a few dozen bags of meal and some sacks of coin._";
	text2 = "_I wanted to pay them. King Starrus has forbidden it. He refused to be extorted by their kind, and he does not want to tell the Empire that these rogues went unpunished._";
	text3 = "_It is an unwise decision. He does not understand how desperate and crazed these vermin are._ She shrugs. _But he is the king._";
	
begintalknode 42;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "Where can I get more information?";
	text1 = "_You must speak with Commander Horrmarin, in the barracks. He knows much more than I about the exact nature of the enemy and their position within the sewers._";
	text2 = "_The important thing is to either strike hard and fast or to find a way to sneak past their defenses._";

begintalknode 43;
	state = 33;
	nextstate = -1;
	condition = gf(148,26) == 0;
	question = "I am ready to descend.";
	text1 = "The mayor rises and unlocks the southern door. _The sewers were sealed off after the envoys were taken. The stairway through here is the only route in or out, though we believe that the enemy has placed some traps._";
	text2 = "_Good luck to you. A great deal depends on your speed and cunning._";
	action = END_TALK;
	code =
		sf(148,26,1);
	break;
	
begintalknode 44;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "I need to do some more investigating.";
	text1 = "She nods. _Learn all you can before you descend. You can't go blundering into there like mere adventurers. You must show great care. Return when you have prepared._";
	action = END_TALK;
	
begintalknode 45;
	state = 30;
	nextstate = 35;
	condition = gf(149,20) > 0;
	question = "How did you become mayor?";
	text1 = "_I was a mayor before. Of a small but growing city in the far north named New Harston. When that city was abandoned, I came here. When the mayor of Almaria ... departed, King Starrus honored me by giving me this post._";
	text2 = "_I had experience, after all._";
	
begintalknode 46;
	state = 35;
	nextstate = -1;
	condition = 1;
	question = "Why was New Harston abandoned?";
	text1 = "_The Slith Horde poured into Avernum not far from our poor city. It was the first settlement lost to that vicious foe. But not the last._";
	
begintalknode 47;
	state = 35;
	nextstate = -1;
	condition = 1;
	question = "What happened to the mayor of Almaria?";
	text1 = "_He visited the Great Portal. And then he went through. Abandoned his post. Used the portal out of turn. It was shocking. A humiliating loss of nerve._";
	text2 = "_But, after what has happened since, I can understand his cowardice. Though I do not share it._";
	
begintalknode 48;
	state = 30;
	nextstate = -1;
	condition = gf(149,21) == 1 && gf(148,1) == 2;
	question = "I'm afraid that all of the hostages were killed.";
	text1 = "Mayor Regan looks ill. _I will send word to the Castle. When we have contact with the surface once again ... Oh, it will not be pleasant. We will have to talk very quickly._";
	text2 = "_I ... I should thank you. I suppose. It was a difficult situation, and you risked your life. Return to the Castle and your commander and get new instructions. I will try to clean up this mess._";
	text3 = "She grabs a pen and starts writing several letters. You soon realize that you have been dismissed.";
	action = END_TALK;
	code =
		sf(149,21,2);
		sf(102,1,1);
		toggle_quest(48,3);
	break;
	
begintalknode 49;
	state = 30;
	nextstate = -1;
	condition = gf(149,21) == 1 && gf(148,1) == 1 && gf(148,12) <= 2;
	question = "I freed the hostages. Though not all of them made it out.";
	text1 = "_You did very well, and I am grateful. You have done enough that King Starrus will be, while displeased, not completely full of wrath. And some of the blame can, of course, be put on the envoys themselves._";
	text2 = "_The survivor has already left Almaria, understandably. The crown will find a safe place for that envoy until escape from the underworld is possible._";
	text3 = "_The survivors have already left Almaria, understandably. The crown will find a safe place for the envoys until escape from the underworld is possible._";
	text4 = "She rewards you with a large sack of coins. _A token of gratitude from Almaria and from the leadership of Avernum. You may report your success back to the Castle. I'm sure they will have more work for one of your obvious skill._";
	code =
		sf(149,21,2);
		sf(102,1,1);
		toggle_quest(48,3);
		change_coins(400);
		award_party_xp(300,14);
		if (gf(148,12) == 1)
			rs(3);
			else rs(2);
	break;
	
begintalknode 50;
	state = 30;
	nextstate = -1;
	condition = gf(149,21) == 1 && gf(148,1) == 1 && gf(148,12) > 2;
	question = "I freed the hostages. They all made it out.";
	text1 = "_You did very well, and I am grateful. Your mission was a stunning success, and the envoys can complain of nothing but inconvenience. And some of the blame can, of course, be put on the envoys themselves._";
	text3 = "_The survivors have already left Almaria, understandably. The crown will find a safe place for the envoys until escape from the underworld is possible._";
	text4 = "She rewards you with a large sack of coins. _A token of gratitude from Almaria and from the leadership of Avernum. And this is a special expression of thanks from me._ She has a guard bring you a beautiful silver dagger.";
	text5 = "_You may report your great success back to the Castle. I'm sure they will have more work for one of your obvious skill._";
	code =
		sf(149,21,2);
		sf(102,1,1);
		toggle_quest(48,3);
		award_party_xp(500,14);
		change_coins(400);
		reward_give(70);
	break;
	
begintalknode 51;
	state = 30;
	nextstate = -1;
	condition = gf(149,21) > 1;
	question = "How have things gone since the hostages were freed?";
	text1 = "_The sewers have been cleared of vermin. We are taking steps to make sure no disaster of this sort ever happens again. Extra night patrols, and so on._";
	text2 = "_As for whether the Empire will forgive us for what happened, I'm afraid we will find out all too soon._";
	code =
		if (gf(148,0) < 2)
			rs(2);
	break;

// West Gate Guard

begintalknode 55;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "A soldier stands by the west gate, holding several scrolls. As you watch, a merchant or traveler will occasionally approach him. He asks a few questions, nods, and cries for the gate to be opened. They enter, and the gate closes again.";
	text2 = "You eventually approach and greet the guard. He notes your insignia. _Greetings, soldier. Welcome to Almaria. Because of ... ahhhh ... the troubles, Mayor Regan has declared that you must have travel orders to enter._";
	text3 = "There is still a guard at this gate. He nods. _Greetings to you._ Then he waves you by.";
	action = DEP_ON_SDF 148 20 0;
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0;
	question = "Why do I need orders to enter?";
	text1 = "_Not my job to argue with a mayor of Avernum. I just get the orders. Though I think a combination of deserters and drunk soldiers on leave had something to do with it._";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0 && gf(170,1) <= 8;
	question = "I really need to enter.";
	text1 = "He looks at one of his scrolls. He looks at you. He consults the scroll again. He shakes his head. _Sorry, friend. Believe me, I'd like to let you in. The wine here is ... edible._";
	text2 = "_But you'll have to be moving on. If you lack something to do, talk to your commanding officer._ Doesn't look like there's anything else you can do here.";
	action = END_TALK;
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0 && gf(170,1) > 8 && registered();
	question = "I have orders to go to the Great Portal. Let me pass.";
	text1 = "He looks at one of his scrolls. He looks at you. He consults the scroll again. Then, on a hunch, he checks a different scroll. Finally, he finds your name.";
	text2 = "He shouts an order, and the gate slowly begins to open. _Sorry for the delay, friend. I don't envy you for going to the Great Portal. Working there is ..._ He shakes his head. _Anyway, welcome to Almaria._";
	action = END_TALK;
	code =
		sf(148,20,1);
	break;
	
begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0;
	question = "You'll let me in if you know what's good for you.";
	text1 = "The guard laughs in your face. _You threaten me, you runt? When I have a whole battalion to back me up? Get out of here!_";
	text2 = "There are already more soldiers on the other side of the gate, drawn by the noise. You decide to move on.";
	action = END_TALK;

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0;
	question = "How are you faring?";
	text1 = "He shrugs. _It's a dull post, but a safe one. I'm in no hurry to go north and fight the horde. Excuse me. Have to get back to work._ He turns to question a small band of refugees.";
	action = END_TALK;
	
begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = gf(148,20) == 0 && gf(170,1) > 8 && registered() == FALSE;
	question = "I have orders to go to the Great Portal. Let me pass.";
	text1 = "He looks at one of his scrolls. He looks at you. He consults the scroll again. Then, on a hunch, he checks a different scroll. Finally, he finds your name. Then he shakes his head.";
	text2 = "_I'm so sorry. This confuses me as much as it does you. According to this scroll, you are only allowed to wander in what is called the 'Demo.'_";
	text3 = "_To be allowed to explore all of Avernum, you need to perform the arcane Ritual of Registration. I wish I could tell you more about it, but I'm very confused._";
	text4 = "(You are at the end of the Avernum 6 demo. To find out how to register, exit the game. If you order the game from our secure online store, you can have the key that unlocks the entire game within minutes!)"; 

// Tardiff

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "After a short wait in line, you approach the window. A young, pleasant woman sits on the other side, counting a tall stack of sliver coins. She deposits them in one of the jars behind her and then greets you.";
	text2 = "_Welcome, soldier. I am Tardiff. I assume you are here to have the gate opened?_";
	text5 = "Tardiff, guardian of the Almaria Bridge, smiles brightly at you. _Always nice to see a soldier. You need anything else from me?_";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Tell me about the bridge.";
	text1 = "She is pleased that you asked. _Ahhhh ... The Almaria bridge. One of the first bridges in Avernum. It has a long and storied history._";
	text2 = "_It is also one of Almaria's main sources of income. Few in our history have had the privilege of passing without paying the proper toll._";

begintalknode 72;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "What is the fee to pass?";
	text1 = "_Normally? Ten coins per person. Three for lizards. Fifteen for wagons. But for soldiers, it's always free. Almaria wants to contribute fully to the war effort._";

begintalknode 73;
	state = 70;
	nextstate = -1;
	condition = gf(148,21) == 0;
	question = "Can you open the gate for me?";
	text1 = "She flutters her eyelashes a little. _You had but to ask._ She waves a hand. A moment later, the east gate begins to open for you.";
	text2 = "Some merchants eye the open gate jealously. They're tempted to try to slip through for free, but they know they're in for a beating from the guards if they try it.";
	code =
		sf(148,21,1);
	break;
	
begintalknode 74;
	state = 70;
	nextstate = -1;
	condition = gf(148,21) > 0;
	question = "Anything else you can do for me?";
	text1 = "She giggles. _Oh, but you are a flirt. No, I only watch the gate. Better go through. Those merchants look like they might run for it any minute._";
	action = END_TALK;

begintalknode 75;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "A long and storied history? Really?";
	text1 = "_Of course. First, it was built, and then ... people crossed it ... All right. Maybe not very storied. But it is pretty._";

begintalknode 76;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "Ever have any trouble collecting the toll?";
	text1 = "_Every day. Everyone wants to haggle or give a reason why they shouldn't have to pay. Fortunately, I have the guards here. Keeps me from long arguments._";
	text2 = "_Why, I even had to charge three Empire envoys not long ago. And they were furious, I can tell you! But I ... Oh. Oops._";

begintalknode 77;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "And yet I don't need to pay the toll?";
	text1 = "_Not at all. Not a coin. I hope you understand what an honor this is. For Almarians, not charging a toll or a tariff ..._ She shakes her head. _Oh, it is a struggle for us._";
	text2 = "";

begintalknode 78;
	state = 72;
	nextstate = 71;
	condition = 1;
	question = "Oops? What?";
	text1 = "_I'm sorry. I ... I misremembered. There were no Empire envoys at all. Never mind. My mistake._ She stammers a bit more. How odd.";

// Edmund

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = "At first, this aging refugee looks no different from all of the others. He sits quietly by the wall, staring into a fire. His clothes are dirty and torn. He seems exhausted.";
	text2 = "But then you notice that he is rarely alone. Other refugees constantly approach him, have whispered conversations, and disappear again. Sometimes he hands them fruit from the basket by his side. In fact, it's odd that he has food.";
	text3 = "Eventually, he notices you and waves for you to approach. _Hello, soldier. I am Edmund. We don't see many of your lot in this unhappy corner of Avernum. Did you need something?_";
	text5 = "Edmund looks up at you and smiles. _Yes, soldier? Do you need something else?_";
	text6 = "You are aware that all of the other refugees have grown very quiet. They watch your conversation intently.";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = 91;
	condition = 1;
	question = "You are one of the refugees.";
	text1 = "_I am. Though, as you may have observed, the others here regard me with some respect. They often come to me for assistance or advice. It takes up a lot of my time, but it doesn't bother me. I have nothing else to do._";

begintalknode 92;
	state = 90;
	nextstate = 93;
	condition = 1;
	question = "I see that you have some food there.";
	text1 = "_This sad little basket? Yes. Some merchants and travelers have made donations, and I have used it to obtain this miserable little store of fruit. I share it with those whose situation has become truly desperate._";

begintalknode 93;
	state = 90;
	nextstate = -1;
	condition = gf(149,24) > 0 && num_of_item(191) > 0;
	question = "I have a bag of meal for you. (Give one bag.)";
	text1 = "Edmund accepts the meal with great gratitude. _I thank you. This does much to improve the lot of the people here._ As expected, he doesn't pay you any money.";
	text2 = "He does, however, pull a stained scrap of vellum out of his pouch. It is covered with dense writing. _One of our number found this in a trash pit. We would like you to have it, as an expression of gratitude._";
	action = REUSABLE;
	code =
		take_num_of_item(191,1);
		award_party_xp(40, average_level());
		inc_flag(149,25,1);
		if (gf(149,25) == 5)
			reward_give(485);
			else rs(2);
	break;
	
begintalknode 94;
	state = 90;
	nextstate = -1;
	condition = gf(149,24) > 0 && num_of_item(191) > 1;
	question = "I have some bags of meal for you. (Give all of your meal.)";
	text1 = "Edmund accepts the meal with great gratitude. _I thank you. This does much to improve the lot of the people here._ As expected, he doesn't pay you any money.";
	text2 = "He does, however, pull a crystal out of his pouch. It is covered with dense writing. _One of our number found this in a ruin outside. We would like you to have it, as an expression of gratitude._";
	action = REUSABLE;
	code =
		i = num_of_item(191);
		take_num_of_item(191,i);
		award_party_xp(40 * i, average_level());
		inc_flag(149,25,i);
		if ((gf(149,25) > 8) && (gf(149,26) == 0)) {
			sf(149,26,1);
			reward_give(242);
			}
			else rs(2);
	break;

begintalknode 95;
	state = 90;
	nextstate = 95;
	condition = gf(149,21) == 1 && gf(148,1) == 0;
	question = "I need your help.";
	text1 = "He leans back against the wall and smiles, unsurprised. _Yes. We hear many things. Lots of rumors. Rumors of, say, Empire envoys and warriors from the Castle._";
	text2 = "_What do you need?_";

begintalknode 96;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "Why do they come to you?";
	text1 = "_In Cotra, where I am from, I was a person of some influence. And I was also, if I may flatter myself, respected. Cotra has been abandoned by the army, and I don't wish to discuss my lost life there. It is too painful._";
	text2 = "_However, my reputation remains. So the refugees come to me._";

begintalknode 97;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "How do you advise them?";
	text1 = "_There are many poor, desperate, scared people here. People who need guidance and reassurance and help in settling arguments over their meager possessions. I simply provide a calm voice._";
	text2 = "_Also, in very desperate situations, I share some of this pitiful basket of food here._ You notice that the fruit in the basket is wrinkled and sometimes a little moldy. But still edible.";

begintalknode 98;
	state = 91;
	nextstate = 92;
	condition = 1;
	question = "How are the refugees treated here?";
	text1 = "_Decently, as these things go. It is far worse in Dharmon and Silvar. The people here are proud, hard-working Avernites, not rabble and beggars. They deserve ..._ He stops and shakes his head.";

begintalknode 99;
	state = 92;
	nextstate = -1;
	condition = 1;
	question = "They deserve what?";
	text1 = "He sighs. _I apologize. I was about to rant. What I meant to say was that Mayor Regan at least tries to treat them decently. She is better than most._";

begintalknode 100;
	state = 93;
	nextstate = 94;
	condition = 1;
	question = "Why don't they go to the food depot?";
	text1 = "_Because the nearest one is a day's walk to the southwest, and that is a long way to travel and a lot of energy to expend to be told 'No.'_";

begintalknode 101;
	state = 93;
	nextstate = -1;
	condition = 1;
	question = "You accept donations?";
	text1 = "_I do. If you, in your travels, obtained a spare bag of mushroom meal, I would happily accept it and make sure it ends up where it would do the most good._";
	text2 = "_Bear in mind that I can't pay you any money. Most likely, doing good will have to be your reward._";
	code = 
		set_flag(149,24,1);
		toggle_quest(80,1);
	break;
	
begintalknode 102;
	state = 94;
	nextstate = -1;
	condition = 1;
	question = "How do they get any food at all?";
	text1 = "_They trade away their few remaining possessions. They forage. They fish. They beg._";
	text2 = "_Also, a trickle of food comes down through the Great Portal. Some of that is distributed among refugees. Be thankful for that. Without that supply, we would soon all succumb to despair._";
	text3 = "_It is not enough. Before, a trickle of food came down through the Great Portal, but that is gone. Soon, if nothing is done, you will see starvation and riots. Mark my words._";
	code =
		if (gf(170,1) < 12)
			rs(3);
			else rs(2);
	break;
	
begintalknode 103;
	state = 95;
	nextstate = 96;
	condition = 1;
	question = "Do you know anything about the envoys?";
	text1 = "_The captives, you mean? The ones from the Empire, who walked the streets at all hours, well-fed, well-dressed, and not entirely sober? I know about them. I know that they should have been more careful, for starters._";
	text2 = "_And I also might know something about the sewers where they are held._";

begintalknode 104;
	state = 96;
	nextstate = -1;
	condition = 1;
	question = "Did you have anything to do with their abduction?";
	text1 = "He sits up, visibly annoyed. _Do I look mad? I have nothing, nothing at all, to do with those mad skribbane eaters in the sewers. Don't insult me._";
	text2 = "_But the envoys were fools, rubbing their wealth in our faces. I warned Horrmarin this would happen, but he didn't listen. And here we are._";

begintalknode 105;
	state = 96;
	nextstate = 90;
	condition = gf(149,25) == 0;
	question = "Maybe you can tell me something about the sewers?";
	text1 = "_I would definitely consider it. However, the hunger of these people surrounding us, is a distraction. Interferes with my memory._";
	text2 = "_Perhaps if you spoke with me about the food situation, and maybe even contributed something to the cause, my mind would clear._";

begintalknode 106;
	state = 96;
	nextstate = 97;
	condition = gf(149,25) > 0;
	question = "Maybe you can tell me something about the sewers?";
	text1 = "He thinks. _I can't. Or, at least, I can't say anything you would want to risk anyone's life on._";
	text2 = "_You should talk to Edgar. He has been down there. I think he might be able to help you._";

begintalknode 107;
	state = 97;
	nextstate = -1;
	condition = 1;
	question = "Where is Edgar?";
	text1 = "_He's shy. Doesn't like soldiers. But he generally begs in the southwest corner of town. Be kind to him. He was an eater of skribbane once, but he cured himself, through great force of will. He's ... broken, but a good man._";
	text2 = "_He may try to avoid you. That's all I can tell you. I need to return to my people. Good day._ You step away, and several unhappy refugees instantly take your place.";
	action = END_TALK;
	code =
		sf(149,27,1);
	break;
	
// Edgar

begintalknode 110;
	state = -1;
	nextstate = 110;
	condition = 1;
	question = "Name";
	text1 = "There is a beggar wandering the streets of Almaria. He is skinny, dressed in torn, filthy clothes, and exhausted. Still, he is somehow able to summon up the energy to keep moving and asking for charity. Not that he's getting any.";
	text2 = "But, as desperate as he is, he is definitely trying to avoid soldiers. Like you. After following him for a while, he isn't able to ignore you anymore. _Sorry, sorry, soldier. Just ... Just being peaceful. Doing nothing wrong._";
	text3 = "_I'm Edgar. Just a poor refugee. Doing nothing wrong._ He looks up at you, hoping that you let him go.";
	text5 = "Edgar the beggar shuffles nervously from one foot to the other. He holds his begging bowl off to the side, making it clear he isn't asking you for money. _Sorry. Sorry. What is it? Was doing nothing wrong, I was._";
	action = INTRO;

begintalknode 111;
	state = 110;
	nextstate = 111;
	condition = 1;
	question = "How are you faring here?";
	text1 = "_Not well. Not well. But ... Doing nobody any harm. Just walking here. Nothing wrong. Nothing wrong. Just waiting to move on. Away from here._";
	
begintalknode 112;
	state = 110;
	nextstate = -1;
	condition = 1;
	question = "Here. (Put five coins in his bowl.)";
	text1 = "You don't have enough money.";
	text2 = "Edgar looks surprised. He relaxes slightly. _Thank you! Thank you! You are very kind._";
	code =
		if (coins_amount() < 5)
			rs(2);
			else {
				rs(1);
				change_coins(-5);
				sf(149,28,1);
				}
	break;

begintalknode 113;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "Why are you so nervous?";
	text1 = "_The guard ... Not good to beggars. Don't like us. I see soldiers, and ... Not good for Edgar. Leave me be? Not hurting anyone, I am._";
	
begintalknode 114;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "Where are you from?";
	text1 = "_From Formello, I was. Lost now. Taken by the sliths. So I came here. Got work for a while, then no work. Now on the streets. Is how I live. Guards don't think I have to eat, but I do._";
	
begintalknode 115;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "Where do you want to go?";
	text1 = "_Waiting for lottery. Waiting to use Great Portal. To get to surface. To work. To start new life._";
	text2 = "He shakes his head. _But portal is gone. No chance of it now. Think I should just lay down and die. And I wouldn't be the first._";
	code =
		if (gf(170,1) < 12)
			rs(2);
	break;
	
begintalknode 116;
	state = 110;
	nextstate = 113;
	condition = gf(149,28) > 0 && gf(149,21) == 1 && gf(148,1) == 0 && gf(149,27) > 0;
	question = "I am going to rescue the Empire envoys. What do you know about the sewers?";
	text1 = "Fortunately, he is no longer as nervous. _I ... I worked in the sewers. Filthy and horrible, but it was work, and I was glad to have it. And ... I know the group that took the envoys._";
	text2 = "_They had a camp. In the northeast quadrant. It was ... A dark place._";
	
begintalknode 117;
	state = 110;
	nextstate = -1;
	condition = gf(149,28) == 0 && gf(149,21) == 1 && gf(148,1) == 0 && gf(149,27) > 0;
	question = "I am going to rescue the Empire envoys. What do you know about the sewers?";
	text1 = "He tries to answer, but he is too nervous. He can't think. He just stammers. You aren't sure what you can do to put him at his ease.";
	
begintalknode 118;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "How did you know them?";
	text1 = "_Once ... Once, I ate the skribbane herb. I'm free of it now. It was long and hard, but I'm free. But that is where I got it. From them. Desperate, crazy people. The sort that would do ... what they did._";

begintalknode 119;
	state = 113;
	nextstate = 114;
	condition = 1;
	question = "How could I sneak in there?";
	text1 = "_Oh, there's lots of tunnels in the sewers. But into their camp? Hmmm ..._ He thinks for a while. _Wait! There was a tunnel. Door was covered over. Used it for access, we did._";
	text2 = "_Go to the northernmost part of the sewers. North as you can go. Look for a switch on the wall. Not easy to see. Is what we used._";
	
begintalknode 120;
	state = 114;
	nextstate = -1;
	condition = 1;
	question = "And?";
	text1 = "_It'll open a tunnel. Take you to the back of the camp. If it's not walled off. Or caved in. Or trapped. Or guarded. That's the best I can do._";
	text2 = "_Sorry I can't help more. And ... Good luck._ He shuffles off, shaking his bowl.";
	action = END_TALK;
	
begintalknode 121;
	state = 110;
	nextstate = -1;
	condition = 1;
	question = "Get out of my way, beggar.";
	text1 = "Your response terrifies him, but he's relieved that you aren't hauling him off to jail. He shuffles away.";
	action = END_TALK;
	code  =
		sf(149,28,0);
	break;
	
begintalknode 122;
	state = 110;
	nextstate = -1;
	condition = 1;
	question = "That's all I need. Good day.";
	text1 = "He is very relieved that you aren't hauling him off to jail. He shuffles away.";
	action = END_TALK;

// Abbot Erlanger

begintalknode 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = "You look around the Church of the Prevailing Righteousness, Avernum's largest and most respected sect of battle priests.";
	text2 = "It is an impressive building, all slabs of marble and soaring arches. It's completely clean. The acolytes here must be very dedicated. You see no signs of mold, dirt, or refugees.";
	text3 = "The abbot is very old, but he takes great pains not to show it. He walks tall and easily bears the weight of the massive blade at his hip. He greets you in a loud, clear voice.";
	text4 = "_I am Abbot Erlanger. Welcome to this shrine of calm in a sea of trouble. Know that, in this time of war, there is one place where courage will never fail._";
	text5 = "Abbot Erlanger chats with you about the recent, unhappy events. You note he constantly watches the door, in case someone breaks in and attacks. He has a large sword at his belt, no doubt in preparation for just such an event.";
	action = INTRO;

begintalknode 131;
	state = 130;
	nextstate = 131;
	condition = 1;
	question = "Tell me about your church.";
	text1 = "_We are the Church of the Prevailing Righteousness. We believe in justice, honor, and freedom. And the crushing, through use of arms, of those who would deny us any of the three._";
	text2 = "_Our faith has a long and honored history in Avernum, and we have sent more priests to hold back the slith menace than any other sect or belief system._";
	
begintalknode 132;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "Can you teach me spells?";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Abbot Erlanger",
		  "Abbot Erlanger is not afraid to help an outsider. His spells are powerful and efficient, but demanding.",
		  32,5,0);	
	break;
	

begintalknode 133;
	state = 130;
	nextstate = 132;
	condition = 1;
	question = "How are you contributing to the war?";
	text1 = "_We have sent most of out acolytes and novices to the front to fight the Slith Horde. All of our faith dream and pray for such an opportunity, a chance to prove the sincerity of their beliefs in battle._";
	text2 = "_I am tending this church mostly alone now. I wish I could join them, but I am ..._ He runs his fingers through his gray, thinning hair. _It was decided that I should stay here and train acolytes._";
	text3 = "_Sadly, this has resulted in a bit of a problem._";
	code =
		if (gf(149,29) > 1)
			rs(3);
	break;
	
begintalknode 134;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "How long have you been active in Avernum?";
	text1 = "_From the first day. Avernum has long had a powerful attraction to us, due to the many foes it offers for the battling._";
	text2 = "_In the Time of Shades, I was one of the few who stood up to the corrupting influence of the invading spirits. That is not boasting. It is simple truth._";
	
begintalknode 135;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "So this church exists to wage war?";
	text1 = "_Or enforce the peace. Or to train others, in preparation for the next war. We believe that peace is only an illusion, a time to prepare for the next struggle._";
	text2 = "_It is only in being victorious against those who oppress us that our freedom and happiness is sustained._";
	
begintalknode 136;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "Do your priests ever heal?";
	text1 = "_Are you mad? Of course! That is the first task of my brethren on the battle front! We believe in honorable victory. Tending to your wounded properly is one of the most important steps toward that end._";
	text2 = "_Of course, when we get the chance, we are always happy to call down a few bolts of holy fire._";
	
begintalknode 137;
	state = 132;
	nextstate = 133;
	condition = gf(149,29) < 2;
	question = "What is the problem?";
	text1 = "_I am the Abbot here, the master of this church. And the Church of the Prevailing Righteousness determines the leaders of its temples through ... Well, outsiders might find it odd._";
	text2 = "_Any novice may deem an Abbot too weak to serve the church properly. And demand the Abbot step down. And, if the Abbot does not, then there is a duel._";
	
begintalknode 138;
	state = 133;
	nextstate = -1;
	condition = 1;
	question = "What kind of a duel?";
	text1 = "_A violent one, using weapons and chants. Serious injury or death is almost always the result. For one or both participants._";
	
begintalknode 139;
	state = 133;
	nextstate = 134;
	condition = 1;
	question = "And how does this affect you?";
	text1 = "_There is a novice just west of the Great Portal. Novice Ximun. He knows I am almost alone here. He wants to challenge me. He is young, and I am ... not as young._";
	text2 = "_This discontinuity in the leadership of the church would be harmful in the extreme. That is why I want you to go to Ximun and convince him that he would be better off going elsewhere. Founding his own temple._";
	code = 
		set_flag(149,29,1);
		toggle_quest(81,1);
	break;	
	
begintalknode 140;
	state = 134;
	nextstate = -1;
	condition = 1;
	question = "Are you really allowed to fend off a challenge that way?";
	text1 = "He laughs loudly. _Of course! You don't think that cultivating allies and using trickery are legitimate ways to win a war, inside or outside the church?_";
	text2 = "_We are warriors, but we are not simple. Novice Ximun would already have hired people to undermine me, if he were not young and simple._";
	
begintalknode 141;
	state = 134;
	nextstate = -1;
	condition = 1;
	question = "Where can I find Ximun?";
	text1 = "_One of his acolytes sent word that he is west of the Great Portal._ He chuckles. _Ximun no longer inspires great loyalty among his followers._";
	
begintalknode 142;
	state = 134;
	nextstate = -1;
	condition = 1;
	question = "Do you want Ximun dead?";
	text1 = "_Of course not. That would be a waste. Let him live, if possible. He still has much to offer us, once he learns his place. A hearty beating should do it. Of course, if he is foolish enough to not submit ..._ Erlanger shrugs.";
	
begintalknode 143;
	state = 130;
	nextstate = -1;
	condition = gf(149,29) == 1 && gf(164,2) == 1;
	question = "I have bested Ximun in combat.";
	text1 = "Abbot Erlanger chuckles. _I am aware of it. Ximun sent word to me, offering me his support. I have sent him to the Abyss, to harness the warrior spirit there. I think, in that environment, he will do well._";
	text2 = "_I am grateful. In return for your help, I have unlocked the acolyte quarters below. They are mostly unoccupied, but there is a tome within that might help you._";
	text3 = "_Also, as an additional reward for sparing the young fool, take these._ He takes two slender glass vials from his pouch and hands them to you.";
	code = 
		set_flag(149,29,2);
		sf(148,27,1);
		toggle_quest(81,3);
		award_party_xp(400,16);
		reward_give(237);
		reward_give(239);
	break;		
	
begintalknode 144;
	state = 130;
	nextstate = -1;
	condition = gf(149,29) == 1 && gf(164,2) == 2;
	question = "I have bested Ximun in combat. Oh, and he is also dead.";
	text1 = "Abbot Erlanger looks genuinely sad. _I am aware of it. It is a waste. I would have sent him to the Abyss, to harness the warrior spirit there. I think, in that environment, he would have done well._";
	text2 = "_But it was necessary. In return for your help, I have unlocked the acolyte quarters below. They are mostly unoccupied, but there is a tome within that might help you._";
	code = 
		set_flag(149,29,2);
		sf(148,27,1);
		toggle_quest(81,3);
		award_party_xp(400,16);
	break;		
	
begintalknode 145;
	state = 130;
	nextstate = -1;
	condition = gf(149,29) > 1;
	question = "Anyone else challenging your authority?";
	text1 = "_No. And, after what happened to Ximun, I think I will be secure for some time to come. He served as an excellent example._";

	
// Noam

begintalknode 150;
	state = -1;
	nextstate = 150;
	condition = 1;
	question = "Name";
	text1 = "You meet the wine merchant of Almaria. Almarian wine is well-known throughout the world, both above and below the surface. Many a connoisseurÊon the surface has braved it, to be able to say he or she tried Avernite wine.";
	text2 = "The merchant is a short, portly man. He seems pleased to have you in his store. _Ahhh ... A soldier. Not a refugee or a beggar. Someone who might actually pay a fair price for quality goods._";
	text3 = "_I am Noam, and this is my shop. Though, sadly, I have lost access to a large part of my stock._";
	text5 = "Noam favors you with a well-practiced smile. _Still pleased, as always, to serve a higher class of customer. Tell me if you would like to sample what remains of my wares._";
	action = INTRO;

begintalknode 151;
	state = 150;
	nextstate = 151;
	condition = 1;
	question = "Tell me about Almarian wine.";
	text1 = "_Oh, but do you have a spare week? For that is how long it will take you to describe the wonders of Almarian wine. The pride of the underworld, served on the finest tables of both Avernum and the Empire._";
	text2 = "_Of course, your average refugee would not appreciate a fine beverage if I used a bottle of it to smash his thick skull. Such is the sad position of one in my line in such difficult times._";
	
begintalknode 152;
	state = 150;
	nextstate = -1;
	condition = 1;
	question = "Let me see what you have for sale.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Noam's Wines",
		  "Noam's stock is surprisingly limited, but there are still a few fine vintages to be had.",
		  33,3,0);	
	break;

begintalknode 153;
	state = 150;
	nextstate = 153;
	condition = gf(149,19) < 2;
	question = "What happened to most of your stock?";
	text1 = "_Well, it is unfortunate. I had the chance to get a case of gremlin wine. Amazing stuff. Truly delicious, and with a subtle bouquet of wild magic. I purchased the case and stored it downstairs._";
	text2 = "_And then, well, the case, or the magic in it, drew pests. There are ... Rats. Rats downstairs. Among all my precious wines. And I need someone to clear them out._";

	
begintalknode 154;
	state = 150;
	nextstate = -1;
	condition = gf(149,19) > 1;
	question = "Are you still short on stock?";
	text1 = "_Yes. Alas, I will be until I have gone downstairs and found which wine is still drinkable and which has been ... soiled._";
	
begintalknode 155;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "You don't care for the refugees much, I gather.";
	text1 = "_Oh, don't misunderstand me. They are unfortunate souls, driven from their homes and work by the tides of war and hunger. I only wish so many of them had not been driven here._";
	text2 = "_At least the Great Portal will carry them away soon enough. If it did not ..._ He shudders.";
	text3 = "_And, now that the portal is gone, I don't like how they look at us. It is only a matter of time until they kill us in our sleep. I am sure of it._";
	code =
		if (gf(170,1) < 12)
			rs(3);
			else rs(2);
	break;
	
begintalknode 156;
	state = 151;
	nextstate = 152;
	condition = 1;
	question = "They drink Almarian wine on the surface?";
	text1 = "_Of course! Many an adventurous connoisseur has wanted to see what life in Avernum is like. To eat and drink what we do._";
	
begintalknode 157;
	state = 152;
	nextstate = -1;
	condition = 1;
	question = "But do they actually like our fungus wine?";
	text1 = "_Well, it can be an ... acquired taste. And it can be hard to find our wine on the surface in quantities necessary to acquire it. They still prefer wine made of grapes. For some reason._";
	
begintalknode 158;
	state = 153;
	nextstate = -1;
	condition = gf(149,21) == 0;
	question = "Perhaps I could help.";
	text1 = "He looks you over and shakes his head. _No, this job requires delicacy. Care. I haven't heard enough about you to trust you waving blades and throwing fireballs around my stock. Perhaps one day..._";
	
begintalknode 159;
	state = 153;
	nextstate = -1;
	condition = gf(149,21) > 0;
	question = "Perhaps I could help.";
	text1 = "He looks you over and thinks about it. _I have heard things about you. Rumors that Regan selected you for a job of great delicacy. Perhaps I can trust you to deal with my ... rats._";
	text2 = "He unlocks the south door.";
	text3 = "_They are downstairs. Just kill the ... rats, and I will reward you with a full case of fine Almaria wine. Quite valuable._";
	code =
		if (gf(148,25) == 0) 
			sf(148,25,1);
			else rs(2);
		set_flag(149,19,1);
		toggle_quest(82,1);
	break;
			
begintalknode 160;
	state = 150;
	nextstate = -1;
	condition = gf(149,19) == 1 && gf(149,23) > 0;
	question = "I killed your rats. Oh, and also the DEMON. Which you didn't mention.";
	text1 = "_I didn't mention it? Are you sure? I must have! It's not like me to let a detail like that slip my mind._";
	text2 = "_Anyway, I will provide the reward I promised._ He brings you a half a case of wine and a pouch of coins. _I don't have a full case of wine left, I'm sad to say, but I will make up for it with an additional payment. In coins._";
	text3 = "_I am most grateful for your help. And I regret any alleged misunderstanding._";
	code = 
		set_flag(149,19,2);
		toggle_quest(82,3);
		award_party_xp(300,15);
		reward_give(435);
		reward_give(435);
		reward_give(439);
		change_coins(250);
	break;			

	
// Kelagan

begintalknode 170;
	state = -1;
	nextstate = 170;
	condition = 1;
	question = "Name";
	text1 = "You notice one of the poor refugees is watching you. Most of the crowd doesn't seem interested in you, but this one man is definitely staring at you.";
	text2 = "As you go about your business, he follows you. Then, just as you are about to ask him what he is doing, he walks up to you.";
	text3 = "_Excuse me. I am Kelagan. I have a message for you._";
	text5 = "That you still want to speak with him makes Kelagan extremely nervous. _I am sorry. I just had a message to give you, is all. I did not want to trouble you._";
	action = INTRO;

begintalknode 171;
	state = 170;
	nextstate = 171;
	condition = 1;
	question = "Tell me about yourself, Kelagan.";
	text1 = "_I am only a poor refugee. I am looking for work. I do not want charity._";
	text2 = "_So, when someone offered me money to give you a message, I did not refuse._";
	
begintalknode 172;
	state = 171;
	nextstate = -1;
	condition = 1;
	question = "Tell me about the person who gave you the message.";
	text1 = "_It was night, and he wore robes, so I am not sure. He had a lisp, though. Like a slith, maybe, but gentler._";
	text2 = "_That is all I know. I am sorry._";

begintalknode 173;
	state = 170;
	nextstate = 172;
	condition = gf(163,1) == 0;
	question = "And what is the message?";
	text1 = "_I was told that a soldier of your description would be coming. And, when I saw you, to tell you this._";
	
begintalknode 174;
	state = 172;
	nextstate = 173;
	condition = 1;
	question = "Yes?";
	text1 = "_Someone wants to see you. Someone with information about the slith Khrez-Yss. He wants to meet you._";
	code = 
		set_flag(149,18,2);
		toggle_quest(83,1);
	break;	
	
begintalknode 175;
	state = 173;
	nextstate = -1;
	condition = 1;
	question = "Meet me where?";
	text1 = "_There is an abandoned tannery to the southeast. There. They will be waiting. And that is all I know. I am sorry. That is all I know._";
	text2 = "_Now I must go. I hope I have helped._ He runs off.";
	action = END_TALK;
	code =
		erase_char(16042);
	break;
	
begintalknode 176;
	state = 170;
	nextstate = 174;
	condition = gf(149,18) > 1 && gf(163,1) > 0;
	question = "I went where you told me to. It was a trap!";
	text1 = "Kelagan takes a step away. He looks terrified. _What? I did not know! I swear! Someone offered me thirty coins to give the message. Fifteen before, fifteen after, and he never came to pay me the other half._";
	text2 = "He is looking more panicked and desperate by the moment. _I did not know about any trap! I swear!_";
	
begintalknode 177;
	state = 174;
	nextstate = -1;
	condition = 1;
	question = "Sorry. I'm going to turn you in to the law.";
	text1 = "_No! I ... I won't let you ..._ His eyes get a crazy look. He is truly deranged. This gives you plenty of warning so, when he pulls out a short dagger, you are ready.";
	text2 = "_They wont get me! They won't!_ He screams, _It won't happen!_ And he lunges at you.";
	code =
		set_attitude(16042,10);
	break;
	action = END_TALK;
	
begintalknode 178;
	state = 174;
	nextstate = -1;
	condition = 1;
	question = "Fine. Just get away from me.";
	text1 = "Considering how deranged he is starting to look, this seems like the best approach. _Yes. I will. I'm going. Thank you. I'm sorry. Thank you._ And he runs away.";
	action = END_TALK;
	code =
		erase_char(16042);
	break;
	
begintalknode 179;
	state = 170;
	nextstate = -1;
	condition = 1;
	question = "Just get away from me.";
	text1 = "Kelagan is very nervous talking to a soldier. He doesn't have to be told twice. _Yes. I am going. Sorry to trouble you._ He runs off.";
	action = END_TALK;

// Commander Horrmarin

begintalknode 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = "There is a large nephar sitting at this desk. Her armor bears the insignia of a full commander. Nepharim are a sort of nephilim, much larger, but sterile. Like mules. Though making that comparison to one's face will likely start a fight.";
	text2 = "She looks up at you when you enter. _Hmrrr. Soldier. Come to me for orders? I am Commander Horrmarin. If you are free to take missions, I do have one for you._";
	text3 = "_Otherwise, move on. Too much to deal with with the refugees and other situations._";
	text5 = "Commander Horrmarin looks up at you impatiently. _Mrrr? What else do you want? I am a commander. I have much to do, all the time, every hour, every minute._";
	action = INTRO;

begintalknode 191;
	state = 190;
	nextstate = 191;
	condition = 1;
	question = "What is the situation in Almaria?";
	text1 = "She suddenly looks very suspicious. _What? Who sent you? What do you want to know? Everything is under control! Who said it was not?_ Then she realizes how suspicious she is acting. She tries to calm down.";
	text2 = "_Mrrr. Situation is under control. For now. Things get worse, with refugees and skribbane eaters, by the day._";
	text3 = "_Besides the troubles you know of? Beyond Empire envoys, you mean? Well, situation above is under control. For now. Things get worse, with refugees and skribbane eaters, by the day._";
	action = DEP_ON_SDF 149 21 0;
	
begintalknode 192;
	state = 190;
	nextstate = 193;
	condition = gf(149,17) < 2;
	question = "You said you had a mission for me?";
	text1 = "_Yes. No time for long talk. No time to waste. You are here. If I can use you, I will._";
	text2 = "_Northeast of Almaria is old, abandoned fort. Fort Haledon. Full of skribbane eaters now. A desperate, hungry bunch. We did not mind them when there were few. But is large settlement now. They sell the herb. They grow it!_";
	text3 = "_Mrrrr! Is too big now! Causes harm! Embarrasses us! They must be stopped._";
	code = 
		set_flag(149,17,1);
		toggle_quest(84,1);
	break;
	
begintalknode 193;
	state = 190;
	nextstate = -1;
	condition = gf(149,17) > 1;
	question = "Anything else I can do for you?";
	text1 = "She shakes her head. _I would not take up too much time of a Castle soldier. It will anger the Castle. Not wise._";
	
begintalknode 194;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "Can I get supplies or training here?";
	text1 = "She chuckles. _Hrr hrrr hrr. I am a commander, not your commander. Not responsible for you. Trade with Serilda, across the way, or go back to the Castle for supplies._";
	
begintalknode 195;
	state = 190;
	nextstate = 196;
	condition = gf(149,21) == 1 && gf(148,1) == 0;
	question = "I am going to try to rescue the Empire envoys. I could use information.";
	text1 = "Commander Horrmarin nods. _Mrrrr. I had thought this is why you are here. Word came ahead of you. I can help you. The thugs in the sewers hold the envoys. I have tried to send spies down to see their position._";
	text2 = "_I have learned little, but some._";
	
begintalknode 196;
	state = 191;
	nextstate = -1;
	condition = 1;
	question = "How are the refugees doing?";
	text1 = "_Well, for now, but there are more every day. Mayor Regan is generous to them. Too much so, I think._";
	text2 = "_But, as long as they have the hope of escaping by the Great Portal, they are calm. They will all be gone soon enough._";
	text3 = "_And, now that the Great Portal is gone, they are hungrier and more scared and more angry by the day. Soon, I fear, there are riots. And I use my bow on my own people. I am not ashamed to admit it. We are all afraid now._";
	code =
		if (gf(170,1) < 12)
			rs(3);
			else rs(2);
	break;
	
begintalknode 197;
	state = 191;
	nextstate = 192;
	condition = 1;
	question = "Tell me about the skribbane eaters.";
	text1 = "_Hrrrm. This is a problem that gets worse. The skribbane kills hunger pains and makes you feel strong. It draws the desperate. And it gets hold._";
	
begintalknode 198;
	state = 192;
	nextstate = -1;
	condition = 1;
	question = "Is there any way to get free of it?";
	text1 = "_Once it grabs you, it takes much time and pain before the hurting stops. Most don't have the strength. They just keep getting doses, one every long while, to keep the dark times away._";
	text2 = "_But, if you do not take it long enough and don't give in, the herb will eventually release its control._";
	
begintalknode 199;
	state = 193;
	nextstate = -1;
	condition = 1;
	question = "Stopped how?";
	text1 = "_Driven out. Don't care how. Their leaders, the growers, probably must die. Think that will be only way._";
	text2 = "_You must maintain the law. You must keep them from mocking us. When they grow the herb no more, you have done well._";
	
begintalknode 200;
	state = 190;
	nextstate = -1;
	condition = gf(149,17) == 1 && gf(135,1) > 0;
	question = "No more skribbane will be grown in the Fort Haledon ruins.";
	text1 = "Commander Horrmarin nods solemnly. _As I always said. Mrrrr. If you need a thing done, get a Castle soldier. They are the best._";
	text2 = "_I am an archer. I know the value of such weapons. The mayor would want you rewarded properly for your aid. I will get you some of the best from our stores._ She has a guard bring you a bow and a set of javelins.";
	text3 = "_We thank you. Those who got their herb from that fort will have painful weeks. Or months. But one day, they will be free, and they will thank us._";
	code = 
		set_flag(149,17,2);
		toggle_quest(84,3);
		award_party_xp(400,15);
		reward_give(315);
		reward_give(117);
	break;		
	
begintalknode 201;
	state = 193;
	nextstate = -1;
	condition = 1;
	question = "Who is their leader?";
	text1 = "_I do not know. Have had no luck getting my own agents in._";
	text2 = "";
	
begintalknode 202;
	state = 196;
	nextstate = -1;
	condition = 1;
	question = "Do you know anything about the brigands?";
	text1 = "_They have been down there for a while. Skribbane eaters, falling deeper and deeper into desperation. Thought they were not dangerous, though. My mistake. Skribbane maddens all, eventually. This is all the fault of my tolerance._";
	
begintalknode 203;
	state = 196;
	nextstate = 197;
	condition = 1;
	question = "How do I get to them?";
	text1 = "_The only route to the sewers not sealed is in city hall. Go down the stairs and you find traps left by the brigands._";
	text2 = "_If you slip past them, you are in the sewers. From there, you can go west or east._";
	
begintalknode 204;
	state = 197;
	nextstate = 198;
	condition = 1;
	question = "Where are the prisoners held?";
	text1 = "_Somewhere in northeast quadrant. That is all I know. And they have guards outside. If you go east when you enter sewers, you meet guards soon. Not good. I don't know what happens if you go west, away from brigands._";
	text2 = "_A frontal assault is very dangerous. If you are not fast enough, the mad people below will kill the hostages. Of this, I am sure._";
	text3 = "_But then that leaves finding another way to them._";
	
begintalknode 205;
	state = 198;
	nextstate = 199;
	condition = 1;
	question = "Where do you think I should go?";
	text1 = "_I don't know. Sewers built and torn down and rebuilt so many times, no idea what is there. But others, they might know. Like the workers. And the refugees. There is someone you might talk to._";
	
begintalknode 206;
	state = 199;
	nextstate = 190;
	condition = 1;
	question = "Who?";
	text1 = "_Is a man called Edmund. Mrrr. I know this man. Trusted by the refugees. He might have heard something. You might want to talk to him._";
	text2 = "_That is all I know. I have told you all. I hope it has helped. Nothing else I can say._";

	
// Tancrid

begintalknode 210;
	state = -1;
	nextstate = 210;
	condition = 1;
	question = "Name";
	text1 = "Considering how much caravan traffic Almaria has received over the years, it is surprising that the inn is so small. It must only be the merchants that stay here. The guards sleep with the caravans.";
	text2 = "The innkeeper has a heavy, polished club hanging from his belt. In these rough times, he's making it clear he won't tolerate any trouble. _I'm Tancrid, my friends, of the Almarian Arms. How can I help you?_";
	text5 = "Tancrid says, _Need anything else, soldier?_ His tone makes it clear that he hopes you'll be moving along very soon.";
	action = INTRO;

begintalknode 211;
	state = 210;
	nextstate = 211;
	condition = 1;
	question = "Anything interesting happening in town?";
	text1 = "Tancrid looks annoyed. _I don't have time to gossip. I don't spread rumors. I run an honest business._";
	text2 = "";
	
begintalknode 212;
	state = 211;
	nextstate = 210;
	condition = coins_amount() >= 10;
	question = "Maybe this will help your memory. (Give 10 coins.)";
	text1 = "He takes your money and pockets it. _Well, let's see._ He thinks. _No. I don't remember anything._";

begintalknode 213;
	state = 211;
	nextstate = 210;
	condition = 1;
	question = "All right. Let's talk about something else.";
	text1 = "_We can. As long as it has to do with business._";
	
begintalknode 214;
	state = 210;
	nextstate = -1;
	condition = 1;
	question = "Can I get a room?";
	text1 = "He gives you a look of distaste. _No offense, but it's usually merchants that sleep here. Your kind, with all due respect, stays at the barracks. And anyway, we're full._";
	
begintalknode 215;
	state = 210;
	nextstate = -1;
	condition = 1;
	question = "What's on the menu?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Almarian Arms",
		  "The inn has a fine selection of wine and a tolerable selection of food.",
		  34,4,0);	
	break;	
	
begintalknode 216;
	state = 210;
	nextstate = -1;
	condition = 1;
	question = "I don't need anything else.";
	text1 = "_Well then, gee. Don't let me keep you from your business._ Before you can respond, Tancrid goes to the other end of the inn to take someone's order.";
	action = END_TALK;

	
// Serilda

begintalknode 230;
	state = -1;
	nextstate = 230;
	condition = 1;
	question = "Name";
	text1 = "There is a small trading post here, that mainly sells to passing merchants, caravan guards, and soldiers. As befits the tenor of the times, most of the store space has been filled with weaponry and armor.";
	text2 = "The proprietor, sensing an easy sale or two, approaches you. _Welcome! I am Serilda. You seem like someone who can appreciate a quality piece of metalwork, something you can rely on when the Slith Horde is knocking at the door._";
	text5 = "Serilda says, _I see you're still around. You definitely seem like someone who knows the importance of quality, properly maintained weaponry and armor. Especially if the slithzerikai are trying to kill you._";
	action = INTRO;

begintalknode 231;
	state = 230;
	nextstate = 231;
	condition = 1;
	question = "You seem worried about the slithzerikai.";
	text1 = "_Well, of course. I need to stay in business, after all. If we were being attacked by demons or cave lobsters, I'd urge you to defend yourself against demons or cave lobsters._";
	text2 = "_Not that I have anything against the slithzerikai. Meant no offense to you._";
	code =
		if (species_in_party(3) == 0)
			rs(2);
	break;
	
begintalknode 232;
	state = 231;
	nextstate = -1;
	condition = 1;
	question = "Is business good?";
	text1 = "_Well, it's good in the sense that I am exchanging lots of weapons for lots of gold. But, since I can't then take that gold and use it to get much food, I'd say I'm not entirely free of fear._";

begintalknode 233;
	state = 231;
	nextstate = 232;
	condition = 1;
	question = "You think the Slith Horde will come down here?";
	text1 = "_I don't know. If they can hold them at the Eastern Gallery, there might be hope. And, if not ..._ She shakes her head. _I've heard rumors that, if things get bad enough, Mayor Regan will collapse the bridge. Can you imagine?_";
	text3 = "_Haven't you heard? Some heroes from the Castle managed to destroy the leaders of the horde! Victory is imminent!_";
	action = DEP_ON_SDF 170 8 0;
	
begintalknode 234;
	state = 232;
	nextstate = -1;
	condition = gf(170,8) > 0;
	question = "I may have heard something about that, yes.";
	text1 = "_Can you imagine such heroism? It is hard to believe. But never lose faith in Avernites, that's what I say._";
	
begintalknode 235;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "What do you have for sale?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Serilda's Arms",
		  "Serilda's selection has been picked kind of clean, but there are still a few nice pieces for sale. For high prices.",
		  35,6,0);	
	break;
	
begintalknode 236;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "I would like to sell something.";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;
	
begintalknode 237;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "That is all I need.";
	text1 = "_Really? You don't want a little more protection for the road? Well, if you say so ..._ She shakes her head, consumed by worry of what will happen if you don't spend some more money here.";
	action = END_TALK;
	
begintalknode 240;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You start to climb the stairs, and then you stop. Without you down here to guide them, the hostages might get lost. Perhaps you should stay down here until they are free.";

	
////
		
begintalknode 299;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "Unfortunately, the Great Cave was a poor place to begin your life of crime. Most of the soldiers have had to travel northeast to fight the slithzerikai, but enough remain down here to hunt you down.";
	text2 = "You are jailed in Fort Remote. By the time you are able to get free, the multiple disasters that afflict Avernum have doomed you and all around you.";
			code =
		erase_char(30000);
	break;