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

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

IF WEIGHT #2 /* Triggers after states #: 33 even though they appear after this state */
~Global("TalkedToNarlen","GLOBAL",0)
!InParty([0.0.0.THIEF])
!InParty([0.0.0.FIGHTER_THIEF])
!InParty([0.0.0.FIGHTER_MAGE_THIEF])
!InParty([0.0.0.MAGE_THIEF])
!InParty([0.0.0.CLERIC_THIEF])
~ THEN BEGIN 0 // from:
  SAY #2881 /* ~Djinni~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #3 /* Triggers after states #: 33 even though they appear after this state */
~Global("TalkedToNarlen","GLOBAL",0)
~ THEN BEGIN 1 // from:
  SAY #2882 /* ~Djinni~ */
  IF ~~ THEN REPLY #2883 /* ~Dao~ */ DO ~SetGlobal("TalkedToNarlen","GLOBAL",1)
SetGlobal("TalkedToThief","GLOBAL",1)
~ GOTO 2
  IF ~~ THEN REPLY #2884 /* ~Dao~ */ DO ~SetGlobal("TalkedToNarlen","GLOBAL",1)
~ GOTO 4
  IF ~Global("HelpAlatos","GLOBAL",1)
~ THEN REPLY #2885 /* ~Efreeti~ */ DO ~SetGlobal("TalkedToNarlen","GLOBAL",1)
~ GOTO 5
  IF ~Global("HelpAlatos","GLOBAL",1)
~ THEN REPLY #2886 /* ~Efreeti~ */ DO ~SetGlobal("TalkedToNarlen","GLOBAL",1)
~ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 31.0 3.0 1.0
  SAY #2887 /* ~Otyugh~ */
  IF ~~ THEN DO ~EscapeArea()
~ JOURNAL #9918 /* ~There's a WHAT in their chicken?

A farmer named Jeb told me that the Hendricks... fellow farmers who have fled from the outlying lands into Imnesvale... may have put something down the gullets of one of their chickens, something that their adventuring daughter brought home with her before she died.  Considering the Hendricks went through that much effort to hide it, it may be something quite valuable.~ */ EXIT
END

IF ~~ THEN BEGIN 3 // from: 1.3
  SAY #2888 /* ~Otyugh~ */
  IF ~~ THEN REPLY #2925 /* ~Anti-Magic Ray~ */ GOTO 2
  IF ~~ THEN REPLY #2926 /* ~Well not really, but close.  He thought it was a dragon.  He was experimenting with glass, grinding it down to make prisms and lenses, you see, because his daughter, my grandmother, was so cross-eyed that, until she was twelve years old, all she ever saw of the world was the nose in the center of her face.  You never had that problem as a child, did you?~ */ GOTO 4
  IF ~Global("HelpAlatos","GLOBAL",1)
~ THEN REPLY #2927 /* ~Me? Oh no, not that...~ */ GOTO 5
  IF ~Global("HelpAlatos","GLOBAL",1)
~ THEN REPLY #2928 /* ~Good, I wouldn't recommend it to anyone.  So my great grandfather had put together a great series of lenses and prisms, I think twelve in all, and attached them to a leather helm he had, the strap of which always chafed under the chin.  Then, all of a sudden, a cloud passed in front of the sun.~ */ GOTO 7
END

IF ~~ THEN BEGIN 4 // from: 31.1 3.1 1.1
  SAY #2889 /* ~I'm not going with him!  I'm not!  Help me!  Please!~ [CSIMO05] */
  IF ~~ THEN REPLY #2929 /* ~Oh my! Was it the dragon?~ */ GOTO 8
  IF ~~ THEN REPLY #2930 /* ~No, no, it happened precisely as I tell it to you now: a cloud passed in front of the sun and my great grandfather looked up from his work so quickly that a dragonfly got caught between two of the prisms over his left eye and clung there for dear life. Of course you can't imagine the hullabaloo this caused, my dear!~ */ GOTO 6
  IF ~~ THEN REPLY #2931 /* ~No, I can imagine it just fine, Mister Jansen.~ */ GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 31.2 3.2 1.2
  SAY #2894 /* ~Constitution Increase~ */
  IF ~~ THEN REPLY #2932 /* ~There he was, throwing all his tools and turnips into the distance where he assumed his greatly magnified adversary to be, and he was running and hollering and telling us to get in the house while he tried to lure the ravaging beast into the backyard of our southside neighbors against whom he had always held a grudge.~ */ GOTO 8
  IF ~~ THEN REPLY #2933 /* ~Whatever happened?~ */ GOTO 6
  IF ~~ THEN REPLY #2934 /* ~What do you expect happened?  We just assumed that he hadn't been taking his herbs and berries again and all wrestled him to the ground, ruining his precious lens-helm in the process, I'm afraid.  It took as a good hour to calm him down and figure out what the truth of the whole matter had been.  Now, do you know what the moral of the story is, Aerie?~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 5.1 4.1
  SAY #2895 /* ~Charisma Increase~ */
  IF ~~ THEN REPLY #2935 /* ~Always wipe your lenses?~ */ GOTO 8
  IF ~~ THEN REPLY #2936 /* ~Hmm, that will do nicely.  I hadn't come up with one for this story yet.~ */ GOTO 7
  IF ~~ THEN REPLY #2937 /* ~And your grandmother, did he make her a new lens-hat so she could finally see?~ */ GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 31.3 6.2 6.1 5.2 4.2 3.3
  SAY #2896 /* ~When asked about her past, AERIE becomes silent for a time, obviously saddened by the memory.  She lived amongst the Avariel, the winged elves, and was captured by slavers when she was still very young.  She shudders when she speaks of her first years in the circus, on display in a cage that restricted her movements to the point that her wings atrophied.  They became infected... and Aerie can barely speak of the night she was taken out of her cage and her wings were sawn off brutally to keep her alive.  She was no longer of use to that circus, and were it not for the kindness of Quayle she surely would have died.  He restored her to health and gave her a reason to continue living, and out of respect for his generosity she learned the devotion of the gnomish god Baervan Wildwanderer.  She speaks of Baervan with affection, yet still pays tribute to Aerdrie Faenya, and approaches life outside of the circus with a combination of wide-eyed innocence and wonder mixed with an inborn determination to fight against injustice.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 6.0 5.0 4.0
  SAY #2897 /* ~When asked about his past, CERND declares in a steady and modest tone that it has been his honor to serve nature in whatever capacity she did call upon him.  It is clear that he is a dedicated servant, and though his demeanor is contemplative and well measured, you are certain that he would not hesitate to risk himself if it would best serve the greater balance.~ */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",1)
EscapeArea()
~ JOURNAL #7144 /* ~The Juggernaut Golem activated.

The Cowled Wizard Jermien used the mimic's blood I brought him to activate his juggernaut golem... only to have his creation turn on him and kill him.  I was able to dispatch it before it killed Jermien's daughter, Collette, who left sadly with her beau, Daar.~ */ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 10 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",1)
~ THEN BEGIN 9 // from:
  SAY #2899 /* ~When asked about his past, YOSHIMO seems disheartened that you are not already acquainted with his reputation.  By his own account, he is apparently well known among people in the know, both as a daring rogue and as a dashing man about town.  While the story sounds impressive, he seems ungainly for such exploits, possibly a bit more hapless than debonair.  He wears it well, however, and perhaps even capitalizes on it.  He seems to know that his kind of good-natured humor is well appreciated by most everyone he meets.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",1)
!See([PC.0.0.MAGE])
!See([PC.0.0.FIGHTER])
!See([PC.0.0.CLERIC])
!See([PC.0.0.BARD])
!See([PC.0.0.PALADIN])
!See([PC.0.0.FIGHTER_MAGE])
!See([PC.0.0.FIGHTER_CLERIC])
!See([PC.0.0.DRUID])
!See([PC.0.0.RANGER])
!See([PC.0.0.CLERIC_MAGE])
!See([PC.0.0.FIGHTER_DRUID])
!See([PC.0.0.FIGHTER_MAGE_CLERIC])
!See([PC.0.0.CLERIC_RANGER])
~ THEN BEGIN 10 // from:
  SAY #2900 /* ~Move carefully now... do you see that large red flower?  It is a Dead Man's Lotus and shall put you right to sleep should you disturb its pollen.~ [CERND52] */
  IF ~~ THEN DO ~MoveViewPoint([376.2193],4)
ActionOverride(LastTalkedToBy,MoveToPoint([376.2193]))
MoveToPoint([376.2193])
StartCutSceneMode()
SetGlobal("NarlenMove","GLOBAL",2)
SetGlobalTimer("NarlenSteal","GLOBAL",20)
EndCutSceneMode()
DestroySelf()
~ EXIT
END

IF WEIGHT #6 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",3)
Dead("Watchm")
~ THEN BEGIN 11 // from:
  SAY #2901 /* ~Rakshasa~ */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",10)
GiveGoldForce(300)
EscapeArea()
~ JOURNAL #9920 /* ~The de'Arnise Keep has been invaded.

Lord de'Arnise's bodyguard, Glaicus, was charmed into serving the invaders, but I charmed him back to normalcy.  He informed me that the leader of the trolls is named TorGal, and that before he was captured Lord de'Arnise was trying to gather three heads of a magical flail that had been disassembled.  It would prove a very effective weapon against trolls with its powers of fire and acid.  Glaicus gave me one of the heads and said that another might be in a secret panel behind the armory on the first floor.~ */ EXIT
END

IF WEIGHT #7 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",3)
Global("HostileWatch","GLOBAL",0)
!Dead("Watchm")
~ THEN BEGIN 12 // from:
  SAY #2902 /* ~Rakshasa~ */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",10)
Attack([PC.0.0.THIEF])
~ JOURNAL #9921 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #2903 /* ~They're so beautiful, Cernd, and--and their light so cold.~ [AERIE70] */
  IF ~~ THEN DO ~Shout(2)
EscapeArea()
~ EXIT
END

IF WEIGHT #8 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",3)
Global("HostileWatch","GLOBAL",1)
!Dead("Watchm")
~ THEN BEGIN 14 // from:
  SAY #2904 /* ~Oh, I wish they would grow forever! How could you ever leave such a place?~ [AERIE71] */
  IF ~~ THEN REPLY #2975 /* ~Ranger-Protector of the Umar Hills

I have saved Imnesvale from a marauding band of orcs that came down from the Hills.  Madulf the ogre has, it seems, lived up to his original bargain and did his best to protect the town.~ */ GOTO 15
  IF ~~ THEN REPLY #2976 /* ~This door has no visible lock or handle and you can't seem to budge it. However, the floor has an odd-shaped recess in it. It looks as if a statuette or figurine could fit within.~ */ GOTO 17
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #2977 /* ~Fael's Potions~ */ GOTO 16
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #2983 /* ~With what grout ye've left, never question what I've to say, else each night upon the morn ye awake screaming for fear of what I may do to ye!~ */ GOTO 32
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #2905 /* ~Though my body may roam, my spirit shall always rest here, Aerie.~ */
  IF ~~ THEN REPLY #2978 /* ~Gas Cloud~ */ GOTO 17
  IF ~~ THEN REPLY #2979 /* ~Ruhk~ */ GOTO 16
  IF ~ReactionLT(LastTalkedToBy,FRIENDLY_LOWER)
~ THEN REPLY #2980 /* ~Ruhk~ */ GOTO 16
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #2981 /* ~What provoked this hostility, Korgan?~ [NALIA49] */ GOTO 32
END

IF ~~ THEN BEGIN 16 // from: 15.2 15.1 14.2
  SAY #2906 /* ~I can just imagine the dreams I'd have in such a place, Cernd.~ [AERIE72] */
  IF ~~ THEN DO ~GiveGoldForce(100)
SetGlobal("NarlenMove","GLOBAL",10)
EscapeArea()
~ JOURNAL #9926 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 17 // from: 15.0 14.1
  SAY #2907 /* ~But... But it is who I am, it is how Quayle taught me.~ [AERIE46] */
  IF ~~ THEN DO ~GiveGoldForce(100)
SetGlobal("NarlenMove","GLOBAL",4)
EscapeArea()
~ JOURNAL #9927 /* ~~ */ EXIT
END

IF WEIGHT #10 /* Triggers after states #: 19 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",4)
~ THEN BEGIN 18 // from:
  SAY #2908 /* ~I cannot understand it, Aerie.  Why this magic... why from you, of all people?  You are too innocent and good to practice such things.~ [VALYGA46] */
  IF ~~ THEN EXIT
END

IF WEIGHT #9 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",4)
!See([PC.0.0.MAGE])
!See([PC.0.0.FIGHTER])
!See([PC.0.0.CLERIC])
!See([PC.0.0.BARD])
!See([PC.0.0.PALADIN])
!See([PC.0.0.FIGHTER_MAGE])
!See([PC.0.0.FIGHTER_CLERIC])
!See([PC.0.0.DRUID])
!See([PC.0.0.RANGER])
!See([PC.0.0.CLERIC_MAGE])
!See([PC.0.0.FIGHTER_DRUID])
!See([PC.0.0.FIGHTER_MAGE_CLERIC])
!See([PC.0.0.CLERIC_RANGER])
~ THEN BEGIN 19 // from:
  SAY #2909 /* ~I know, I know, but... magic corrupts.  The very power of magic twists a mage's soul a little each day.  There's always one more spell to learn or cast.
~ */
  IF ~~ THEN DO ~MoveToPoint([761.1228])
OpenDoor("DOOR1312")
SetGlobal("NarlenMove","GLOBAL",5)
DestroySelf()
~ JOURNAL #9928 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 20 // from:
  SAY #2912 /* ~Eek!~ [AERIE58] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 21 // from:
  SAY #2915 /* ~I--I tried my--my best, sir.~ [AERIE59] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 22 // from:
  SAY #2916 /* ~Well it ain't good enough, now is it!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #11 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",5)
!PartyHasItem("MISC45")
~ THEN BEGIN 23 // from:
  SAY #2917 /* ~Quit yer whinin', wench.  So you be tired, we care not.  Sleep when death takes hold o' ye, which would be a welcome respite for the rest of us... god knows!~ [KORGAN61] */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",6)
EscapeArea()
~ JOURNAL #9930 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 24 // from:
  SAY #2918 /* ~You're a filthy and horrible little man, Korgan! If he's--if he's still with us this time tomorrow, I'm going back to the circus!~ [AERIE60] */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",6)
TakePartyItem("MISC45")
GiveItemCreate("MISC36",LastTalkedToBy)
GiveItemCreate("MISC36",LastTalkedToBy)
GiveItemCreate("MISC36",LastTalkedToBy)
~ JOURNAL #9931 /* ~~ */ EXIT
END

IF WEIGHT #12 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",5)
PartyHasItem("MISC45")~ THEN BEGIN 25 // from:
  SAY #2919 /* ~Aye, we'll miss you like a good club to the head, won't we, <CHARNAME>!  Har har har!~ */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",7)
TakePartyItem("MISC45")
GiveItemCreate("MISC36",LastTalkedToBy)
GiveItemCreate("MISC36",LastTalkedToBy)
GiveItemCreate("MISC36",LastTalkedToBy)
~ JOURNAL #9931 /* ~~ */ EXIT
END

IF WEIGHT #13 /* Triggers after states #: 33 even though they appear after this state */
~Global("NarlenMove","GLOBAL",8)
~ THEN BEGIN 26 // from:
  SAY #2921 /* ~Ha ha! Looka' the sky, missy.  Yer day's up and I'm still 'ere.  Ol' <CHARNAME> didn't e'en break it to ya gently.  Take the hint and head back to yer little circus, girlie.~ [KORGAN62] */
  IF ~~ THEN DO ~SetGlobal("NarlenMove","GLOBAL",9)
~ EXTERN ~RESAR~ 4
END

IF ~~ THEN BEGIN 27 // from:
  SAY #2922 /* ~Because they're true, every last one of them, even the one about my great grandfather slaying the dragon.~ */
  IF ~~ THEN EXTERN ~ALATOS~ 16
END

IF ~~ THEN BEGIN 28 // from:
  SAY #2923 /* ~A dragon? Really?~ */
  IF ~~ THEN EXTERN ~ALATOS~ 17
END

IF ~~ THEN BEGIN 29 // from:
  SAY #2924 /* ~Anti-Magic Ray~ */
  IF ~~ THEN DO ~ActionOverride("NARLEN",EscapeArea())
EscapeArea()
~ JOURNAL #9934 /* ~~ */ EXIT
END

IF ~~ THEN BEGIN 30 // from:
  SAY #2938 /* ~What?  Oh no, no, it was an idea doomed to fail, I'm afraid.  Two years later she lost her nose in a bizarre harvest accident and she's been seeing just fine ever since.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 31 // from:
  SAY #2970 /* ~Golem Haste~ */
  IF ~~ THEN REPLY #2971 /* ~Ranger-Protector of the Umar Hills

Delon of Imnesvale came and told me that the village was under assault by orcs coming down from the hills.  I told him I would go and help out as soon as possible.  I should go within three days at most or it will be too late.~ */ GOTO 2
  IF ~~ THEN REPLY #2972 /* ~Ranger-Protector of the Umar Hills

Delon of Imnesvale came and told me of a group of orcs that seems to have come down from the hills and attacked the village.  I have other things to do, so the boy left.  If I change my mind, I should go to the village within three days or it will be too late.~ */ GOTO 4
  IF ~~ THEN REPLY #2973 /* ~Ranger-Protector of the Umar Hills

I managed to fight off the orcs and rescue Madulf the ogre, who had taken shelter in the nearby cave after his fellows were driven off.~ */ GOTO 5
  IF ~~ THEN REPLY #2974 /* ~Ranger-Protector of the Umar Hills

I cam to the village and saved it from attack by a clan of orcs that had come down from the mountains.  Madulf the ogre, it seems, protected the village despite not having an alliance.  The mayor was surprised and is going to speak to the ogre about the possibility, now.~ */ GOTO 7
END

IF ~~ THEN BEGIN 32 // from: 15.3 14.3
  SAY #2982 /* ~I'm sorry, Korgan.  I seek no conflict and wish only to be left alone. Forgive my slights, if I made any.~ */
  IF ~~ THEN DO ~GiveGoldForce(100)
SetGlobal("NarlenMove","GLOBAL",10)
~ JOURNAL #9963 /* ~~ */ EXIT
END

IF WEIGHT #0 ~StateCheck(Myself,STATE_CHARMED)
~ THEN BEGIN 33 // from:
  SAY #6472 /* ~But there is an affair that you must worry about. You honor shall forever remain in question if you do not repair the damage done by the slaying of the innocent knights.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 34 // from:
  SAY #9071 /* ~Little I may be on body but strong I am in conviction.  You have been warned.~ */
  IF ~~ THEN EXIT
END
