// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(83,0) == 0;
	question = "special";
	text1 = "There is an odd statue here. It looks like a stone giantess, remarkably lifelike, frozen in a position of terror and surprise.";
	text2 = "Most would simply think that this is an odd place to put such a piece of artwork and leave it at that. Being an experienced warrior, you realize the truth. This is one of the most reliable signs of the presence of basilisks.";
	action = SET_SDF 83 0 1;


begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This lizard's legs have been hobbled with sticks, keeping it from walking too far. It grazes on Blighted mushrooms. Soon, it will meet its unhappy fate in the farmhouse, ending up as meat and leather.";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You meet Heloise, Goodman Giscard's wife. She invites you to sit down and have some tea and a (very small) piece of bread. After some chat, she says, _If you are here for business, you should talk to my husband._";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several soldiers camped here. They are stationed in Fort Duvno, but they are guarding this crossroads, watching for enemy raiders and scouts.";
	text2 = "They are a grim, scarred, battle-tested lot. They are not hostile, but they tend to look down on those who aren't spending all their time on the front. After they warn you not to travel north, you take your leave.";
	text3 = "They are a grim, scarred, battle-tested lot. However, they aren't so jaded that they can resist talking to a hero like you. You tell them the tale of the battle with Ess-Kalyn, the Manburner. They look at you with awe.";
	code =
		if (gf(170,8) == 0)
			rs(3);
			else rs(2);
	break;

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This small farmhouse has high stone walls and several huge, burly bodyguards. As you are a soldier, they let you pass. They grunt that you should talk to Goodman Giscard, inside the house.";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  GISCARD ESTATE. Mercenaries hired.";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Fort Duvno - West.";
	text3 = "  Silvar - South.";
	text4 = "  No Man's Land - North";
	

//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Goodman Giscard";
	text1 = "There is an old merchant sitting at this table, writing letters and counting coins. His clothes are a few years out of fashion, but they are still beautifully tailored. He, however, looks like he's been missing a lot of meals.";
	text2 = "He rises to greet you, speaking in a calm and cultured voice. His despair only slips into it a little. _Welcome, stout warrior of Avernum. I am Giscard, once a proud landowner near Formello._";
	text3 = "_Now I have come to here. This perilous place. And, I assure you, I am not idle. I do what I can to help. To employ my own warriors._";
	text5 = "Goodman Giscard sets aside his work to speak with you. You peek at the letters he was writing. They seem to be postings for job boards and letters to mercenaries.";
	text6 = "He notices your interest and smiles. _I am no soldier, but I do what I can._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "You lived in Formello?";
	text1 = "He sighs and shakes his head. _A beautiful home. Plenty of farmland._";
	text2 = "_Then the horde came. I took every possession I had of value, came here, and bought this estate._";

begintalknode 12;
	state = 10;
	nextstate = 14;
	condition = 1;
	question = "What do you do for the war?";
	text1 = "_I have money, and I use it. I am a partisan, and I use what resources I have to employ adventurers and mercenaries._";
	text2 = "_Do not worry. Fort Duvno knows what I am doing, and they do not discourage it._";
	text4 = "_Although you, the hero of Avernum, have done much to hurt the horde, they still have much power. It will be a struggle to reclaim our caves from them. Assuming we do not starve first._";
	code =
		if (gf(170,8) == 0)
			rs(4);
	break;
	
begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Do you ever do any trading?";
	text1 = "_You mean cash for goods? Or the reverse? I sometimes buy supplies and weaponry to aid those in my employ, but I don't require anything else at the moment._";

begintalknode 14;
	state = 10;
	nextstate = 16;
	condition = gf(83,5) < 2;
	question = "Do you care to employ me?";
	text1 = "He is truly torn. _Fort Duvno requested that I not hire soldiers, only mercenaries. I want to respect that, but ..._";
	text2 = "_All I will say is this. If you are ever scouting in the northern lands and find my mansion, there are two paintings I want._ He describes them.";
	text3 = "_They are small, and I would pay dearly for them._";
	code = 
		set_flag(83,5,1);
		toggle_quest(106,1);
	break;	

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = gf(83,5) > 1;
	question = "Do you have any more work for me?";
	text1 = "_I would not irritate Fort Duvno by distracting their soldiers any more than I already have._";

begintalknode 16;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Tell me about your own farm.";
	text1 = "_Good land. Very productive. A lovely mansion. A lifetime of ... complacency. Of never having any problem worse than the occasional gremlin in my storehouses._";
	text2 = "_And then, overnight, the Blight appeared. Made the place worthless. I would have tried to adapt, to remain, but then the horde made that course suicide._";
	text3 = "_Ahhh ... The Blight. That was what it took to give us humility at last._";

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "What do you mean?";
	text1 = "_I have watched for years as more and more people came here. To Avernum, I mean. We needed more food to support them. But, when you are a farmer, new plagues come to destroy our crops from time to time. It is part of life._";
	text2 = "_I knew this was coming for so many years. I tried to ignore it, that little voice in the back of my head. And, when it finally came, it was far worse than even I feared._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Who did you buy this farm from?";
	text1 = "_A man named William. He took a modest amount of money, and then he and his family went to the Great Portal. They are probably on the surface now, safe._";
	text2 = "_We might be there now, but I am stubborn. I am going to stay here. And I will use what money remains to me to make a difference._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "How long will you stay here?";
	text1 = "_My wife and I are agreed. We will return to Formello, or we will stay here. We will not back down. We will not abandon these caves to the horde._";
	text2 = "_Even with the horde leaderless, there is still much to do before we can return to our home._";
	code =
		if (gf(170,8) == 0)
			rs(2);
	break;
	
begintalknode 20;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "What sort of things do you pay them to do?";
	text1 = "_I have them scout. What information I get goes straight to Fort Duvno. I direct them to hunt down horde scouting parties and advance bases. And I send them to root out traitors and spies._";

begintalknode 21;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "You pay them gold?";
	text1 = "_Yes. And a small amount of food. Fort Duvno spares some to aid me with my efforts._";

begintalknode 22;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Do the slithzerikai ever try to kill you?";
	text1 = "He laughs dryly. _Twice so far. And they will try again. That is why I employ guards. They know I am here._";

begintalknode 23;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "Where is your mansion?";
	text1 = "_A short distance southwest of Formello. Deep in the lands of the horde._";

begintalknode 24;
	state = 16;
	nextstate = 17;
	condition = 1;
	question = "Tell me about the paintings.";
	text1 = "_When we fled, we wanted to travel light. I only took things I could sell, to raise money to fight the horde. But those paintings, so small, of my family, my only memory of some of them._";
	text2 = "_I wish I had brought them. I desperately need to see ... see their faces._";

begintalknode 25;
	state = 17;
	nextstate = -1;
	condition = 1;
	question = "Tell me more about your family.";
	text1 = "_I have several children. When the horde came, some ... fought. I ..._ He chokes up. _Excuse me for a moment._ He turns away.";
	action = END_TALK;

begintalknode 26;
	state = 10;
	nextstate = -1;
	condition = gf(83,5) == 1 && has_spec_item(46) > 1;
	question = "I have your paintings. (Give them.)";
	text1 = "He takes the paintings, looks at them, and is instantly overcome with emotion. _Yes ... I ... I ... I thank you. Please ... You are a hero. You can use supplies. I will ... Will unlock doors downstairs._";
	text2 = "_Please ... Excuse me._ He takes the paintings and walks away.";
	action = END_TALK;
	code = 
		set_flag(83,5,2);
		set_spec_item(46,-2);
		toggle_quest(106,3);
		award_party_xp(400,30);
		sf(83,10,1);
		sf(83,11,1);
	break;


//

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

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

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

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

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

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

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

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

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

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

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

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

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

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

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

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 = "";
		