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

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

IF WEIGHT #0 ~OR(4)
!InParty("Korgan")
Dead("Korgan")
!See("Korgan")
StateCheck("Korgan",STATE_SLEEPING)
Global("TalkedAboutPimlico","GLOBAL",0)
~ THEN BEGIN 0 // from:
  SAY #30448 /* ~Who be you then? I've no time for chatter and I'll not have roustabouts lounging about my home.~ */
  IF ~~ THEN REPLY #30452 /* ~No need for a fuss. We just wanted to know who you were.~ */ GOTO 2
  IF ~~ THEN REPLY #30453 /* ~And what if I want to lounge about your home? Who will stop me?~ */ GOTO 3
  IF ~~ THEN REPLY #30454 /* ~Sorry to have disturbed you, I meant no offense.~ */ GOTO 5
END

IF WEIGHT #1 ~OR(4)
!InParty("Korgan")
Dead("Korgan")
!See("Korgan")
StateCheck("Korgan",STATE_SLEEPING)
Global("TalkedAboutPimlico","GLOBAL",1)
NumTimesTalkedTo(0)
~ THEN BEGIN 1 // from:
  SAY #30449 /* ~What's this disturbance about? I've cataloging to do and you're disrupting my concentration.~ */
  IF ~~ THEN REPLY #30466 /* ~Pimlico is your name? I have heard you are looking for a particular old tome.~ */ GOTO 6
  IF ~~ THEN REPLY #30467 /* ~And what if I intend to disrupt you? Who will stop me?~ */ GOTO 3
  IF ~~ THEN REPLY #30468 /* ~I'll be leaving then. Sorry to have bothered you. No offense meant.~ */ GOTO 5
END

IF ~~ THEN BEGIN 2 // from: 0.0
  SAY #30455 /* ~I make a habit of acquiring old tomes, but it concerns you not. If I get business I need a spare hand for I will place a poster at the local pub. Beyond that is my affair alone, so be on your way.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1 0.1
  SAY #30460 /* ~My well-paid guards of course. No doubt it would reflect very bad upon you to conflict with sanctioned city militia. I may be a simple collector of tomes, but I know the value of security.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #30461 /* ~Go on now, and perhaps we will both live to deal in the future. I've nothing for you at the moment.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 1.2 0.2
  SAY #30462 /* ~None taken if you leave with haste. Perhaps we can deal in the future, but I've many under me already.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from: 1.0
  SAY #30476 /* ~And who might have told you that? That fool Shagbag? No, it was his fellow Korgan, wasn't it. Awfully wordy, even by my standards. Likes to hear himself talk.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #30478 /* ~Regardless, yes, I am looking for an old tome. It is a book of verse, ancient and rare. You are too late though; I already hired a group of heavyhands to get it.~ */
  IF ~~ THEN REPLY #30480 /* ~The men hired don't have it yet. I think Korgan was having trouble with them.~ */ GOTO 9
  IF ~~ THEN REPLY #30481 /* ~What if I were to try and retrieve it myself?~ */ GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 9.0 7.1
  SAY #30482 /* ~I don't much care who brings it to me.  I will pay you as much as the other fellows. Just don't damage the thing. It's entitled 'The Book of Kaza.' Off with you.  A word of advice however:  you'll need help from one of the other fellows, only they know where the book is.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 9 // from: 7.0
  SAY #30510 /* ~They seemed a bit unstable as a group. Are you any better? Perhaps you would serve just as well.~ */
  IF ~~ THEN GOTO 8
END

IF WEIGHT #2 ~InParty("Korgan")
See("Korgan")
!StateCheck("Korgan",STATE_SLEEPING)
Global("FinishedTalking","LOCALS",0)
Global("KorganTomb","GLOBAL",0)~ THEN BEGIN 10 // from:
  SAY #30516 /* ~Korgan? I thought you were dead. Ahh, perhaps Shagbag and those others were getting ahead of themselves.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedAboutShagbag","GLOBAL",1)~ EXTERN ~KORGANJ~ 25
END

IF ~~ THEN BEGIN 11 // from: KORGANJ:25.0
  SAY #30519 /* ~Well, you'd best hurry then. I'll pay whoever puts the book in my hand. I shouldn't like to see you out of the bargain; you were the more coherent of the lot of them.~ */
  IF ~~ THEN EXTERN ~KORGANJ~ 26
END

IF ~~ THEN BEGIN 12 // from: KORGANJ:26.0
  SAY #30523 /* ~Either way, I will win. Good luck then.~ */
  IF ~~ THEN DO ~SetGlobal("FinishedTalking","LOCALS",1)~ EXTERN ~KORGANJ~ 27
END

IF WEIGHT #4 /* Triggers after states #: 14 even though they appear after this state */
~True()~ THEN BEGIN 13 // from:
  SAY #30531 /* ~Good luck. May the fastest team of lunatics win.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 ~Global("FinishedTalking","LOCALS",1)
OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN BEGIN 14 // from:
  SAY #37861 /* ~Off with you then. If you wish to find my prize you had best hurry.~ */
  IF ~~ THEN EXIT
END
