// TOWN DIALOGUE SCRIPT
//    Town 11: Thassaka

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;
int i,j,k,choice;


// *** Everyone before you're welcomed ***

begintalknode 1;
	state = -1;
	personality = 1;
	nextstate = -1;
	condition = 1;
	question = "Slith";
	text1 = "This slith looks at you uncomfortably and says nothing, despite your attempts to start a conversation. It appears that no one will talk to you here except the king.";

// *** The advisors before welcomed ***

begintalknode 2;
	state = -1;
	personality = 1;
	nextstate = -1;
	condition = 1;
	question = "Slith";
	text1 = "This slith indicates towards the king. _You should speak to him, not to us,_ he says.";

//*** Khalthanas ***

begintalknode 3;
	state = -1;
	personality = 110;
	nextstate = 1;
	condition = 1;
	question = "Khalthanas";
	text1 = "The slith king looks at you anxiously as you approach. He is tall and strong, with all of the aged majesty that you would expect from a king of the homeland, but he looks worn, weighed down by the pressures of the office.";
	text2 = "_Welcome to Thassaka,_ he says. _Our city has seen better days, but we are still strong, still standing, still ready to fight any invaders! You'd better explain what you're doing here._";
	text5 = "Kalthanas waits for your next question.";
	action = INTRO;

begintalknode 4;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = get_flag(11,9) == 0;
	question = "(Tell him the whole story.)";
	text1 = "He listens carefully as you tell him what you know of slith history, explaining that many sliths no longer worship demons. You tell him also of the coming of Legare and the developing expedition.";
	text2 = "When you finish, Khalthanas gives you a long look. _I... understand. This is... you must forgive me._ He sighs, a strikingly human reaction. _You should, of course, bring Legare and the others here._ He pauses.";
	text3 = "_But first, you should know our situation._";
	action = SET_SDF 11 9 1;

begintalknode 5;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = get_flag(11,9) == 1;
	question = "What is your situation?";
	text1 = "_In the time of my grandfather's rule, some seventy years ago, a terrible cavequake ripped through this entire region. Bandits, a problem before, grew much worse. We received a message a few years later to look to our own defenses.";
	text2 = "_Abandoned by the empire, we stood alone to fight the encroaching barbarians. It had already been too dangerous to travel north of Nakhtha, and shortly, it became too dangerous to go south. We have been by ourselves for decades.";
	text3 = "_As you know, Nakhtha was sacked recently. Thassaka stands as the last bastion of civilization in this region, with no contact with any other non-barbarian sliths. We are holding out, but constant attacks take their toll._";
	text4 = "He sighs again. _And that is our situation._";
	action = SET_SDF 11 1 1;

begintalknode 6;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = get_flag(11,1) == 1;
	question = "Can I help you out at all?";
	text1 = "_Perhaps._ He thinks. _We have faced attacks from the east that we have traced back to an archmage who leads a barbarian camp on an island in the middle of a river of lava. Slay the archmage, and we will be much safer._";
	text2 = "He adds, _We have little with which to reward you, but they must have gathered things that would be reward in themselves._";
	text3 = "_Kill the archmage. That will be of great service to us._";
	text5 = "_No, not anymore. The death of the archmage was all that we could ask of you. It is time for you to move on._";
	code =
	clear_strings();
	if (get_flag(13,2) == 0) {
		add_string(1);
		add_string(2);
		toggle_quest(3,1);
		set_flag(13,2,1);
		set_flag(13,4,1);
		}
	if (get_flag(13,2) == 1)
		add_string(3);
	if (get_flag(13,2) >= 2)
		add_string(5);
break;

begintalknode 7;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = get_flag(11,1) == 1;
	question = "Khalthanas... why does that name sound familiar?";
	text1 = "_Because of Khalthas, of course!_ He laughs at the question, but then he realizes that you don't know what he's talking about. _Khalthas. The hero of the Khalthanad. You know, the Khalthanad._ Your blank expression persists.";
	text2 = "_By all the gods, how much culture have you lost in Avernum? The Khalthanad is the epic poem of the empire. It tells the story of our founder, Khalthas, and his heroic deeds culminating in the founding of the empire itself._";
	text3 = "He adds, _In a short while, we will have a public performance of part of the poem. You should attend. It is definitely worth your time._";
	text5 = "_Because of Khalthas, of course!_ He laughs at the question. _You remember the Khalthanad, surely. You heard part of it a short time ago. Khalthas is the hero. I was named after him._";
	text6 = "He adds dryly, _I don't doubt that it was more out of hope from my parents than anything else. In these dark times, we need all the memories of greatness we can muster._";
	code =
	if (get_flag(11,6) == 0) {
		remove_string(5);
		remove_string(6);
		}
	else {
		remove_string(1);
		remove_string(2);
		remove_string(3);
		}
break;

begintalknode 8;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = (get_flag(11,4) == 0) && (get_flag(11,1) == 1);
	question = "May I tell the expedition to come here now?";
	text1 = "_Yes, certainly. I wish to speak to this Legare._";
	text2 = "The expedition is still in Nakhtha. To inform them, you must go back that way.";

begintalknode 9;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = (get_flag(5,3) == 1) && (get_flag(11,1) == 1);
	question = "Some refugees from Nakhtha are hiding out in Neoss. (Explain who you met.)";
	text1 = "_We already have some refugees here. Now that you've cleared the way, we can go north and bring them back. Thank you for your help._";
	code =
	set_flag(5,3,2);
	toggle_quest(1,0);
	award_party_xp(50,60);
break;

begintalknode 10;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = (get_flag(13,2) == 2) && (get_flag(13,4) == 1);
	question = "I have killed the archmage.";
	text1 = "_All Thassaka thanks you,_ Khalthanas says. _You have our eternal gratitude._ His tone is serious. The barbarians have destroyed all of the cities around Thassaka, and Khalthanas surely knows that it's only a matter of time before they get Thassaka, too.";
	text2 = "_As a token of our gratitude,_ he continues, _we give you this necklace. May it save your life as you have saved ours._ He hands you a beautiful, shining necklace, one filled with magic.";
	code =
	set_flag(13,2,2 + reward_give(489));
	toggle_quest(3,0);
	award_party_xp(50,60);
break;

begintalknode 11;
	state = 1;
	personality = 110;
	nextstate = 1;
	condition = (get_flag(11,7) != 0) && (get_flag(11,2) == 0);
	question = "Great king, we humbly request your help dealing with some barbarians. (Describe what Pithoss told you.)";
	text1 = "King Khalthanas digests your request. _I have spoken with Legare. I believe that our fate is bound up with his. If he can reach Khitaloss Province in the center of the empire, then perhaps he can convince the emperor to send reinforcements to aid us._";
	text2 = "He continues, _We have enough of a military that we can be certain to defeat this camp, but we can offer you little assistance beyond that. The barbarians are quite strong and always waiting for a moment of weakness._";
	action = SET_SDF 11 2 1;

// *** Takoss ***

begintalknode 14;
	state = -1;
	personality = 111;
	nextstate = 5;
	condition = 1;
	question = "Takoss";
	text1 = "This slith walks carefully through the library, attending to details and obviously making note of all the things that are out of place. His job must be to care for these books. _Hello,_ he says. _My name is Takoss._";
	text5 = "Takoss stands for moment, waiting for your next question.";
	action = INTRO;

begintalknode 15;
	state = 5;
	personality = 111;
	nextstate = 6;
	condition = 1;
	question = "What is your job?";
	text1 = "_I maintain this library,_ he replies. _I keep track of the accumulated knowledge of the city of Thassaka, renowned for its learning and study, and make sure that we don't lose any more of it than we already have._";
	text2 = "He adds, _And by Possanathoss, I don't intend to lose anything else._";

begintalknode 16;
	state = 6;
	personality = 111;
	nextstate = 6;
	condition = 1;
	question = "You've lost things?";
	text1 = "_Before my time,_ Takoss says, sniffing pridefully. _The keepers of this storehouse of knowledge once were less diligent._";
	text2 = "He adds, _But then, they did not have to be. In the generations before ours, we could simply travel to Nakhtha or Manikoss if we lost a book and needed a scribe to write a new copy. Now, we are not so lucky._";

begintalknode 17;
	state = 6;
	personality = 111;
	nextstate = 6;
	condition = 1;
	question = "Who is Possanathoss?";
	text1 = "_The god of light and poetry, of course,_ Takoss says, laughing at your ignorance. _He is the guardian of this library, and of all libraries, for that matter._";

begintalknode 18;
	state = 5;
	personality = 111;
	nextstate = 5;
	condition = 1;
	question = "What's your most popular book?";
	text1 = "_Why, the Khalthanad, of course. Every slith in Thassaka learns most of the Khalthanad by heart before the age of maturity. It is our national story, our heritage, our very lives._";
	text2 = "His voice swells. _It tells the story of Khalthas, born a prince of a small, distant kingdom, who was betrayed and overthrown, who then wandered for years until he met the mighty dragon Mahanyakshetra. After slaying the dragon, he spoke with a goddess._";
	text3 = "He continues, _They conversed about virtue and the nature of all things, and at the end, as was fated, the divine lady promised Khalthas an empire without end. Thus he left and journeyed until he reached Khitaloss Province, where he founded the empire._";
	text4 = "He concludes, _Then the poem tells the story of the wars to conquer Khitaloss Province, the center of slith civilization for the past thousand years. It finishes with Khalthas's death and the passing of his rule to another._";

begintalknode 19;
	state = 5;
	personality = 111;
	nextstate = 5;
	condition = 1;
	question = "Do you do any original research here?";
	text1 = "_Research?_ He looks at you blankly. You explain the concept of investigating new things and coming up with new ideas. It strikes him as very strange.";
	text2 = "He replies, _No... no. When we want to know things, we read the wisdom of the ancients. After all, they collected all knowledge that there was to be known._";
	text3 = "He adds confidently, _If you have a question, read what the ancient authorities wrote about it, weigh the evidence, and select the answer that seems most reasonable to you. That's the real way to know things._";

// *** Faskoss ***

begintalknode 20;
	state = -1;
	personality = 112;
	nextstate = 10;
	condition = 1;
	question = "Faskoss";
	text1 = "This merchant slith greets you as you approach. He is lean and trim, smaller than most other sliths. _My name is Faskoss,_ he says. _I sell magic._";
	text5 = "_Do you wish to do business?_ Faskoss asks.";
	action = INTRO;

begintalknode 21;
	state = 10;
	personality = 112;
	nextstate = 10;
	condition = 1;
	question = "Can you tell me anything interesting about Thassaka?";
	text1 = "_What is there to tell? We are surrounded by barbarians, and our greatest ally, Nakhtha, has been destroyed. We are not only an island of land amidst water, but also an island of civilization amidst chaos._";
	text2 = "He frowns. _I cannot even acquire the magical learning our race had of old. Spells once common are now lost. The powerful magics that held the dark sliths at bay are failing, not because of a wane in magic, but because our knowledge is disappearing._";
	text3 = "His claws clench in frustration. _I am the only true magic-user in Thassaka, and I have no apprentices. When I die, still a few will know some spells, but no real mages: one can cast Bolt of Fire, another Call Beast, a third Healing, but none all these._";
	text4 = "He shakes his head. _We are losing._";

begintalknode 22;
	state = 10;
	personality = 112;
	nextstate = 10;
	condition = 1;
	question = "I'd like to purchase mage spells.";
	text1 = "You finish shopping.";
	code =
	if (get_flag(11,5) < 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many mage spells, and he's willing to teach you, for a price.",3,4,-1);
	if (get_flag(11,5) == 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many mage spells, and he's willing to teach you, for a price. After your javelin-throwing, he gives you a discount.",3,3,-1);
	if (get_flag(11,5) > 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many mage spells, and he's willing to teach you, for a price. After your javelin-throwing, he gives you a discount.",3,2,-1);
break;

begintalknode 23;
	state = 10;
	personality = 112;
	nextstate = 10;
	condition = 1;
	question = "I'd like to purchase priest spells.";
	text1 = "You finish shopping.";
	code =
	if (get_flag(11,5) < 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many priest spells, and he's willing to teach you, for a price.",4,4,-1);
	if (get_flag(11,5) == 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many priest spells, and he's willing to teach you, for a price. After your javelin-throwing, he gives you a discount.",4,3,-1);
	if (get_flag(11,5) > 2)
		begin_shop_mode("Faskoss's Spells","Faskoss knows a great many priest spells, and he's willing to teach you, for a price. After your javelin-throwing, he gives you a discount.",4,2,-1);
break;

begintalknode 24;
	state = 10;
	personality = 112;
	nextstate = 11;
	condition = 1;
	question = "I'd like to purchase powerful spells.";
	text1 = "_I can teach any of the following: Major Haste for 1000 coins, Safe Travel for 1000, Capture Soul for 1500, and Recall Soul for 1500 What would you like to purchase?_";

begintalknode 25;
	state = 11;
	personality = 112;
	nextstate = 10;
	condition = 1;
	question = "Nothing right now, thank you.";
	text1 = "_Very well._";

begintalknode 26;
	state = 11;
	personality = 112;
	nextstate = 11;
	condition = (coins_amount() >= 1000) && (get_flag(293,3) < 2);
	question = "I'd like to learn a level of Major Haste.";
	text1 = "He teaches you this powerful spell. When cast, it will haste all of the members of your party simultaneously.";
	code =
	change_coins(-1000);
	inc_flag(293,3,1);
	set_flag(293,0,1);
break;

begintalknode 27;
	state = 11;
	personality = 112;
	nextstate = 11;
	condition = (coins_amount() >= 1000) && (get_flag(293,4) < 2);
	question = "I'd like to learn a level of Safe Travel.";
	text1 = "He teaches you this powerful spell. When cast, it will enchant you with the status Safe Travel, allowing you to walk on certain dangerous terrains without receiving damage.";
	code =
	change_coins(-1000);
	inc_flag(293,4,1);
	set_flag(293,0,1);
break;

begintalknode 28;
	state = 11;
	personality = 112;
	nextstate = 11;
	condition = (coins_amount() >= 1500) && (get_flag(292,4) < 1);
	question = "I'd like to learn a level of Capture Soul.";
	text1 = "He teaches you this powerful spell. When cast on an enemy, it will store that creature's spirit. You can then summon the creature with Recall Soul.";
	code =
	change_coins(-1500);
	inc_flag(292,4,1);
	set_flag(292,0,1);
break;

begintalknode 29;
	state = 11;
	personality = 112;
	nextstate = 11;
	condition = (coins_amount() >= 1500) && (get_flag(292,5) < 1);
	question = "I'd like to learn a level of Recall Soul.";
	text1 = "He teaches you this powerful spell. When cast on an enemy, it summons near that enemy a creature stored with the spell Capture Soul.";
	code =
	change_coins(-1500);
	inc_flag(292,5,1);
	set_flag(292,0,1);
break;

// *** Ithik ***

begintalknode 35;
	state = -1;
	personality = 113;
	nextstate = 14;
	condition = 1;
	question = "Ithik";
	text1 = "Ithik stands here in front of this shelf, reading one book. It's the Khalthanad. He glances up as you approach. You notice that there are half a dozen copies of this book on the shelf in front of him.";
	text5 = "Ithik continues to read his book, waiting for your next question.";
	action = INTRO;

begintalknode 36;
	state = 14;
	personality = 113;
	nextstate = 15;
	condition = 1;
	question = "How's the Khalthanad?";
	text1 = "_Good. Very good._ He shakes his head. _The Guardpost never had a copy, and none of the Bahssikavans thought to bring any of their copies. Vasskolis had none, either. I grew up hearing about this, but I've never been able to read it._";
	text2 = "He continues, _It's amazing. The language is so old, so strange to the tongue, but it rings true. Nothing false could be this beautiful. Listen._";

begintalknode 37;
	state = 15;
	personality = 113;
	nextstate = 16;
	condition = 1;
	question = "(Listen to him read.)";
	text1 = "He reads, _'_Some are born great, some achieve greatness, and some have greatness thrust upon them. The Fates open their hands, Khalthas; embrace them, and cast off your humble slough, and become fresh. In your new skin, be unafraid._";
	text2 = "_'Thus the goddess spoke, and Khalthas replied: _O my Lady, I am not eloquent, but slow of speech and tongue, nor am I strong, either of grip of hand or of swiftness of feet. Please, let another be king._";
	text3 = "_'At these words, the goddess shrieked, both great and terrible, _Am I not the Lady who created you and gifted you with language? Do I not command the meanings of the words, their proper places and orders, their balance and harmony?_";
	text4 = "_'_Therefore go, and I will guide your mouth and right hand, by which you will found an empire without end._ With such words she commanded, and he obeyed.'_";

begintalknode 38;
	state = 16;
	personality = 113;
	nextstate = 14;
	condition = get_flag(11,8) == 0;
	question = "Wow. That's neat.";
	text1 = "_Isn't it astonishing? It has an entire section that I had never heard: Khalthas speaks to a goddess about true virtue. A goddess, like Legare's! Perhaps she is real after all._";
	action = SET_SDF 11 8 2;

begintalknode 39;
	state = 16;
	personality = 113;
	nextstate = -1;
	condition = get_flag(11,8) == 0;
	question = "That was boring.";
	text1 = "Ithik glares at you. _I think it's tremendous. I'm not done reading it yet, but it feels to me like the truest history I've ever read._ He goes back to reading.";
	action = SET_SDF 11 8 1;

// *** Talas ***

begintalknode 40;
	state = -1;
	personality = 114;
	nextstate = 18;
	condition = 1;
	question = "Talas";
	text1 = "Talas is wandering around the library, picking out scrolls seemingly at random, reading bits of them, and putting them back on the shelves. He looks pleased but intent.";

begintalknode 41;
	state = 18;
	personality = 114;
	nextstate = 18;
	condition = 1;
	question = "What are you doing?";
	text1 = "_What? Oh, I'm just trying to sample the knowledge in this treasure trove. This city has existed for centuries, collecting the greatest works of literature and science from the greatest thinkers the empire has ever had. Can you imagine?_";
	text2 = "He adds, _Most of it is literature, philosophy, rhetoric, little science or math. But I find a little here and there that interests me._";

begintalknode 42;
	state = 18;
	personality = 114;
	nextstate = 19;
	condition = 1;
	question = "What do you think of this city?";
	text1 = "_It's impressive. A summary of the combined learning of a thousand years of the empire, right before us. All the wisdom of the ancients is here. But I don't think the wisdom of the present is here._";

begintalknode 43;
	state = 19;
	personality = 114;
	nextstate = 18;
	condition = 1;
	question = "What do you mean?";
	text1 = "_Look around. The building is falling apart. Cracks are all over the walls. I asked the librarian, and he said that he knew, but he couldn't find the architecture book that described how this building had been built, so he couldn't repair it.";
	text2 = "_I'm an engineer. When I want to make something, I don't read a book; I just patch things together until they seem right. But that's not how this city functions. When they want to know something, they look to the past, not at what's in front of them.";
	text3 = "_They cannot solve new problems. If it wasn't solved three hundred years ago, it won't be solved. They're just trying not to lose things! It's like the war with the bandits: they never try to win, just to hold them back enough not to lose.";
	text4 = "_I know now why their empire is falling: it is being crushed under the weight of its own history._ He shakes his head. _But it is still incredible here._";

// *** Phaedra ***

begintalknode 45;
	state = -1;
	personality = 115;
	nextstate = 25;
	condition = 1;
	question = "Phaedra";
	text1 = "Phaedra sits, merrily as ever, looking over what appears to be a chessboard. It doesn't have quite the same pieces as the ones in Avernum: the diagonally-moving nephil archer is a razordisk-throwing slith, among others, but it's clearly chess.";
	text2 = "_Hey there,_ she says, looking up at you and smiling.";
	text5 = "Phaedra continues examining the position on the board as she waits for your next question.";
	action = INTRO;

begintalknode 46;
	state = 25;
	personality = 115;
	nextstate = 25;
	condition = 1;
	question = "What are you doing?";
	text1 = "_I talked one of the scribes into playing a game against me. It turns out he copied an entire book of thousands of chess games at one point. He beat me. I'm going over our moves and examining what I should have done at each position._";

begintalknode 47;
	state = 25;
	personality = 115;
	nextstate = 25;
	condition = 1;
	question = "What do you think of Thassaka?";
	text1 = "_It's nice, nicer than the road ahead. The librarian told me a little of the path we must travel next, and it doesn't sound pleasant. It almost makes me want to stay here to have this baby, but I can't do that. I have to stay with the expedition._";
	text2 = "She grins. _After all, you guys would get into so much trouble without me!_";

begintalknode 48;
	state = 25;
	personality = 115;
	nextstate = 25;
	condition = 1;
	question = "So, who's the father?";
	text1 = "She smiles shyly, but she does not answer.";

// *** Pithoss ***

begintalknode 50;
	state = -1;
	personality = 116;
	nextstate = 30;
	condition = 1;
	question = "Pithoss";
	text1 = "Pithoss stands alert at the door, apparently guarding it. He stands next to a slith statue and manages to look so much like it that you are taken aback for a moment. Just a coincidence, you suppose.";
	text5 = "Pithoss wipes part of his spear that he normally carries on his back, waiting for your next question.";
	action = INTRO;

begintalknode 51;
	state = 30;
	personality = 116;
	nextstate = 30;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Making sure that Legare is not disturbed,_ he replies. _He is resting now. No one can see him._";

begintalknode 52;
	state = 30;
	personality = 116;
	nextstate = 30;
	condition = 1;
	question = "What am I supposed to do now?";
	text1 = "_The river soon grows too rocky and unsteady for us to continue to travel down. It once was more clear, but much has since collapsed, which is part of the reason that Thassaka was cut off. We must proceed south over land, but bandits block our path._";
	text2 = "He continues, _Speak with Khalthanas, the king, and ask for his help in clearing these bandits. Then clear the way and proceed south until you find the next good stopping place for us. Once you've found that, return and tell us how to get there._";
	text3 = "He adds, _The land becomes inhospitable not far south of here. Make sure not only that you find a good stopping place for us but also that you find the path to continue south._";
	text4 = "_As I said, ask for Khalthanas's help and then clear the bandits. Then scout south for a path through the inhospitable terrain._";
	text5 = "_Scout south for a path through the inhospitable terrain. Make sure not only that you find a good stopping place for us but also that you find the path to continue south._";
	code =
	clear_strings();
	if (get_flag(11,7) == 0) {
		add_string(1);
		add_string(2);
		add_string(3);
		set_flag(11,7,1);
		toggle_quest(4,1);
		}
	else {
		if (get_flag(12,1) == 0)
			add_string(4);
		else
			add_string(5);
		}
break;

begintalknode 53;
	state = 30;
	personality = 116;
	nextstate = 30;
	condition = ((get_flag(16,1)) && (get_flag(14,0)));
	question = "I have found a stopping point in the Lava Ocean and a path out, but I need Talas's help to open the way.";
	text1 = "_You have found it!_ Pithoss exclaims. _This is good news. We are ready to move on from Thassaka. Leave this city, and the expedition will follow right behind you._";
	code =
	set_flag(14,1,1);
	toggle_quest(4,0);
	award_party_xp(75,75);
break;

// *** Sakna ***

begintalknode 60;
	state = -1;
	personality = 117;
	nextstate = 40;
	condition = 1;
	question = "Sakna";
	text1 = "_Greetings,_ this merchant says. _My name is Sakna. I sell many different odds and ends, always useful for traveling folk, by Rhaasinoss!_";
	text5 = "Sakna waits for your next question.";
	action = INTRO;

begintalknode 61;
	state = 40;
	personality = 117;
	nextstate = 40;
	condition = 1;
	question = "I'd like to buy some things.";
	text1 = "You finish shopping.";
	code =
	if (get_flag(11,5) < 2)
		begin_shop_mode("Sakna's Assortment","Sakna is selling a few utility items that may be useful in a variety of circumstances.",5,4,-1);
	if (get_flag(11,5) == 2)
		begin_shop_mode("Sakna's Assortment","Sakna is selling a few utility items that may be useful in a variety of circumstances. After your javelin-throwing, he gives you a discount.",5,3,-1);
	if (get_flag(11,5) > 2)
		begin_shop_mode("Sakna's Assortment","Sakna is selling a few utility items that may be useful in a variety of circumstances. After your javelin-throwing, he gives you a discount.",5,2,-1);
break;

begintalknode 62;
	state = 40;
	personality = 117;
	nextstate = 40;
	condition = 1;
	question = "You sell swords? I thought sliths didn't use swords.";
	text1 = "Sakna frowns. _Sliths have used swords since the time of Khalthas,_ he says. _Some of the barbarians have lost the ability to forge precisely enough to make swords, and they rely solely on spears, but they are uncivilized._";

begintalknode 63;
	state = 40;
	personality = 117;
	nextstate = 40;
	condition = 1;
	question = "Who is Rhaasinoss?";
	text1 = "He looks at you as if you are the most bumbling ignorant savage he has ever seen. _Rhaasinoss, of course!_ he says. _The god of war. He is also the patron of travelers, or at least that's the joke in these dark times._";

// *** Deross ***

begintalknode 70;
	state = -1;
	personality = 118;
	nextstate = 50;
	condition = 1;
	question = "Deross";
	text1 = "_Hello to you,_ this boat-worker says in between hammer-blows. _My name is Deross. You are welcome here, by the will of Seithoss._";
	text5 = "Deross hammers away at the boat before him, waiting for your next question.";
	action = INTRO;

begintalknode 71;
	state = 50;
	personality = 118;
	nextstate = 50;
	condition = 1;
	question = "You work on boats?";
	text1 = "_Yes,_ he says, gesturing to the one in front of him. _I mostly repair them. Thassaka lives on the fishing that we do around here, but these boats are all very old, and we don't have much good wood left on this island to make whole new boats._";
	text2 = "He continues, _I have to fix the ones that break, since few others know how. I worry sometimes, though; I have no apprentices or young sliths interested in my work. When I grow old and can no longer work, I do not know how we will continue to fish._";
	text3 = "He adds, _Or, perhaps more importantly, how we will continue to bring back metal from the quarry in the southwest. It is vital to our survival, with barbarians around all the time, but we need good boats for it, and no one is learning the trade._";

begintalknode 72;
	state = 50;
	personality = 118;
	nextstate = 50;
	condition = 1;
	question = "Who is Seithoss?";
	text1 = "_The mightiest god of all,_ Deross answers, striking the boat particularly hard after this statement. _He is the lord of all the other gods, the serpent god, the creator and bringer of life._";

// *** Machrone ***

begintalknode 80;
	state = -1;
	personality = 119;
	nextstate = 60;
	condition = 1;
	question = "Machrone";
	text1 = "Machrone, happily busy as always, is scribbling notes on the sliths surrounding him. He seems particularly interested in the blue-skinned sliths, the refugees from Nakhtha who managed to get out and flee south before the city was destroyed.";
	text2 = "_Oh, hi,_ he says as he sees you. _Good to see you again._";
	text5 = "Machrone jots notes as he waits for you next question.";
	action = INTRO;

begintalknode 81;
	state = 60;
	personality = 119;
	nextstate = 61;
	condition = 1;
	question = "What did you think of the performance?";
	text1 = "_Pretty,_ he said. _I didn't understand it at all. I'm having a hard enough time learning the language that these sliths all speak. Did you know that they call it the 'Modern' dialect? This archaic tongue, far older than anything in Avernum, 'Modern'!_";

begintalknode 82;
	state = 61;
	personality = 119;
	nextstate = 61;
	condition = 1;
	question = "So you can't speak the slith tongue well yet?";
	text1 = "He gives you demonstration. He speaks with an accent that makes his words almost incomprehensible. You shake your head. You are fortunate to have learned this old dialect through mind crystals.";

begintalknode 83;
	state = 61;
	personality = 119;
	nextstate = 61;
	condition = 1;
	question = "What else have you learned about their dialects?";
	text1 = "_Glad you asked._ He pulls out a pad upon which he has made many notes. _The language of the Khalthanad is called 'Classical Slith.' Well, that's not their term for it. Their term is... um... I can't pronounce it. But it means 'Classical Slith.'_";
	text2 = "He continues, _It was spoken long ago, supposedly first by Khalthas, who wandered among the sliths whom he had conquered and picked up all of their dialects, until he combined them all into one, which became the official dialect of the empire._";
	text3 = "His finger moves to another note. _Later, the language continued to evolve, and eventually it was so different that the sliths decided to change it officially. They created 'Modern Slith,' which has been the spoken language for a few hundred years now._";
	text4 = "He adds, _Apparently, the sliths of Avernum speak some sort of barbarized form. I tried to speak the Avernite tongue to them, and they spit at me a term, which I think translates as 'Barbaric Slith.' They don't think highly of it._";

begintalknode 84;
	state = 60;
	personality = 119;
	nextstate = 60;
	condition = 1;
	question = "Have you learned anything interesting from the Thassakans?";
	text1 = "_Oh, yes,_ he says. _I've learned the way that they fish, and I've learned the types of metal they find in the quarry, and I've learned the prayers that they recite before dinner every night, and I've learned all sorts of other things._";
	text2 = "A thought occurs to him. _Nothing that would be useful to you, I think,_ he says regretfully.";

// *** Pistokh ***

begintalknode 90;
	state = -1;
	personality = 129;
	nextstate = 70;
	condition = 1;
	question = "Pistokha";
	text1 = "This slith woman greets you with a smile as you approach. _Hello, foreigner!_ she says. _My name is Pistokha. Have you any need for food? If so, I can help you!_";
	text5 = "Pistokha tends to her food items while she waits for your next question.";
	action = INTRO;

begintalknode 91;
	state = 70;
	personality = 129;
	nextstate = 70;
	condition = 1;
	question = "Can I buy some food?";
	text1 = "You finish shopping.";
	code =
	if (get_flag(11,5) < 2)
		begin_shop_mode("Pistokha's Food","Pistokha offers a wide selection of food types, including a few that sliths probably don't eat often.",12,4,-1);
	if (get_flag(11,5) == 2)
		begin_shop_mode("Pistokha's Food","Pistokha offers a wide selection of food types, including a few that sliths probably don't eat often. After your javelin-throwing, he gives you a discount.",12,3,-1);
	if (get_flag(11,5) > 2)
		begin_shop_mode("Pistokha's Food","Pistokha offers a wide selection of food types, including a few that sliths probably don't eat often. After your javelin-throwing, he gives you a discount.",12,2,-1);
break;

begintalknode 92;
	state = 70;
	personality = 129;
	nextstate = 70;
	condition = 1;
	question = "Do the people around here really eat this stuff often?";
	text1 = "_No,_ she says, grinning. _But I bring out my best goods for my very most special customers, those coming from lands far away with lots of money._ She winks. _No, sliths around here normally eat mushrooms and sometimes the meat of a sacrificed animal._";

// *** Silthokh ***

begintalknode 100;
	state = -1;
	personality = 128;
	nextstate = 80;
	condition = 1;
	question = "Silthokh";
	text1 = "Silthokh is here, wandering through the main square, speaking with each merchant and bargaining over items. He stops as you approach, clearly hoping that you will make a purchase or two.";
	text5 = "Silthokh waits for your next question.";
	action = INTRO;

begintalknode 101;
	state = 80;
	personality = 128;
	nextstate = 80;
	condition = 1;
	question = "What do you think of the trip so far?";
	text1 = "_Very interesting, and very hopeful,_ he says. _Aside from the unpleasantness as we left Vasskolis, we have encountered no real difficulties._ He grins. _I've found plenty of trinkets here in Thassaka that will fetch a good sale price back in Avernum._";
	text2 = "You catch a drift of Phaedra's voice from the library to the north, and Silthokh frowns darkly. You start to ask him about it, but he doesn't respond at all. Strange.";

begintalknode 102;
	state = 80;
	personality = 128;
	nextstate = 80;
	condition = 1;
	question = "Show me your wares.";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Items","This slith merchant has a variety of miscellaneous items at reasonable prices, and he will buy your excess, too.",13,2,2);
break;
	
begintalknode 103;
	state = 80;
	personality = 128;
	nextstate = 80;
	condition = 1;
	question = "Can you identify my items?";
	text1 = "_Yes. I've learned a thing or two about strange items in my time, so whatever you've come up with shouldn't be a problem for me._";
	action = ID 5;
	
begintalknode 104;
	state = 80;
	personality = 128;
	nextstate = 80;
	condition = 1;
	question = "Can you teach me anything?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Silthokh's Recipes","Silthokh, from years of digging up alchemical ingredients, knows how to make a variety of potions. He'll teach you for a small price.",14,2,-1);
break;