// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(10,0) == 0;
	question = "special";
	text1 = "Based on the crumbling sections of track and abandoned, rusting carts, you suspect that this was once a mine. However, someone else has moved in.";
	text2 = "Several crystals have been set lining the roadway, and a large magical barrier blocks the entryway. You can't see any movement on the other side.";
	text3 = "The only clue to the new residents of this place is an obelisk bearing one word: _Tenevra._ You don't know what that means.";
	text4 = "You shout, but nobody comes to let you in. Without help, you aren't going to be able to get in.";
	action = SET_SDF 10 0 1;
	code =
		if (has_spec_item(16) > 0)
			rs(4);
	break;
	
begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(10,1) == 0 && has_spec_item(6) > 0;
	question = "special";
	text1 = "When you get close to the barriers, you hold up the mica sheet that Ghall-Ihrno gave you. You keep holding it up. You wait. Your arm starts to hurt.";
	text2 = "Sometimes you imagine that you can hear whispered conversations on the other side of the barrier.";
	text3 = "Eventually, frustrated, you drop your arm and turn away. Then you hear a quiet hissing sound, followed by a pop. The magical barriers slowly sink into the floor, allowing entry.";
	action = SET_SDF 10 1 1;
	code =
		kill_object(1853,0);
		kill_object(1854,0);
	break;
		
begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(10,2) == 0;
	question = "special";
	text1 = "You enter Tenevra, a small vahnatai colony deep in slithzerikai lands. You can see several of these tall, alien creatures, gawking at you from the shadowy corridors. Most of them have clearly never seen one of your kind before.";
	text2 = "There are about a dozen of them. There is a long, awkward pause. And then one of them steps forward. He is a formidable warrior, with a long waveblade and a dozen razor-sharp disks on his belt.";
	text3 = "He says something in the vahnatai tongue. Though you can't pick up subtle vahnatai emotional cues, his irritation is unmistakable. The vahnatai  turn and walk away.";
	text4 = "The warrior strides toward you. _We have let you in. Now we are talking._";
	action = SET_SDF 10 2 1;
	code =
		spawn_creature(1086);
		set_name(1086,"Torkia");
	break;
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(10,3) == 0;
	question = "special";
	text1 = "This chamber is oppressively hot and humid. There is a lot of rubble, shaken loose from the ceiling by cavequakes. The vahnatai haven't spent much time here. They just sealed it up and stayed away.";
	text2 = "You can soon see why. There is old magic in the eastern half of the cave. Abandoned, dangerous magic. Some sort of trap, left for anyone careless enough to blunder into it.";
	text3 = "There are four crystal pylons, about your height, arranged in a ring around a magic circle. The circle is empty, but the pylons are still quite active. They glow with a dangerous, fiery light.";
	action = SET_SDF 10 3 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(10,4) == 0;
	question = "special";
	text1 = "There is a crystal pylon in the middle of this chamber. Many lines of strange, flowing runes have been etched into its surface, forming rings that go from the base to the tip. It is clearly vahnatai workmanship.";
	text2 = "It is also ruined. Something has broken it, either a surge of power or a blow from outside. Dozens of cracks spiderweb its surface, and many small fragments have broken loose.";
	text3 = "This is probably the pylon Lark sent you to find. You collect a handful of crystal shards from the base of the pylon. Doesn't seem like much of a reward for all the trouble you went through to get here.";
	action = SET_SDF 10 4 1;
	code =
		set_spec_item(10,1);
	break;


//

begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The obelisk bears one word carved in a peculiar script: _TENEVRA._";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are several vahnatai warriors in Tenevra. They watch you carefully. However, they don't speak any of your language.";

begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You poke at the slithzerikai. A spell has left it frozen. Its skin has a bluish tint. If it is breathing, the motion is so slow that you can't detect it.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "As Kian-Ihrno crumples to the ground, his face betrays his surprise and agony at your betrayal.";
	text2 = "Oh, well. If he really thought that the vahnatai were going to be allowed to make a new city in Avernite lands, well, he deserved what he got.";

////

begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "When you enter the ring of pylons, they pulse with light. Three times, in unison. A shade appears in the circle in the middle. With each flash of light, it becomes more substantial.";
	text2 = "The shade begins to speak. At least, the sound comes from the spectral shape. Its mouth doesn't move.";
	text3 = "It says, _You have entered ... Defend ... You must prove ... the circle ... Kkkk ... Kkkk ... You have entered ..._";
	text4 = "It doesn't say anything else. Strange. The years of neglect seem to have allowed the spells here to decay. Doesn't make them any less dangerous.";
	text5 = "One of the pylons is now surrounded by gentle motes of blue light. Another is surrounded by angry, hot sparks of flame.";
	
begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Now that one of you is a safe distance from the magical constructs, the trap becomes inactive. The shade behind you fades away. The pylons return to darkness.";

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "A wave of flame shoots out of the pylon wreathed in sparks. Then all four pylons flash brightly. Moments later, when the light fades, the blue and red motes of light have moved.";

begintalknode 17;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The magical trap, unstable after many years of neglect, has taken too much damage. The pylons begin to crumble. The shade in the center begins to stumble around, no longer controlled by the crystals that surround it.";
	text2 = "It begins to fall apart too. That doesn't stop it from continuing to try to kill you.";

begintalknode 18;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Your blows have finally sufficiently damaged the lump of hostile ectoplasm. It crumbles and dissolves. The traps have finally faded. The barriers to the south, which had been sustained by the energy of the pylons, fade away.";

//

begintalknode 19;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The portal is small, but it is now receiving a fair amount of energy from the crystal pylons. Soon, it will be able to send small objects (or individuals) a long way with only a small chance of disaster.";
	text2 = "For now, it is not fully charged. Using it in its current state would be dangerous. You might have to talk to someone to get it working properly.";

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

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

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

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

//

begintalknode 25;
	state = -1;
	nextstate = 20;
	condition = 1;
	question = "special";
	text1 = "You approach the ";


//Kian-Ihrno

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "This vahnatai is unusually short, only about your height, but she bears herself with great dignity. Her skin is unusually pale and chalky. Perhaps that means that she is a bit older than the others.";
	text2 = "She begins to speak, and you find that her command of your tongue is unusually good. _I am Kian-Ihrno. I have heard of you. I know you bear the token and faith of one of our kind. This is good._";
	text3 = "_I hope you are here to help our colony. This can help us much and make many good feelings._";
	text5 = "Kian-Ihrno says, _Is there anything else you need, visitor? Since you came far to see us, we wish you to be comfortable when in our home._";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "What are you all doing here?";
	text1 = "_It is a long story. A long journey from our home, with a mission. And then we arrived to find much had changed. We have had many decisions, though our mission never changed._";

begintalknode 32;
	state = 30;
	nextstate = 32;
	condition = 1;
	question = "Tell me about this colony.";
	text1 = "Kian-Ihrno suddenly looks very nervous. This is a touchy subject. _We had a very hard journey here. Many troubles. Very hard to return. And these lands are wild now. Not controlled. The number of people is shrinking._";
	text2 = "_We have made a colony here. Until ... Until things change to make us leave._ A vahnatai colony in Avernite land? This is a touchy topic indeed.";
	text3 = "_Do not be angered. Is all unsettled. For now, we just try to find a way to live, since we are trapped here. We still lack many things to make a proper vahnatai home._";
	
begintalknode 33;
	state = 30;
	nextstate = 35;
	condition = 1;
	question = "Do you have many problems with the slithzerikai?";
	text1 = "_They tried to kill us when we arrived. They killed one of us. We killed a number of them. They know we are here. They know we can defend ourselves._";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = gf(132,29) == 7 && has_spec_item(10) == 0 && gf(10,5) == 0;
	question = "I am looking for the shards of a vahnatai communication device. Might there be something like that here?";
	text1 = "_Ahhh ... That is an interesting query. While you are helping us with the other matter, I will look around. Perhaps I will discover something._";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = gf(132,29) == 7 && has_spec_item(10) == 0 && gf(10,5) > 0;
	question = "I am looking for the shards of a vahnatai communication device. Might there be something like that here?";
	text1 = "_Yes ... There is a reason we were drawn to these tunnels, out of all available to us. The vahnatai were here once. Some of their power was here. It called to us. Then we arrived, only to find that there were traps too._";
	text2 = "_Of course, we sealed the chamber below, the trapped chamber. If you wish to take the risk of removing the traps for us, you are welcome to anything there you find. Then, when you are gone, we can use the space._";
	text3 = "_I will have the gate opened for you._";
	code =
		sf(10,10,1);
	break;
	
begintalknode 36;
	state = 30;
	nextstate = 37;
	condition = gf(10,7) < 3;
	question = "I have been sent here to help you. What do you need?";
	text1 = "Kian-Ihrno nods. _Yes, so much work, so much loss, to get to this point. We are shamed to need the help, but the journey weakened us. And there are other ... problems._";
	text2 = "_Anyway. The problems is a ... a cult. They hate humans. They worship Rentar-Ihrno. They have come here to ... We don't know what they will do. Nothing good._";
	text3 = "_The council at Olgai have decided that they must be destroyed. This is why we were sent. We hunted them down, but we cannot drive them out. We ask Avernum's help for this, since we all should want them gone._";
	code = 
		if (gf(10,7) == 0)
			set_flag(10,7,1);
		toggle_quest(57,1);
	break;

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = gf(10,7) == 2 && gf(0,7) > 0;
	question = "The vahnatai cultists have been defeated.";
	text1 = "Kian-Ihrno nods. Her mouth twists in what could only be a smile. _Yes. Yes. Our mission is done. Now we ... Now we must face a dreaded future, with many decisions._";
	text2 = "_Return to your Castle. Tell them that the work is done, and they have earned the gratitude of the vahnatai. When we can send word back to Olgai, something will be done._";
	text3 = "She has a warrior fetch you a baton and a glittering crystal. _And take these tokens. They express our gratitude greatly. I, and the vahnatai, thank you._";
	code = 
		set_flag(10,7,3);
		sf(10,5,1);
		toggle_quest(57,3);
		award_party_xp(400,30);
		reward_give(295);
		reward_give(246);
	break;

begintalknode 38;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Where are you from?";
	text1 = "_We are from the capital of our fragment of the vahnatai whole. It is called Olgai. It is an honored place, near many crystal souls. No human has set foot there in a number of years. It is a sad thing._";

begintalknode 39;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Tell me about your journey.";
	text1 = "_We came on foot, up through many miles of wild, uncontrolled caves. Chitrachs, rockhounds, then slithzerikai. We were thirty when we left, only twenty when we arrived. This makes us want to stay for a time._";

begintalknode 40;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What had changed when you arrived?";
	text1 = "_When we left, there was no Blight. No horde. We thought to march to the Castle, see Ghall-Ihrno, and present our case. And to see human lands and meet them and nephil. We were excited to visit and see many ... sights._";
	text2 = "_But then we found a starving trapped place full of war. We could not get through slith lands, so we found here._";

begintalknode 41;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "You are forming a city here?";
	text1 = "_A city ... That is a bold word. For now, we make little homes, raise a little food, just try to live. We do not want to invade Avernum. We will only stay until ... Until we have to go._";

begintalknode 42;
	state = 32;
	nextstate = 33;
	condition = 1;
	question = "What does this colony lack?";
	text1 = "_Many things. There are only a few of us, for ..._ She is silent for a moment. She was about to say the rather ominous, _For now._";
	text2 = "_And we lack a crystal soul. These are the frozen souls of our honored leaders, who eternally exist to guide us. Without one, this colony is forever adrift._";

begintalknode 43;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "And when will you leave?";
	text1 = "_We would not anger Avernum. Should the humans return and want us to leave, we would. Though, if the humans do not return, if this lands stays wild, who would deny us a home?_ She makes an odd little shrugging motion.";

begintalknode 44;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "And do you hope to get a crystal soul? Or more vahnatai?";
	text1 = "_I ... We only came here on a mission. We do not plan to make a city at this point. We only ... We wait and see. We only, for now, want to live._";

begintalknode 45;
	state = 35;
	nextstate = 36;
	condition = 1;
	question = "Do they ever attack you?";
	text1 = "_No. With what has been done to them, they are confused and scattered, and they do not have the focus to fight us. Unlike before, when they were far more dangerous than they usually are._";
	text2 = "_If they defeat the humans, however, they will give us many problems. Especially if we must keep living here._";
	text3 = "_We do not fear the slithzerikai, though. The savage among them have fought us for precious caves for many years. We have never lost to them. And I do not see this as changing. If anything, we will take from them._";

begintalknode 46;
	state = 36;
	nextstate = -1;
	condition = 1;
	question = "The Slith Horde had been unusually competent?";
	text1 = "_Yes. But their leaders are gone. Killed by Avernum. Now they are ... as they have always been._";

begintalknode 47;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "Cultists who worship Rentar-Ihrno?";
	text1 = "_That is correct. Some vahnatai have never forgiven humans for entering the underworld, so they worship their hero Rentar-Ihrno, greatest of vahnatai mages, who killed so many humans on the surface and in Avernum._";
	text2 = "There is no Avernite who hasn't heard of Rentar-Ihrno. Once an ally of Avernum, she sent hordes of monsters to destroy the surface world. It was Avernites that countered this plot, and she later attacked Avernum in revenge.";
	text3 = "It was a band of Avernite soldiers who finally found and defeated her in an epic battle. She is completely gone, and yet she pesters humanity even now.";

begintalknode 48;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "Where are they now?";
	text1 = "_They have sealed themselves in her old fortress, far to the northwest, far beyond our ability to reach them. They try to commune with her or to find signs that she still lives._";
	text2 = "_And they plan. When they see that she is gone, they will lash out._";

begintalknode 49;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "Why must they be destroyed?";
	text1 = "_They hate Avernum. They would attack it. We have learned all too well what happens when vahnatai fight humans. It goes poorly for us. Now they are in one place. Now we can strike them._";
	text2 = "_If they conclude their work and escape, however, we fear they will not surface again until they attack._";
	text3 = "_But they have their defenses. That is why we need your help. You will learn more when you arrive at the ruined fortress._";

begintalknode 50;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "Why should Avernum help you?";
	text1 = "_Because they are your enemies. Because they will do harm, and you cannot afford another band of foes working against you. And because, in your time of trial, the council of Olgai have promised that they will repay your aid._";
	text2 = "_This is a matter of honor. If you help us, we will help you far more in return._";

begintalknode 51;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "How can I reach them?";
	text1 = "_You must go to see Unici-Tel. We have brought a portalmaster with us. It is our great fortune that he survived. His first work, once here, was to make a way to send warriors to find the cultists._";
	text2 = "_He is the one who will send you where you need to go._";
	text3 = "Great. More portals. Your stomach is already rolling over in anticipation.";


begintalknode 52;
	state = 30;
	nextstate = 40;
	condition = gf(63,21) == 1;
	question = "I have been sent here by Melanchion.";
	text1 = "The vahnatai nods slowly. She seems unsurprised. _Yes. We know of the dragon. The dragon knows of us. The dragon wants a simple world. He thinks eliminating us will mean more peace. It will only mean more death._";
	text2 = "_I will save you the trouble of more speaking. We are here. We are not leaving. Perhaps we will leave if Avernum asks. We will not obey the dragon._";
	
begintalknode 53;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Are you really forming a colony here?";
	text1 = "_When we came here, the horde owned these lands. We took them. Avernum was not involved. Avernum was gone._";
	text2 = "_What will happen now? Will we leave? Maybe, someday? For now, these lands are unclaimed, they were once ours, and we will stay here until Avernum convinces us we should go._";
	
begintalknode 54;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "I will leave you here, for now.";
	text1 = "_That is wise. For now, there is peace. There will only be war if you will it._ The vahnatai turns away.";
	action = END_TALK;

// ONE MORE NODE LATER

	
// Palom

begintalknode 55;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "The vahnatai brought an alchemist with them. He is currently at work in these stifling, poorly ventilated caves. Being trapped in here with so many noxious gases can't be good for him. He's kind of twitchy.";
	text2 = "He also speaks very little of your tongue. He points at himself. _Palom._ He points at his equipment. _Mix. I mix. Mix you._";
	text5 = "Palom watches you attentively, eager to help. _Mix! Me mix! Mix you._";
	action = INTRO;

begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "You can mix things for me?";
	text1 = "He points up. _Kian-Ihrno._ He nods vigorously. _Mix! Mix!_";

	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I'd like to know more about you.";
	text1 = "He looks confused for a moment. He says a few things in the vahnatai tongue and notes your incomprehension.";
	text2 = "Then he points at himself. _Palom. Palom mix. Mix you!_";
	
begintalknode 58;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "Can you make a potion for me?";
	text1 = "He nods, recognizing a word. _Potion. Mix potion. Potion ..._ He thinks, trying to remember the words. _Fast! Power! Protect! Thoughts!_";
	text2 = "He holds out his hands and then points at your pack. You show him the ingredients you have gathered and he inspects them, looking for something he can use.";
	
begintalknode 59;
	state = 51;
	nextstate = -1;
	condition = party_has_item(290) && party_has_item(291) && party_has_item(292);
	question = "Make a 'Fast' potion for me. (Give spiritual and energetic herbs and graymold.)";
	text1 = "He takes the materials, inspects them, and nods. On comfortable ground at last, he engages in a long period of chopping, mixing, and boiling.";
	text2 = "Eventually, he hands you a bottle stoppered with wax. _Potion. I mix! Good!_";
	action = REUSABLE;
	code =
		take_item(290);
		take_item(291);
		take_item(292);
		reward_give(228);
	break;
	
begintalknode 60;
	state = 51;
	nextstate = -1;
	condition = party_has_item(290) && party_has_item(291) && party_has_item(292);
	question = "Make a 'Power' potion for me. (Give spiritual and energetic herbs and graymold.)";
	text1 = "He takes the materials, inspects them, and nods. On comfortable ground at last, he engages in a long period of chopping, mixing, and boiling.";
	text2 = "Eventually, he hands you a bottle stoppered with wax. _Potion. I mix! Good!_";
	action = REUSABLE;
	code =
		take_item(290);
		take_item(291);
		take_item(292);
		reward_give(229);
	break;
	
begintalknode 61;
	state = 51;
	nextstate = -1;
	condition = party_has_item(289) && party_has_item(290) && party_has_item(291) && party_has_item(293);
	question = "Make a 'Protect' potion for me. (Give healing, spiritual and energetic herbs and mandrake root.)";
	text1 = "He takes the materials, inspects them, and nods. On comfortable ground at last, he engages in a long period of chopping, mixing, and boiling.";
	text2 = "Eventually, he hands you a bottle stoppered with wax. _Potion. I mix! Good!_";
	action = REUSABLE;
	code =
		take_item(289);
		take_item(290);
		take_item(291);
		take_item(293);
		reward_give(237);
	break;
	
begintalknode 62;
	state = 51;
	nextstate = -1;
	condition = party_has_item(289) && party_has_item(290) && party_has_item(291) && party_has_item(292) && party_has_item(293);
	question = "Make a 'Thoughts' potion for me. (Give healing, spiritual and energetic herbs, graymold, and mandrake root.)";
	text1 = "He takes the materials, inspects them, and nods. On comfortable ground at last, he engages in a long period of chopping, mixing, and boiling.";
	text2 = "Eventually, he hands you a bottle stoppered with wax. _Potion. I mix! Good! Best!_";
	action = REUSABLE;
	code =
		take_item(289);
		take_item(290);
		take_item(291);
		take_item(292);
		take_item(293);
		reward_give(239);
	break;
	
begintalknode 63;
	state = 51;
	nextstate = -1;
	condition = 1;
	question = "That is all I need.";
	text1 = "You take away the ingredients. He looks disappointed. _Mix?_";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "That is all. Goodbye.";
	text1 = "He nods, understanding you. _Goodbye. Goodbye._";
	action = END_TALK;

// ANOITHE RKIAN NODE

begintalknode 67;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "I won't tolerate another colony in Avernum's lands. You have to go.";
	text1 = "The vahnatai looks disappointed. _You are not a true representative of Avernum. You are a brigand, doing a dragon's bidding for blood money. We will tolerate your presence here no longer._";
	text2 = "And then Kian-Ihrno makes a single chopping motion with her hand. Tenevra is, in an instant, a far less friendly place.";
	action = END_TALK;
	code =
		change_crime_level(-1,10);
		make_zone_hostile();
	break;	

// 70 Unici-Tel

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "There is a young, spritely vahnatai walking around this chamber, working on the small portal. He moves from position to position, examining the shimmering pillar of light. He occasionally casts a minor spell to adjust it.";
	text2 = "When he sees you, he stops his work. _Good. The ... Avernite. Good to practice your talk. Need to know it, if we live here._";
	text3 = "_I Unici-Tel, the portalmaster. Come here with many ... things ... doing things ... Ummmm ... Jobs! Many jobs._";
	text5 = "Unici-Tel says, _I am still Unici-Tel. Still with many jobs. But I help. Kian-Ihrno says ... help is right word? Not a bad word? Help? Help._";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = gf(10,7) == 0;
	question = "I would like to talk to you.";
	text1 = "_I ... I help, but ... You no talk to Kian-Ihrno. No talk. She want talk. Then I help. I not bring anger? Anger not want. Go talk Kian-Ihrno._ He points to the north and apologizes a few more times.";
	action = END_TALK;

begintalknode 72;
	state = 70;
	nextstate = 71;
	condition = gf(10,7) > 0;
	question = "You know a lot about portals?";
	text1 = "_Yes! Vahnatai use crystals. Love crystal magic. Magic makes portals. Crystal power portals go! Can soon bring with portal too. Bring from far._";
	text2 = "_Make this portal. I hear of you portal. Big ... Great? Great Portal. Gone. Is sad._";

begintalknode 73;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "You made this portal?";
	text1 = "_Yes! I make! Many spells. Make in many parts. Bring crystals. Give power. Push power. Make power ... pile. And grow portal. And use to send!_";

begintalknode 74;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "You want to use the portal to bring things from far away?";
	text1 = "_Yes! Kian-Ihrno want bring vahnatai. More vahnatai. Soon can do it. And then ..._ He stops talking. He looks worried.";
	text2 = "_Maybe I not talk more on this. Kian-Ihrno talks on this._";

begintalknode 75;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "You know about the Great Portal?";
	text1 = "_Yes. Even feel it. Feel when it blow, out here. Very bad. Crystal crack. Hard to ... to make good. To ... gooder? No. Fix! Yes. Hard to fix._";

begintalknode 76;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Can you fix it?";
	text1 = "_I? Oh, no. Big hard thing. Much time. Many wizards. Much power. Maybe vahnatai from back ... Egli wizard place, they can. But time. Much time. And you no eat._";

begintalknode 77;
	state = 70;
	nextstate = -1;
	condition = gf(10,7) > 0;
	question = "Tell me more about this colony.";
	text1 = "_I ..._ He looks nervous. _Not talk good. Not know what ... What should say. Talk to Kian-Ihrno. Knows more._";

begintalknode 78;
	state = 70;
	nextstate = 73;
	condition = gf(10,7) == 1 || gf(10,7) == 2;
	question = "I need to use your portal.";
	text1 = "Unici-Tel looks up at the portal. _Has used. Is ... Not hurt ... Not bad ... Safe. Is safe. Was used. Takes to ... To place. You go in._";
	text2 = "He turns and concentrates on the portal, ready to rapidly solve any problems when you try to go through.";
	code =
		sf(10,7,2);
	break;
	
begintalknode 79;
	state = 70;
	nextstate = 75;
	condition = gf(10,7) > 0;
	question = "What are your other jobs?";
	text1 = "_I ... Talk. Yes, talk. Far talk with vahnatai. From where we are from. Tell them what we do. What we need._";
	text2 = "_But no do. Not now. Stone I use, speaking stone, it is lost. I can make new one. Is hard. No ... No time._";
	code = 
		if (gf(10,11) > 1)
			rs(2);
	break;
	
begintalknode 80;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "You are sure it is safe?";
	text1 = "_Sure? What ... sure ... Yes! Sure! Is safe! Was used. Warriors through. Warriors in place now._";

begintalknode 81;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "I just step in?";
	text1 = "_Yes. Go. Safe!_";

begintalknode 82;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "There are already warriors there?";
	text1 = "_They go to place. They find the ... Vahnatai. Bad vahnatai. Can't ... You talk them. They help you. First go. In portal._";

begintalknode 83;
	state = 75;
	nextstate = -1;
	condition = 1;
	question = "You tell them what you need? How would they send help to you?";
	text1 = "_I ... Hard to say. We just talk. They can't send help yet._";


begintalknode 84;
	state = 75;
	nextstate = 76;
	condition = gf(10,11) < 2;
	question = "Maybe I can recover that stone for you?";
	text1 = "_Maybe? What that? Oh ... Do or not do. Maybe. Maybe you can. When we travel, the giants ... Giants chase us. One with stone lost. Giants take away._";
	text2 = "_Giants are ... are ..._ He points to the southwest. _There. But far. If we have stone, can help. Help us. Help Avernum._";
	code =
		sf(10,11,1);
		toggle_quest(115,1);
	break;
	
begintalknode 85;
	state = 76;
	nextstate = -1;
	condition = 1;
	question = "What does the stone look like?";
	text1 = "_Is crystal. About ..._ He holds his hands six inches apart. _And ..._ He mimes that it is flat and about an inch thick. _Is good to talk._";

begintalknode 86;
	state = 70;
	nextstate = -1;
	condition = has_spec_item(14) && gf(10,11) == 1;
	question = "I found your speaking stone. (Give it to him.)";
	text1 = "He is thrilled to have it back. _Yes! Is it! And only a little ... What is word?_ He points at the small scratches on the surface.";
	text2 = "_I pay. Reward. For good thing you do. Thing we find here. Good magic, not fit me._ He gets a leather vest for you. It's dirty and moldy, but you can still make out the intricate runework.";
	code = 
		set_flag(10,11,2);
		toggle_quest(115,3);
		award_party_xp(400,30);
		reward_give(52);
		set_spec_item(14,-1);
	break;		

// 90 Torkia

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = "The vahnatai warrior walks up to you and gives a stiff martial bow. _I am Torkia. I am myrmidon of the vahnatai. I give life to defend those here._ His training includes quite a bit of practice with your tongue.";
	text2 = "_We see the mark you bear, from one of us. Some of us ask for help. Now we have it, but we watch you. If there is treachery, you will pay._";
	text3 = "You notice, to the south, a slithzerikai standing in a magic circle. It is frozen immobile. It appears that Torkia was examining it. You can't tell if it is alive.";
	text5 = "Torkia watches you suspiciously. You're no expert at picking up vahnatai visual clues, but he is not happy that you are here. He would probably be just as happy if you ended up like the frozen slith.";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = gf(10,7) == 0;
	question = "Why was I asked to come here?";
	text1 = "He points to the northeast. _Kian-Ihrno is there. She is our leader. Letting your kind in and asking you for help is her decision._";

begintalknode 92;
	state = 90;
	nextstate = 91;
	condition = gf(10,7) > 0;
	question = "What do you think of the vahnatai cultists?";
	text1 = "He looks away. _I am a soldier. I do not make wars. I follow orders. I do not want war with your kind._";
	text2 = "_But some of us saw the good in what Rentar-Ihrno wanted. We will not forget what she wanted for us._";

begintalknode 93;
	state = 90;
	nextstate = 92;
	condition = 1;
	question = "How did vahnatai come to be here?";
	text1 = "_We walked. We came up from our colony, far below, on a mission. We lost much. But we may gain much too._";

begintalknode 94;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "Tell me more about your slithzerikai.";
	text1 = "He smiles. _We vahnatai have long battled those savages. They have always tried to take what we have, and they have always failed._";
	text2 = "_Sometimes we take them prisoner. We see what they know. Then we discard them. They are like goblins to us. Pests. Nothing more._";
	text3 = "Something about his look makes you suspect he'd like to spend some time with you on his platform.";
	
begintalknode 95;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "What did Rentar-Ihrno want?";
	text1 = "_These tunnels are for the vahnatai. We did not ask your kind to come and steal our home. To us, your losing your food is only justice._";

begintalknode 96;
	state = 91;
	nextstate = -1;
	condition = 1;
	question = "And might you want to help the cultists instead of fight them?";
	text1 = "Torkia looks furious. _I gave much to be here! I lost warriors and friends on the journey. The council in Olgai told me to hunt the cultists down, so I have come._";
	text2 = "_I will not stop you, but I will not listen to insults._ He turns away.";
	action = END_TALK;
	
begintalknode 97;
	state = 91;
	nextstate = 90;
	condition = 1;
	question = "Do you think there will be war between vahnatai and humans?";
	text1 = "_If the humans are able to leave again, no. If they keep spreading through the tunnels, yes. I have heard of other colonies, in the low tunnels to the north, that ..._";
	text2 = "_Our leader would not want me discussing this._";

begintalknode 98;
	state = 92;
	nextstate = -1;
	condition = 1;
	question = "Gain much? What do you mean?";
	text1 = "He looks around at the cavern you are in. _I misspoke. It is not important. You should talk to our leader._";

begintalknode 99;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "I would like to know something else.";
	text1 = "Torkia shakes his head. _I must watch the gate. Watch for invaders. Is important. There are others here who want to talk to you._";
	action = END_TALK;

// 110 Salasi


begintalknode 110;
	state = -1;
	nextstate = 110;
	condition = 1;
	question = "Name";
	text1 = "This cave is full of fields of tiny mushrooms. Edible mushrooms, free of the Blight and only recently planted. A vahnatai walks around the fields and tends to them, occasionally dabbing a bit of spores on a bare patch of stone.";
	text2 = "When you enter, she runs up to stop you. _Please ... Be careful. Do not step on them. Very delicate. Precious and new. Is hard to make._";
	text3 = "_I am Salasi. I am farmer. Brought here with warriors._";
	text5 = "Salasi speaks with you quietly. She also watches you attentively, constantly alert for any movement that might hurt her precious mushrooms.";
	action = INTRO;

begintalknode 111;
	state = 110;
	nextstate = 111;
	condition = 1;
	question = "Why did you come here?";
	text1 = "_I was brought on a long dangerous journey by Kian-Ihrno. Was very hard. Many times, I thought we would not live. I am no warrior. But our leader, she selected me, and I could not refuse._";
	text2 = "_Was hard to leave life of honor, though._";
	
begintalknode 112;
	state = 110;
	nextstate = 112;
	condition = 1;
	question = "You are actually growing mushrooms!";
	text1 = "_Yes. They are not mushrooms like Avernum's one sort made by mages to grow always and fast. They are the wild types. They can't be forced to grow. They can only be encouraged. Very hard._";
	text2 = "_Was very sad when I came, when I heard of the Blight. I had envy for mushrooms humans ate._";

begintalknode 113;
	state = 110;
	nextstate = 115;
	condition = 1;
	question = "How are your crops doing?";
	text1 = "She looks protectively at her hordes of tiny, fungal children. _Some of them are deciding to grow. If they honor us by getting large, I will select a number of them to feed us._";
	text2 = "_Until then, we hunt and fish some. We forage, we steal from the slithzerikai, and we eat little. Vahnatai can go without food for some time._";
	text3 = "_Of course, there are other things to watch for. Many strange things in the caves._";
	code =
		if (gf(10,12) > 1)
			rs(3);
	break;
	
begintalknode 114;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "But why did she want a farmer on such a mission?";
	text1 = "_I do not know. But lucky, was it not? Is good to have one who can raise mushrooms here, is it not? Now, if I succeed, we can live here a long time._";
	
begintalknode 115;
	state = 111;
	nextstate = -1;
	condition = 1;
	question = "Why were you honored?";
	text1 = "She looks surprised at the question. _I can grow food. Is that not cause of honor? Raising these mushrooms ... It is very difficult, and all depend on us to succeed._";
	
begintalknode 116;
	state = 112;
	nextstate = -1;
	condition = 1;
	question = "But you manage to grow these mushrooms.";
	text1 = "_When they decide to. They grow for a time. Then they stop, and the vahnatai all must sleep. It is a hard thing to have to depend on._";
	
begintalknode 117;
	state = 112;
	nextstate = 113;
	condition = 1;
	question = "You envied our mushrooms?";
	text1 = "_Of course. You had more food. All the time. We depend on cave food from nature, and there is too little. We grow what we can. Then the caves tire out and we must all sleep._";
	text2 = "_Is hard life in a way, and I hoped your mushrooms could free us from it. But then your Blight came._";
	
begintalknode 118;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "You all sleep? What do you mean?";
	text1 = "_When the caves are tired and can no longer feed us, we vahnatai sleep. For years, while everything regrows._";
	text2 = "_Is hard, because, when we sleep, some come to steal our land. Sometimes._";
	
begintalknode 119;
	state = 113;
	nextstate = -1;
	condition = 1;
	question = "Where do you think the Blight came from?";
	text1 = "_Blights always come. Sometimes they hurt our mushrooms. But then we grow another sort of mushroom._";
	text2 = "_Your mushrooms, just one sort, made by the magic, it would be wonderful if that worked. But it didn't, and they are gone. There were too many of you here, and you never slept, and now you will suffer. It is the way of things._";
	
begintalknode 120;
	state = 115;
	nextstate = 116;
	condition = gf(10,12) < 2;
	question = "What do you mean?";
	text1 = "_There is a ... a presence. A fungal, magical thing, that affects the plants in the caves. We are far enough away that the influence is small, but it is still enough. I can feel it. It hurts my lovely fungus._";
	text2 = "_I would like for Torkia to send warriors south to find this fungus monster and kill it, but we do not have soldiers to spare. It makes things harder, but I will manage._";
	code = 
		set_flag(10,12,1);
		toggle_quest(116,1);
	break;	
	
begintalknode 121;
	state = 116;
	nextstate = -1;
	condition = 1;
	question = "How would I know this creature if I found it?";
	text1 = "_It is a fungus, but walking and with powerful magic. And very dangerous. It would probably be in the lower tunnels. It is the way with such beasts. Look for a place where the plants grow without control, unnaturally._";
	
begintalknode 122;
	state = 110;
	nextstate = -1;
	condition = gf(10,12) == 1 && gf(50,6) > 0;
	question = "I think I managed to kill the fungus beast that bothered you.";
	text1 = "_I believe you. I have felt its influence slowly fade. I wasn't sure, but now I know. The horror is gone, and my mushrooms can grow without being bothered by its unnatural power._";
	text2 = "_I should reward you for helping us. I have a few potions. Not useful to me, but I saved them when we lost warriors in the journey here._ She gives you several small flasks.";
	code = 
		set_flag(10,12,2);
		toggle_quest(116,3);
		award_party_xp(400,30);
		reward_give(228);
		reward_give(228);
		reward_give(229);
		reward_give(229);
		reward_give(230);
	break;		


////

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