// dlg.txt

begintalkscript;

variables;

short i;



begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is Belgan, a gruff woodsman. He's a tall, burly man, with massive muscles built from many years of chopping up cavewood.";
	text2 = "He talks with you briefly, telling you of the difficulties of bringing in lumber in these harsh times. Then he says, _My wife handles all of the business. You want to trade, you talk to her._";
	text3 = "_Oh, and thanks for helping with the ogre. I told people I wasn't seeing things!_";
	code = 
		if (gf(96,4) < 2)
			rs(3);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The lizard hisses at you when you get close. The lizards, at least, are well fed. They can survive on the Blighted mushrooms.";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are a lot of soldiers on the road, keeping clear the main route between Silvar and Fort Duvno. They greet you cordially.";
	text2 = "They warn you to watch out for slithzerikai. They also let you know that, unless you have orders specifically sending you to Fort Duvno, you won't be let in.";
	text3 = "Then they recognize you from the battle with Ess-Kalyn. Once that happens, you can't get away without a long retelling of the final battle between Solberg and the Manburner. In this instance, being famous is very time-consuming.";
	code =
		if (gf(170,8) > 0)
			rs(2);
			else rs(3);
	break;

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Fort Duvno - North";
	text3 = "  Fort Avernum (Closed) - East";
	text4 = "  Cotra, Fort Dranlon - West";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Fort Duvno - North";
	text3 = "  Silvar - South";
	text4 = "  Cotra, Fort Dranlon - West";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";


// goodwife kreger

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a sturdy woman sitting at this table, counting coins and making notes on a sheet of papyrus. She looks up at you and smiles.";
	text2 = "_A soldier! Soldiers are always welcome here. You don't look like  a quartermaster, more a fighter, but no matter. Dealing with the army is what keeps us alive._";
	text3 = "_I am Goodwife Kreger._ She nods toward the window. _Belgan is my husband. He's out working. Do you need anything?_";
	text5 = "Goodwife Kreger smiles and pours you some tea. _Please have a seat. I'm making some soup now. Soldiers are always welcome in our home._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "What do you do here?";
	text1 = "_We work with cavewood. We're lumberjacks, carpenters, whatever is needed. We've worked the forest to the southeast for many a year._";

begintalknode 12;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "Aren't you worried living this close to the front?";
	text1 = "She nods. _Oh, yes. We're not fools. We sent our children to live in the Great Cave, far from the horde._";
	text2 = "_But we live between Silvar and Fort Duvno. Soldiers patrol outside every hour. That's as safe as we can be, and dealing with the soldiers keeps us alive._";

begintalknode 13;
	state = 10;
	nextstate = 14;
	condition = gf(96,4) < 2;
	question = "Have you had any problems lately?";
	text1 = "She nods. _I don't like to say, because the soldiers have so much to worry about. But, since you asked, I think there's an ogre in the woods. Belgan is sure he saw it walking around out there._";
	text2 = "_It's kept to itself so far, but you know how those creatures are. They eat a lot of meat, and they aren't picky about where they get it._";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = gf(96,4) > 1;
	question = "Have you had any problems lately?";
	text1 = "_Not since the problem with the ogre. Thank you again for your help. I don't want to take any more of your time._";

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Don't you worry about cutting down all the trees?";
	text1 = "_I suppose it's possible, but the wizards, bless their hearts, made trees that grow very fast. We have to struggle just to keep the forest from spreading and engulfing everything._";

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "What is cavewood good for?";
	text1 = "_It can do anything wood from the surface can do, only worse. It's weaker. It's harder to cut properly and harder to burn. It's rough, fungal stuff. But it's sustained Avernum for all these years, so we'll live with it._";

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Fort Duvno.";
	text1 = "_Oh, I haven't been inside there for years, and they only let soldiers in there now. It was a small fort, but it's very important now._";
	text2 = "_I heard that a powerful wizard just arrived there. Solberg! Still alive. Can you believe it? He's determined to end the war! I would have thought he'd be too old to do anything, but I don't know much about wizards._";
	code =
		if (gf(170,8) > 0)
			rs(2);
	break;

begintalknode 18;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "What do you do for the soldiers?";
	text1 = "_We provide wood. They need lots of it, to burn and to make fortifications. We make ourselves useful, and, in return, they pay us in the only thing that matters._";

begintalknode 19;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What is that?";
	text1 = "_Food. With the Great Portal gone, there's none to be had anywhere else. We eat some. We send the rest to our children. And we work as hard as we can to keep you lot happy._";
	
begintalknode 20;
	state = 14;
	nextstate = 10;
	condition = gf(96,4) == 0;
	question = "I'm too busy to worry about that.";
	text1 = "_Oh. Oh, of course. I'm very sorry I even mentioned it._";

begintalknode 21;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Maybe I can hunt it down for you.";
	text1 = "_Could you? I would very much appreciate it. I think, if you drove it off, it would make this road much more secure. And we might be able to pay you. It would make our work much safer._";
	text2 = "_I don't know where it is, though. Just out in the woods somewhere. If Belgan wasn't seeing things._";
	code = 
		set_flag(96,4,1);
		toggle_quest(104,1);
	break;

begintalknode 22;
	state = 10;
	nextstate = -1;
	condition = gf(96,5) > 0 && gf(96,4) == 1;
	question = "I found and killed that ogre. It was actually an ogre mage. Very nasty.";
	text1 = "Goodwife Kreger looks very relieved. _Oh, thank you! That thing might have killed us in our beds if you hadn't helped._";
	text2 = "She fetches a ring and a sheet of leather for you. _It's a humble payment. I don't think the ring is magical, and this is only a sheet of leather, not armor or anything, but it came from a drake. They might be helpful to you._";
	code = 
		set_flag(96,4,2);
		toggle_quest(104,3);
		award_party_xp(400,25);
		reward_give(171);
		reward_give(294);
	break;	


//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "You have interrupted a farmer in the middle of abandoning his home. He is putting his last few possessions in a sack in order to haul them out to his wagon.";
	text2 = "He looks up at you and shakes his head. He is clearly distraught, but he keeps his composure. _I'm Epridge, and this is ... was my home. You're welcome to it now. Take what you find. I'm off._";
	text5 = "Epridge continues to haul his meager possessions out to his wagon. _Don't worry about me, soldier. And no hard feelings. I know your lot did your best._";
	action = INTRO;
	code =
		sf(96,6,1);
	break;
	
begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Can you tell me about this area?";
	text1 = "_What? You new here? Just wander around. You'll find out what it's like soon enough. Just wander around._";

begintalknode 32;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "You are leaving?";
	text1 = "_I am. My family left a month ago. I thought I'd try to make it alone here. But there's no hope. There's just no way to make it work. And it's not safe._";

begintalknode 33;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "Where are you going?";
	text1 = "_We are going ... We don't know. We'll all meet up in the Great Cave. And then ..._ He shakes his head. _I don't think there's hope. But I don't talk about it around them. It scares them. We are cut off for good._";

begintalknode 34;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What were you trying to do?";
	text1 = "_All our crops are dead, and they're not coming back. So I was trying to raise fruit trees. And I am getting fruit. Just not enough._";

begintalknode 35;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Have you been attacked?";
	text1 = "_Not yet, but it's only a matter of time. The sliths will get a raid back here eventually, and Belgan was saying he saw an ogre, too. There's no hope of raising a family here._";
	text2 = "";

begintalknode 36;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "Cut off for good?";
	text1 = "_They tell us they will rebuild the Great Portal, but we know it's just to keep us from panicking. Without it, there's not enough food for us all. So we are just going to go where what little food there is is kept._";
	text2 = "_Maybe ... Maybe we ..._ He shakes his head, overcome with emotion. _Please just leave me. I have to go._";
	action = END_TALK;
	
begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "There is something else I need to know.";
	text1 = "_Then talk to the soldiers. They know everything. Far more than they say, anyway. I have to leave. I want to see my family again before the ... the end. Excuse me._ He returns to loading up the wagon.";
	action = END_TALK;

//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

////

begintalknode 299;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		