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

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)
!See("Valygar")
!See("Korgan")~ THEN BEGIN 0 // from:
  SAY #18246 /* ~Greetings.  You are known to me.  Or your deeds are known to those I serve.  I think I should introduce myself.~ */
  IF ~~ THEN DO ~EraseJournalEntry(3304)
SetGlobal("TalkedToMadeen","GLOBAL",1)~ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0 KORGANJ:212.0
  SAY #18247 /* ~I am Madeen.  I represent one of the masters of the Athkatla order of the Cowled Wizards.  He seeks to employ you in a matter of some urgency.~ */
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #18248 /* ~The Cowled Wizards?  They are the ones that arrested Imoen.  I would be very interested in speaking to them about that.~ */ GOTO 2
  IF ~~ THEN REPLY #18249 /* ~Oh?  And what matter are you referring to?~ */ GOTO 3
  IF ~~ THEN REPLY #18250 /* ~I would like to know what kind of reward I am looking at before you speak any further.~ */ GOTO 4
  IF ~OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN REPLY #18251 /* ~I have no time to help anyone at the moment, least of all the Cowled Wizards.~ */ GOTO 6
  IF ~InParty("Korgan")
See("Korgan")~ THEN REPLY #59354 /* ~I have no time to help anyone at the moment, least of all the Cowled Wizards.~ */ EXTERN ~KORGANJ~ 213
END

IF ~~ THEN BEGIN 2 // from: 5.0 1.0
  SAY #18252 /* ~I do not know anything about that.  I represent one of the wizards, as I said, a Master Tolgerias.  Perhaps you could speak to him of this Imoen?~ */
  IF ~~ THEN REPLY #18254 /* ~Very well.  How do I go about meeting this Tolgerias fellow?~ */ GOTO 8
  IF ~~ THEN REPLY #18255 /* ~I want to know what task I would be performing before I speak to anyone.~ */ GOTO 3
  IF ~~ THEN REPLY #18256 /* ~Tell me what manner of reward I might be looking at, first.~ */ GOTO 4
  IF ~OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN REPLY #18257 /* ~I have no time to parley with wizards.  I have far more important things to do.~ */ GOTO 6
  IF ~InParty("Korgan")
See("Korgan")~ THEN REPLY #59356 /* ~I have no time to parley with wizards.  I have far more important things to do.~ */ EXTERN ~KORGANJ~ 213
END

IF ~~ THEN BEGIN 3 // from: 9.0 5.1 2.1 1.1
  SAY #18253 /* ~The matter is most sensitive... I have been given little knowledge of it.  Tolgerias, the one whom I speak for, is eager to meet with you and discuss these matters.~ */
  IF ~~ THEN REPLY #18258 /* ~Alright, then.  Tell me how I go about meeting this Tolgerias.~ */ GOTO 8
  IF ~~ THEN REPLY #18259 /* ~I want to know about the reward before I do anything.~ */ GOTO 4
  IF ~OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN REPLY #18260 /* ~Forget it.  I have no time for such matters.~ */ GOTO 6
  IF ~InParty("Korgan")
See("Korgan")~ THEN REPLY #59357 /* ~Forget it.  I have no time for such matters.~ */ EXTERN ~KORGANJ~ 213
END

IF ~~ THEN BEGIN 4 // from: 9.1 3.1 2.2 1.2
  SAY #18261 /* ~The reward for the task is known only to the one I represent.  But he is eager to meet with you, and as a Cowled Wizard possesses resources to offer great rewards.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #18263 /* ~Might you wish to meet with him, yes?~ */
  IF ~GlobalLT("chapter","GLOBAL",4)~ THEN REPLY #18264 /* ~And what if I said I wished to know the whereabouts of Imoen?  Might your wizard see his way to doing that?~ */ GOTO 2
  IF ~~ THEN REPLY #18265 /* ~I'd prefer to know what task I'd be undertaking before I met with this man.~ */ GOTO 3
  IF ~OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN REPLY #18266 /* ~No, I don't.  Excuse me.~ */ GOTO 6
  IF ~InParty("Korgan")
See("Korgan")~ THEN REPLY #59358 /* ~No, I don't.  Excuse me.~ */ EXTERN ~KORGANJ~ 213
END

IF ~~ THEN BEGIN 6 // from: 5.2 3.2 2.3 1.3
  SAY #18267 /* ~As you wish.  The one I represent is most insistent that only the most able be brought to perform this task.  Should you change your mind you will find me here.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #18268 /* ~Until then, my friend, I wish you a most pleasant journey.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 9.3 3.0 2.0 KORGANJ:213.0
  SAY #18269 /* ~He will be most pleased.  Master Tolgerias can be found in the government building behind me... you may go within.  Do not tarry overlong, my friend.~ */
  IF ~OR(2)
!InParty("Korgan")
!See("Korgan")~ THEN DO ~SetGlobal("TalkedToMadeen","GLOBAL",1)
MoveToObject("DOOR06")
OpenDoor("DOOR06")
EscapeArea()
~ UNSOLVED_JOURNAL #7994 /* ~Meet with Tolgerias the Cowled Wizard.

A man by the name of Madeen has told me of a Cowled Wizard who wishes to hire someone to perform a service for him.  The wizard's name is Tolgerias, and he can be found in the main government building in the Government District.~ */ EXIT
  IF ~InParty("Korgan")
See("Korgan")~ THEN DO ~SetGlobal("TalkedToMadeen","GLOBAL",1)
MoveToObject("DOOR06")
OpenDoor("DOOR06")
EscapeArea()~ UNSOLVED_JOURNAL #7994 /* ~Meet with Tolgerias the Cowled Wizard.

A man by the name of Madeen has told me of a Cowled Wizard who wishes to hire someone to perform a service for him.  The wizard's name is Tolgerias, and he can be found in the main government building in the Government District.~ */ EXTERN ~KORGANJ~ 214
END

IF WEIGHT #1 ~NumTimesTalkedToGT(0)
!See("Valygar")~ THEN BEGIN 9 // from:
  SAY #18270 /* ~Ah, I see you have found me once again, my friend <CHARNAME>.  Have you changed your mind regarding the proffered employment by the Master Tolgerias?~ */
  IF ~~ THEN REPLY #18272 /* ~Perhaps.  Tell me again what manner of employment this might be.~ */ GOTO 3
  IF ~~ THEN REPLY #18273 /* ~I want to know more about the reward.~ */ GOTO 4
  IF ~~ THEN REPLY #18274 /* ~No, actually.  Excuse me.~ */ GOTO 10
  IF ~~ THEN REPLY #18276 /* ~Yes, I think I might wish to meet with this Tolgerias, now.  How do we proceed?~ */ GOTO 8
END

IF ~~ THEN BEGIN 10 // from: 9.2
  SAY #18271 /* ~Of course, as you wish.  I shall await your pleasure here.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 12 even though they appear after this state */
~See("Valygar")~ THEN BEGIN 11 // from:
  SAY #58510 /* ~The murderer of the Cowled Wizards comes amongst us?  You take your life into your own hands, ranger.  I suggest you run, if you can.~ */
  IF ~~ THEN DO ~EraseJournalEntry(3304)
EscapeArea()~ EXIT
END

IF WEIGHT #2 ~NumTimesTalkedTo(0)
See("Korgan")
!See("Valygar")~ THEN BEGIN 12 // from:
  SAY #59349 /* ~Ah, it is Korgan Bloodaxe at last.  I have watched for you and your companions for some time.  But these... these are not your usual comrades-in-arms.~ */
  IF ~~ THEN DO ~EraseJournalEntry(3304)~ EXTERN ~KORGANJ~ 210
END

IF ~~ THEN BEGIN 13 // from: KORGANJ:211.0
  SAY #59352 /* ~Oh, there is a contact, indeed.  But perhaps I should introduce myself to your new friends, Mr. Bloodaxe... I do not wish to give the wrong impression.~ */
  IF ~~ THEN EXTERN ~KORGANJ~ 212
END
