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

BEGIN ~LIIA~

IF ~~ THEN BEGIN 0 // from:
  SAY #2262 /* ~As all of you know, this is a special occasion for the city of Baldur's Gate. It is time for a new person to join the ranks of the Grand Dukes. I do not wish to downplay the tragedy that we suffered with the loss of Entar Silvershield, but this is not the time for us to show grief.~ [LIIAJ01] */
  IF ~~ THEN EXTERN ~BELT~ 1
END

IF ~~ THEN BEGIN 1 // from: NOBLPA:3.0 NOBLPA1:1.0
  SAY #2263 /* ~The evidence we have about Entar's murder does resemble the work of the Shadow Thieves, but...~ [LIIAJ04] */
  IF ~~ THEN EXTERN ~NOBLPA3~ 1
END

IF ~~ THEN BEGIN 2 // from: NOBLPA:5.0 NOBLPA3:1.0
  SAY #2264 /* ~If I MAY continue, the signature left behind was very blatant and could have been put there to mislead all of us.~ [LIIAJ05] */
  IF ~~ THEN EXTERN ~NOBLPA1~ 2
  IF ~Global("X#VicLiia","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VicLiia","GLOBAL",1)~ EXTERN ~VICONJ~ 118
END

IF ~  Dead("GDOPP7")
Dead("GDOPP71")
Dead("GDOPP72")
Dead("GDOPP73")
Dead("GDOPP74")
Dead("GDOPP75")
Global("SarevokBehavior","GLOBAL",0)
~ THEN BEGIN 3 // from:
  SAY #2265 /* ~Thank you for saving us. You have our eternal gratitude. Is there anything I can do in return?~ */
  IF ~  PartyHasItem("SCRL2K")
~ THEN REPLY #2273 /* ~Take a look at these documents we have. Sarevok is the one who tried to kill you, had Entar killed, and nearly killed Eltan.~ */ GOTO 4
  IF ~~ THEN REPLY #2275 /* ~Sarevok's the one who set you up to be killed. You have to kill him, now!~ */ GOTO 6
  IF ~  PartyHasItem("SCRL3F")
~ THEN REPLY #20707 /* ~Here is Sarevok's diary! It has everything you need to know. Sarevok is the one who tried to kill you, had Entar killed and nearly killed Eltan.~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 6.2 3.2 3.0
  SAY #2266 /* ~These are harsh accusations. Let me take a look at these documents you possess.~ */
  IF ~~ THEN EXTERN ~SAREVO~ 9
END

IF ~~ THEN BEGIN 5 // from:
  SAY #2267 /* ~If you want to leave, you are free to go.~ */
  IF ~~ THEN DO ~Wait(10)
~ EXIT
  IF ~Global("X#SharLiia","GLOBAL",0)
InParty("sharteel")
InMyArea("sharteel")
!StateCheck("sharteel",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#SharLiia","GLOBAL",1)~ EXTERN ~SHARTJ~ 96
END

IF ~~ THEN BEGIN 6 // from: 3.1
  SAY #2268 /* ~You are talking about a Grand Duke, do you have any proof to back up your claims?~ */
  IF ~~ THEN REPLY #2276 /* ~No, we don't.~ */ EXTERN ~SAREVO~ 25
  IF ~  PartyHasItem("SCRL2K")
~ THEN REPLY #2277 /* ~Yes, we do. Take a look at these documents.~ */ EXTERN ~SAREVO~ 9
  IF ~  PartyHasItem("SCRL3F")
~ THEN REPLY #20708 /* ~Here is Sarevok's diary! It has everything you need to know. Sarevok is the one who tried to kill you, had Entar killed and nearly killed Eltan.~ */ GOTO 4
END

IF ~~ THEN BEGIN 7 // from:
  SAY #2269 /* ~I countermand that order. Wait until I have finished reading what is here.~ */
  IF ~~ THEN EXTERN ~SAREVO~ 10
END

IF ~  Global("SarevokBehavior","GLOBAL",1)
~ THEN BEGIN 8 // from:
  SAY #2270 /* ~I would ask that you do us one favor. It seems that you know Sarevok better than any of us. Would you hunt him down and end his threat?~ */
  IF ~~ THEN REPLY #2278 /* ~No way lady, we want to remain among the living.~ */ DO ~SetGlobal("DukeThanks","GLOBAL",1)
~ GOTO 9
  IF ~~ THEN REPLY #2279 /* ~We have many personal reasons for wanting to hunt him down. The only problem is trying to find him.~ */ DO ~SetGlobal("DukeThanks","GLOBAL",1)
~ GOTO 10
  IF ~  Dead("BHEREN")
~ THEN REPLY #46506 /* ~I will hunt Sarevok down, ma'am, but seeing that I could lose my life, I plead your Grace for one favour before I go. There is some unfinished business... a trivial thing. An orphan girl, Petrine and her cat, Angel need a proper guardian. I... I killed her uncle – a mean man who mistreated her, and yet she was left with no soul in the world to protect her. 'Tis a blood debt.~ */ DO ~SetGlobal("DukeThanks","GLOBAL",1)
~ GOTO 15
  IF ~Global("X#LIIA8","GLOBAL",0)
InParty("imoen")
InMyArea("imoen")
!StateCheck("imoen",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#LIIA8","GLOBAL",1)~ EXTERN ~IMOEN2~ 413
  IF ~Global("X#LIIA8","GLOBAL",0)
InParty("xan")
InMyArea("xan")
!StateCheck("xan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#LIIA8","GLOBAL",1)~ EXTERN ~XANJ~ 228
  IF ~Global("X#LIIA8","GLOBAL",0)
InParty("dynaheir")
InMyArea("dynaheir")
!StateCheck("dynaheir",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#LIIA8","GLOBAL",1)~ EXTERN ~DYNAHJ~ 199
  IF ~Global("X#LIIA8","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#LIIA8","GLOBAL",1)~ EXTERN ~KIVANJ~ 362
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #2271 /* ~It would seem to be in your best interest to hunt him down, after all he has threatened all of your lives.~ */
  IF ~~ THEN REPLY #2280 /* ~We've already given you our answer.~ */ GOTO 12
  IF ~~ THEN REPLY #2281 /* ~I guess we do, yes we'll hunt him down. Our only problem will be finding the bastard.~ */ GOTO 10
  IF ~  Dead("BHEREN")
~ THEN REPLY #46506 /* ~I will hunt Sarevok down, ma'am, but seeing that I could lose my life, I plead your Grace for one favour before I go. There is some unfinished business... a trivial thing. An orphan girl, Petrine and her cat, Angel need a proper guardian. I... I killed her uncle – a mean man who mistreated her, and yet she was left with no soul in the world to protect her. 'Tis a blood debt.~ */ DO ~SetGlobal("DukeThanks","GLOBAL",1)
~ GOTO 15
END

IF ~~ THEN BEGIN 10 // from: 9.1 8.1
  SAY #2272 /* ~I'm a mage of no small skill, so I can divine the location of where Sarevok's mage took him. If you just wait a few seconds, I should have the location.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 15.0 10.0
  SAY #20590 /* ~He and his lackey have teleported themselves to the Thieves' Guild, for what purpose, I can't say. It is easy enough for me to teleport you to the same location. Just hold still, this might be somewhat disorientating.~ */
  IF ~~ THEN DO ~ClearAllActions()
StartCutSceneMode()
StartCutScene("cutliia")
~ UNSOLVED_JOURNAL #26872 /* ~Tandem in Extremis
After learning that Sarevok has teleported to the Thieves' Guild, Liia suggests I follow him there. He will never leave me in peace, so I have no choice but to confront him.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from: 9.0
  SAY #20591 /* ~Well, even if you aren't interested in hunting him down now, you probably will in the future. Just wait a moment and I'll divine his location for you.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #20592 /* ~Mmmm... he's been teleported to the Thieves' Guild, for what purpose I couldn't tell you. I must thank you again for what you have done. If in the future, you need any favors, I would be glad to help.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #26872 /* ~Tandem in Extremis
After learning that Sarevok has teleported to the Thieves' Guild, Liia suggests I follow him there. He will never leave me in peace, so I have no choice but to confront him.~ */ EXIT
END

IF ~~ THEN BEGIN 14 // from:
  SAY #46461 /* ~You would be rewarded, but it's your choice.~ */
  IF ~~ THEN DO ~Wait(10)
~ EXIT
END

IF ~~ THEN BEGIN 15 // from: 9.2 8.2
  SAY #46507 /* ~Rise, my good <PRO_LADYLORD>. You have my word that as long as I command power and authority in this city, the girl Petrine should be raised as my own... and Angel the Cat will find welcome in the palace as well. Now, do not tarry, Sarevok has to be destroyed for his crimes!~ */
  IF ~~ THEN GOTO 11
END
