// TOWN DIALOGUE SCRIPT
//    Town 29: Egli

begintalkscript;

variables;

short i,j,k,r1,choice;


begintalknode;
	tag = 1;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "This chitrach has been imprisoned here for experimentation. It clicks and hisses unhappily at you.";

begintalknode;
	tag = 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	text1 = "A vahnatai guard stands motionlessly at attention. When you try to speak with him, he ignores you.";

// Seno

begintalknode;
	tag = 10;
	state = -1;
	nextstate = 1;
	question = "Seno";
	text1 = "This is a stooped vahnatai male pacing around this lecture hall. He walks around while reading a scroll. Even though he doesn't seem aware of his surroundings, he deftly steps around chairs and away from walls.";
	text2 = "When you get close, he looks up at you. _Welcome, humans._ He pauses a moment to verify you understand his speech. _I am Seno. An honored teacher._";
	text5 = "Seno seems eager to return to his scroll, but he is also interested in talking to aliens. He watches you curiously, waiting to see what else you have to say.";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	question = "_What might your job be here?_";
	text1 = "_I am an instructor. I teach the magical arts to visitors. Even you._";

begintalknode;
	state = 2;
	nextstate = -1;
	question = "_Many vahnatai hate my kind. Why will you teach me?_";
	text1 = "_It is not an issue without argument. Some of us hate you. Some of us don't. I am of the faction that believes you are not part of the aliens that defiled our lands. Because of this, I will aid you. Perhaps you can help us recover our lost Crystal Souls._";
	text3 = "_You are recovering the lost Crystal Souls. What more is needed to know?_";
	action = DEP_ON_SDF 30 14 0;
	
begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What do you teach?_";
	text1 = "_I instruct visitors in the powerful vahnatai magical arts. In return, we of Egli request coins and materials we can use to continue our researches. Let me know if you wish to purchase skills._";
	text2 = "_By the way, to use the spells I can teach you, you will need a spirit prism._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_How developed is your magic?_";
	text1 = "_We vahnatai haven't the physical strength of your people, but our magical skills are greatly advanced._";

begintalknode;
	state = 3;
	nextstate = -1;
	condition = has_spec_item(7) == 0;
	question = "_And where would I get a spirit prism?_";
	text1 = "_Go speak with Lith. He is Egli's crystal-smith._";

begintalknode;
	state = 3;
	nextstate = -1;
	question = "_A spirit prism? What is that?_";
	text1 = "_Do not confuse a spirit prism with a Crystal Soul. A Crystal Soul is a valued vahnatai soul, made into physical form to guide us after death. A spirit prism is a crystal magically altered to accept and store the vibrations and energies of life._";
	text2 = "_It is possible to take part of the life force of another creature and store it in a spirit prism. It does not hurt the being touched in this way, and the life energy can then be studied._";


begintalknode;
	state = 1;
	nextstate = -1;
	condition = has_spec_item(7) == 0;
	question = "_Can you teach me some of your magic?_";
	text1 = "_Yes, but only if you have a spirit prism. You would need to find Lith and convince the crystal worker to give you one._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = has_spec_item(7) > 0;
	question = "_Can you teach me some of your magic?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Seno's Magical Spells","Seno can teach you how to store spirits of your foes in a spirit prism and summon copies of them later.",73,0,3);
	break;
	
begintalknode;
	state = 1;
	nextstate = 4;
	question = "_What are you reading?_";
	text1 = "He shows it to you. It is from Avernum! It looks like a work of fiction. A very bawdy work of fiction. _I am trying to learn about the humans. This scroll interests me. It seems to be describing a very complicated magical ritual._";
	text2 = "_Thanks to you, I am on the path to understanding._";
	code =
		if (gf(29,14) == 0)
			rs(2);
	break;
	
begintalknode;
	state = 4;
	nextstate = -1;
	condition = gf(29,14) == 0;
	question = "_Uhhh ... that's exactly right._";
	text1 = "_Interesting. Hopefully, I can practice this ritual someday. It seems to be very energizing._";
	action = SET_SDF 29 14 1;

begintalknode;
	state = 4;
	nextstate = -1;
	condition = gf(29,14) == 0;
	question = "_Not quite._ Explain exactly what the scroll is about.";
	text1 = "Maybe it's your imagination or a trick of the light, but you would swear that Seno turns pale. _I ... see. Humans are very ... very interesting._";
	text2 = "_Wlort._";
	action = SET_SDF 29 14 1;

// Oratem

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 28;
	question = "Oratem";
	text1 = "There is a vahnatai sitting at the table, grinding up some lichen. He nods to you when you approach. _I am called Oratem, aliens. Welcome to my shop. I sell potions, and I buy goods._";
	text5 = "Oratem continues to chop and grind herbs and fungal growths. Some of them are familiar to you. Some of them aren't. Some of them move under their own power.";
	action = INTRO;

begintalknode;
	state = 28;
	nextstate = 29;
	question = "_What are you making?_";
	text1 = "He indicates shelves heavily laden with vials, pouches, and bowls of viscous sludge. _I create potions and other magical substances for my fellow mages._";
	text2 = "_If you have any valuables, I can purchase them as well. Supplies have been short since the Awakening, and there is demand for alien artifacts._";

begintalknode;
	state = 28;
	nextstate = -1;
	question = "_Can I purchase a potion?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Oratem the Alchemist","Oratem promises you to only sell you potions non-poisonous to humanity.",28,3,3);
	break;

begintalknode;
	state = 29;
	nextstate = 30;
	question = "_What are your fellow mages working on?_";
	text1 = "_We mages of Egli work hard to rebuild our lands after the Resting, and to defend our kind from our enemies._";

begintalknode;
	state = 30;
	nextstate = 31;
	question = "_Who are your enemies?_";
	text1 = "_Right now, the human invaders who stole our ancestors are our enemies, and when they are found, vengeance will be unavoidable._";
	text2 = "_Then we will deal with those who stole our land._";

begintalknode;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "_Who stole your land?_";
	text1 = "_You do not know? I will only say that, when we awoke, we found your land of Avernum sitting in many caves once ours._";
	
begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 28;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right, outsider._";
	action = END_TALK;


// Crean

begintalknode;
	tag = 50;
	state = -1;
	nextstate = 55;
	question = "Crean";
	text1 = "This vahnatai is carrying a large bowl of pungent gray liquid. When you approach, he bows to you. A little of the fluid in the bowl spills over onto the floor. He pushes his robe into the fluid with his foot to mop it up."; 
	text2 = "_I am Crean,_ he finally says. _I am being clumsy._";
	text5 = "Crean carries around his large bowl of gray liquid, occasionally spooning some of it into someone's clay bowl. He keeps accidentally spilling little splashes of it onto the floor. His bright robes are speckled with tiny bits of food.";
	action = INTRO;

begintalknode;
	state = 55;
	nextstate = -1;
	question = "_You seem to be having some problems._";
	text1 = "_I am filled with fatigue. That is why I am spilling. I have many jobs to do, and the mages are too high up and busy to help me. Too much cooking and working._";

begintalknode;
	state = 55;
	nextstate = 56;
	question = "_Is that food you are carrying?_";
	text1 = "He looks at you with irritation. _Yes, I am the cook and custodian for Egli at the moment. It is difficult to manage all this by myself._";
	text2 = "_I have already spent too much time trying to get the mages to wake someone to help me._";

begintalknode;
	state = 56;
	nextstate = 57;
	question = "_May I taste your soup?_";
	text1 = "He proffers the bowl. _Here. Taste some of the broth._ You do. It's vile and nasty. He notes your reaction.";

begintalknode;
	state = 56;
	nextstate = -1;
	question = "_Why haven't they already woken an assistant for you?_";
	text1 = "_Many of us are still in the Resting, sleeping in their crystals. Waking them all and rebuilding our cities are enormous jobs. The most important of the people get woken first. But some not so important ones need be woken too. Yes?_";

begintalknode;
	state = 57;
	nextstate = -1;
	condition = gf(29,15) == 0;
	question = "_It doesn't taste very good._";
	text1 = "_Trust me, it tastes no better to us than you. The mages woke many warriors and the like, but very few people to simply keep things functioning._";
	text2 = "He holds up the broth proudly. _But if this doesn't get them to wake help for me, nothing will!_";
	action = SET_SDF 29 15 1;

begintalknode;
	state = 57;
	nextstate = -1;
	condition = gf(29,15) == 0;
	question = "_It's ... uhhh ... yummy._";
	text1 = "_You are kind to say so. Dishonest, but kind._";
	action = SET_SDF 29 15 1;

begintalknode;
	state = 55;
	nextstate = -1;
	condition = gf(29,17) >= 1 && gf(29,9) == 0;
	question = "_I'd like to meet Rentar-Ihrno, but I don't know how to reach her._";
	text1 = "_I know. I do the cleaning, so I actually know things about this fort._";
	text2 = "_Most vahnatai here don't know this, but there is a concealed door in the back of one of the small meditation cells. They're in the middle of Egli. Go through that door and you will be able to get to her chambers._";

// Vahnatai woman

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 82;
	question = "Vahnatai woman";
	text1 = "There is a vahnatai woman sitting cross-legged on a carpet, staring deeply into a large, glowing crystal. The room is very warm.";
	text5 = "This vahnatai continues to focus on the large crystal. It's as if she's in communion with it.";
	action = INTRO;

begintalknode;
	state = 82;
	nextstate = 83;
	question = "_Hi!_";
	text1 = "She ignores you. Motes of light float from her eyes into the crystal. Other, smaller motes float back.";

begintalknode;
	state = 83;
	nextstate = -1;
	question = "_Umm..._";
	text1 = "You start to speak to her, but note her furious concentration and stop. Interrupting magical rituals is a dangerous business.";
	action = END_TALK;

// Clodeca

begintalknode;
	tag = 90;
	state = -1;
	nextstate = 109;
	question = "Clodeca";
	text1 = "One of the vahnatai mages eagerly approaches you. _Welcome, human outsiders!_";
	text2 = "_I heard of your arrival. I am Clodeca. An apprentice of Egli._ He wears the typical glowing robe and scant clothing underneath and carries a double armload of scrolls.";
	text5 = "Clodeca's skin is very smooth and has a shiny, almost waxy sheen. Possibly, that means he is younger. He seems to be having trouble carrying his armfuls of scrolls.";
	action = INTRO;

begintalknode;
	state = 109;
	nextstate = 110;
	question = "_What sort of research are you doing?_";
	text1 = "_Nothing of great import. I am still only an apprentice here._ He indicates the scrolls. _I have much to study._";

begintalknode;
	state = 110;
	nextstate = 111;
	question = "_What are you studying?_";
	text1 = "_The first principles, only. I'm a new apprentice, not a crystal to my name. For now, I spend my time on these herb catalogs._ He looks at the scrolls with distaste.";

begintalknode;
	state = 111;
	nextstate = -1;
	question = "_What are crystals used for?_";
	text1 = "_We vahnatai perform most of our magic through crystals. We store power in them and draw the power back. The more powerful we are, the more crystals we gain, and vice versa._";

begintalknode;
	state = 111;
	nextstate = 112;
	question = "_I'm interested in the herb catalog. What sorts of herbs are here?_";
	text1 = "He emits a vahnatai sigh, a long, painful hiss of air from between clenched teeth. _In the storerooms here, we have samples of every herb, lichen, mold, moss, mushroom, and other plant ever found in these caves, powerful or not, rare or not._";
	text2 = "_I keep track of what is where and how fresh. It is both time-consuming and worthless. Looking for anything?_";

begintalknode;
	state = 112;
	nextstate = -1;
	condition = gf(54,17) == 1 && gf(29,12) == 0;
	question = "_Actually, yes. Do you happen to have borgia toadstools?_";
	text1 = "He looks through the scrolls for a few minutes. _Yes, just as I thought. We do have borgia toadstools, not too fresh, but still usable. They're in the northeast storeroom, in the back. The small, beige, speckled, dried ones._ (You take note of this.)";
	action = SET_SDF 29 8 1;

begintalknode;
	state = 112;
	nextstate = -1;
	condition = 1;
	question = "_I could use things for making potions._";
	text1 = "_Oh, as much as I want to help you, I can't give you any of that. We're having troubles reclaiming our lands from the cave hounds and chitrachs after the Resting. We need the potions for our warriors. Apologies._";

begintalknode;
	state = 109;
	nextstate = -1;
	question = "_What are those scrolls?_";
	text1 = "He shows you one. It is a list of different sorts of fungi, with notes about descriptions and magical properties. _Bestiaries. Biological notes. And so on. Knowing of the flora and fauna of these caves is a matter of great import for us._";

begintalknode;
	state = 109;
	nextstate = -1;
	question = "_How long will your apprenticeship last?_";
	text1 = "_I am progressing quickly. My teachers are happy with my skills. So my learning will probably only take twenty years or so._";

begintalknode;
	state = 109;
	nextstate = -1;
	condition = gf(29,17) >= 1 && gf(29,9) == 0;
	question = "_I really need to see Rentar-Ihrno. Can you help me?_";
	text1 = "_Most definitely not. Rentar-Ihrno has instructed all mages here to keep you from seeing her. No mage will help you._ You notice that he is stressing the word 'mage.'";

// Oth-Ihrno

begintalknode;
	tag = 110;
	state = -1;
	nextstate = 136;
	question = "Oth-Ihrno";
	text1 = "An aged vahnatai is sitting here, polishing an intricately carved piece of smoky quartz. His skin is a very dull, dusty gray, with many flecks of black. He wears a silver headband.";
	text2 = "He takes a break from his work when you enter. _I am Oth-Ihrno, the leader of this settlement. I welcome you to Egli. I am willing to teach you, to bring our peoples together._";
	text5 = "Oth-Ihrno looks up at you, watching you closely. The crystal he was working on hums softly on his table. _Are you here for learning?_";
	action = INTRO;

begintalknode;
	state = 136;
	nextstate = 137;
	question = "_Can you help me?_";
	text1 = "_I am the Ihrno here, the ... the speaker of Egli. Bon-Ihrno has spoken to me, saying we are to offer you help and information._";

begintalknode;
	state = 137;
	nextstate = -1;
	question = "_What is an Ihrno, exactly?_";
	text1 = "_An Ihrno is a leader of mages, a vahnatai skilled in the magical arts who speaks for the others of our kind. I am in charge of this place of learning._";

begintalknode;
	state = 136;
	nextstate = 138;
	question = "_I would like to learn from you._";
	text1 = "_Yes. Bon-Ihrno thinks you are beings of honor. Though I am filled with anger at your kind, I am filled more with respect for Bon's judgment. I can offer you knowledge of our magical ways. I can also help with understanding us._";
	text2 = "_However, I cannot guarantee Rentar-Ihrno will help you, I am afraid._";

begintalknode;
	state = 138;
	nextstate = -1;
	question = "_I'd like to learn some vahnatai magic._";
	text1 = "_Seno has agreed to teach you a small amount of our magic, both out of a desire to share and so you can grasp some of our power. Before troubling Seno, be sure to speak with Lith. He can tell you of the importance of crystals to us._";


begintalknode;
	state = 138;
	nextstate = 140;
	condition = 1;
	question = "_I want to know more about the vahnatai._";
	text1 = "_Yes. Knowing the customs of the other is the path to understanding. We vahnatai believe in the trading of knowledge. It creates respect for the teachers. I will tell you some of our lore for 300 coins._";
	text3 = "_I have told you what I know._";
	action = DEP_ON_SDF 29 24 0;

begintalknode;
	state = 140;
	nextstate = 138;
	condition = gf(29,24) == 0 && coins_amount() >= 300;
	question = "_I want to learn._ (Pay 300 coins.)";
	text1 = "Oth-Ihrno takes the coins, and, in return, tells you many little details of vahnatai life in the caves. They are very reverent of these chambers and the life forms in them. Life in the caves is a fragile thing, and it is very easy to run out of food.";
	text2 = "The lesson ends with a warning: _Beware. If too many humans and other outsiders come down here, you will soon find that you lack enough to eat._";
	code =
		change_coins(-300);
		sf(29,24,1);
		set_spec_item(64,1);
	break;

begintalknode;
	state = 140;
	nextstate = 138;
	condition = gf(29,24) == 0;
	question = "_I don't need to know._";
	text1 = "_It saddens me to hear it._";

begintalknode;
	state = 138;
	nextstate = 139;
	question = "_Who is Rentar-Ihrno?_";
	text1 = "He shakes his head. _Rentar is the greatest of the Ihrnos awake. She created the barriers in your land, and she has no love of humans at this point. She has agreed not to harm you, but I don't think she will give you much aid._";


begintalknode;
	state = 139;
	nextstate = -1;
	condition = gf(29,9) == 0 && gf(29,9) == 0;
	question = "_I would like to speak with Rentar-Ihrno._";
	text1 = "Oth-Ihrno pauses and thinks. _She has asked me not to help you speak with her, and I have agreed._ He thinks more. _But if you asked others here, they might be able to tell you how to reach her. I am not the only one who knows._ (You take note of this.)";
	action = SET_SDF 29 17 1;

begintalknode;
	state = 136;
	nextstate = -1;
	question = "_Are you all right? You have some black specks on your skin._";
	text1 = "_It comes to all of our kind with age. Does not the skin of your kind change with age?_";

begintalknode;
	state = 136;
	nextstate = -1;
	condition = dread_curse(0) > 0;
	question = "_I have a horrible curse. Can you help me to lift it?_";
	text1 = "Oth-Ihrno bends close to you, and then jumps back, is if burned. _Oh dear. Yes, that is a very nasty curse, indeed. And it is not a one I feel comfortable lifting. We vahnatai tend to believe that a curse such as that is only had if deserved._";
	text2 = "_Try instead looking at your human settlements of magic. Your Tower of Magi, for example. They may not have as much in the way of scruples as us._";

// Rentar-Ihrno

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 163;
	question = "Rentar-Ihrno";
	text1 = "This vahnatai lady bears herself with utter confidence. She wears long, radiant robes, which seem to shift and flow under their own power. She is extremely irritated that you have disturbed her.";
	text2 = "She points at you. Your skin begins to itch and burn. _You. Alien. I am called Rentar-Ihrno. You have disturbed me._";
	text5 = "Rentar-Ihrno's pale eyes glitter as she sweeps them over you. You would swear your skin feels hot where her gaze touches you.";
	action = INTRO;
	
begintalknode;
	state = 163;
	nextstate = -1;
	condition = gf(29,9) == 0;
	question = "_I wish to speak with you._";
	text1 = "_You are an outsider, one of those who steal our lands and our ancestors. My anger burns to see you. You are my foe, until someone stolen from my people has been returned. Be grateful I only do this ..._";
	text2 = "She waves a hand. An instant later, you are elsewhere.";
		action = END_TALK;
	code =
		relocate_char(get_pc_id(0),16,30,FALSE);
		relocate_char(get_pc_id(1),17,30,FALSE);
		relocate_char(get_pc_id(2),17,31,FALSE);
		relocate_char(get_pc_id(3),16,31,FALSE);
	break;
	
begintalknode;
	state = 163;
	nextstate = -1;
	condition = gf(30,14) >= 1 && gf(29,9) == 0;
	question = "_I have returned one of the Crystal Souls. This proves I am worthy of an audience._";
	text1 = "Rentar-Ihrno thinks on this for a minute. She examines you carefully, evaluating your skills and character. Finally, she says, _Well. You may be correct. You are not of your Empire._";
	text2 = "_The people on the surface world are those who committed the crime against us. You, I will listen to. You may ask me for assistance, though I may not give it._";
	text3 = "_Also, I do you a small honor. You may enter my chambers through the north gate instead of through dusty back passages._";
	action = SET_SDF 29 9 1;
	code =
		sf(29,29,1);
	break;
	
begintalknode;
	state = 163;
	nextstate = 164;
	condition = gf(29,9) > 0;
	question = "_What are your responsibilities here in Egli?_";
	text1 = "_I am the magical leader of the vahnatai people. Nothing more, nothing less. I advise. I learn. I act. And, when necessary, I punish._";

begintalknode;
	state = 164;
	nextstate = 165;
	question = "_What sort of magic do you specialize in?_";
	text1 = "_My modest skills enabled me to create the barriers in your land. My minor knowledge is helping me find ways to bring tons of rock down on the homes and cities, husbands, wives and children of those who dared to steal our Crystal Souls._";
	
begintalknode;
	state = 165;
	nextstate = -1;
	question = "_How can you stand there and plan the deaths of innocent human beings?_";
	text1 = "_You are thieves. Even if you didn't take our Crystal Souls, you did take our lands. All of Avernum is an act of theft. This will never change while you are down here._";
	
begintalknode;
	state = 163;
	nextstate = -1;
	condition = gf(29,9) >= 1 && gf(29,18) >= 1 && gf(29,6) <= 1;
	question = "_You are a powerful wizard. Can you teach me how to create quickfire?_";
	text1 = "__";
	code =
	run_hardcode(106);
	break;

begintalknode;
	state = 163;
	nextstate = -1;
	condition = gf(29,6) == 1 && has_spec_item(10) > 0;
	question = "_I have found the mica tome._ Give it to her.";
	text1 = "__";
	code =
	run_hardcode(106);
	break;

begintalknode;
	state = 163;
	nextstate = 167;
	condition = gf(29,9) >= 1 && gf(29,19) >= 1 && gf(16,11) == 0;
	question = "_I am trying to destroy Garzahd, a powerful wizard of the Empire. Can you help?_";
	text1 = "__";
	code =
	run_hardcode(107);
	break;


begintalknode;
	state = 167;
	nextstate = -1;
	condition = 1;
	question = "_How will you help me against Garzahd?_";
	text1 = "_I will help you gain entry to his fortress. I have made study of it. I can help you get in. However, due to certain special protections, I best not deal with the worm myself. But, if you reach his home, I can help you gain his presence._";
	text2 = "_The rest will be left to you._";

begintalknode;
	state = 167;
	nextstate = -1;
	condition = 1;
	question = "_Can I be sure you will help me?_";
	text1 = "_Do not pester me, outsider. You have my word that, once there, you will have my aid. Do not anger me by questioning my honesty._";

begintalknode;
	state = 167;
	nextstate = -1;
	condition = 1;
	question = "_How can I reach Garzahd's fortress?_";
	text1 = "_What do I look like to you? A library? A servant? I have not the time to research every little bit of information you may think you require. Go among your precious Avernites and find the way there. I have more important things to plan!_";
	action = END_TALK;
	
begintalknode;
	state = 163;
	nextstate = 169;
	condition = gf(16,11) > 0;
	question = "_I have slain Garzahd, our common enemy._";
	text1 = "She grins, the first friendly gesture she's shown you. _The job is done. I was pleased and even a little impressed by your actions. Your kind is capable of some small acts of strength._";
	text2 = "_Now I must plan._";

begintalknode;
	state = 169;
	nextstate = -1;
	condition = 1;
	question = "_Plan what?_";
	text1 = "_Vengeance._ You start to ask what she means. She cuts you off. _Now go._";	
	text2 = "She waves a hand. An instant later, you are elsewhere.";
		action = END_TALK;
	code =
		relocate_char(get_pc_id(0),16,30,FALSE);
		relocate_char(get_pc_id(1),17,30,FALSE);
		relocate_char(get_pc_id(2),17,31,FALSE);
		relocate_char(get_pc_id(3),16,31,FALSE);
	break;
	
begintalknode;
	state = 163;
	nextstate = -1;
	condition = gf(29,9) >= 1;
	question = "_I want to learn some spells._";
	text1 = "_You will not learn them from me. Such a task is plainly beneath my station._";

	
begintalknode;
	state = 163;
	nextstate = 166;
	condition = gf(29,9) >= 1;
	question = "_Tell me something of yourself._";
	text1 = "_What is there to say? I am the strongest mage of these vahnatai lands, and I have attained this power in a very short span of life. I care for nothing but for the safety and honor of my kind, and for the Crystal Souls._";

begintalknode;
	state = 166;
	nextstate = -1;
	condition = 1;
	question = "_Are there many vahnatai lands?_";
	text1 = "_Of course. Our kind is spread all throughout the deep parts of the world. We have many lands. I only know that I am the strongest mage in these lands. I am only probably the strongest vahnatai mage of all._";

begintalknode;
	state = 166;
	nextstate = 168;
	question = "_And you are the one who created the barriers in Avernum?_";
	text1 = "_Yes. That was me. It was deemed a necessary step when we believed that you were responsible for the theft of the Crystal Souls. It was not you, though, was it? It was this Empire._";
	text2 = "_Now that we know that, the thieves of Avernum are safe from us, as long as they perpetuate no further crimes against us._";

begintalknode;
	state = 168;
	nextstate = -1;
	condition = 1;
	question = "_The 'thieves of Avernum'?_";
	text1 = "_Avernum lies in lands we meant to settle upon this Awakening. You took the rich caves where we hoped to raise young. We will forgive this crime, but we watch your advance carefully. Be warned._";

// Lith

begintalknode;
	tag = 150;
	state = -1;
	nextstate = 190;
	question = "Lith";
	text1 = "This vahnatai's robes are cinched in at the waist by a tool belt and covered with a thick layer of quartz dust. He is currently buffing down a sheet of blue, translucent stone.";
	text2 = "He nods when you enter. _I am Lith. Welcome to my workshop._";
	text5 = "Lith sets his work aside to talk to you. The dust in the air is making your eyes water, but he doesn't seem the least bit bothered.";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = 191;
	question = "_What do you do here in Egli?_";
	text1 = "_I am a crystalsmith. It is hard work, but necessary and honored._ He holds the sheet of blue stone up to the light, looking for flaws.";

begintalknode;
	state = 191;
	nextstate = -1;
	question = "_What is the blue stone for?_";
	text1 = "He looks at the sheet with pride. _This will one day be part of a cabinet in which aging or ill vahnatai are frozen. Similar cabinets now hold most of our tribe, but not for long._";
	text2 = "He smiles. _Some call them coffins, as a joke, but they are as much the opposite as they can be!_";

begintalknode;
	state = 190;
	nextstate = 192;
	question = "_What does a crystalsmith make?_";
	text1 = "_I create spirit prisms and Crystal Soul vessels, two cores of vahnatai magic._";

begintalknode;
	state = 192;
	nextstate = 193;
	question = "_What is the difference between a spirit prism and a Crystal Soul?_";
	text1 = "_Crystal Souls are the physical manifestation of our spirits; they are what was stolen from us. Spirit prisms are what we store life energies in. To ever perform any of our special magics, you will need one._";
	text2 = "_One called Abra said he would give you one, but he had to leave. Maybe you should find him._";
	code = 
		if (has_spec_item(7) > 0)
			rs(2);
	break;
	
begintalknode;
	state = 193;
	nextstate = -1;
	condition = has_spec_item(7) == 0;
	question = "_Where can I find Abra?_";
	text1 = "_He had to go to the southeast to reawaken more vahnatai. Difficult, but rewarding work. You might explore the caves there. I believe there is a Resting Cell south of Mancuso._";

begintalknode;
	state = 193;
	nextstate = -1;
	condition = 1;
	question = "_So you make Crystal Souls?_";
	text1 = "_No, I but make the vessel. Then, when one is so honored as to be stored in long life, a ritual is performed to move the spirit of the lost into the stone._";
	
begintalknode;
	state = 190;
	nextstate = 194;
	question = "_Your kind does most of its magic with crystal and stone. Correct?_";
	text1 = "_That is so. We are a practical people. We work with things that are close to hand. There is nothing more common here than stone._";

begintalknode;
	state = 194;
	nextstate = -1;
	condition = gf(29,21) <= 1;
	question = "_Do you ever work magic with anything else?_";
	text1 = "_I am glad that you asked that. I have heard that, in your lands, certain drakes are born with a black fang, shiny, like onyx or a similar stone. I would gladly reward you well if you could recover one of those for me._";
	code =
		sf(29,21,1);
		toggle_quest(11,1);
	break;
	
begintalknode;
	state = 190;
	nextstate = -1;
	condition = has_spec_item(27) > 0 && gf(29,21) == 1;
	question = "_I have obtained a black drake fang for you._ (Give it to him.)";
	code =
	run_hardcode(10);
	break;

begintalknode;
	state = 190;
	nextstate = -1;
	question = "_Do you have any magical crystals I could purchase?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Lith's Crystalcraft","Lith sells both raw and finished crystals. There is a dizzying variety in the glittering array.",29,4,3);
	break;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_I am pleased you came to visit. Goodbye._";
	action = END_TALK;

// Small Demon

begintalknode;
	tag = 170;
	state = -1;
	nextstate = 217;
	question = "Small Demon";
	text1 = "There is a small, demonic creature scuttling underfoot. It smells of sulphur and bad cheese. You ask its name. It displays a crude hand gesture in return.";
	text5 = "The demon looks up at you and laughs, an irritating, high-pitched barking noise.";
	action = INTRO;

begintalknode;
	state = 217;
	nextstate = 218;
	question = "_What are you running around for?_";
	text1 = "_I run errands! And you better watch it!_";

begintalknode;
	state = 218;
	nextstate = -1;
	question = "_Watch for what?_";
	text1 = "_Or Rentar-Dumbo will turn you to a slug! Ha!_";

begintalknode;
	state = 218;
	nextstate = -1;
	question = "_What sort of errands have you done?_";
	text1 = "It expels gas in your direction. Then it wanders off.";
	action = END_TALK;

begintalknode;
	state = 217;
	nextstate = -1;
	question = "_Watch your manners, little creature, or I will teach you a lesson._";
	text1 = "It responds with a series of different hand gestures, each more elaborate, evocative, and insulting than the last. Then it wanders off.";
	action = END_TALK;

