// dlg.txt

begintalkscript;

variables;

short i;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(81,2) == 0;
	question = "special";
	text1 = "There is a ruined fortress here, and it looks like it has been ruined for a long time. It slumps, crumbling and abandoned, in the shadow of Fort Duvno.";
	text2 = "It has a commanding view of the expanses to the west, but the soldiers have not claimed it. Perhaps they don't have the resources to hold and fortify two nearby keeps.";
	text3 = "Something has moved into the vacuum. The walls of the ruin are covered with thick masses of web. You can look through the gaps in the wall and see arachnid figures shuffling around.";
	action = SET_SDF 81 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(81,4) == 0;
	question = "special";
	text1 = "You enter the ruined fort, only to find it still and quiet. There is no sign of the arachnids.";
	text2 = "It looks like humans were settled here only recently. There are campsites and piles of trash. The people are gone now. And, at the moment, so are the spiders.";
	action = SET_SDF 81 4 1;
	
begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(81,3) == 0 && gf(81,11) == 0 && gf(81,10) == 0;
	question = "special";
	text1 = "You stop moving and listen. Yes ... Something is happening. You can hear shuffling, hissing, and clicking all around you. Something is coming. The spiders have emerged from hiding.";
	action = SET_SDF 81 3 1;
	code =
		activate_hidden_group(49);
	break;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(81,5) == 0;
	question = "special";
	text1 = "When you reach the top of the stairs, your skin starts to itch and your hair stands up on end. You can sense the presence of powerful magic.";
	text2 = "There are more aranea nearby. Dangerous ones. The magic barriers to the north show that they are serious about maintaining their privacy.";
	action = SET_SDF 81 5 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The writing on this obelisk has long since worn off.";




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

begintalknode 7; // sbook 1
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You are surprised to find that this web is unusual. The strands form complicated patterns. You soon realize that it is writing. This is an aranea spellbook, and the script is vaguely familiar.";
	text2 = "You manage to decipher the script. You learn more about rituals for clouding the minds of your foes. Very useful. (Your skill with the spell Control Foe increases.)";
	text3 = "You examine the web a bit more, but you don't learn anything new.";
	text4 = "You examine the web, but you can't understand any of it. You don't know enough magical lore. (Improve your Arcane Lore skill to understand books like these.)";
	code =
		if (gf(81,9) == 0) {
			rs(3);
			if (get_stat_total(13) < 7)
				rs(2);
				else {
					rs(4);
					sf(81,9,1);
					alter_stat(30000,74,1);
					}
			}
			else {
				rs(1); rs(2); rs(4);
				}
	break;

begintalknode 8; // sbook 2
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You are surprised to find that this web is unusual. The strands form complicated patterns. You soon realize that it is writing. This is an aranea spellbook, and the script is vaguely familiar.";
	text2 = "You manage to decipher the script. You learn more about techniques for calling lightning out of the air. It is very, very helpful. (Your skill with the spell Lightning Spray increases greatly.)";
	text3 = "You examine the web a bit more, but you don't learn anything new.";
	text4 = "You examine the web, but you can't understand any of it. You don't know enough magical lore. (Improve your Arcane Lore skill to understand books like these.)";
	code =
		if (gf(81,8) == 0) {
			rs(3);
			if (get_stat_total(13) < 7)
				rs(2);
				else {
					rs(4);
					sf(81,8,1);
					alter_stat(30000,50,2);
					}
			}
			else {
				rs(1); rs(2); rs(4);
				}
	break;

//

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

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

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

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

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

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

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

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

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

begintalknode 19;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 20;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

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

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

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

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

//

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 = "";
		