// creator  : weidu.exe (version 23600)
// argument : RIELTA.DLG
// game     : .
// source   : ./override/RIELTA.DLG
// dialog   : lang\en_us/dialog.tlk
// dialogF  : (none)

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

IF WEIGHT #1 /* Triggers after states #: 12 even though they appear after this state */
~  NumberOfTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #1653 /* ~My dear <SIRMAAM>, you must realize that it is manners that make the gentle<MANWOMAN>, so would you kindly prove that you are one by leaving?!~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
  IF ~Global("X#RIELTA0","GLOBAL",0)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA0","GLOBAL",1)~ GOTO 16
  IF ~Global("X#RIELTA0","GLOBAL",0)
InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA0","GLOBAL",1)~ EXTERN ~CORANJ~ 290
  IF ~Global("X#RIELTA0","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA0","GLOBAL",1)~ GOTO 18
  IF ~Global("X#RIELTA0","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA0","GLOBAL",1)~ EXTERN ~SHARTJ~ 154
END

IF WEIGHT #4 /* Triggers after states #: 3 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 1 // from: 21.0 20.0 19.0 18.0 17.0 16.0 0.0 SHARTJ:154.0
  SAY #1654 /* ~The right people can afford to be rude, but this is not you. Leave now, before my irate companion Brunos lets his temper get ahead of his reason!~ */
  IF ~~ THEN REPLY #16818 /* ~Fine, we'll be on our way.~ */ GOTO 8
  IF ~~ THEN REPLY #16819 /* ~You're the leaders of the Iron Throne! We're the ones who've caused you so much trouble over the past weeks. We know what you're all about, and soon, so will Duke Eltan.~ */ GOTO 5
  IF ~~ THEN REPLY #16820 /* ~You're the bastards behind all of the troubles from here to Baldur's Gate. Now that we have you where we want you, don't think we're going to let you live!~ */ GOTO 2
  IF ~Global("X#EdwinRieltar","GLOBAL",0)
InParty("edwin")
InMyArea("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#EdwinRieltar","GLOBAL",1)~ EXTERN ~EDWINJ~ 105
END

IF WEIGHT #5 /* Triggers after states #: 3 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 2 // from: 15.2 6.0 5.0 1.2
  SAY #1655 /* ~This is most distasteful. I have always known that rudeness is how the weak make themselves look strong. Even if you were to somehow beat us in battle, how would you escape the keep? Or did you think that the monks would let you go about murdering everyone within their keep?~ */
  IF ~~ THEN EXTERN ~BRUNO~ 1
  IF ~Global("X#RIELTA2","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA2","GLOBAL",1)~ GOTO 22
  IF ~Global("X#RIELTA2","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA2","GLOBAL",1)~ EXTERN ~GARRIJ~ 172
  IF ~Global("X#RIELTA2","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#RIELTA2","GLOBAL",1)~ EXTERN ~JAHEIJ~ 310
END

IF WEIGHT #2 /* Triggers after states #: 12 even though they appear after this state */
~  StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 3 // from:
  SAY #6071 /* ~I'm one of the western divisional leaders of the Iron Throne. We are here at Candlekeep negotiating with the Knights of the Shield. We have been creating a misinformation campaign to blame the Zhentarim for all the troubles in the region. We are trying to create tensions between the governments of Baldur's Gate and Amn. With iron being the most important resource in a war, the Baldurian government will have to go to us in order to get any. We have disrupted all iron trade through the region using the Blacktalon mercenaries and the Chill. The only known iron mine in the region is at Nashkel, and we have effectively crippled that mine. We have our own mine operating in Cloakwood. When the Baldurian government comes to us for iron, we will be able to make exorbitant trading demands, and thus become the preeminent trading power in this region.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #26972 /* ~Return to Candlekeep
When we charmed Rieltar we learned a lot of information about the Iron Throne. They want to become the dominant trading cartel along the Sword Coast. To do this, they have been using a misinformation campaign to raise tensions between the nations of Baldur's Gate and Amn. They have disrupted the flow of iron into Baldur's Gate by sabotaging the Nashkel mines and using the Chill and Blacktalons to cut off all trade along the Sword Coast. The only iron source in the Sword Coast will be the Iron Throne base in Cloakwood. With Baldur's Gate anticipating a war with Amn, they will be forced to go to the Iron Throne for the most precious of wartime materials. When this occurs, the Iron Throne will be able to make any demands that they wish.~ */ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 4 // from:
  SAY #9094 /* ~You'll pay for what you've done!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 /* Triggers after states #: 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 5 // from: 15.1 1.1
  SAY #16821 /* ~You're the...? And you're stupid enough to admit this? Well, my young friend, you may find safety within the library, but once you've left there will be no place for you to run.~ */
  IF ~~ THEN REPLY #20470 /* ~How 'bout we just end all of our problems, right here and now? Draw steel and let's sort everything out with the sharp of our blades!~ */ GOTO 2
  IF ~  Global("KillReiltar","GLOBAL",1)
~ THEN REPLY #20471 /* ~Koveras told us you were all but undefended here at the keep. We could kill you and probably get away with it.~ */ GOTO 6
  IF ~~ THEN REPLY #20466 /* ~We'll leave, but don't think this is the last of it... it won't be, not by a long shot.~ */ GOTO 7
END

IF WEIGHT #8 /* Triggers after states #: 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 6 // from: 5.1
  SAY #20473 /* ~Koveras! Who is Kove... of course. It seems that I taught my son all too well. Well my young pups, you've been set up to be used as dupes. Koveras does not want what's best for you, but rather what's best for him. Hmmm... well you should stop this foolish prattle about doing battle and get out of our conference room!~ */
  IF ~~ THEN REPLY #20478 /* ~We don't intend to leave, we intend to kill you.~ */ GOTO 2
  IF ~~ THEN REPLY #20479 /* ~We'll leave, but don't think that this is over.~ */ GOTO 7
END

IF WEIGHT #9 /* Triggers after states #: 9 12 even though they appear after this state */
~  OR(3)
!InParty("yeslick")
!InMyArea("yeslick")
StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN BEGIN 7 // from: 6.1 5.2
  SAY #20474 /* ~That's fine, little ones. I'm sure we can expect to see you in the future, if not in person, then at least your heads.~ */
  IF ~~ THEN DO ~EraseJournalEntry(31460)
~ UNSOLVED_JOURNAL #32134 /* ~I'm not a murderer.

I couldn't kill Rieltar in cold blood. Something strange is going on in Candlekeep. I shall investigate further.~ */ EXIT
  IF ~Global("X#JaRieltar2","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaRieltar2","GLOBAL",1)~ EXTERN ~JAHEIJ~ 100
END

IF ~~ THEN BEGIN 8 // from: 15.0 1.0
  SAY #20475 /* ~Good riddance.~ */
  IF ~~ THEN DO ~EraseJournalEntry(31460)
~ UNSOLVED_JOURNAL #32134 /* ~I'm not a murderer.

I couldn't kill Rieltar in cold blood. Something strange is going on in Candlekeep. I shall investigate further.~ */ EXIT
  IF ~Global("X#JaRieltar3","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaRieltar3","GLOBAL",1)~ EXTERN ~JAHEIJ~ 99
END

IF WEIGHT #3 /* Triggers after states #: 12 even though they appear after this state */
~  True()
~ THEN BEGIN 9 // from:
  SAY #20477 /* ~As I told you before, get out and stop bothering us!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from:
  SAY #45942 /* ~Yeslick?!? Then - Cloakwood *has* fallen... Damn you, Dwarf! There may be safety for you in this library but I assure you, outside of here, there will be nowhere to hide for you!~ */
  IF ~~ THEN EXTERN ~YESLIJ~ 49
END

IF ~~ THEN BEGIN 11 // from:
  SAY #45948 /* ~My time is coming, dwarf... but not in the way you might think. Now scurry off while you still have legs!~ */
  IF ~~ THEN EXTERN ~YESLIJ~ 53
END

IF WEIGHT #0 ~  Global("X#IRWAS","GLOBAL",2)
~ THEN BEGIN 12 // from:
  SAY #45950 /* ~That takes care of one annoyance... As for you - there may be safety for you in this library but I assure you, outside of here, there will be nowhere to hide for you!~ */
  IF ~~ THEN REPLY #45951 /* ~Your time is coming, Rieltar. The Iron Throne will not succeed!~ */ DO ~SetGlobal("X#IRWAS","GLOBAL",3)
~ GOTO 14
  IF ~~ THEN REPLY #45952 /* ~You... killed Yeslick! Prepare to die, you swine!~ */ DO ~SetGlobal("X#IRWAS","GLOBAL",3)
~ GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.1
  SAY #45953 /* ~Some fight in you after all, eh? Then come - to your deaths!~ */
  IF ~~ THEN DO ~SetGlobal("X#IRWAS","GLOBAL",4)
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 14 // from: 12.0
  SAY #45954 /* ~My time is coming... but not in the way you might think. Now scurry off, while you still have legs!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from:
  SAY #46683 /* ~Oh? How droll.~ */
  IF ~~ THEN REPLY #16818 /* ~Fine, we'll be on our way.~ */ GOTO 8
  IF ~~ THEN REPLY #16819 /* ~You're the leaders of the Iron Throne! We're the ones who've caused you so much trouble over the past weeks. We know what you're all about, and soon, so will Duke Eltan.~ */ GOTO 5
  IF ~~ THEN REPLY #16820 /* ~You're the bastards behind all of the troubles from here to Baldur's Gate. Now that we have you where we want you, don't think we're going to let you live!~ */ GOTO 2
END

IF ~~ THEN BEGIN 16 // from: 0.2
  SAY #49847 /* ~It would be a sad day indeed, if I took some pointy-eared rogue's threats seriously.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
END

IF ~~ THEN BEGIN 17 // from:
  SAY #49847 /* ~It would be a sad day indeed, if I took some pointy-eared rogue's threats seriously.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
END

IF ~~ THEN BEGIN 18 // from: 0.4
  SAY #49845 /* ~I doubt not that you are ill-mannered enough to act upon your threat, but I assure you that I have taken every precaution to protect myself against brutes like you.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
  IF ~  InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN GOTO 19
  IF ~  InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN EXTERN ~CORANJ~ 291
END

IF ~~ THEN BEGIN 19 // from: 18.2
  SAY #49847 /* ~It would be a sad day indeed, if I took some pointy-eared rogue's threats seriously.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
END

IF ~~ THEN BEGIN 20 // from: SHARTJ:154.4
  SAY #49845 /* ~I doubt not that you are ill-mannered enough to act upon your threat, but I assure you that I have taken every precaution to protect myself against brutes like you.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
  IF ~  InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN GOTO 21
  IF ~  InParty("coran")
InMyArea("coran")
!StateCheck("coran",CD_STATE_NOTVALID)
~ THEN EXTERN ~CORANJ~ 292
END

IF ~~ THEN BEGIN 21 // from: 20.2 SHARTJ:154.2
  SAY #49847 /* ~It would be a sad day indeed, if I took some pointy-eared rogue's threats seriously.~ */
  IF ~~ THEN DO ~SetGlobal("Criminal","GLOBAL",1)
~ SOLVED_JOURNAL #31459 /* ~Candlekeep Investigation

I have returned to Candlekeep. I must find Rieltar and expose his connection to recent events. I should head to the central keep right away.~ */ GOTO 1
  IF ~  InParty("yeslick")
InMyArea("yeslick")
!StateCheck("yeslick",CD_STATE_NOTVALID)
~ THEN EXTERN ~YESLIJ~ 48
END

IF ~~ THEN BEGIN 22 // from: 2.1
  SAY #49850 /* ~Yes, listen to the child and be on your way.~ */
  IF ~~ THEN EXTERN ~BRUNO~ 1
END

IF ~~ THEN BEGIN 23 // from:
  SAY #49850 /* ~Yes, listen to the child and be on your way.~ */
  IF ~~ THEN EXTERN ~BRUNO~ 1
END

IF ~~ THEN BEGIN 24 // from:
  SAY #49850 /* ~Yes, listen to the child and be on your way.~ */
  IF ~~ THEN EXTERN ~BRUNO~ 1
END
