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

BEGIN ~PPDOOR~ 1 // non-zero flags may indicate non-pausing dialogue

IF ~Global("PirateOpen","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #44010 /* ~Go away. The Pirate Lord sees no one without appointment.~ */
  IF ~Global("SavedClaire","GLOBAL",2)~ THEN REPLY #44011 /* ~I have urgent business to discuss with him. Captain Golin referred me.~ */ GOTO 7
  IF ~Global("SpokeSaemon","GLOBAL",1)~ THEN REPLY #44012 /* ~Saemon Havarian said I might find what I need here.~ */ GOTO 8
  IF ~~ THEN REPLY #44013 /* ~How does one get an appointment?~ */ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.2
  SAY #44014 /* ~'One' gets an appointment by being worthy of it! Ain't just anyone that can get in here! Gotta be referred here by someone he knows.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #44015 /* ~Unless...~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #44016 /* ~Unless you care to pad my palm. I might be able to get you in. Maybe. Possibly. What say you?~ */
  IF ~~ THEN REPLY #44017 /* ~And how much would this cost?~ */ GOTO 4
  IF ~~ THEN REPLY #44018 /* ~Is there no one here that speaks for free? What is YOUR damnable price?~ */ GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.1 3.0
  SAY #44019 /* ~Uh... ok... how about 300? You willing to pay that?~ */
  IF ~Global("SpokeSanik","GLOBAL",2)~ THEN REPLY #44020 /* ~But I have urgent business to discuss with him. Captain Golin referred me.~ */ GOTO 7
  IF ~Global("SpokeSaemon","GLOBAL",1)~ THEN REPLY #44021 /* ~But Saemon Havarian said I might find what I need here.~ */ GOTO 8
  IF ~PartyGoldGT(299)~ THEN REPLY #44022 /* ~All right, I'll pay the stupid price. Just get the door open.~ */ DO ~TakePartyGold(300)~ GOTO 6
  IF ~PartyGoldLT(300)~ THEN REPLY #44023 /* ~I cannot afford that.~ */ GOTO 5
  IF ~~ THEN REPLY #44024 /* ~And what if I don't pay? What then?~ */ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.4 4.3
  SAY #44025 /* ~Well, I guess you don't get in. You push it and I'll have to make you sorry. That's kinda my job as the door guard. Get lost.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: 4.2
  SAY #44026 /* ~What? Hey, sure, you bet. Usually people just go find someone to name-drop, but if you want to pay, go right in. Just made my wage for the season!~ */
  IF ~~ THEN DO ~Unlock("PirateDoor")
OpenDoor("PirateDoor")
SetGlobal("PirateOpen","GLOBAL",1)
SetGlobal("AsylumPlot","GLOBAL",10)~ UNSOLVED_JOURNAL #11681 /* ~Getting Inside the Asylum

I found where the 'Pirate King', Desharik, is... and bribed a guard to allow me entrance to his office.~ */ EXIT
END

IF ~~ THEN BEGIN 7 // from: 4.0 0.0
  SAY #44027 /* ~Golin. He's in good stead. You musta impressed him, or paid him well. All right, you can go in, but don't make trouble or out you go.~ */
  IF ~~ THEN DO ~Unlock("PirateDoor")
OpenDoor("PirateDoor")
SetGlobal("PirateOpen","GLOBAL",3)
SetGlobal("AsylumPlot","GLOBAL",10)~ UNSOLVED_JOURNAL #19364 /* ~Getting Inside the Asylum

I found where the so-called 'Pirate Lord', Desharik, is staying... and managed to get inside by mentioning Golin's name.  It appears the Captain is respected, here.~ */ EXIT
END

IF ~~ THEN BEGIN 8 // from: 4.1 0.1
  SAY #44028 /* ~Saemon? Saemon Havarian? Uh, all right, you can go in, if you really want to.~ */
  IF ~~ THEN DO ~Unlock("PirateDoor")
OpenDoor("PirateDoor")
SetGlobal("PirateOpen","GLOBAL",2)
SetGlobal("AsylumPlot","GLOBAL",10)~ UNSOLVED_JOURNAL #15715 /* ~Getting Inside the Asylum

I found where the 'Pirate King', Desharik, is... and managed to get by the guard by mentioning Saemon Havarian's name.  Saemon mentioned not being popular in these parts... I hope this isn't a mistake.~ */ EXIT
END

IF ~Global("PirateOpen","GLOBAL",1)~ THEN BEGIN 9 // from:
  SAY #44029 /* ~You're okay by me, friend. Go where you want.~ */
  IF ~~ THEN EXIT
END

IF ~Global("PirateOpen","GLOBAL",2)~ THEN BEGIN 10 // from:
  SAY #44030 /* ~You can go in, but I don't know why you would. Ain't smart claiming friendship with Saemon Havarian.~ */
  IF ~~ THEN EXIT
END

IF ~Global("PirateOpen","GLOBAL",3)~ THEN BEGIN 11 // from:
  SAY #44031 /* ~Golin is a good one. If he said you could come through here, chances are you will be of interest to Desharik.~ */
  IF ~~ THEN EXIT
END
