// TOWN DIALOGUE SCRIPT
// 	Town 15: Khar-Grav

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

begintalkscript;

variables;

// *** Voss ***

begintalknode 1;
	state = -1;
	personality = 170;
	nextstate = 1;
	condition = 1;
	question = "Voss";
	text1 = "Voss, the ghost who spoke to you after you defeated Nolagh-Khar in the room above, looks at you closely. He says nothing, but he waits for your questions.";
	text5 = "The ghost waits for your next question.";
	action = INTRO;
	
begintalknode 2;
	state = 1;
	personality = 170;
	nextstate = 1;
	condition = 1;
	question = "Who are you?";
	text1 = "_My name is Voss. In life, I was an advisor to the mayor of Bahssikava. Now, in death, I am all that is left of the leadership of this city. How the glorious have fallen._";
	text2 = "It seemed to you that there was a strange tone in his voice right there, but just as you think that, you realize that he was not speaking at all. He was communicating via telepathy, his voice only sounding in your mind!";
	text3 = "His voice sounds sibilant as a hiss, quiet yet distinct so as not to be hard to understand, and hollow, as if it were reverberating in his hollow ribcage before entering your mind.";

begintalknode 3;
	state = 1;
	personality = 170;
	nextstate = 2;
	condition = 1;
	question = "What is this place?";
	text1 = "_This is the room from which the rebellion has fought for the past sixty years, struggling to win our freedom from the demon lord Nolagh-Khar. Would you like me to tell you our story?_";

begintalknode 4;
	state = 2;
	personality = 170;
	nextstate = 1;
	condition = 1;
	question = "Yes, please.";
	text1 = "The ghost falls completely, utterly silent.";
	code =
	set_flag(17,1,1);
	end();
break;

begintalknode 5;
	state = -1;
	personality = 171;
	nextstate = 3;
	condition = 1;
	question = "Ithik";
	text1 = "The living slith looks at you carefully, waiting for your questions.";

begintalknode 6;
	state = 3;
	personality = 171;
	nextstate = 3;
	condition = (get_flag(250,2) == 0);
	question = "Who are you?";
	text1 = "The slith looks at you uncomprehendingly. He begins to speak a strange-sounding language, but you can't understand him. When it becomes clear that you will not be able to communicate, he sighs, hands you a cloak, and leaves.";
	text2 = "He looked grateful to you, but you may never know what he wanted to say.";
	code =
	if (reward_give(459) == 0)
		put_item_on_spot(33,28,459);
	erase_char(7);
	end();
break;

begintalknode 7;
	state = 3;
	personality = 171;
	nextstate = 4;
	condition = ((get_flag(250,2) >= 1) && (get_flag(15,22) == 0));
	question = "Who are you?";
	text1 = "At first he does not understand you, and he responds in a strange, sibilant language. You can almost understand him! He is speaking something very close to the Ancient Bahssikavan you've been learning!";
	text2 = "You ask him again in that language, and he replies. _My name is Ithik. Have you spoken with Voss yet?_";
	
begintalknode 8;
	state = 4;
	personality = 171;
	nextstate = -1;
	condition = get_flag(17,1) != 2;
	question = "No.";
	text1 = "_Then speak to him first. His matter is more important than mine._";
	action = END_TALK;

begintalknode 9;
	state = 4;
	personality = 171;
	nextstate = -1;
	condition = get_flag(17,1) == 2;
	question = "Yes.";
	text1 = "_Good. Then we can talk. I have a long story to tell you about how I came to Bahssikava, but I will wait until later to tell it. You have heard enough tragedy for the time being._";
	text2 = "_For right now, I will give you my gift for having freed me from the captivity of the demons. It is a cloak that should serve you well._ He hands you a beautifully woven, soft, durable cloak.";
	text3 = "_I will go on ahead of you. The way out is simple: leave through the north passageway, and travel north and east. Eventually you should return to caves that you are familiar with._ He begins walking to the exit.";
	text4 = "_Oh, and don't worry about finding me. I'll find you when the time is right._ With that, he leaves.";
	code =
	if (reward_give(459) == 0)
		put_item_on_spot(33,28,459);
	set_flag(17,2,1);
	erase_char(7);
	end();
break;

begintalknode 10;
	state = 3;
	personality = 171;
	nextstate = 4;
	condition = get_flag(15,22) == 1;
	question = "Hi, Ithik.";
	text1 = "You speak to him in the ancient slithzerikai language that has become somewhat familiar to you by this point. He smiles and replies, _Have you spoken to Voss yet?_";
	
// *** Phaedra identification ***

begintalknode 198;
	state = -1;
	personality = 250;
	nextstate = 99;
	condition = 1;
	question = "Phaedra";
	text1 = "You ask Phaedra if she can identify your items for you. _I sure can,_ she replies, grinning.";

begintalknode 199;
	state = 99;
	personality = 250;
	nextstate = -1;
	condition = 1;
	question = "Please do, then.";
	text1 = "_Sure thing. Only 5 coins per item._ She flashes you another grin,  daring you to ask why she is charging you. You don't.";
	action = ID 5;