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

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

IF WEIGHT #3 /* Triggers after states #: 33 even though they appear after this state */
~NumTimesTalkedTo(0)
~ THEN BEGIN 0 // from:
  SAY #5660 /* ~Red Dragon Scales~ */
  IF ~~ THEN DO ~SetGlobal("Golem","GLOBAL",1)
~ EXIT
END

IF WEIGHT #9 /* Triggers after states #: 5 26 27 28 30 33 even though they appear after this state */
~True()~ THEN BEGIN 1 // from:
  SAY #5661 /* ~Red Dragon Scales~ */
  IF ~~ THEN REPLY #5662 /* ~Silver Blade~ */ GOTO 2
  IF ~~ THEN REPLY #5663 /* ~Silver Blade~ */ GOTO 3
  IF ~~ THEN REPLY #5664 /* ~Silver Hilt~ */ GOTO 4
  IF ~PartyHasItem("MISC49")
~ THEN REPLY #6154 /* ~If you truly wish to choose the righteous way then you shall need a guide. Shall I join you on your journey to salvation?~ */ DO ~TakePartyItem("MISC49")
DestroyItem("MISC49")
CreateCreature("MELICA",[286.398])
ActionOverride("Melicamp",SetNumTimesTalkedTo(2))
SetGlobal("LeftChicken","GLOBAL",1)
~ GOTO 7
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #5726 /* ~If this is the man we want, it shouldn't be too long until he shows up again.~ */
  IF ~~ THEN REPLY #15295 /* ~Thank you for the information, Garroll.  Here's an extra 5 gold for your troubles.  Perhaps I'll go and talk to Lehtinan, after all.~ */ DO ~StartStore("highhedg",LastTalkedToBy())
~ EXIT
  IF ~~ THEN REPLY #15296 /* ~I appreciate the information, friend.  I must be on my way.~ */ DO ~~ EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #6137 /* ~Gorgon Plate +4~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 4 // from: 1.2
  SAY #6151 /* ~Your threats are empty! My blade shall do my speaking from this point forward.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 /* Triggers after states #: 26 27 28 30 33 even though they appear after this state */
~NumTimesTalkedTo(2)
!PartyHasItem("MISC49")
~ THEN BEGIN 5 // from:
  SAY #6152 /* ~I hereby renounce my path of evil and pledge to follow the path of righteousness for as long as I shall live.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 6 // from:
  SAY #6153 /* ~Servant of evil! Would that this was a place appropriate to send you to the hell that most assuredly awaits you!  Another time, fiend!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 1.3
  SAY #6155 /* ~I would be pleased to have you join me.~ */
  IF ~~ THEN REPLY #6156 /* ~This is a road that I must walk alone. I must decline your offer.~ */ GOTO 9
  IF ~~ THEN REPLY #6157 /* ~The adventurer returns. Have you chosen the path of righteousness?~ */ GOTO 8
  IF ~~ THEN REPLY #6162 /* ~That is none of your affair.~ */ GOTO 10
END

IF ~~ THEN BEGIN 8 // from: 7.1
  SAY #6158 /* ~Indeed, I have.~ */
  IF ~~ THEN REPLY #6159 /* ~The blathering about righteousness is the swan song of the weak. I will not listen to such idiocy.~ */ GOTO 9
  IF ~~ THEN REPLY #6161 /* ~Fair lady, what brings you to this cesspool of corruption?~ [ANOMEN02] */ GOTO 11
  IF ~~ THEN REPLY #6165 /* ~In truth it is. I am honor-bound to protect all persons from corruption and evil. This place contains both. Be you an adventurer who comes seeking others of like mind?~ */ GOTO 10
END

IF ~~ THEN BEGIN 9 // from: 15.0 13.0 8.0 7.0
  SAY #6160 /* ~I am not prepared to accept that path.~ */
  IF ~~ THEN EXTERN ~MELICA~ 17
END

IF ~~ THEN BEGIN 10 // from: 23.0 22.1 21.2 16.0 15.1 13.1 11.1 8.2 7.2
  SAY #6163 /* ~I seek adventure and honor.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11 // from: 8.1
  SAY #6164 /* ~I only wish to rest here awhile and partake of the pleasures within.~ */
  IF ~ReactionGT(LastTalkedToBy,NEUTRAL_UPPER)
~ THEN REPLY #6166 /* ~Indeed, I am. And who might you be?~ */ GOTO 13
  IF ~~ THEN REPLY #6167 /* ~As I said before, it is none of your affair.~ */ GOTO 10
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #6168 /* ~I only wish to rest here awhile and partake of the pleasures within.~ */ GOTO 14
  IF ~~ THEN REPLY #6169 /* ~Chance smiles upon you for I am an adventurer of some worth.  I am Anomen, warrior priest of Helm. What is your name?~ */ GOTO 12
  IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #6173 /* ~I shall let that pass. Tell me true, be you a force for good or for evil?~ */ GOTO 15
END

IF ~~ THEN BEGIN 12 // from: 11.3
  SAY #6170 /* ~I am <GABBER>. It is a pleasure to meet you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 13 // from: 11.0
  SAY #6171 /* ~Where did you get the idiotic accent from? Have you been reading too many romance novels?~ */
  IF ~~ THEN REPLY #6175 /* ~There is no true good or true evil. The universe is a balance of all things.~ */ GOTO 9
  IF ~~ THEN REPLY #6176 /* ~I am no weak-willed goody-two-shoes. I take what I want, when I want it!~ */ GOTO 10
END

IF ~~ THEN BEGIN 14 // from: 11.2
  SAY #6172 /* ~None of your business, Anomen. Get out of my way.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 15 // from: 11.4
  SAY #6174 /* ~I am a force of righteousness.~ */
  IF ~~ THEN REPLY #6177 /* ~I tell you truly, this place is not for you. 'Tis a foul place for a lady to be.~ */ GOTO 9
  IF ~~ THEN REPLY #6178 /* ~You are not the one to decide where I should and should not be. Get out of my way.~ */ GOTO 10
END

IF ~~ THEN BEGIN 16 // from:
  SAY #6180 /* ~Where should I be then?~ */
  IF ~~ THEN REPLY #6181 /* ~Perhaps your path links closely to my own.  I seek to be knighted in the Most Noble Order of the Radiant Heart, and must prove my worth first. Have you need of a strong warrior?~ */ GOTO 10
  IF ~~ THEN REPLY #6182 /* ~I would be infinitely pleased to have you join me. Welcome!~ */ GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.1
  SAY #6183 /* ~Regretfully, I must decline your offer.~ */
  IF ~~ THEN EXTERN ~MELICA~ 18
END

IF ~~ THEN BEGIN 18 // from:
  SAY #6185 /* ~Actually, I was hired to win you back from the wizard by Raelis Shai.~ */
  IF ~~ THEN EXTERN ~MELICA~ 19
END

IF ~~ THEN BEGIN 19 // from:
  SAY #6187 /* ~Helm's beard! What have we done? A most foul ruse has been played upon this company! Innocents are slain! The lifeblood of the Order stains the ground at my feet. What have we done?~ [ANOMEN99] */
  IF ~~ THEN EXTERN ~MELICA~ 20
END

IF ~~ THEN BEGIN 20 // from:
  SAY #6511 /* ~I do believe that you are correct. We should make our way there now. He said that is was just north of the battlefield, did he not?~ */
  IF ~~ THEN EXTERN ~MELICA~ 21
END

IF ~~ THEN BEGIN 21 // from:
  SAY #6513 /* ~No, these are not them! Continue your scouring. (I swear, I should have hired a team of monkeys for this.)~ */
  IF ~~ THEN REPLY #6514 /* ~The time to slay the betrayer is upon us! We must be swift, else the Shadow Thieves mark us for death in Mae'Var's stead. This would be bad, understand?~ [EDWIN88] */ GOTO 24
  IF ~~ THEN REPLY #6515 /* ~I remember something of this place... there are soothsayers and conjurers that whisper in hushed tones about an artifact lost to antiquity... (but not so lost to a perceptive mage.)~ [EDWIN81] */ GOTO 23
  IF ~~ THEN REPLY #6516 /* ~We must return to our delving in the graveyard... the Nether scroll... think of it. (Yes, just think of it.) The written word of the creator races... (it should be mine.)~ [EDWIN82] */ GOTO 10
  IF ~~ THEN REPLY #6517 /* ~This is it. This must be it. This has to be it! The just and unjust alike will all fear the overwhelming power of Edwin Odesseiron and his Nether scroll!~ [EDWIN83] */ GOTO 22
END

IF ~~ THEN BEGIN 22 // from: 21.3
  SAY #6518 /* ~(Yes... yes this will be a great help.) Of course, I shall put it to the best use of the group. Mark my words. (Yes, mark them well.)  But you'll not see the scroll... it's mine!~ */
  IF ~~ THEN REPLY #6519 /* ~Touch the scroll, pull back a stump.  (Head,  limb, leg... your choice.) I will use this for the benefit of the group, I assure you. (Yes, I assure you of that.) But no one reads it but me.~ */ GOTO 24
  IF ~~ THEN REPLY #6520 /* ~Will you be using that scroll to help us?~ */ GOTO 10
  IF ~~ THEN REPLY #6521 /* ~Djinni~ */ GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.2 21.1
  SAY #6522 /* ~Gaseous Form~ */
  IF ~~ THEN REPLY #6523 /* ~Hangard's Axe +2~ */ GOTO 10
  IF ~~ THEN REPLY #6524 /* ~Rifthome Axe +3~ */ GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.1 22.0 21.0
  SAY #6525 /* ~We all found it, we all own it. It's party treasure, Edwin.~ */
  IF ~~ THEN EXTERN ~MELICA~ 22
END

IF ~~ THEN BEGIN 25 // from:
  SAY #6527 /* ~Air Elemental Statue~ */
  IF ~~ THEN DO ~SetGlobal("HelpThalantyr","GLOBAL",1)
~ JOURNAL #10669 /* ~~ */ EXIT
END

IF WEIGHT #4 /* Triggers after states #: 33 even though they appear after this state */
~Global("HelpThalantyr","GLOBAL",1)
!PartyHasItem("MISC50")
Global("TransformedChicken","GLOBAL",0)
See("Melicamp")
!Dead("Melicamp")
~ THEN BEGIN 26 // from:
  SAY #6528 /* ~Cromwell~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 /* Triggers after states #: 33 even though they appear after this state */
~Global("HelpThalantyr","GLOBAL",1)
PartyHasItem("MISC50")
Global("TransformedChicken","GLOBAL",0)
See("Melicamp")
!Dead("Melicamp")
~ THEN BEGIN 27 // from:
  SAY #6529 /* ~Cromwell~ */
  IF ~~ THEN DO ~TakePartyItem("MISC50")
DestroyItem("MISC50")
SetGlobal("TransformedChicken","GLOBAL",1)
SendTrigger("Thalantyr",1)
~ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 33 even though they appear after this state */
~Dead("Melicamp")
Global("TransformedChicken","GLOBAL",1)
~ THEN BEGIN 28 // from:
  SAY #6530 /* ~Katana +2~ */
  IF ~~ THEN DO ~SetGlobal("TransformedChicken","GLOBAL",2)
~ JOURNAL #10670 /* ~Getting Inside the Asylum

The courtesan offered to get me inside by pretending I was a customer... but cannot help me deal with the guards within.  That part will be up to me.~ */ EXIT
END

IF ~~ THEN BEGIN 29 // from:
  SAY #6532 /* ~Scatter!~ */
  IF ~~ THEN EXTERN ~MELICA~ 24
END

IF WEIGHT #7 /* Triggers after states #: 33 even though they appear after this state */
~!Dead("Melicamp")
Global("TransformedChicken","GLOBAL",1)
~ THEN BEGIN 30 // from:
  SAY #8780 /* ~All the better, Viconia.  Get lost.~ */
  IF ~~ THEN EXTERN ~MELICA~ 23
END

IF ~~ THEN BEGIN 31 // from:
  SAY #8781 /* ~Very well.  I have said my piece and I do not have to lower myself to speak to you any more.  Let my cold silence be your companion.~ */
  IF ~~ THEN EXTERN ~MELICA~ 25
END

IF ~~ THEN BEGIN 32 // from:
  SAY #8783 /* ~Cernd, you left her with child.~ */
  IF ~~ THEN JOURNAL #10671 /* ~Getting Inside the Asylum

Once I find Chremy, the courtesan suggested I should return so the medallion could be verified.~ */ EXIT
END

IF WEIGHT #1 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 33 // from:
  SAY #8958 /* ~Galia... died a few months ago. I ain't saying nothing, but it didn't seem natural.  No fuss made... Deril's got a wallet for the guard, if you get my drift?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 34 // from:
  SAY #8959 /* ~Galia's son... Cernd's son... is with Deril now.  No doubt the boy will be an unthinking lout... if not from the family line then from example.~ */
  IF ~~ THEN EXIT
END
