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

BEGIN ~SAHBEH01~

IF ~NumTimesTalkedTo(0)
!Global("SpectatorAllowsChest","GLOBAL",1)
!PartyHasItem("key26")~ THEN BEGIN 0 // from:
  SAY #46764 /* ~Visitors!  It has been some time since I have had anyone but the mad little Sahuagin come to this place... and that one is not full of riveting conversation.~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #46765 /* ~Ah --- but I see you hesitate.  No doubt you have heard of my kind before, or even met some.  You call us Beholders...  yes, I think that is the term you use.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #46766 /* ~I am but a Spectator Beholder, however, and not quite like others you may have met.  I am set in this place to guard one thing and one thing only.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 2.0
  SAY #46767 /* ~I will not attack you... unless you try to touch what I guard.  Touch anything else you'd like!  Provided you weren't driven insane by the imps back there.~ */
  IF ~~ THEN REPLY #46768 /* ~What is it, exactly, that you guard?~ */ GOTO 4
  IF ~~ THEN REPLY #46769 /* ~How is it that you came to be in this place?~ */ GOTO 9
  IF ~~ THEN REPLY #46770 /* ~What's with those imps, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46771 /* ~Maybe I should just be on my way...~ */ GOTO 17
  IF ~~ THEN REPLY #46772 /* ~I shall not allow an evil creature such as yourself to live!  Prepare to meet your end, beast!~ */ GOTO 18
END

IF ~~ THEN BEGIN 4 // from: 22.0 21.1 16.0 13.2 3.0
  SAY #46773 /* ~Just the one chest behind me.  You are welcome to open the others with the imps, or do whatever else... I'm not here to do anything about them in the slightest.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: 4.0
  SAY #46774 /* ~I think the Sahuagin looted the other chests long ago.  They might have put some stuff of theirs around here, though, thinking I would scare off thieves.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #46775 /* ~... oh, that reminds me.  I promised that mad little Sahuagin that I would make an effort to scare off intruders...~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #46776 /* ~So... boo!~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #46777 /* ~And that's about as much effort as I'm willing to put into that.  (sigh)  It's been a pretty lonely experience so far, you know.~ */
  IF ~~ THEN REPLY #46778 /* ~Do you know what's in that chest you're guarding?~ */ GOTO 19
  IF ~~ THEN REPLY #46779 /* ~Is there no way I can release you from your task?~ */ GOTO 20
  IF ~~ THEN REPLY #46780 /* ~Just how did you end up here, anyway?~ */ GOTO 9
  IF ~~ THEN REPLY #46781 /* ~What's with those imps in the other room, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46782 /* ~Perhaps I should be on my way.~ */ GOTO 17
  IF ~~ THEN REPLY #46783 /* ~No matter your demeanor, you are a Beholder still and I shall destroy you!~ */ GOTO 18
END

IF ~~ THEN BEGIN 9 // from: 22.1 20.2 19.2 16.1 8.2 3.1
  SAY #46784 /* ~Mmm.  I was summoned by a mad little drow who took over this part of the Sahuagin city a long time ago.  This chest was extremely important to him, apparently.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #46786 /* ~The Sahuagin were attacking, and he didn't want them to get the chest after he died... so 'POOF!' in I came, attached to a 99 year contract.  Only 40 years to go.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #46787 /* ~The drow wasn't much more entertaining than the Sahuagin, really.  He smelled better, though.  I don't think I'll ever be able to stomach fish again... yech.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #46788 /* ~To top it off, I got stuck with the drow's imps, too, which are bound here but keep teleporting away from the Sahuagin.  I wish they would just go away.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #46789 /* ~I mean, I can only play 'I spy' and 'peek-a-boo' so many times without getting tired of it, but not THEM, oh no.  Rotten impish bastards.~ */
  IF ~~ THEN REPLY #46790 /* ~Er... just how can you smell without a nose?~ */ GOTO 21
  IF ~~ THEN REPLY #46791 /* ~Is there no way I can release you from your task?~ */ GOTO 20
  IF ~~ THEN REPLY #46792 /* ~What is it, exactly, that you guard?~ */ GOTO 4
  IF ~~ THEN REPLY #46793 /* ~What's with those imps, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46794 /* ~Maybe I should just be on my way...~ */ GOTO 17
  IF ~~ THEN REPLY #46795 /* ~No matter your demeanor, you are a Beholder still and I shall destroy you!~ */ GOTO 18
END

IF ~~ THEN BEGIN 14 // from: 22.2 21.2 20.3 19.3 13.3 8.3 3.2
  SAY #46796 /* ~Oh, they've been here since the drow who summoned me was slaughtered... Sixty years with only two imps and a mad fish-king for company.  Is this hell?~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #46797 /* ~There's a chest in there that the Sahuagin put something valuable in.  Always whispered the incantation to open it, though.  Like *I* would care.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #46798 /* ~The imps figured out the incantation.  I suppose they told you, if you didn't squish 'em on the spot.  Not that I would be sad, exactly, to see them gone...~ */
  IF ~~ THEN REPLY #46799 /* ~What is it, exactly, that you guard?~ */ GOTO 4
  IF ~~ THEN REPLY #46800 /* ~How is it that you came to be in this place?~ */ GOTO 9
  IF ~~ THEN REPLY #46801 /* ~Maybe I should just be on my way...~ */ GOTO 17
  IF ~~ THEN REPLY #46802 /* ~No matter your demeanor, you are a Beholder still and I shall destroy you!~ */ GOTO 18
END

IF ~~ THEN BEGIN 17 // from: 21.3 20.4 19.4 16.2 13.4 8.4 3.3
  SAY #46803 /* ~If you have to go, you have to go.  I'll be here if you need to chat... for the next 40 years, anyway.  After that... well, I got this great tomb lined up...~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: 21.4 20.5 19.5 16.3 13.5 8.5 3.4
  SAY #46804 /* ~Some action!  Finally!  Rules are rules, though.  If you're not going to touch the chest, you have to take the first shot at me... so make it a good one!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 19 // from: 20.0 8.0
  SAY #46806 /* ~Not a clue.  I wouldn't recommend touching it, though.  I haven't had any real excitement in a long long time, but I've no compulsion towards killing, you know.~ */
  IF ~~ THEN REPLY #55281 /* ~Are you *sure* I can't see what's inside the chest?~ */ GOTO 23
  IF ~~ THEN REPLY #46807 /* ~Is there no way I can release you from your task?~ */ GOTO 20
  IF ~~ THEN REPLY #46808 /* ~Just how did you end up here, anyway?~ */ GOTO 9
  IF ~~ THEN REPLY #46809 /* ~What's with those imps in the other room, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46810 /* ~Perhaps I should be on my way.~ */ GOTO 17
  IF ~~ THEN REPLY #46811 /* ~Well, I intend to have what's in that chest, so it's time for you to die!~ */ GOTO 18
END

IF ~~ THEN BEGIN 20 // from: 21.0 19.1 13.1 8.1
  SAY #46812 /* ~Awww, that's sweet.  Short of death, there isn't any way to shorten the 40 years I have left... and I'm not eager to greet the Beyond just yet.~ */
  IF ~~ THEN REPLY #46813 /* ~Do you know what's in that chest you're guarding?~ */ GOTO 19
  IF ~~ THEN REPLY #55280 /* ~Are you *sure* I can't see what's in the chest?~ */ GOTO 23
  IF ~~ THEN REPLY #46814 /* ~Just how did you end up here, anyway?~ */ GOTO 9
  IF ~~ THEN REPLY #46815 /* ~What's with those imps in the other room, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46816 /* ~Perhaps I should be on my way.~ */ GOTO 17
  IF ~~ THEN REPLY #46817 /* ~Eager or not, prepare to die!~ */ GOTO 18
END

IF ~~ THEN BEGIN 21 // from: 13.0
  SAY #46818 /* ~What, you think I can't smell just because I got the one-big-eye thing going?  How much do you know about magic, anyway?  You're almost as bad as those imps.~ */
  IF ~~ THEN REPLY #46819 /* ~Is there no way I can release you from your task?~ */ GOTO 20
  IF ~~ THEN REPLY #46820 /* ~What is it, exactly, that you guard?~ */ GOTO 4
  IF ~~ THEN REPLY #46821 /* ~What's with those imps, anyway?~ */ GOTO 14
  IF ~~ THEN REPLY #46822 /* ~Maybe I should just be on my way...~ */ GOTO 17
  IF ~~ THEN REPLY #46823 /* ~I will not stand to be insulted by a creature of evil!  Prepare to die!~ */ GOTO 18
END

IF ~NumTimesTalkedToGT(0)
!Global("SpectatorAllowsChest","GLOBAL",1)
Global("BadOpen","AR2300",0)
!PartyHasItem("key26")~ THEN BEGIN 22 // from:
  SAY #46824 /* ~If you're going to ask me for a game of peek-a-boo, I'm not interested.~ */
  IF ~~ THEN REPLY #46825 /* ~No, no.  I'm just wondering which of these chests you actually guard.~ */ GOTO 4
  IF ~~ THEN REPLY #46826 /* ~I'd like to know how you ended up here.~ */ GOTO 9
  IF ~~ THEN REPLY #46827 /* ~I'd like you to tell me about those imps, if you can.~ */ GOTO 14
  IF ~~ THEN REPLY #46828 /* ~Is there no way I can convince you to let me see what's in that chest you guard?~ */ GOTO 23
  IF ~~ THEN REPLY #46829 /* ~Well, I'll be on my way, then...~ */ GOTO 28
  IF ~~ THEN REPLY #46830 /* ~I'd rather kill you than play games, beholder!~ */ GOTO 29
END

IF ~~ THEN BEGIN 23 // from: 22.3 20.1 19.0
  SAY #46831 /* ~What?  Are you in desperate need, or something?  You have a dying relative that desperately needs what's in this chest?~ */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 24 // from: 23.0
  SAY #46832 /* ~OH, I get it!  You just HAVE to have what's in this chest, right?  Because if a Beholder's guarding it, it HAS to be cool!~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #46833 /* ~Keep in mind that the drow who summoned me was mad.  But, hey, who am I to judge, I suppose.  I've been playing tic-tac-toe with a pair of imps for sixty years.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #46834 /* ~... sigh...~ */
  IF ~~ THEN GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.0
  SAY #46835 /* ~Oh... in case you didn't hear an answer in that: no, you CAN'T look at what's in the chest.  The drow specifically summoned me to guard *this* chest.~ */
  IF ~!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("HaerDalis")
!IsValidForPartyDialog("Cernd")
!CheckStatGT(LastTalkedToBy,12,WIS)~ THEN UNSOLVED_JOURNAL #7242 /* ~A Spectator and his chest are rarely parted.

I've encountered a peculiar Spectator Beholder, set to guard a particular chest for a lengthy time.  He doesn't seem malevolent, but if I want in that chest I guess I have no choice but to fight him.  Perhaps someone wiser might be able to talk him into helping us out, but I don't know.~ */ EXIT
  IF ~!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("HaerDalis")
!IsValidForPartyDialog("Cernd")
CheckStatGT(LastTalkedToBy,12,WIS)~ THEN REPLY #55282 /* ~Did the drow summon you to guard just the chest or what's inside the chest?~ */ GOTO 33
  IF ~IsValidForPartyDialog("Edwin")~ THEN EXTERN ~EDWINJ~ 96
  IF ~!IsValidForPartyDialog("Edwin")
IsValidForPartyDialog("HaerDalis")~ THEN EXTERN ~HAERDAJ~ 101
  IF ~!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("HaerDalis")
IsValidForPartyDialog("Cernd")~ THEN EXTERN ~CERNDJ~ 101
END

IF ~~ THEN BEGIN 28 // from: 22.4
  SAY #46836 /* ~What, you were actually going to ask me to play peek-a-boo?  For a supposedly smart <RACE>, you don't have much imagination with the eye jokes, do you?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 29 // from: 22.5
  SAY #46837 /* ~Oh, promises, promises.  My eye's bigger than your whole head, you creepy little <RACE>.~ */
  IF ~~ THEN EXIT
END

IF ~!Global("SpectatorAllowsChest","GLOBAL",1)
PartyHasItem("key26")
Global("SpectatorSpeaks","AR2300",1)
~ THEN BEGIN 30 // from:
  SAY #49727 /* ~I warned you!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~False()~ THEN BEGIN 31 // from:
  SAY #50048 /* ~I hope you know what you're doing!~ */
  IF ~~ THEN EXIT
END

IF ~False()~ THEN BEGIN 32 // from:
  SAY #50049 /* ~What fun! The guardians awake!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 33 // from: 27.1
  SAY #55288 /* ~Hmmmn.  Well, he screamed 'my chest', as I recall.  A spear was being thrust through his own chest at the time, though, so he could have been referring to that.~ */
  IF ~~ THEN GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 33.0
  SAY #55289 /* ~I assume he was talking about *this* chest, though.  And that means I can't let you open it... or do anything to it... even if I'm not guarding what's inside.~ */
  IF ~!IsValidForPartyDialog("Jan")
!IsValidForPartyDialog("HaerDalis")
!CheckStatGT(LastTalkedToBy,12,WIS)~ THEN UNSOLVED_JOURNAL #5014 /* ~A Spectator and his chest are rarely parted.

The Spectator Beholder seems determined to guard his chest, though he would admit that he guards the chest itself and not what's inside.  That's all I could get out of him.  Perhaps someone wiser could convince him to help us out.~ */ EXIT
  IF ~!IsValidForPartyDialog("Jan")
!IsValidForPartyDialog("HaerDalis")
CheckStatGT(LastTalkedToBy,12,WIS)~ THEN REPLY #55290 /* ~But that doesn't mean *you* can't open it, right?  Then I could get what's inside without touching anything.~ */ GOTO 35
  IF ~IsValidForPartyDialog("Jan")~ THEN EXTERN ~JANJ~ 148
  IF ~!IsValidForPartyDialog("Jan")
IsValidForPartyDialog("HaerDalis")~ THEN EXTERN ~HAERDAJ~ 102
END

IF ~~ THEN BEGIN 35 // from: 34.1
  SAY #55294 /* ~Hey, you're probably right.  Hmmn.  Actually, I've been wondering what was inside.  Tell you what... I won't turn around and you just go take a look, ok?~ */
  IF ~~ THEN DO ~Unlock("Spectator Chest")
SetGlobal("SpectatorAllowsChest","GLOBAL",1)~ EXIT
END

IF ~~ THEN BEGIN 36 // from:
  SAY #55295 /* ~Do-de-dum-de-doo-de-dum-dum...~ */
  IF ~~ THEN DO ~MoveToPointNoInterrupt([1012.2377])
Face(8)~ EXIT
END

IF ~PartyHasItem("key26")
Global("SpectatorAllowsChest","GLOBAL",1)~ THEN BEGIN 37 // from:
  SAY #55296 /* ~Hmph.  Is that it?  Shoot, you'd have thought the whole future of the drow race depended on it or something, the way that mad drow was screaming.~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 38 // from: 37.0
  SAY #55297 /* ~(sigh)  I suppose I have to resign myself, now, to guarding a completely empty chest for the next forty years. Yay.~ */
  IF ~!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Nalia")~ THEN REPLY #55298 /* ~Why?  What would be the point?~ */ GOTO 39
  IF ~!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Aerie")
!IsValidForPartyDialog("Nalia")~ THEN REPLY #55299 /* ~I suppose if you have to...~ */ GOTO 43
  IF ~IsValidForPartyDialog("Imoen2")~ THEN EXTERN ~IMOEN2J~ 14
  IF ~!IsValidForPartyDialog("Imoen2")
IsValidForPartyDialog("Edwin")~ THEN EXTERN ~EDWINJ~ 97
  IF ~!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Edwin")
IsValidForPartyDialog("Aerie")~ THEN EXTERN ~AERIEJ~ 132
  IF ~!IsValidForPartyDialog("Imoen2")
!IsValidForPartyDialog("Edwin")
!IsValidForPartyDialog("Aerie")
IsValidForPartyDialog("Nalia")~ THEN EXTERN ~NALIAJ~ 271
END

IF ~~ THEN BEGIN 39 // from: 38.0
  SAY #55304 /* ~Huh.  You know... you're absolutely right.  Not even that drow mage would want me to guard an empty chest.  It's not even a *nice* chest.~ */
  IF ~~ THEN GOTO 40
END

IF ~~ THEN BEGIN 40 // from: 43.0 39.0
  SAY #55305 /* ~There's no way that the Beholder Council, bloated bladder-bags that they are, would hold me responsible for this contract!  I... I'm free!  Free!!  Yippee!~ */
  IF ~!Dead("sahimp01")
!Dead("sahimp02")~ THEN GOTO 41
  IF ~OR(2)
Dead("sahimp01")
Dead("sahimp02")~ THEN GOTO 42
END

IF ~~ THEN BEGIN 41 // from: 40.0
  SAY #55310 /* ~What to do now?  Hmmn.  Kill the imps... yeah.  Those bastards deserve to die.  But first I'm gonna go eat something.  You have *no* idea how hungry I am.~ */
  IF ~~ THEN DO ~EraseJournalEntry(7242)
EraseJournalEntry(5014)
AddExperienceParty(15000)
EscapeArea()~ SOLVED_JOURNAL #23225 /* ~A Spectator and his chest are rarely parted.

I convinced the Spectator Beholder to let me open the chest and I retrieved Sekolah's Tooth from inside.  The Beholder decided there is no point in guarding an empty box, so he has wandered off, pleased.  Not a bad guy, overall.~ */ EXIT
END

IF ~~ THEN BEGIN 42 // from: 40.1
  SAY #55311 /* ~What to do now?  Hmmn.  The Underdark is near here, isn't it?  That means a female beholder can't be far.  And *that* means... well, never you mind.~ */
  IF ~~ THEN DO ~EraseJournalEntry(7242)
EraseJournalEntry(5014)
AddExperienceParty(15000)
EscapeArea()~ SOLVED_JOURNAL #23225 /* ~A Spectator and his chest are rarely parted.

I convinced the Spectator Beholder to let me open the chest and I retrieved Sekolah's Tooth from inside.  The Beholder decided there is no point in guarding an empty box, so he has wandered off, pleased.  Not a bad guy, overall.~ */ EXIT
END

IF ~~ THEN BEGIN 43 // from: 38.1
  SAY #55312 /* ~Hmm.  Maybe I *don't* have to.   Not even that drow mage would want me to guard an empty chest, right?  No one would want that!  It's not even a *nice* chest.~ */
  IF ~~ THEN GOTO 40
END

IF ~Global("SpectatorAllowsChest","GLOBAL",1)~ THEN BEGIN 44 // from:
  SAY #55316 /* ~Well, go ahead and look in the chest, already.  Sheesh.  Whaddaya need, a nudge?  I'm afraid I can only offer you a wink, there, chummer.~ */
  IF ~~ THEN EXIT
END
