// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(47,0) == 0;
	question = "special";
	text1 = "There is a narrow bridge over the river to the west. It was only recently completed. No doubt, it was the result of great expense and years of hard Avernite labor.";
	text2 = "That would probably explain why it was not collapsed the moment the Slith Horde started surging into northern Avernum. An understandable error, but a fatal one.";
	text3 = "Several giants stand guard on the bridge. This is the western extent of the lands they claim.";
	action = SET_SDF 47 0 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(47,1) == 0;
	question = "special";
	text1 = "The tunnel to the west is blocked by a large gateway. It was recently rebuilt, but not by sliths. The work is far too solid. The massive stones, any one of which would require five giants to move it, are put together too tightly.";
	text2 = "Humans and nephilim look out at you through the windows. And aim arrows in your direction. That means that the barrier isn't controlled by the giants either.";
	text3 = "Then you get close enough to see the obelisk that stands before the gate. Several words have been melted into the stone, identifying who claims these lands:";
	text4 = "_THIS IS THE REALM OF THE GREAT DRAGON! NONE ENTER WITHOUT HIS BLESSING!_";
	action = SET_SDF 47 1 1;
	code =
		sf(47,10,1);
	break;
	
begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(47,2) == 0;
	question = "special";
	text1 = "You get close enough to this pit to peer down into it. You don't like what you see.";
	text2 = "The passage down gets steeper and steeper, and it gets slick with algae to boot. If you slide down it, there is a good chance (bordering on a guarantee) that you won't be able to climb back up.";
	action = SET_SDF 47 2 1;

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

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Great heat has melted words into the surface of the obelisk:";
	text2 = "_THIS IS THE REALM OF THE GREAT DRAGON! NONE ENTER WITHOUT HIS BLESSING!_";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Oddly enough, someone has set a pair of stone servants here. They are working on rebuilding this long-abandoned home. They mutely get blocks and then pile them on each other, making rough but basically stable walls.";
	text2 = "You find no clue to who made or is maintaining the constructs.";

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

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The defenders of the gate look at you with pure disdain. You do not worship the dragon, so you are beneath notice. It is unfortunate that the arrogance of the mighty drake seems to be catching.";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "When you step through the gate, the defenders shout out an alarm. They are very serious about keeping out intruders and infidels. In moments, arrows are being launched at you with deadly aim.";




//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a lone man standing out in front of the gate. He is fearless, as if following Melanchion renders him immune from attack. He is young, healthy, and strong. And his eyes have a glazed look that makes you feel very cautious.";
	text2 = "_Welcome,_ he says, raising his hand. _I am Tarmik-Drayssa, servant of the mighty dragon Melanchion. My dread master wishes no conflict with Avernum._";
	text3 = "_As long as you do not try to pass, we will not have to kill you. Our weapons have been touched by the mighty dragon himself. You must turn back._";
	text5 = "Tarmik-Drayssa gives you a little nod. _I can talk to you more if you wish. The dragon would want me to be polite. Only, do not cause trouble. Our weapons are touched by the dragon._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Tell me about Melanchion.";
	text1 = "Tarmik-Drayssa gives you a fuzzy little smile, the only emotion he has betrayed so far. _He is a dragon. Young and mighty, come from the lower tunnels to bring peace and prosperity to the underworld._";
	text2 = "_I met him myself. He touched me with his claw. Touched my weapon. Allowed me to call myself Drayssa. I am his._";

begintalknode 12;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "Your weapons are touched by the dragon? What does that mean?";
	text1 = "_I ... I mean that he touched them. There is no special or poetic meaning. He reached out and touched my blade. It was a true honor._";

begintalknode 13;
	state = 10;
	nextstate = 15;
	condition = has_spec_item(5) == 0;
	question = "I would like permission to pass.";
	text1 = "_And do you have a token of Melanchion's? Something marking you?_ You don't. He shakes his head. _You must go then, before we feel we need to kill you._";

begintalknode 14;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(5) > 0 && gf(47,6) == 0;
	question = "I have been called by Melanchion. (Show the scale.)";
	text1 = "You remove the scale from your pack and show it to Tarmik. He reaches out and touches it reverently. _Yes, you are truly the one we were told to expect._";
	text2 = "He whistles. The guards lower their bows. _You may pass on to Refuge, but you must be on your best behavior._";
	code =
		sf(47,20,1);
		sf(47,6,1);
	break;
	
begintalknode 15;
	state = 10;
	nextstate = 16;
	condition = gf(47,6) > 0;
	question = "I may pass safely?";
	text1 = "Tarmik nods. _But beware. No crime or violence is allowed by outsiders. Break our laws, and no quarter will be given. Obey our laws, and you will be allowed to pass._";


begintalknode 17;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I'll be going now. (Leave.)";
	text1 = "Tarmik-Drayssa nods and silently watches you go..";
	action = END_TALK;
	
begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "And who were you before you served Melanchion?";
	text1 = "_I was a soldier of Avernum. I had to ... leave._ Desert, more likely. _We do not like to talk about what we were before the dragon accepted us._";
	
begintalknode 19;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "What exactly does he plan for us all?";
	text1 = "Tarmik looks perplexed. _I am not intelligent enough to comprehend the mind and plans of the dragon._ That much seems true enough.";

begintalknode 20;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "Can any serve Melanchion?";
	text1 = "_Oh, no! Many come before him. He judges them. Looks into their eyes. Sees if their spirit will let them obey properly._";
	text2 = "_And, if they are not true in their desire, they are rejected._";

begintalknode 21;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "And what happens to the rejected?";
	text1 = "_They leave our lands, unharmed. They are sent to Bargha. We do not touch or rob them, but they may not return._";

begintalknode 22;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "Did it give your weapon any special powers?";
	text1 = "_As long as I fight for the dragon with a true spirit, I am indestructible._";

begintalknode 23;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "I found Breck-Drayssa. I'm sure Melanchion would like to know.";
	text1 = "_Ah, but you ask me to try to divine the thoughts of the dragon. I am unable and unworthy. I only know his command, which is that only those with permission may pass this gate._";

begintalknode 24;
	state = 15;
	nextstate = -1;
	condition = gf(47,6) == 0;
	question = "Let me by or I will destroy you.";
	text1 = "Tarmik-Drayssa's expression doesn't change. He simply draws his weapon and assumes a defensive stance. He moves remarkably quickly.";
	code =
		set_attitude(30015,10);
	break;
	
begintalknode 25;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "I want to worship Melanchion.";
	text1 = "_And once, those words would have won you passage. The rules changed recently. Now you must have permission to pass._";

begintalknode 26;
	state = 15;
	nextstate = -1;
	condition = 1;
	question = "I'll just go then.";
	text1 = "Tarmik-Drayssa nods and silently watches you go..";
	action = END_TALK;

begintalknode 27;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "How do I reach Melanchion?";
	text1 = "_Go west and you will reach Refuge. Continue beyond to the west, and you will find the dragon's keep in the south wall of the cavern._";

//

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