// TOWN DIALOGUE SCRIPT
//    Town 54: The Third Level

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

begintalkscript;

variables;
int i,j,k,choice;


//*** Velner ***

begintalknode 1;
	state = -1;
	personality = 540;
	nextstate = 1;
	condition = 1;
	question = "Velner";
	text1 = "This man stirs his cooking pot, clearly on edge, as he watches you approach. He doesn't have the out-of-place appearance of a living being the Land of the Dead, so he must be deceased and forced to remain here.";
	text2 = "He is tall and strong, though on the thinner side, and he reminds you of men you've seen in taverns before. He must have been a small-time bandit, outlaw, or low-life while alive.";
	text5 = "Velner continues to stir his pot nervously as he waits for your next question. It bubbles frothily.";
	action = INTRO;

begintalknode 2;
	state = 1;
	personality = 540;
	nextstate = 2;
	condition = 1;
	question = "Who are you?";
	text1 = "_The name's Velner. I was a bandit near Fort Duvno. My buddies and I hit caravans coming from Formello or Silvar. Then some bastard adventurers came through and killed us all. I hear they were the same guys who killed Hawthorne._";
	text2 = "He indicates the pot before him. _Now, 'cuz of how I lived, I have to cook for these idiots._";

begintalknode 3;
	state = 2;
	personality = 540;
	nextstate = 2;
	condition = 1;
	question = "They're all dead, though. You have no one to cook for.";
	text1 = "_Nah,_ he says. _Their spirits are banished right now, but they'll be back soon enough, and they'll be hungry. That's how it works around here: no one dies for long._";

begintalknode 4;
	state = 2;
	personality = 540;
	nextstate = 2;
	condition = 1;
	question = "Why do you have to cook for them?";
	text1 = "_It is my punishment,_ he says. _When I died, some bright god shined in my face and told me that I had to cook for them for fifty years, and then, if someone was willing to free me, I could go up to the nicer places. That was more than sixty years ago._";

begintalknode 5;
	state = 2;
	personality = 540;
	nextstate = 2;
	condition = 1;
	question = "Is there any way that you can be helped?";
	text1 = "_My time here is up. I've served my whole sentence. If you kill the brutish king in the next room, I can be free._";
	action = SET_SDF 54 9 1;

begintalknode 6;
	state = 2;
	personality = 540;
	nextstate = 2;
	condition = ((get_flag(54,9) == 1) && (get_flag(54,11) == 1));
	question = "I killed your master. You can be free.";
	text1 = "Velner's face lights up for the first time. _Really? Now I can get out of this place._ He turns to the woman at his side, and, holding her hand, the two of them run out of the kitchen and scurry away, down the halls.";
	code =
	set_flag(54,10,1);
	i = 0;
	while (char_ok(i) == 0)
		{i = i + 1; }
	award_party_xp(get_level(i),50);
	erase_char(40);
	erase_char(39);
	end();
break;

//*** Nemurr ***

begintalknode 10;
	state = -1;
	personality = 541;
	nextstate = 5;
	condition = 1;
	question = "Nemurr";
	text1 = "This burly nephil is shackled to the wall, unable to move, covered in whip wounds, lashed almost beyond recognition. His fur is soaked with blood, stained red, and he stares almost mindlessly at the table upon which some of his blood still pools.";
	text2 = "He looks up at you as you enter, resigned to another round of torture, but then he realizes that you are not his captors, and his eyes brighten immediately with awareness.";
	text5 = "Nemurr waits, motionless and shackled, for your next question.";
	action = INTRO;

begintalknode 11;
	state = 5;
	personality = 541;
	nextstate = 5;
	condition = 1;
	question = "Who are you?";
	text1 = "_My name is Nemurr,_ he says, _and I am an oathbreaker. I was of a clan of followers of Rrasang -- the nephil name for the god known to the sliths as Rashank -- and I committed many atrocities with them. But then Avernite soldiers attacked._";
	text2 = "His warm, rumbly voice drops in tone. _I wanted to save myself, so I betrayed my clan and all our oaths by revealing our secrets to the Avernites in exchange for my life. They spared me, but I grew ill and died shortly thereafter._";
	text3 = "He clanks his chains. _Now I suffer the punishment of those who swear their lives to evil and then break their oaths, for a hundred years tortured in this hellish place._";

begintalknode 12;
	state = 5;
	personality = 541;
	nextstate = 5;
	condition = 1;
	question = "Do you know anything useful about this place?";
	text1 = "_I know that everything important is kept upstairs,_ he replies. _The rulers of this place do not trust the residents, so there is a heavily-guarded gate in the northeast, and the stairs lie beyond that._";
	text2 = "He adds, _I know this because I have heard people talking in the halls. I have also heard that they have gotten a new prisoner they're keeping up there, too, but I don't know anything about him._";

begintalknode 13;
	state = 5;
	personality = 541;
	nextstate = 5;
	condition = 1;
	question = "Can you be helped at all?";
	text1 = "_No,_ he says. _My time here is not yet over. Mrr. Even if I escaped, I would have to return. You cannot help me._";

//*** Laghash ***

begintalknode 15;
	state = -1;
	personality = 542;
	nextstate = 10;
	condition = 1;
	question = "Laghash";
	text1 = "Here behind the cages is a small imp, looking quite displeased. He notes your approach but does not attack you.";
	text5 = "Laghash glares at you as he waits for your next question.";
	action = INTRO;

begintalknode 16;
	state = 10;
	personality = 542;
	nextstate = 11;
	condition = 1;
	question = "What are you doing here?";
	text1 = "_I live here. What are YOU doing here?_ He growls unpleasantly. _My name is Laghash. I serve these buffoons. They make me clean the cages in between torture victims._";
	text2 = "He seems rather unfriendly towards his masters. This is not uncommon: demons tend to treat imps rather harshly, and the imps tend to resent it. You even managed to cause an imp revolt in Bahssikava because of this fact, once.";

begintalknode 17;
	state = 11;
	personality = 542;
	nextstate = 10;
	condition = 1;
	question = "Since you don't like your masters, is there anything that you can do for me?";
	text1 = "Laghash snorts. _I may be annoyed, but I'm not suicidal. I'm not going to help you._ He pauses. _That is, unless you help me. For a small price, I can identify your items._ He gives you toothy grin.";
	action = SET_SDF 54 12 1;

begintalknode 18;
	state = 10;
	personality = 542;
	nextstate = 10;
	condition = get_flag(54,12) == 1;
	question = "Can you identify my items?";
	text1 = "_For ten coins apiece, I'll tell you anything you want to know about your things._";
	action = ID 10;