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

BEGIN ~_EDWINP~

IF ~Global("KickedOut","LOCALS",1)
~ THEN BEGIN 0 // from:
  SAY #74212 /* ~It is about time you returned!  If I had waited another moment you would surely have regretted it!  Let's get moving!~ */
  IF ~~ THEN REPLY #74213 /* ~That is a bit presumptuous of you.  I have no desire to have you back just yet.~ */ GOTO 2
  IF ~~ THEN REPLY #74214 /* ~Though I do not enjoy your manner, I do have need of your talents.  Welcome back.~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #74215 /* ~Save your pleasantries.  (I will suffer their company merely because they are useful.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 2 // from: 0.0
  SAY #74216 /* ~You would cast me aside yet again?  Do not press me further!  I will wait here, but do not tarry!~ */
  IF ~~ THEN EXIT
END

IF ~HappinessLT(Myself,0)
~ THEN BEGIN 3 // from:
  SAY #74210 /* ~You would cast me out as though I were a servant?  (They will all pay for their insolence!)~ */
  IF ~~ THEN DO ~SetGlobal("IHATEYOUALL","LOCALS",0)
ChangeAIScript("",DEFAULT)
LeaveParty()
EscapeArea()
~ EXIT
END

IF ~Global("KickedOut","LOCALS",0)
~ THEN BEGIN 4 // from:
  SAY #74211 /* ~You would have me leave the group?  I agree to do so, but only as it serves my purposes for the time being.  (I will wait here, but I am not a patient man.)~ */
  IF ~  False()
~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
  IF ~  !AreaCheck("FW5100")
!AreaCheck("FW5101")
!AreaCheck("FW5102")
!AreaCheck("FW5103")
!AreaCheck("FW5401")
!AreaCheck("FW5402")
!AreaCheck("FW5403")
!AreaCheck("FW5404")
!AreaCheck("FW5405")
!AreaCheck("FW1900")
!AreaCheck("FW1901")
!AreaCheck("FW1903")
!AreaCheck("FW3900")
!AreaCheck("FW3901")
!AreaCheck("FW4500")
!AreaCheck("FW5201")
!AreaCheck("FW3500")
!AreaCheck("FW1603")
!AreaCheck("FW4501")
!AreaCheck("FW3601")
!AreaCheck("FW1401")
!AreaCheck("FW2101")
!AreaCheck("FW1801")
!AreaCheck("FW1802")
!AreaCheck("FW1803")
!AreaCheck("FW1804")
!AreaCheck("FW2615")
!AreaCheck("FW2619")
!AreaCheck("FW5506")
!AreaCheck("FW0500")
!AreaCheck("FW0501")
!AreaCheck("FW0502")
!AreaCheck("FW0503")
!AreaCheck("FW0504")
!AreaCheck("FW0505")
!AreaCheck("FW0506")
!AreaCheck("FW0507")
!AreaCheck("FW0508")
!AreaCheck("FW0509")
!AreaCheck("FW0510")
!AreaCheck("FW0511")
!AreaCheck("FW0512")
!AreaCheck("FW0513")
!AreaCheck("FW0514")
!AreaCheck("FW0515")
!AreaCheck("FW0516")
!AreaCheck("FW1002")
!AreaCheck("FW1003")
!AreaCheck("FW1008")
!AreaCheck("FW1009")
!AreaCheck("FW1500")
!AreaCheck("FW2000")
!AreaCheck("FW2012")
!AreaCheck("FW1501")
!AreaCheck("FW1502")
!AreaCheck("FW1503")
!AreaCheck("FW1504")
!AreaCheck("FW1505")
!AreaCheck("FW0400")
!AreaCheck("FW0606")
!AreaCheck("FW0607")
!AreaCheck("FW0608")
!AreaCheck("FW1113")
!AreaCheck("FW1114")
!AreaCheck("FW1201")
!AreaCheck("FW1202")
!AreaCheck("FW1207")
!AreaCheck("FW0721")
!AreaCheck("FW0611")
!AreaCheck("FW0621")
!AreaCheck("FW0123")
!AreaCheck("FW0125")
!AreaCheck("FW0126")
!AreaCheck("FW0137")
!AreaCheck("FW0138")
!AreaCheck("FW0139")
!AreaCheck("FW0140")
!AreaCheck("FW0141")
!AreaCheck("FW0142")
!AreaCheck("FW0146")
!AreaCheck("FW0161")
!AreaCheck("FW0224")
!AreaCheck("FW0225")
!AreaCheck("FW0226")
~ THEN REPLY #113668 /* ~Edwin, I do not want to part ways with you forever. Just wait for me here. I will return for you when I need your help again.~ */ GOTO 8
  IF ~  OR(84)
AreaCheck("FW5100")
AreaCheck("FW5101")
AreaCheck("FW5102")
AreaCheck("FW5103")
AreaCheck("FW5401")
AreaCheck("FW5402")
AreaCheck("FW5403")
AreaCheck("FW5404")
AreaCheck("FW5405")
AreaCheck("FW1900")
AreaCheck("FW1901")
AreaCheck("FW1903")
AreaCheck("FW3900")
AreaCheck("FW3901")
AreaCheck("FW4500")
AreaCheck("FW5201")
AreaCheck("FW3500")
AreaCheck("FW1603")
AreaCheck("FW4501")
AreaCheck("FW3601")
AreaCheck("FW1401")
AreaCheck("FW2101")
AreaCheck("FW1801")
AreaCheck("FW1802")
AreaCheck("FW1803")
AreaCheck("FW1804")
AreaCheck("FW2615")
AreaCheck("FW2619")
AreaCheck("FW5506")
AreaCheck("FW0500")
AreaCheck("FW0501")
AreaCheck("FW0502")
AreaCheck("FW0503")
AreaCheck("FW0504")
AreaCheck("FW0505")
AreaCheck("FW0506")
AreaCheck("FW0507")
AreaCheck("FW0508")
AreaCheck("FW0509")
AreaCheck("FW0510")
AreaCheck("FW0511")
AreaCheck("FW0512")
AreaCheck("FW0513")
AreaCheck("FW0514")
AreaCheck("FW0515")
AreaCheck("FW0516")
AreaCheck("FW1002")
AreaCheck("FW1003")
AreaCheck("FW1008")
AreaCheck("FW1009")
AreaCheck("FW1500")
AreaCheck("FW2000")
AreaCheck("FW2012")
AreaCheck("FW1501")
AreaCheck("FW1502")
AreaCheck("FW1503")
AreaCheck("FW1504")
AreaCheck("FW1505")
AreaCheck("FW0400")
AreaCheck("FW0606")
AreaCheck("FW0607")
AreaCheck("FW0608")
AreaCheck("FW1113")
AreaCheck("FW1114")
AreaCheck("FW1201")
AreaCheck("FW1202")
AreaCheck("FW1207")
AreaCheck("FW0721")
AreaCheck("FW0611")
AreaCheck("FW0621")
AreaCheck("FW0123")
AreaCheck("FW0125")
AreaCheck("FW0126")
AreaCheck("FW0137")
AreaCheck("FW0138")
AreaCheck("FW0139")
AreaCheck("FW0140")
AreaCheck("FW0141")
AreaCheck("FW0142")
AreaCheck("FW0146")
AreaCheck("FW0161")
AreaCheck("FW0224")
AreaCheck("FW0225")
AreaCheck("FW0226")
~ THEN REPLY #113668 /* ~Edwin, I do not want to part ways with you forever. Just wait for me here. I will return for you when I need your help again.~ */ GOTO 10
  IF ~  Global("Drawbridge","GLOBAL",1)
~ THEN REPLY #113562 /* ~Our paths have to separate right now, but they will cross again one of these days. I might seek your help again soon. Let us set up a meeting place somewhere in the city of Baldur's Gate.~ */ GOTO 12
  IF ~~ THEN REPLY #113563 /* ~Our paths have to separate right now, but they will cross again one of these days. I might seek your help again soon. Let us set up a meeting place somewhere along the Sword Coast.~ */ GOTO 11
  IF ~~ THEN REPLY #113669 /* ~On second thought, Edwin, I want you to stay with the group.~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: _DENAK:11.2
  SAY #100000 /* ~Never double-cross a Red Wizard of Thay, <CHARNAME>. Unfortunately, you will not live to enjoy the benefits of this lesson.~ */
  IF ~~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
~ EXIT
  IF ~  Global("X#EdwinReturn","GLOBAL",2)
!Dead("Edwin")
!InParty("edwin")
!StateCheck("edwin",CD_STATE_NOTVALID)
See("denak")
~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
~ GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.1 _DENAK:11.1
  SAY #100001 /* ~Have I not told you that I shall return? I was busying myself with preparing a surprise for you.~ */
  IF ~~ THEN DO ~SetGlobal("X#EdwinReturn","GLOBAL",3)
CreateCreature("_FGOLEM",[-1.-1],0)
CreateCreature("_FGOLEM",[-1.-1],0)
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 10.1 4.5
  SAY #113670 /* ~Save your pleasantries. (I suffer the company of these cretins merely because they are useful.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",0)
JoinParty()
~ EXIT
END

IF ~~ THEN BEGIN 8 // from: 4.1
  SAY #113671 /* ~Good riddance. (I am not being cast out, I... I am merely biding my time, taking a well-deserved rest away from these... from these pesky... simians! Yes! That's the right word.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 10.0
  SAY #113672 /* ~You would cast me out as though I were a servant? (They will pay for their insolence!)~ */
  IF ~~ THEN DO ~LeaveParty()
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 10 // from: 4.2
  SAY #113673 /* ~Do you take me for a complete fool, sim... er <CHARNAME>? (These monkeys could never appreciate a true genius, even if it was served to them on a silver plate with a golden spoon.) I would not stay in this disgusting cloaca, fit only for a bunch of diseased chimpanzees, not even for all the treasures of Thay. (And that is a *seriously* large pile of shiny, yellow coins, trust me on this one.)~ */
  IF ~~ THEN REPLY #113571 /* ~Farewell then.~ */ GOTO 9
  IF ~~ THEN REPLY #113572 /* ~On second thought, I want you to stay with the group.~ */ GOTO 7
  IF ~  OR(59)
AreaCheck("FW5100")
AreaCheck("FW5101")
AreaCheck("FW5102")
AreaCheck("FW5103")
AreaCheck("FW5401")
AreaCheck("FW5402")
AreaCheck("FW5403")
AreaCheck("FW5404")
AreaCheck("FW5405")
AreaCheck("FW1900")
AreaCheck("FW1901")
AreaCheck("FW1903")
AreaCheck("FW3900")
AreaCheck("FW3901")
AreaCheck("FW4500")
AreaCheck("FW5201")
AreaCheck("FW3500")
AreaCheck("FW1603")
AreaCheck("FW4501")
AreaCheck("FW3601")
AreaCheck("FW1401")
AreaCheck("FW2101")
AreaCheck("FW1801")
AreaCheck("FW1802")
AreaCheck("FW1803")
AreaCheck("FW1804")
AreaCheck("FW2615")
AreaCheck("FW2619")
AreaCheck("FW5506")
AreaCheck("FW0500")
AreaCheck("FW0501")
AreaCheck("FW0502")
AreaCheck("FW0503")
AreaCheck("FW0504")
AreaCheck("FW0505")
AreaCheck("FW0506")
AreaCheck("FW0507")
AreaCheck("FW0508")
AreaCheck("FW0509")
AreaCheck("FW0510")
AreaCheck("FW0511")
AreaCheck("FW0512")
AreaCheck("FW0513")
AreaCheck("FW0514")
AreaCheck("FW0515")
AreaCheck("FW0516")
AreaCheck("FW1002")
AreaCheck("FW1003")
AreaCheck("FW1008")
AreaCheck("FW1009")
AreaCheck("FW1500")
AreaCheck("FW2000")
AreaCheck("FW2012")
AreaCheck("FW1501")
AreaCheck("FW1502")
AreaCheck("FW1503")
AreaCheck("FW1504")
AreaCheck("FW1505")
AreaCheck("FW0400")
~ THEN REPLY #113573 /* ~Oh, I trust in your outstanding skills of survival. When you are out of here, go to the safe haven of your choice and wait for me there.~ */ GOTO 11
  IF ~  OR(25)
AreaCheck("FW0606")
AreaCheck("FW0607")
AreaCheck("FW0608")
AreaCheck("FW1113")
AreaCheck("FW1114")
AreaCheck("FW1201")
AreaCheck("FW1202")
AreaCheck("FW1207")
AreaCheck("FW0721")
AreaCheck("FW0611")
AreaCheck("FW0621")
AreaCheck("FW0123")
AreaCheck("FW0125")
AreaCheck("FW0126")
AreaCheck("FW0137")
AreaCheck("FW0138")
AreaCheck("FW0139")
AreaCheck("FW0140")
AreaCheck("FW0141")
AreaCheck("FW0142")
AreaCheck("FW0146")
AreaCheck("FW0161")
AreaCheck("FW0224")
AreaCheck("FW0225")
AreaCheck("FW0226")
~ THEN REPLY #113573 /* ~Oh, I trust in your outstanding skills of survival. When you are out of here, go to the safe haven of your choice and wait for me there.~ */ GOTO 12
END

IF ~~ THEN BEGIN 11 // from: 10.2 4.4
  SAY #113674 /* ~Nashkel's Belching Dragon is a nauseous, filthy pigsty. But it will have to do. See if you can find your way down there, before I grow bored of waiting. (Let's see how quickly they will discover my irreplaceability. I bet they will run all the way down to Nashkel.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
EscapeAreaMove("FW4809",144,289,0)
~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 10.3 4.3
  SAY #113675 /* ~There are yet some sumptuous places in the squalid collection of hovels that they call Baldur's Gate. The Low Lantern is a splendid Hell disguised as a boat. Seek me out there when you grow bored of your petty pursuits. (Not that these simians would appreciate true splendor if it came up to them and bit them.)~ */
  IF ~~ THEN DO ~SetGlobal("KickedOut","LOCALS",1)
EscapeAreaMove("FW0133",564,474,8)
~ EXIT
END
