// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(49,0) == 0;
	question = "special";
	text1 = "The wide river opens into a far wider cavern. It's far smaller than the Eastern Gallery, but it's still large, spreading out over a long expanse of war-ravaged land to the west.";
	text2 = "You are on a large lake, extending to the east, toward slith land. In the green light from the fungus far above, you can barely make out a distant shore. Probably guarded by many warriors of the Horde.";
	text3 = "You feel a brief chill when you realize that you have left the comforting lands of Avernum. You are in horde lands now, increasingly far from any safe haven.";
	text4 = "There are still signs of Avernum, happily. There is a hill to the north that appears to have a portal pylon on it. It may well be the last friendly thing you see. Your destination is east, through many miles of enemy territory.";
	action = SET_SDF 49 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(49,1) == 0 && gf(170,8) == 0;
	question = "special";
	text1 = "You get close enough to look at this portal pylon. It's a huge disappointment. It has not been completed. The runes in the stone are incomplete, and the crystal at the top is dark.";
	text2 = "Until a wizard can come here to finish the work, the pylon will be useless. And, as long as the Slith Horde is as dangerous as it is, no precious wizards are coming up here.";
	action = SET_SDF 49 1 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(49,2) == 0 && gf(170,8) > 0;
	question = "special";
	text1 = "You get close enough to look at this portal pylon. It looks like it has only recently been completed. Some wizards slipped up here, finished the work, and teleported out.";
	action = SET_SDF 49 2 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(49,3) == 0;
	question = "special";
	text1 = "There is a narrow tunnel here, too small to admit any giants. You notice faint bootprints on the floor.";
	action = SET_SDF 49 3 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(49,4) == 0 && gf(170,8) == 0;
	question = "special";
	text1 = "As you explore the swamp, you see many tracks. They are unmistakably the footprints of giants. Nothing else that walks on two legs has feet that big.";
	text2 = "The lands to the west must be settled with giants. Those mighty creatures have long resided in this region. Perhaps they are allied with the horde or are simply strong enough to resist them.";
	text3 = "If you travel farther west, you are in danger of getting the attention of the giants. That would be very risky, considering how dangerous your mission already is.";
	action = SET_SDF 49 4 1;


begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You touch the pylon. You feel a brief shock, but nothing else happens.";
	text2 = "This pylon will be dormant until a trained wizard can come out to complete it. When that happens, with luck, this contact will be enough to attune you to it.";
	code =
		sf(49,6,1);
	break;
	
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

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

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


// Dalliman

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "This man is half-starved, covered with grime, and reeking of fish. If it weren't for the ratty remains of the sergeant's insignia on his shoulder, you would have mistaken him for a particularly tall goblin.";
	text2 = "He has been hiding out here, avoiding the sliths and giants, for a while. He is desperately happy to see a friendly face.";
	text3 = "_Welcome. Oh, thank the sky, welcome. I am Dalliman. I mean Sergeant Dalliman. Oh, sorry._ He salutes. _I ... I am very happy to see you. I hope your arrival is a sign we are winning the war at last._";
	text5 = "Sergeant Dalliman invites you to sit by his tiny fire and share some of his miserable little dinner of half-raw cave fish.";
	text6 = "_Disgusting, I know. But ..._ He pats his belly. _You can live on it._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "What are you doing out here?";
	text1 = "_Well, I'm a scout. And a spy. And I was hoping to help anyone else who infiltrated enemy lands. Like you. To give information and supplies._";

begintalknode 12;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "Tell me about these caves.";
	text1 = "He sits up. _I'd be glad to! That's why I am here. The giants and ... others are to the west. Poor Fort Monastery is to the north. And the slithzerikai are to the east._";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(170,8) == 0;
	question = "The war is still going on. (Say what has been happening.)";
	text1 = "He seems very disappointed. _So you aren't here to relieve me. I am not surprised. I'll stay here then, as long as I can hold out._";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = gf(170,8) > 0 && gf(49,10) == 0;
	question = "The leaders of the Slith Horde have been slain.";
	text1 = "He is thrilled. _That explains what I've been seeing. Movement toward the front. Fewer of the enemy around Fort Monastery. The giants have been laughing a lot._";
	text2 = "_And that means I can go home and report. Thank you! Soon, I'll make my way downriver. A hot bed and a decent meal. I can't wait._";
	code =
		award_party_xp(300,30);
		sf(49,10,1);
	break;
	
begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Would you like to come with me?";
	text1 = "He shakes his head. _I have orders. I have to stay here. I have to spy and guide anyone who travels north. Plus, I'm in no shape to help you. I'm too weak._";
	text2 = "_I'm sorry I can't be of more use to you, but we all have our duties._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now.";
	text1 = "He nods. _Thank you ... It was good to have company. I'll be here for a while. If I live._";
	action = END_TALK;
	
begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "How have you survived?";
	text1 = "_With great care. On this side of the river, it's possible. The giants can't get at me in here, and the sliths mostly stay away. They try to avoid the giants. All those monsters have a sort of a truce._";
	text2 = "_I forage food. I sleep with one eye open. I learn what I can. It's ... I hate it here._";

begintalknode 18;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "You have supplies for me?";
	text1 = "He looks embarrassed. _I did. I had food and some potions. But I had to eat the food, and I needed the potions to heal myself when a giant threw an accurate rock._";
	text2 = "_I don't have anything but information. I am sorry. I gave up on saving supplies when the infiltrators with the orb never arrived._";

begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "How long have you been here?";
	text1 = "He looks at the west wall of the cave. You can see many little marks etches on it. _I put one mark on the wall a day. Except for days I forget. And days that I put on two marks by mistake. Or three marks._";
	text2 = "_I've been here ..._ He squints at the chaotic profusion of marks. _A while._";
	
begintalknode 20;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "With the orb? What do you mean?";
	text1 = "_When I was sent here, I was told that some infiltrators would come north soon after. They would use the Orb of Thralni to fly up here. I would give supplies, and they would head east to Formello to try to kill the Impaler._";
	text2 = "_They never arrived. They must have had problems. Not surprised. It seems very risky to try to fly that far. No magic is without limits._";
	text3 = "You tell Dalliman the tale of your recovery of the shards of the orb. He is unhappy, but unsurprised. _Yes, it is true. They found the limits of that magic, and it cost their lives._";
	code =
		if (gf(90,4) == 0)
			rs(3);
	break;
	
begintalknode 21;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "Tell me more about the west.";
	text1 = "_Well, the giants are close. That is dangerous enough. But then, you'll be close to the ruins of New Harston and the entrance to the Northern Reaches. And then ... I'm not sure._";

begintalknode 22;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What is happening at Fort Monastery?";
	text1 = "_It's under siege. Has been for months. I'm not sure how the humans in the fort hold out. There's always a huge slith force camped outside._";
	text2 = "_Stay away from there. That's my advice. Nothing you can do for them, and the force camped outside is vicious and numerous._";

begintalknode 23;
	state = 13;
	nextstate = 16;
	condition = gf(170,8) == 0;
	question = "Tell me more about slith lands.";
	text1 = "_I can tell you only what I have seen from here. There are slithzerikai. All savage, always everywhere. I see them camp on the shore. Sometimes they come over here to reinforce the siege around Fort Monastery._";
	text2 = "_But ... I don't think their control of the land is complete. There is still Fort Draco. And I've seen some humans over there._";

begintalknode 24;
	state = 14;
	nextstate = 15;
	condition = 1;
	question = "What don't you understand?";
	text1 = "_Well, I've been eavesdropping on the giant patrols. It's not hard. They're loud creatures. I heard them say that the 'dragon lovers' are that way._";
	text2 = "_I tried to go there myself. I saw some armed humans, on the road to New Harston._";

begintalknode 25;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "What happened?";
	text1 = "_They attacked me! I had to run off. Lucky to escape with my life. Don't go west if you're hoping for a place to trade or rest. Giant or human, they're all mad that way._";

begintalknode 26;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Fort Draco.";
	text1 = "_I only know what I've heard. When it was abandoned, the wizards sealed it. The slith can't get it. Nor can humans. Nor anyone, not without the key. Don't go there looking for a safe harbor._";
	text2 = "_But at least the horde can't use it._";

begintalknode 27;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "You've seen humans?";
	text1 = "_It's hard to tell from this distance, but I think I've seen human soldiers by the shore across the lake. Moving fast ... I only saw them for a moment. But, if they're still alive, maybe they can tell you more._";

//

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