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

BEGIN ~PPDESH~

IF ~Global("AsylumPlot","GLOBAL",10)
Global("PirateRefused","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #44032 /* ~What is the meaning of this intrusion? Who are you?~ [DESHAR02] */
  IF ~Global("PirateOpen","GLOBAL",1)~ THEN REPLY #44033 /* ~I am <CHARNAME>. I paid your door guard for a meeting with you.~ */ GOTO 1
  IF ~Global("PirateOpen","GLOBAL",2)~ THEN REPLY #44034 /* ~I am <CHARNAME>. Saemon Havarian suggested I speak with you.~ */ GOTO 2
  IF ~Global("PirateOpen","GLOBAL",3)~ THEN REPLY #44035 /* ~<CHARNAME> is my name. I was referred by Captain Golin.~ */ GOTO 4
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #44036 /* ~I see. He's a shrewd one then, as I usually see any who are referred by someone I know. Well, you are here. What is it that you want?~ */
  IF ~~ THEN REPLY #44046 /* ~I must be sent to Spellhold! I cannot be allowed to run loose!~ */ GOTO 5
  IF ~~ THEN REPLY #44047 /* ~I require entry to the asylum. Could you help?~ */ GOTO 5
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #44037 /* ~Saemon... Havarian... That name is not one that I am fond of. A scoundrel of the lowest order, I should think.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #44038 /* ~Tell me, why should I not have you killed where you stand? It is the fate in store of Saemon. What do you want here?~ */
  IF ~~ THEN REPLY #44040 /* ~No! No, you don't want to kill me. You want... to send me to Spellhold!~ */ GOTO 5
  IF ~~ THEN REPLY #44043 /* ~I need to gain entrance to the asylum. Can you help me?~ */ GOTO 5
END

IF ~~ THEN BEGIN 4 // from: 0.2
  SAY #44042 /* ~Golin? Why would he send you to me? What is it that you think you want here?~ */
  IF ~~ THEN REPLY #44044 /* ~I need you to send me to Spellhold! I must be sent there!~ */ GOTO 5
  IF ~~ THEN REPLY #44045 /* ~I seek entry to the asylum. Can you help with this?~ */ GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.1 4.0 3.1 3.0 1.1 1.0
  SAY #44048 /* ~Spellhold? Why would you want to go there? Hardly a sociable place for decent folk.~ */
  IF ~~ THEN REPLY #44049 /* ~I seek a friend that is trapped there. Please help me to release her.~ */ GOTO 6
  IF ~~ THEN REPLY #44050 /* ~All you need to know is that I wish to go there. I will pay for your help.~ */ GOTO 8
  IF ~~ THEN REPLY #44051 /* ~A friend is there. I would storm the place and kill her captors!~ */ GOTO 6
  IF ~~ THEN REPLY #44052 /* ~I... I need to be admitted. I need... I need help. I need to be confined.~ */ GOTO 10
END

IF ~~ THEN BEGIN 6 // from: 19.1 12.0 9.2 8.0 5.2 5.0
  SAY #44053 /* ~I have a nice relationship with those that run the asylum. They provide a great deal of protection for this port and the ships that dock here.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #44054 /* ~I have no interest in angering them, and no interest in releasing people that may well belong there. Your pleas are worthless to me. Leave me.~ */
  IF ~!IsValidForPartyDialogue("YOSHIMO")~ THEN REPLY #44055 /* ~Fine! Do not help! Have me committed instead! I will go mad if I cannot get in!~ */ GOTO 11
  IF ~!IsValidForPartyDialogue("YOSHIMO")~ THEN REPLY #44056 /* ~I will pay for your assistance.~ */ GOTO 11
  IF ~!IsValidForPartyDialogue("YOSHIMO")~ THEN REPLY #44057 /* ~Do not make me stoop to threats. Help me.~ */ GOTO 11
  IF ~IsValidForPartyDialogue("YOSHIMO")~ THEN EXTERN ~YOSHJ~ 121
END

IF ~~ THEN BEGIN 8 // from: 9.1 5.1
  SAY #44058 /* ~I have no interest in your gold. The security of my position on this island is worth more in the long run. No, helping you holds no benefit.~ */
  IF ~~ THEN REPLY #44063 /* ~Please, I seek to release a friend of mine.~ */ GOTO 6
  IF ~~ THEN REPLY #44064 /* ~If you will not help then have me committed! I will go mad if I get no help!~ */ GOTO 10
  IF ~~ THEN REPLY #44068 /* ~Do not make me stoop to threats. Help me.~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.2
  SAY #44059 /* ~You will not have to stoop if I remove your legs. Do not attack when you are not in the better tactical position. My guards are all around us.~ */
  IF ~~ THEN REPLY #44060 /* ~Then have me committed! I would have to be insane to threaten you!~ */ GOTO 10
  IF ~~ THEN REPLY #44061 /* ~Please, I will pay for your help.~ */ GOTO 8
  IF ~~ THEN REPLY #44069 /* ~I seek the release of a friend of mine. She must be free of the place.~ */ GOTO 6
END

IF ~~ THEN BEGIN 10 // from: 9.0 8.1 5.3
  SAY #44065 /* ~You wish me to have you thrown into the asylum? That is certainly an odd request, though not in itself an indication of madness.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 11 // from: 7.2 7.1 7.0
  SAY #44067 /* ~You seek to release a patient, so you are a threat to my allies in Spellhold. I will not allow it, and I will tell the Cowled Wizards of your intention.  Get out.~ */
  IF ~~ THEN DO ~EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
SetGlobal("PirateRefused","GLOBAL",1)
EscapeArea()
~ UNSOLVED_JOURNAL #9982 /* ~Getting Inside the Asylum

It seems that Desharik has a very good relationship with the wizards of the asylum, and now that he knows I plan on rescuing a patient there is no way he will allow me to enter.  More than that, he has gone off to warn the wizards of my intentions.  I will have to find another way in, if it is not already too late.~ */ EXIT
END

IF ~~ THEN BEGIN 12 // from: 10.0
  SAY #44070 /* ~What are you trying to accomplish? I can indeed have people committed to Spellhold, but why would you request it?~ */
  IF ~~ THEN REPLY #44072 /* ~Because I have a friend that is held there. I must get in to rescue her.~ */ GOTO 6
  IF ~IsValidForPartyDialog("Minsc")~ THEN REPLY #44073 /* ~I am clearly deranged. Look who I travel with! Minsc, meet the Pirate Lord!~ */ EXTERN ~MINSCJ~ 88
  IF ~~ THEN REPLY #44074 /* ~Because I must be confined. I can feel myself losing my grip on reality.~ */ GOTO 19
END

IF ~Global("PirateRefused","GLOBAL",1)~ THEN BEGIN 13 // from:
  SAY #44071 /* ~You are clearly a threat to those that run the asylum, and as such are a danger to my security. Leave this island before I have you removed. This ultimatum is the only charity you will receive from me.~ [DESHAR07] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 14 // from:
  SAY #44076 /* ~Er, why is your friend pointing a hamster at me?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 89
END

IF ~~ THEN BEGIN 15 // from:
  SAY #44078 /* ~My... what?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 90
END

IF ~~ THEN BEGIN 16 // from:
  SAY #44080 /* ~A parrot?~ */
  IF ~~ THEN EXTERN ~MINSCJ~ 91
END

IF ~~ THEN BEGIN 17 // from:
  SAY #44082 /* ~I've seen enough. Congratulations, you are on your way to Spellhold. You are clearly a danger to the general community.~ */
  IF ~~ THEN GOTO 18
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #44083 /* ~By the gods, I think I'm stupider for talking to you. Stupider? More stupid? Get them out of my sight, all of them. They may all have his disease of the mind.~ */
  IF ~~ THEN DO ~EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
EraseJournalEntry(3362)
EraseJournalEntry(9982)
EraseJournalEntry(11681)
EraseJournalEntry(11686)
EraseJournalEntry(11884)
EraseJournalEntry(15783)
EraseJournalEntry(15794)
EraseJournalEntry(16541)
EraseJournalEntry(16677)
EraseJournalEntry(23512)
EraseJournalEntry(5059)
EraseJournalEntry(6934)
EraseJournalEntry(7235)
EraseJournalEntry(10106)
EraseJournalEntry(10107)
EraseJournalEntry(10670)
EraseJournalEntry(10671)
EraseJournalEntry(10933)
EraseJournalEntry(11689)
EraseJournalEntry(11755)
EraseJournalEntry(11904)
EraseJournalEntry(15698)
EraseJournalEntry(15703)
EraseJournalEntry(15801)
EraseJournalEntry(16558)
EraseJournalEntry(20367)
EraseJournalEntry(23504)
EraseJournalEntry(23530)
EraseJournalEntry(11661)
AddXPObject(Player1,38500)
AddXPObject(Player2,38500)
AddXPObject(Player3,38500)
AddXPObject(Player4,38500)
AddXPObject(Player5,38500)
AddXPObject(Player6,38500)
SetGlobal("PirateAsylum","GLOBAL",11)
SetGlobal("AsylumPlot","GLOBAL",11)
StartCutSceneMode()
StartCutScene("Cut41f")
~ SOLVED_JOURNAL #11645 /* ~Getting Inside the Asylum

It was easy to convince Desharik that I was crazy.  Between Minsc and his hamster, Desharik was all too willing to have me thrown in the asylum.  I am to be admitted forthwith, and then I shall find out what has happened to Imoen and Irenicus both!~ */ EXIT
END

IF ~~ THEN BEGIN 19 // from: 12.2
  SAY #44084 /* ~And this makes you a threat to yourself? I know a great deal of people that do not know their arse from a hole in the ground. They function reasonably well.~ */
  IF ~~ THEN REPLY #44085 /* ~I have delusions! I dream of godhood, that my father was a deity!~ */ GOTO 20
  IF ~~ THEN REPLY #44086 /* ~Look, I'll level with you. A friend of mine is being held there. Please help me.~ */ GOTO 6
  IF ~IsValidForPartyDialog("Minsc")~ THEN REPLY #44087 /* ~But look at the company I keep! Minsc! Meet the Pirate Lord!~ */ EXTERN ~MINSCJ~ 88
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #44088 /* ~Do you now? I am no student of the mind, but perhaps these are just your wishes to become more than you are?~ */
  IF ~!IsValidForPartyDialogue("YOSHIMO")~ THEN REPLY #44089 /* ~I feel as though I am in a fight for myself! Like I must battle my own thoughts!~ */ GOTO 21
  IF ~IsValidForPartyDialog("Minsc")~ THEN REPLY #44090 /* ~Minsc! Tell the Pirate Lord how much I should be in the asylum!~ */ EXTERN ~MINSCJ~ 88
  IF ~~ THEN REPLY #44091 /* ~I wish to be nothing! I am mad, I tell you! Mad! Send me to the blasted asylum!~ */ GOTO 22
  IF ~IsValidForPartyDialogue("YOSHIMO")~ THEN REPLY #58829 /* ~I feel as though I am in a fight for myself! Like I must battle my own thoughts!~ */ EXTERN ~YOSHJ~ 128
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #44092 /* ~Well now, that would seem alarming. You certainly seem convinced of this.~ */
  IF ~CheckStatGT(LastTalkedToBy,15,CHR)~ THEN REPLY #44095 /* ~Convinced? I am lost within it! I am the child of a god and I will destroy you all!~ */ GOTO 24
  IF ~CheckStatLT(LastTalkedToBy,16,CHR)~ THEN REPLY #44096 /* ~Convinced? I am lost within it! I am the child of a god and I will destroy you all!~ */ GOTO 22
  IF ~IsValidForPartyDialog("Minsc")~ THEN REPLY #44097 /* ~Convinced? Minsc, tell the Pirate Lord how convinced I am!~ */ EXTERN ~MINSCJ~ 88
END

IF ~~ THEN BEGIN 22 // from: 21.1 20.2
  SAY #44093 /* ~No, I'm not believing this. You are raving, but it seems calculated to me. Likely you bear a grudge against the asylum and seek entry to wreak havoc.~ */
  IF ~!IsValidForPartyDialogue("YOSHIMO)~ THEN GOTO 23
  IF ~IsValidForPartyDialogue("YOSHIMO)~ THEN EXTERN ~YOSHJ~ 121
END

IF ~~ THEN BEGIN 23 // from: 22.0
  SAY #44094 /* ~You lack the presence to promote your lies. Pathetic, but an amusing tale to tell my woman.  I'm leaving, but my men will be watching to make sure you stay in line.~ */
  IF ~~ THEN DO ~SetGlobal("PirateRefused","GLOBAL",1)
EscapeArea()
EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)~ UNSOLVED_JOURNAL #23512 /* ~Getting Inside the Asylum

Apparently, I was not able to pull off a convincing enough performance of insanity so that Desharik would put me in the asylum.  He grew suspicious of me and refused.  I will have to find another way to gain entrance now, it seems.~ */ EXIT
END

IF ~~ THEN BEGIN 24 // from: 21.0
  SAY #44098 /* ~Your raving would seem forced coming from a less charismatic person, but you certainly seem genuinely distraught. All right then, I shall do as you ask.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #44099 /* ~You will not be grateful for long, however. I would not call Spellhold an adequate place for healing. Still, if it is your wish.~ */
  IF ~~ THEN REPLY #44100 /* ~It is! It is!~ */ GOTO 26
  IF ~~ THEN REPLY #44101 /* ~Actually, perhaps I should think about this.~ */ GOTO 27
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #44102 /* ~Then that is where you will go, along with any that traveled with you in case they share your sickness. May the gods protect you, because no one else will.~ */
  IF ~~ THEN DO ~EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
EraseJournalEntry(3362)
EraseJournalEntry(9982)
EraseJournalEntry(11681)
EraseJournalEntry(11686)
EraseJournalEntry(11884)
EraseJournalEntry(15783)
EraseJournalEntry(15794)
EraseJournalEntry(16541)
EraseJournalEntry(16677)
EraseJournalEntry(23512)
EraseJournalEntry(5059)
EraseJournalEntry(6934)
EraseJournalEntry(7235)
EraseJournalEntry(10106)
EraseJournalEntry(10107)
EraseJournalEntry(10670)
EraseJournalEntry(10671)
EraseJournalEntry(10933)
EraseJournalEntry(11689)
EraseJournalEntry(11755)
EraseJournalEntry(11904)
EraseJournalEntry(15698)
EraseJournalEntry(15703)
EraseJournalEntry(15801)
EraseJournalEntry(16558)
EraseJournalEntry(20367)
EraseJournalEntry(23504)
EraseJournalEntry(23530)
EraseJournalEntry(11661)
EraseJournalEntry(19364)
AddXPObject(Player1,38500)
AddXPObject(Player2,38500)
AddXPObject(Player3,38500)
AddXPObject(Player4,38500)
AddXPObject(Player5,38500)
AddXPObject(Player6,38500)
SetGlobal("AsylumPlot","GLOBAL",11)
SetGlobal("PPdeshSend","GLOBAL",1)
StartCutSceneMode()
StartCutScene("Cut41f")
~ SOLVED_JOURNAL #23521 /* ~Getting Inside the Asylum

Charisma alone was apparently enough to make my performance of insanity convincing, and Pirate Lord Desharik agreed to have me committed.  I am to be admitted forthwith. Now to find out what has happened to Imoen and Irenicus!~ */ EXIT
END

IF ~~ THEN BEGIN 27 // from: 25.1
  SAY #44103 /* ~Think about it? A moment ago you were raving and desperate; now you wish to think? I believe you are trying to trick me.~ */
  IF ~!IsValidForPartyDialogue("YOSHIMO")~ THEN GOTO 28
  IF ~IsValidForPartyDialogue("YOSHIMO")~ THEN EXTERN ~YOSHJ~ 121
END

IF ~~ THEN BEGIN 28 // from: 27.0
  SAY #44104 /* ~If you are not genuinely ill then you plot against the asylum and I cannot allow that. Leave before I have you removed.  Now excuse me, I must meet a lady friend.~ */
  IF ~~ THEN DO ~EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
SetGlobal("PirateRefused","GLOBAL",1)
EscapeArea()
~ UNSOLVED_JOURNAL #16677 /* ~Getting Inside the Asylum

A moment of hesitation and all is lost.  I think I actually had Desharik going, there, with my performance of insanity... all until I stopped to consider whether or not I really wanted to enter the asylum this way.  Desharik grew suspicious and refused, and now I will have to find another way within.~ */ EXIT
END

IF ~~ THEN BEGIN 29 // from:
  SAY #58807 /* ~Yo... Yoshimo. Well, that is a name that I have heard recently.  So you... seek entrance to the asylum, do you?~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 122
END

IF ~~ THEN BEGIN 30 // from:
  SAY #58809 /* ~I see. Well then, I suppose I have no further objection to letting you go there.  Of course, just to protect myself, I will send you under the guise of madness.~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 123
END

IF ~~ THEN BEGIN 31 // from:
  SAY #58811 /* ~I'm sure.  You will be on your way shortly then.  Give the asylum coordinator my regards when you arrive.~ */
  IF ~~ THEN EXTERN ~YOSHJ~ 124
END

IF ~~ THEN BEGIN 32 // from:
  SAY #58817 /* ~If that is what you wish to say, then so be it.  You are ready to go, I assume?~ */
  IF ~~ THEN REPLY #58818 /* ~Yes, take us now.~ */ FLAGS 128 GOTO 33
  IF ~~ THEN REPLY #58819 /* ~No, I'd rather not enter this way.~ */ EXTERN ~YOSHJ~ 126
END

IF ~~ THEN BEGIN 33 // from: 34.1 32.0
  SAY #58820 /* ~Then you are on your way, and may the gods have mercy on you when you arrive. I wouldn't wish the place on anyone. Well, anyone I like.~ */
  IF ~~ THEN DO ~AddXPObject(Player1,38500)
AddXPObject(Player2,38500)
AddXPObject(Player3,38500)
AddXPObject(Player4,38500)
AddXPObject(Player5,38500)
AddXPObject(Player6,38500)
EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
EraseJournalEntry(3362)
EraseJournalEntry(9982)
EraseJournalEntry(11681)
EraseJournalEntry(11686)
EraseJournalEntry(11884)
EraseJournalEntry(15783)
EraseJournalEntry(15794)
EraseJournalEntry(16541)
EraseJournalEntry(16677)
EraseJournalEntry(23512)
EraseJournalEntry(5059)
EraseJournalEntry(6934)
EraseJournalEntry(7235)
EraseJournalEntry(10106)
EraseJournalEntry(10107)
EraseJournalEntry(10670)
EraseJournalEntry(10671)
EraseJournalEntry(10933)
EraseJournalEntry(11689)
EraseJournalEntry(11755)
EraseJournalEntry(11904)
EraseJournalEntry(15698)
EraseJournalEntry(15703)
EraseJournalEntry(15801)
EraseJournalEntry(16558)
EraseJournalEntry(20367)
EraseJournalEntry(23504)
EraseJournalEntry(23530)
EraseJournalEntry(11661)
SetGlobal("PPdeshSend","GLOBAL",1)
StartCutSceneMode()
StartCutScene("Cut41f")
~ SOLVED_JOURNAL #3361 /* ~Getting Inside the Asylum

It was looking bad for a moment, and Desharik was not going to let me into the asylum.  Luckily, Yoshimo has apparently had previous dealings of some sort with the pirate.  I am to be admitted forthwith, and then I shall find out what has happened to Imoen and Irenicus both!~ */ EXIT
END

IF ~~ THEN BEGIN 34 // from:
  SAY #58821 /* ~Look, I have no time for these games.  Do you want to go or not. I'll not ask again.  This is risky enough for me without you wasting my time.~ */
  IF ~~ THEN REPLY #58822 /* ~No, I'll take my chances somewhere else.~ */ GOTO 35
  IF ~~ THEN REPLY #58823 /* ~Let's go.~ */ GOTO 33
END

IF ~~ THEN BEGIN 35 // from: 34.0
  SAY #58825 /* ~Very well. Bother me no more on the subject.  I have better things to do.~ */
  IF ~~ THEN DO ~EraseJournalEntry(11681)
EraseJournalEntry(15715)
EraseJournalEntry(15760)
EraseJournalEntry(19364)
SetGlobal("PirateRefused","GLOBAL",1)
EscapeArea()
~ UNSOLVED_JOURNAL #3362 /* ~Getting Inside the Asylum

A moment of hesitation and all is lost.  I was able to enter the asylum through Desharik, but I just didn't like the sound of it.  Actually, it was looking pretty rough for a while, but then Yoshimo piped up and everything smoothed out.  A little too smooth, I think.  Desharik was likely setting us up for an ambush. Can't trust a pirate.  I will have to find another way within.~ */ EXIT
END
