// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(163,2) == 0;
	question = "special";
	text1 = "You smelled this place well before you saw it. Like alchemy workshops, tanneries are generally kept far from cities. Especially in Avernum, where lack of strong winds can make a smell linger for a long time.";
	text2 = "This tannery looks like it has been abandoned for months, if not longer. The reek still hangs heavy in the air. A lot of the lizard skins were left behind to rot.";
	text3 = "It's very quiet here. Eerily so. Even the omnipresent sounds of chirping bats and dripping water seem faint and far away. Odd.";
	text4 = "This must be where Kelagan, the man you met in Almaria, was telling you to come. Nobody is here to greet you.";
	action = SET_SDF 163 2 1;
	code =
		if (gf(149,8) == 0)
			rs(4);
	break;
	
begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(163,3) == 0;
	question = "special";
	text1 = "Suddenly, the gate behind you slams shut! You run back and try to open it. It's solid steel, locked in place. You are trapped. You look for anyone who might be able to help you (or who trapped you). There's nobody.";
	text2 = "Then, as you start wondering how long it will take for the Castle to send someone to hunt for you, the southern gate slowly begins to open.";
	action = SET_SDF 163 3 1;
	code =
		sf(163,9,0);
		sf(163,10,1);
	break;
	
begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(163,5) == 0;
	question = "special";
	text1 = "There are faint slime trails on the floor here. It looks like Gremess's _pets_ constantly slither up and down these halls.";
	text2 = "Of course, if they move around, there is a chance that they can be avoided ...";
	action = SET_SDF 163 5 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(163,6) == 0;
	question = "special";
	text1 = "You have a bit of good fortune. From this side, you can see a narrow, concealed pathway through the tangle of fungal trees ahead. You have a route out of this ambush.";
	text2 = "Unfortunately, Gremess knew about this path too. He is standing out there, flanked by two other slithzerikai, waiting for you.";
	text3 = "He cries, _Come out, soldier! Don't keep usss waiting! Show usss the courage of Avernum'sss warriorsss! What my petsss could not do, we will!_";
	action = SET_SDF 163 6 1;
	code =
		set_terrain(0,622,725,0);
		set_terrain(0,623,725,0);
		set_terrain(0,624,725,0);
		set_terrain(0,622,726,0);
		set_terrain(0,623,726,0);
		set_terrain(0,624,726,0);
		sf(163,1,1);
		activate_hidden_group(37);
		set_name(17620,"Slith Cultist");
		set_name(17621,"Slith Cultist");
		set_level(17620,10);
		set_level(17621,10);
	break;
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Gremess collapses, mortally wounded. It didn't take much. He was cunning and treacherous, but frail.";
	text2 = "_Yesss,_ he whispers, as his eyes cloud over. _Khrez-Yss, you gave a promise. You will kill this warrior yourself. Personally. You will ... Yesss ... It will happen ..._ And then he is still.";
	text3 = "_Khrez-Yss, I tried to avenge you ... I tried ... I am sorry ..._ And then he is still.";
	code =
		if (gf(170,6) > 0)
			rs(2);
			else rs(3);
	break;



//

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a gate in the north wall. A slithzerikai in a heavy cloak stands behind it, watching you. Though this reminds you of your encounter in Lord Trinket's lair, you are sure you have never seen this slith before.";
	text2 = "He is a thin, weedy creature, with pale skin and a pronounced facial tic. When you enter, he laughs at you, a weak hissing sound.";
	text3 = "_Ahsss hsss hsss! You fell into the trap of the master. He hasss tricked you. Hisss message sent you to me. Cunning Gremess will kill you for hisss glory._";
	code =
		sf(163,4,1);
		toggle_quest(83,3);
	break;
	
begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = gf(149,8) == 0;
	question = "Message? What message?";
	text1 = "_You mean you did not get the message in Almaria? You are just here because of luck? Ahsss hsss hsss! See how the foes of the Shadow fall in hisss way!_";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = gf(149,8) == 0;
	question = "You are the one who had Kelagan send me here?";
	text1 = "_Ahsss ... No. It was the mighty Shadow himself, spying on Almaria. And placing a trap to send you in his way. A test for thisss loyal servant!_";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Let me out of here.";
	text1 = "_Oh no, soldier. Hssss._ He nods toward the bodies in the corner. _That isss your fate._";

begintalknode 14;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Who is your master?";
	text1 = "_I serve Khrez-Yss the Shadow, spy and assassin of the Slith Horde! Killing you will be my final test, the one that shows I am worthy to fight at hisss side._";
	text2 = "He nods at the two dead humans in the corner. _I have been practicing._";

begintalknode 15;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "A wormy little creature like you? Kill me?";
	text1 = "_I wasss born weak. Born twisted. But I made up for it in cunning. I have killed many. Even the mightiest warrior must sleep. Even the most cunning mage can be tricked into eating my poison._";

begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = gf(170,6) > 0;
	question = "Ummm ... You do know Khrez-Yss is dead, right?";
	text1 = "_What? You lie ... You ... No. I see in your face you speak the truth._ He starts to shriek. _Well, I will avenge him! I swear it! You will rot here!_";
	text2 = "He turns and runs into the shadows.";
	action = END_TALK;
	
begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Who were those two people?";
	text1 = "_Avernite soldiers. I lured them here. Simple trickery. Refining my techniques. For the chaos me and mine will sow in the Great Cave once I have proved myself._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = gf(170,6) == 0;
	question = "Why does Khrez-Yss keep sending vermin to kill me?";
	text1 = "_Oh, do not worry. The Shadow has promised me a mighty honor. Hsss hsss hsss. He saysss, if I fall, he will deal with you himself. To be avenged by him would be a great thing._";
	text2 = "_But it will not happen. You will never leave thisss tunnel. My petsss will deal with you._";
	text3 = "You try to ask Gremess another question, but he turns and flees into the shadows.";
	action = END_TALK;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

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

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

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

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

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

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

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

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

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

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

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

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

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

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

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

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

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

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

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

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

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

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

////

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