// creator  : weidu.exe (version 23100)
// argument : ALDETH.DLG
// game		 : .
// source	 : ./DATA/DIALOG.BIF
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~ALDETH~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #1 /* Triggers after states #: 26 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
GlobalLT("Chapter","GLOBAL",5)
~ THEN BEGIN 0 // from:
  SAY #939 /* ~Indeed? Well, despite your... wit, he would be a great help in our escape.  Better that we make use of all our strengths, rather than pick apart our weaknesses.~ */
  IF ~~ THEN REPLY #947 /* ~Such a chore to protect all these people from their own ineptitude.~ */ JOURNAL #6496 /* ~Getting Inside the Palace in Suldanessellar

The priestess Reirra told me that the avatar of Rillifane must be summoned to defeat the monsters in the city, and also remove the seal on the palace gates.  There are three relics that have been stolen by monsters and scattered throughout the city, and they must be returned to the temple and placed on Rillifane's statue in order for the avatar to be summoned.~ */ GOTO 4
  IF ~~ THEN REPLY #948 /* ~I will help, but your cage seems to be sealed magically.~ */ GOTO 3
END

IF WEIGHT #2 /* Triggers after states #: 26 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
GlobalLT("Chapter","GLOBAL",5)
~ THEN BEGIN 1 // from:
  SAY #940 /* ~You have changed in this place.  You would abandon your friends?  Whether you remember or not, we have shared the path here.  Is that to be forgotten?~ */
  IF ~~ THEN REPLY #949 /* ~More baggage for me? I think I'll leave you all behind to distract the guards.~ */ DO ~SetGlobal("TalkedToAldeth","GLOBAL",1)
~ JOURNAL #6496 /* ~Getting Inside the Palace in Suldanessellar

The priestess Reirra told me that the avatar of Rillifane must be summoned to defeat the monsters in the city, and also remove the seal on the palace gates.  There are three relics that have been stolen by monsters and scattered throughout the city, and they must be returned to the temple and placed on Rillifane's statue in order for the avatar to be summoned.~ */ GOTO 4
  IF ~~ THEN REPLY #950 /* ~I will decide what course is best. First I shall see to your cage.~ */ GOTO 3
END

IF WEIGHT #3 /* Triggers after states #: 26 even though they appear after this state */
~NumTimesTalkedTo(0)
ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
GlobalLT("Chapter","GLOBAL",5)
~ THEN BEGIN 2 // from:
  SAY #941 /* ~A bottle of sleeping draught used by Galvena's courtesans to aid in robbing clients.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1 0.1
  SAY #942 /* ~Aye, and as quickly as possible. Goodbye, Jaheira... It's been swell.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.0 0.0
  SAY #943 /* ~I am merely taking a new path, one that is better suited to my needs.~ */
  IF ~~ THEN DO ~SetGlobal("HelpAldeth","GLOBAL",1)
ClearAllActions()
StartCutScene("Aldcut01")
~ EXIT
END

IF ~~ THEN BEGIN 5 // from:
  SAY #944 /* ~Forgive my ill-timed jesting. I will free you as soon as possible.~ */
  IF ~~ THEN REPLY #960 /* ~Where?  He who sneaks up on Minsc loses teeth!~ [MINSC47] */ GOTO 6
  IF ~~ THEN REPLY #961 /* ~Stop it!  Boo is not for you, tiny! You'll hurt him!~ */ EXTERN ~SENIYA~ 1
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #945 /* ~It would be best to face the culprit another day on our own terms, so go and be quick. We must free ourselves soon.~ */
  IF ~~ THEN DO ~EndCutsceneMode()
Enemy()
~ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 26 even though they appear after this state */
~GlobalGT("KilledDruids","GLOBAL",3)
Global("HelpAldeth","GLOBAL",1)
GlobalLT("Chapter","GLOBAL",5)
~ THEN BEGIN 7 // from:
  SAY #946 /* ~I care not. In fact, I think I'll leave you to distract any guards.~ */
  IF ~~ THEN DO ~SetGlobal("AldethMove","GLOBAL",1)
GiveItem("POTN09",LastTalkedToBy)
AddexperienceParty(2000)
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from:
  SAY #1030 /* ~I do not wish that company. I am sorry, but you must find your own way out.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 26 even though they appear after this state */
~Global("Chapter","GLOBAL",5)
Global("AldethMove","GLOBAL",1)
~ THEN BEGIN 9 // from:
  SAY #1031 /* ~You are right, of course. Join with me and we shall escape this place.~ */
  IF ~~ THEN REPLY #1054 /* ~A collection of bones that once made up the skeleton of a dog. They have been gnawed upon by something large.~ */ GOTO 11
  IF ~~ THEN REPLY #1055 /* ~A length of smooth golden rope, braided into a miniature pair of shackles. Visaj said that the rope would protect you from the effects of the lich Deirex's magic.~ */ GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 13.1 12.0 11.0 9.1
  SAY #1033 /* ~An effective plan, but as cold and calculating as the walls that hold us.  So be it, but it won't be I that is captured.  Perhaps we will meet again.~ */
  IF ~~ THEN DO ~

~ EXIT
END

IF ~~ THEN BEGIN 11 // from: 9.0
  SAY #1036 /* ~A mug of ale with an odd but faint smell.~ */
  IF ~~ THEN REPLY #1059 /* ~This is the wardstone that will allow you access to the House Jae'llat. Without the stone, the wards make the place impenetrable.~ */ GOTO 10
  IF ~~ THEN REPLY #1060 /* ~This is a tooth from the drow lich Deirex. The tooth acts as a key for many of the lich's doors.  It will also open his treasure vault at the top of his tower.~ */ GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.1
  SAY #1037 /* ~Holy water blessed by the Elven god Rillifane. The water is specially made to combat vampires.~ */
  IF ~~ THEN REPLY #1061 /* ~These are the gems in which the lich Deirex stores imprisoned souls of his enemies.~ */ GOTO 10
  IF ~~ THEN REPLY #1062 /* ~This enchanted rope allows the user to descend or ascend any height. It will stretch to any length and still maintain its strength. It can be used to descend into the Underdark through the hole that the sahuagin guard.~ */ GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.1
  SAY #1038 /* ~A human skull made from solid gold. The thing burns with malevolent energy.~ */
  IF ~~ THEN REPLY #1063 /* ~The brain of the drow priestess, Qilue.~ */ JOURNAL #6501 /* ~Getting Inside the Palace in Suldanessellar

The black dragon that Irenicus apparently rode to Suldanessellar on is outside of the city to the northwest.~ */ GOTO 25
  IF ~~ THEN REPLY #1064 /* ~The black withered heart of the vampire Bodhi.~ */ GOTO 10
END

IF WEIGHT #6 /* Triggers after states #: 26 even though they appear after this state */
~Global("Chapter","GLOBAL",5)
Global("AldethMove","GLOBAL",2)
GlobalLT("AldethDopple","GLOBAL",6)
~ THEN BEGIN 14 // from:
  SAY #1040 /* ~A skeletal torso made of pure gold. A palpable sense of evil pollutes the very air around the bones.~ */
  IF ~~ THEN REPLY #1067 /* ~A beautiful glittering fruit taken from the section of the Tree of Life that grows through the palace. The fruit has a tantalizing smell and looks ripe enough to eat.~ */ GOTO 15
  IF ~~ THEN REPLY #1068 /* ~An elegantly carved stone harp. The harp appears to have been part of a larger carving but has obviously been torn away from it.~ */ GOTO 16
  IF ~Global("ZorlParty","GLOBAL",1)
~ THEN REPLY #1069 /* ~Lizard Man~ */ GOTO 17
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #1041 /* ~This is the central eye obtained from the beholder of the Twisted Rune.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from: 14.1
  SAY #1042 /* ~This is the holy symbol of the Elven god Rillifane.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 17 // from: 14.2
  SAY #1043 /* ~An intricate gilded cup. This is one of the crown jewels of Ellesime, the Queen of Suldanessellar. The Goblet is a powerful symbol of the Elven people.~ */
  IF ~~ THEN REPLY #1070 /* ~Lizard Man~ */ GOTO 18
  IF ~~ THEN REPLY #1071 /* ~An elegantly carved stone horn. The horn appears to have been part of a larger carving but has obviously been torn away from it.~ */ GOTO 19
  IF ~~ THEN REPLY #1072 /* ~This a Holy Stone used by priests of the Elven god Rillifane. A piece of ritual is written on the back:

From Corellan, all began. Rillifane grew
From the branches of Rillifane the Water flowed,
Granting life to the Tree
Suldanessellar owes all to the Tree.~ */ GOTO 20
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #1044 /* ~A powerful Moonblade, this weapon has become one of the most basic symbols of Suldanessellar.  It is truly ancient, and said to have been wielded by the founder of long ruined Myth Rhynn.  It can be used only by its 'chosen', a citizen of the city that has proven their worth in a series of mysterious tests unknown to any outsider.~ */
  IF ~~ THEN DO ~SetGlobal("TalkToBrandilar","GLOBAL",1)
~ EXIT
END

IF ~~ THEN BEGIN 19 // from: 17.1
  SAY #1045 /* ~A small hardened fruit harvested from a section of the Tree of Life that grew into the palace. There is no obvious use for the smaller fruits but they have power and should be kept.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 20 // from: 17.2
  SAY #1046 /* ~A teardrop shaped gemstone of a deep, oddly unsettling color. The Tear is one of the keys required to open the Watcher's Door.~ */
  IF ~~ THEN DO ~SetGlobal("TalkToBrandilar","GLOBAL",1)
~ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 26 even though they appear after this state */
~Global("Chapter","GLOBAL",7)
~ THEN BEGIN 21 // from:
  SAY #2123 /* ~Very well. Be quick, I can't stand the stench of these slums for much longer.~ */
  IF ~~ THEN REPLY #2126 /* ~Ah, my hound, this city be the great world of commerce! Perhaps we can sell Jaheira?~ [HAERDA53] */ EXIT
  IF ~~ THEN REPLY #2127 /* ~Don't fret, Jan. Vaelag wants me back.~ */ GOTO 22
END

IF ~~ THEN BEGIN 22 // from: 21.1
  SAY #2124 /* ~Leave him alone, Vaelag. He was only trying to help me.~ */
  IF ~~ THEN REPLY #2128 /* ~He has apologized. He won't be cruel to us again.~ */ EXTERN ~FLAMAL~ 0
  IF ~~ THEN REPLY #2129 /* ~You will stop this immediately! I am grateful for what you have done but you must not overstep your bounds. He is my husband and I love him.~ */ EXTERN ~FLAMAL~ 0
  IF ~~ THEN REPLY #2130 /* ~He won't, Jan! He's different now. You're not being fair to him.~ */ EXTERN ~FLAMAL~ 0
END

IF ~~ THEN BEGIN 23 // from:
  SAY #2125 /* ~Both of you stop it! You're frightening the children. Vaelag, please wait outside. I'll thank these people for showing me hospitality while you were busy.~ */
  IF ~~ THEN REPLY #2131 /* ~That was before and we have spoken about those things. He promised to change. I am leaving now, Jan.~ */ JOURNAL #6534 /* ~The hunt for Valygar Corthala.

A servant, Hervo, has given me leave to look around the home of his master, as he is quite worried about his disappearance.~ */ EXIT
  IF ~~ THEN REPLY #2132 /* ~Cut my wit?  Why, certainly, if I could only use your nose's razor edge to perform the task.~ */ JOURNAL #6534 /* ~The hunt for Valygar Corthala.

A servant, Hervo, has given me leave to look around the home of his master, as he is quite worried about his disappearance.~ */ EXTERN ~FLAMAL~ 1
END

IF WEIGHT #10 /* Triggers after states #: 26 27 28 even though they appear after this state */
~Global("HelpAldeth","GLOBAL",0)
~ THEN BEGIN 24 // from:
  SAY #5737 /* ~Truly, my beauty, it is time for you to leave this life. Guarding the spoils of another man's crime is no way for a woman to live.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 25 // from: 13.0
  SAY #5738 /* ~Choose not the difficult path, weak one. You will come with me regardless.  Expect no help from these dregs. Their death as written in the stars shall be fulfilled tonight.~ */
  IF ~~ THEN DO ~SetGlobal("AldethMove","GLOBAL",2)
MoveToPoint([3244.2519])
OpenDoor("DOOR0127")
DestroySelf()
~ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 26 // from:
  SAY #5739 /* ~Psionic Blast~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 ~Global("Chapter","GLOBAL",5)
Global("HelpAldeth","GLOBAL",1)
GlobalGT("AldethDopple","GLOBAL",5)
~ THEN BEGIN 27 // from:
  SAY #5740 /* ~Air elemental whirlwind~ */
  IF ~~ THEN DO ~GiveItem("SW1H03",LastTalkedToBy)
GivePartyGold(100)
SetGlobal("HelpAldeth","GLOBAL",2)
AddexperienceParty(5000)
~ EXIT
END

IF WEIGHT #9 ~Global("Chapter","GLOBAL",5)
Global("HelpAldeth","GLOBAL",2)
~ THEN BEGIN 28 // from:
  SAY #5741 /* ~It went as you expected though I regret to report that Mook was murdered.~ */
  IF ~~ THEN EXIT
END
