// creator  : weidu.exe (version 23100)
// argument : NALIAP.DLG
// game		 : .
// source	 : ./override/NALIAP.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

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

IF WEIGHT #5 /* Triggers after states #: 5 7 10 12 18 even though they appear after this state */
~!Dead("Torgal")
Global("EnteredAR1300","GLOBAL",0)
Global("KickedOut","LOCALS",0)
~ THEN BEGIN 0 // from:
  SAY #24360 /* ~What? But I just joined... oh, very well. I can't wait around for you though. I have to go to my family's land and help them. If you still want to help then that's where you should go. I'll meet you there and we can plan the attack.~ [NALIA97] */
  IF ~~ THEN REPLY #24363 /* ~I will meet you there later. I still want to help, but I have things I must do first.~ */ UNSOLVED_JOURNAL #10073 /* ~The de'Arnise Keep has been invaded.

Nalia has left the party to go to her family's keep.  She asked me to go there to meet her, if I could, but she could wait no longer.~ */ GOTO 1
  IF ~~ THEN REPLY #24364 /* ~I have no intention of helping you. Get someone else.~ */ GOTO 2
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #24366 /* ~Please hurry. I can't do much on my own.~ */
  IF ~~ THEN DO ~SetDialog("Nalia")
SetGlobal("NaliaMove","GLOBAL",1)
EscapeAreaMove("AR1300",748,3227,14)
~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 3.1 0.1
  SAY #24368 /* ~What?!  That's what I get for helping people?  If you walk by a burning keep in your travels remember what you did here today!  Good bye!~ */
  IF ~~ THEN DO ~SetGlobal("NaliaMove","GLOBAL",3)
SetGlobal("SPRITE_IS_DEADNalia","GLOBAL",1)
EscapeArea()
~ UNSOLVED_JOURNAL #6549 /* ~The de'Arnise Keep has been invaded.

After telling Nalia I could not help her with her family's keep, she stormed off to deal with the problem on her own.  I doubt that she'll be back anytime soon.~ */ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 5 7 10 12 18 even though they appear after this state */
~Global("EnteredAR1300","LOCALS",1)
Global("KickedOut","LOCALS",0)
~ THEN BEGIN 3 // from:
  SAY #24375 /* ~But... but we've been together such a short while. Please, do you still intend to help me defend my family's keep?~ [NALIA93] */
  IF ~~ THEN REPLY #24402 /* ~Yes, but I don't want you in the group while I do it.~ */ GOTO 4
  IF ~~ THEN REPLY #24403 /* ~No, I have changed my mind about helping you.~ */ GOTO 2
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #24405 /* ~Then I will be at the palisade.  Please be careful.  Try to find Daleson through the secret door north of the palisade, along the base of the keep wall.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
SetDialog("Nalia")
SetGlobal("NaliaMove","GLOBAL",1)
EscapeAreaMove("AR1300",748,3227,14)
~ UNSOLVED_JOURNAL #16542 /* ~The de'Arnise Keep has been invaded.

Nalia has gone back to the palisade to wait for my news of Daleson.  The servant is likely the best way to find out what has happened to her family without alerting the trolls to my presence.~ */ EXIT
END

IF WEIGHT #1 /* Triggers after states #: 18 even though they appear after this state */
~Global("KickedOut","LOCALS",0)
HappinessLT(Myself,-299)
~ THEN BEGIN 5 // from: 16.2
  SAY #23428 /* ~I... I don't think this group is doing as much good as it could, and I doubt I would rejoin if asked. I... I don't think I'll be seeing you again.~ [NALIA98] */
  IF ~~ THEN DO ~EscapeArea()
~ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 7 10 12 18 even though they appear after this state */
~Global("KickedOut","LOCALS",0)
~ THEN BEGIN 6 // from:
  SAY #23430 /* ~Shall we continue on, or has this ended our travels?~ [NALIA99] */
  IF ~~ THEN REPLY #48537 /* ~Perhaps we should go our separate ways.~ */ GOTO 17
  IF ~~ THEN REPLY #48535 /* ~We go on as before. Let's go.~ */ DO ~JoinParty()
~ EXIT
END

IF WEIGHT #2 /* Triggers after states #: 18 even though they appear after this state */
~Global("KickedOut","LOCALS",1)
~ THEN BEGIN 7 // from:
  SAY #23646 /* ~It is good to see you again. I had hoped you'd return. There's little here for me. Do you... do you still need another party member?~ [NALIA94] */
  IF ~~ THEN REPLY #23649 /* ~Yes.~ */ GOTO 8
  IF ~~ THEN REPLY #23650 /* ~No.~ */ GOTO 9
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #23651 /* ~Good.  Not another word, then.~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 7.1
  SAY #23652 /* ~I'll be waiting here until you change your minds.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 18 even though they appear after this state */
~!Dead("Torgal")
Global("EnteredAR1300","GLOBAL",3)
Global("KickedOut","LOCALS",0)
~ THEN BEGIN 10 // from:
  SAY #39763 /* ~If that is what you wish... it will be safer than waiting here. I will wait outside by the palisade.~ [NALIA95] */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
SetDialog("Nalia")
SetGlobal("NaliaMove","GLOBAL",1)
EscapeAreaMove("AR1300",748,3227,14)
~ EXIT
END

IF ~~ THEN BEGIN 11 // from: ISAEA:18.0
  SAY #46219 /* ~Don't whine, Isaea. It makes you seem even less of a man.~ */
  IF ~~ THEN EXTERN ~ISAEA~ 19
END

IF WEIGHT #4 /* Triggers after states #: 18 even though they appear after this state */
~Global("RoenalConvict","GLOBAL",1)~ THEN BEGIN 12 // from:
  SAY #46221 /* ~Thank you for your help. You have helped me again, and I am grateful.~ [NALIA96] */
  IF ~~ THEN REPLY #46222 /* ~Think nothing of it.~ */ GOTO 13
  IF ~~ THEN REPLY #46223 /* ~It's getting a little tedious helping you, actually.~ */ GOTO 13
  IF ~~ THEN REPLY #46224 /* ~Yes, yes, can we go now?~ */ GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.2 12.1 12.0
  SAY #46225 /* ~I will try to be less of a burden on the group in future. I... I trust you still want my company in the party?~ */
  IF ~~ THEN REPLY #46226 /* ~Yes, join and we shall be on our way again.~ */ DO ~EraseJournalEntry(5811)
EraseJournalEntry(5831)
EraseJournalEntry(6538)
EraseJournalEntry(7036)
EraseJournalEntry(9703)
EraseJournalEntry(14924)
EraseJournalEntry(16028)
EraseJournalEntry(23547)~ SOLVED_JOURNAL #11880 /* ~Nalia Abducted By Isaea Roenall

I brought all the evidence I had collected on Isaea Roenall's corruption to his commander's attention, warranting both Nalia's release and an investigation into the arrogant noble's dealings.  I wonder if I will hear of the result... he certainly deserves whatever he gets.~ */ GOTO 14
  IF ~~ THEN REPLY #46227 /* ~No, I've decided I don't need you right now.~ */ DO ~EraseJournalEntry(5811)
EraseJournalEntry(5831)
EraseJournalEntry(6538)
EraseJournalEntry(7036)
EraseJournalEntry(9703)
EraseJournalEntry(14924)
EraseJournalEntry(16028)
EraseJournalEntry(23547)~ SOLVED_JOURNAL #11880 /* ~Nalia Abducted By Isaea Roenall

I brought all the evidence I had collected on Isaea Roenall's corruption to his commander's attention, warranting both Nalia's release and an investigation into the arrogant noble's dealings.  I wonder if I will hear of the result... he certainly deserves whatever he gets.~ */ GOTO 15
END

IF ~~ THEN BEGIN 14 // from: 16.0 13.0
  SAY #46228 /* ~Thank you, <CHARNAME>, I needed to feel welcome.~ */
  IF ~~ THEN DO ~JoinParty()~ EXIT
END

IF ~~ THEN BEGIN 15 // from: 13.1
  SAY #46229 /* ~Very well. I will remain here until you have changed your mind.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 16 // from:
  SAY #48261 /* ~Shall we continue on, or has this ended our travels?~ */
  IF ~~ THEN REPLY #48262 /* ~We go on as before. Let's go.~ */ GOTO 14
  IF ~!HappinessLT(Myself,0)~ THEN REPLY #48263 /* ~It's time we went our separate ways.~ */ GOTO 17
  IF ~HappinessLT(Myself,0)~ THEN REPLY #48264 /* ~It's time we went our separate ways.~ */ GOTO 5
END

IF ~~ THEN BEGIN 17 // from: 16.1 6.0
  SAY #49744 /* ~Where should we meet if you were to change your mind?~ */
  IF ~!AreaCheck("AR0602")
!AreaCheck("AR0603")
!AreaCheck("AR0410")
!AreaCheck("AR0411")
!AreaCheck("AR0412")
!AreaCheck("AR0413")
!AreaCheck("AR0414")
!AreaCheck("AR1512")
!AreaCheck("AR1513")
!AreaCheck("AR1514")
!AreaCheck("AR1515")
!AreaCheck("AR1516")
!AreaCheck("AR1501")
!AreaCheck("AR1502")
!AreaCheck("AR1503")
!AreaCheck("AR1504")
!AreaCheck("AR1505")
!AreaCheck("AR1506")
!AreaCheck("AR1507")
!AreaCheck("AR1508")
!AreaCheck("AR1509")
!AreaCheck("AR1510")
!AreaCheck("AR1511")
!AreaCheck("AR2100")
!AreaCheck("AR2101")
!AreaCheck("AR2102")
!AreaCheck("AR2200")
!AreaCheck("AR2202")
!AreaCheck("AR2203")
!AreaCheck("AR2204")
!AreaCheck("AR2205")
!AreaCheck("AR2206")
!AreaCheck("AR2207")
!AreaCheck("AR2208")
!AreaCheck("AR2209")
!AreaCheck("AR2210")
!AreaCheck("AR2300")
!AreaCheck("AR2400")
!AreaCheck("AR2401")
!AreaCheck("AR2402")
!AreaCheck("AR2900")
!AreaCheck("AR2901")
!AreaCheck("AR2902")
!AreaCheck("AR2903")
!AreaCheck("AR2904")
!AreaCheck("AR2905")
!AreaCheck("AR2906")
~ THEN REPLY #49745 /* ~Meet us at the Copper Coronet.~ */ DO ~SetGlobal("KickedOut","LOCALS",1)
MoveGlobal("AR0406","Nalia",[658.1462])
~ EXIT
  IF ~!AreaCheck("AR0301")
!AreaCheck("AR0302")
!AreaCheck("AR0303")
!AreaCheck("AR0304")
!AreaCheck("AR0305")
!AreaCheck("AR0306")
!AreaCheck("AR0307")
!AreaCheck("AR0509")
!AreaCheck("AR0510")
!AreaCheck("AR0511")
!AreaCheck("AR1102")
!AreaCheck("AR1107")
!AreaCheck("AR0801")
!AreaCheck("AR0803")
!AreaCheck("AR1300")
!AreaCheck("AR1301")
!AreaCheck("AR1302")
!AreaCheck("AR1303")
!AreaCheck("AR0604")
!AreaCheck("AR0605")
!AreaCheck("AR0606")
!InWatchersKeep()
~ THEN REPLY #49746 /* ~Just wait right here and we'll come back for you later.~ */ DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF WEIGHT #0 ~Global("NaliaWentToFuneral","GLOBAL",1)
Global("KickedOut","LOCALS",0)~ THEN BEGIN 18 // from:
  SAY #60924 /* ~Hello, <GABBER>.  It is... good to see you again.  (sigh)  The funeral was... was just horrible!~ */
  IF ~~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #60941 /* ~Isaea Roenall was there... the boy my father engaged me to.  He seems determined to press the engagement, even though I refuse to have anything to do with him.~ */
  IF ~~ THEN GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #60942 /* ~Isaea has... connections... being an important member of the guard.  I think he believes I've threatened his reputation and he might do something drastic!  This is terrible!~ */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #60943 /* ~Can I travel with you again?  I would feel safer... and there's nothing left around here for me, anyway.  What do you think?~ */
  IF ~~ THEN REPLY #60944 /* ~Certainly, come along.~ */ GOTO 22
  IF ~~ THEN REPLY #60945 /* ~Sorry, Nalia... you'll have to find your own way, for now.~ */ GOTO 23
  IF ~~ THEN REPLY #60946 /* ~Forget it!  If it isn't one thing with you, it's another, and I'll not be bothered!~ */ GOTO 24
END

IF ~~ THEN BEGIN 22 // from: 21.0
  SAY #60947 /* ~That's a relief.  Let's get out of here, then... the farther I am from the Roenalls the happier I'll be!~ */
  IF ~~ THEN DO ~SetGlobal("NaliaWentToFuneral","GLOBAL",2)
SetGlobalTimer("IsaeaArrestTimer","GLOBAL",ONE_DAY)
JoinParty()~ EXIT
END

IF ~~ THEN BEGIN 23 // from: 21.1
  SAY #60948 /* ~(sigh)  I suppose you're right.  I doubt I'll be going far from here, though, anytime soon.  I don't think Isaea will look for me in the slums.  Maybe we'll meet again?~ */
  IF ~~ THEN DO ~SetGlobal("NaliaWentToFuneral","GLOBAL",2)
SetGlobalTimer("IsaeaArrestTimer","GLOBAL",ONE_DAY)
SetGlobal("KickedOut","LOCALS",1)~ EXIT
END

IF ~~ THEN BEGIN 24 // from: 21.2
  SAY #60951 /* ~Well, I'm not about to wait around and see what the Roenalls have in store for me.  Have it your way, then... if I'm lucky, we won't meet again!~ */
  IF ~~ THEN DO ~EscapeArea()~ EXIT
END
