ADD_STATE_TRIGGER ~ELDOTJ~ 10 ~Global("X#EldothRansom","GLOBAL",0)~

EXTEND_BOTTOM ~ELDOTJ~ 10
IF ~InParty("ELDOTH")~ THEN DO ~SetGlobal("X#EldothRansom","GLOBAL",1)~ EXIT
END

INTERJECT_COPY_TRANS ~BGWILLIA~ 10 ManyInt9
== ~ELDOTJ~ IF ~InParty("eldoth") !Dead("eldoth") !StateCheck("eldoth",STATE_SLEEPING)~ THEN ~I must say this is the most inspiring tale I have heard about <CHARNAME> to date.~
== ~BGWILLIA~ IF ~InParty("eldoth") !Dead("eldoth") !StateCheck("eldoth",STATE_SLEEPING)~ THEN ~Aye, little one...~
END

// Eldoth Interjection (meeting Priilmu, in chapter 7. He's the beggar/priest of Ilmater in area FW0149 whose idea of suffering includes visits to the Undercellar and who can take you there.)

EXTEND_BOTTOM ~PRIILMU~ 0
IF ~IsValidForPartyDialog("ELDOTH")~ THEN EXTERN ~BELDOT~ EldothPriest
END

CHAIN
IF WEIGHT #-2 ~~ THEN ~BELDOT~ EldothPriest
~Prilly! Is it really you?~
DO ~SetGlobal("EldPriest1","GLOBAL",1)~
== ~PRIILMU~ ~Eh? Whozzat? Why, Eldoth! My boy, my boy. It has been a time, hasn't it?~
== ~BELDOT~  ~But...you...here? You were off to conquer the salons of Waterdeep, last I saw you.~
== ~PRIILMU~ ~So I was. And so I did, for a time. But the Blackstaff is a cruel, hard man to run foul of. Thus, I'm right pleased to be able to be here now.~
== ~BELDOT~  ~Hah! I should imagine! Still, I've always thought that priests were dodgey fellows. I am pleased to know so now, for certain.~
== ~PRIILMU~ ~Oh, 'tisn't all scam, lad. My suffering's real enough.~
== ~BELDOT~  ~So it must be else you'd have turned up as an acolyte of Lady Firehair, which, if I recall, was always your true devotion.~
== ~PRIILMU~ ~Sune, eh? Well, I won't deny that I am still acquainted with some...practical practitioners of the Lady's arts. Y'see, there's this place called the Undercellar and...~
END
++ ~Ahem! I think these reminiscences have gone on *quite* long enough. We have a task that we must be about.~ EXTERN ~PRIILMU~ PriEld1.10
+ ~PartyHasItem("scrl3f")!PartyHasItem("misc78")~ + ~The Undercellar? It is there we must go! At once!~ EXTERN ~PRIILMU~ PriEld1.11
IF ~PartyHasItem("misc78")~ THEN REPLY ~We've been there. The most interesting feature of the place is the brace of assassins we killed.~ EXTERN ~PRIILMU~ PriEld1.12

CHAIN
IF ~Global("EldPriest1","GLOBAL",1) !Global("PRIELD","GLOBAL",3)~ THEN  ~PRIILMU~ PriEld1.10
~Oooh, a proper young fogey, aren't we? Well, then, off with you and I hope you like your suffering neat when you find it.~
== ~BELDOT~ ~No fear, oh mentor of my youth. <CHARNAME>'s well fermented in that brew. And...er...something to prolong your agony.~
DO ~TakePartyGold("100") SetGlobal("PRIELD","GLOBAL",1) RealSetGlobalTimer("EldPoetPri","GLOBAL",10)
ActionOverride(Player1,LeaveAreaLUAPanic("AR7400","",[1053.1330],12))
ActionOverride(Player1,LeaveAreaLUA("AR7400","",[1053.1330],12))
ActionOverride(Player1,SetMasterArea("AR7400"))
ActionOverride(Player2,LeaveAreaLUA("AR7400","",[1077.1360],12))
ActionOverride(Player3,LeaveAreaLUA("AR7400","",[1113.1384],12))
ActionOverride(Player4,LeaveAreaLUA("AR7400","",[1145.1358],12))
ActionOverride(Player5,LeaveAreaLUA("AR7400","",[1121.1333],12))
ActionOverride(Player6,LeaveAreaLUA("AR7400","",[1086.1310],12))~
EXIT

//Eldoth FAI

APPEND ~BENTLY~

IF WEIGHT #-1 ~InParty("Eldoth")
!StateCheck("Eldoth",STATE_SLEEPING)
Global("BentEld","GLOBAL",0)~ THEN BEGIN BentEld1.1
SAY ~Greetings, travelers, what can I do...YOU!!! Guards! GUARDS!!!~
IF ~~ THEN DO ~SetGlobal("BentEld","GLOBAL",1)~ EXTERN ~ELDOTJ~ 
BentEld1.2
END

IF ~~ THEN BEGIN BentEld1.3
SAY ~It is not a 'need'. It is my very great pleasure!~
IF ~~ THEN REPLY ~Uh...anyone want to tell me what all the shouting's about?~ GOTO BentEld1.4
END

IF ~~ THEN BEGIN BentEld1.4
SAY ~This...vagabond!...offered to "sing for his supper." We get little entertainment here so I thought it worth the chance. HA! Within two insulting songs he had the whole place in riot! Took me a fortnight to repair all the damage.~
IF ~~ THEN EXTERN ~ELDOTJ~ BentEld1.5
END

IF ~~ THEN BEGIN BentEld1.6
SAY ~Including the three bottles you made off with, when the trouble started.~
IF ~~ THEN EXTERN ~ELDOTJ~ BentEld1.7
END

IF ~~ THEN BEGIN BentEld1.8
SAY ~Hmph!~
IF ~~ THEN DO ~StartStore("X#FRIED2",LastTalkedToBy(Myself))~
EXIT
END

IF WEIGHT #-1 ~InParty("Eldoth")
GlobalGT("BentEld","GLOBAL",0)~ THEN BEGIN BentEld1.9
SAY ~You back? Say what you want and be quick about it!~
IF ~~ THEN DO ~StartStore("X#FRIED2",LastTalkedToBy(Myself))~
EXIT
END
END

//Priest of Ilmaater

APPEND ~PRIILMU~

IF ~~ THEN BEGIN PriEld1.11
SAY ~Whee! Aren't you the ardent young creature then?~
IF ~~ THEN REPLY ~No, no. Our enemies have set a rendezvous there. We must catch them!~ GOTO PriEld1.14
END

IF ~~ THEN BEGIN PriEld1.12
SAY ~Ha! Prefer your cut-and-thrust to slap-and-tickle, eh? You'll learn in time - if you are granted time. Young Eldoth, there, would make you a good teacher.~
IF ~~ THEN EXTERN ~ELDOTJ~ PriEld1.16
END

IF ~~ THEN BEGIN PriEld1.14
SAY ~Sure, sure. One of the girls is a disguised green dragon, is it? Bet it's that new bird, Mistie, that everyone's...no. Well, I will show you a...private...entrance. But try not to wreck the place entirely, eh? I do suffer sublimely there!~
IF ~~ THEN EXTERN ~ELDOTJ~ PriEld1.15
END

IF ~~ THEN BEGIN PriEld1.17
SAY ~Find yourself the right girdle and I *will* school you, lad. *sigh* Of course, at my age, you'd have to imagine a deal of it...~
IF ~~ THEN EXIT
END

IF WEIGHT #-2 ~InParty("Eldoth")
Global("PRIELD","GLOBAL",4) Global("EldPriest1","GLOBAL",1)~ THEN BEGIN PriEld2.1
SAY ~Ah, returned you are. Care for the naughty jaunt, then?~
IF ~~ REPLY ~Yes, I think we should go there.~ GOTO PriEld2.2
IF ~~ REPLY ~Uh...no. Forget I blundered back in here.~ EXIT
END

IF ~~ THEN BEGIN PriEld2.2
SAY ~Ah, sweet evening crowns the hottest day. This way.~
IF ~~ THEN
DO ~TakePartyGold("100") SetGlobal("PRIELD","GLOBAL",2) RealSetGlobalTimer("EldPoetPri","GLOBAL",10)
ActionOverride(Player1,LeaveAreaLUAPanic("AR7212","",[132.282],12))
ActionOverride(Player1,LeaveAreaLUA("AR7212","",[132.282],12))
ActionOverride(Player1,SetMasterArea("AR7212"))
ActionOverride(Player2,LeaveAreaLUA("AR7212","",[176.247],12))
ActionOverride(Player3,LeaveAreaLUA("AR7212","",[231.197],12))
ActionOverride(Player4,LeaveAreaLUA("AR7212","",[185.327],12))
ActionOverride(Player5,LeaveAreaLUA("AR7212","",[262.299],12))
ActionOverride(Player6,LeaveAreaLUA("AR7212","",[352.268],12))~ EXIT
END

END

APPEND ~ELDOTJ~

IF ~~ THEN BEGIN BentEld1.2
SAY ~Now, now, good sir. No need to upset your house on my account.~
IF ~~ THEN EXTERN ~BENTLY~ BentEld1.3
END

IF ~~ THEN BEGIN BentEld1.5
SAY ~You should not have provided so much...or such excellent...wine with the meal, then, good sir.~
IF ~~ THEN EXTERN ~BENTLY~ BentEld1.6
END

IF ~~ THEN BEGIN BentEld1.7
SAY ~But that was then, this is now. I am...alas...perfectly sober and shall remain so whilst under your roof, I daresay. You will also note that I enjoy the estimable...and capable...company of <CHARNAME> on this visit. So might we partake of your offerings, if you please?~
IF ~~ THEN EXTERN ~BENTLY~ BentEld1.8
END

// Eldoth Reacts to being teleported by the priest

IF WEIGHT #-100 ~Global("PRIELD","GLOBAL",3)~ THEN BEGIN PriEld3.1
SAY ~O, Prilly, Prilly...~
= ~The filigree of Wenroth town
Is cast afire by the evening sun.
Come, my love, let us go down
To see how Time limns wealth renown'd.~
IF ~~ THEN REPLY ~You're quoting that old goat? Sounds to me like one more excuse to get his girl friends out-of-doors of an evening.~ DO ~SetGlobal("PRIELD","GLOBAL",4)~ GOTO PriEld3.2
IF ~~ THEN REPLY ~That old fraud again? Speaking of whom, weren't you awfully generous to him with *our* money?~ DO  ~SetGlobal("PRIELD","GLOBAL",4)~ GOTO PriEld3.3
IF ~~ THEN REPLY ~Phhhtt!~ DO ~SetGlobal("PRIELD","GLOBAL",4)~ EXIT
END


IF ~~ THEN BEGIN PriEld1.13
SAY ~No fear, oh mentor of my youth. <CHARNAME>'s well fermented in that brew. And...er...something to prolong your agony.~
IF ~~ THEN DO ~SetGlobal("EldPriest1","GLOBAL",1)~ EXIT
END

IF ~~ THEN BEGIN PriEld1.15
SAY ~No fear, oh mentor of my youth. We shall be discrete. And... er... something to prolong your agony.~
IF ~~ THEN DO ~TakePartyGold("100") SetGlobal("PRIELD","GLOBAL",2) RealSetGlobalTimer("EldPoetPri","GLOBAL",10)
ActionOverride(Player1,LeaveAreaLUAPanic("AR7212","",[132.282],12))
ActionOverride(Player1,LeaveAreaLUA("AR7212","",[132.282],12))
ActionOverride(Player1,SetMasterArea("AR7212"))
ActionOverride(Player2,LeaveAreaLUA("AR7212","",[176.247],12))
ActionOverride(Player3,LeaveAreaLUA("AR7212","",[231.197],12))
ActionOverride(Player4,LeaveAreaLUA("AR7212","",[185.327],12))
ActionOverride(Player5,LeaveAreaLUA("AR7212","",[262.299],12))
ActionOverride(Player6,LeaveAreaLUA("AR7212","",[352.268],12))~ EXIT
END

IF ~~ THEN BEGIN PriEld1.16
SAY ~Ha! Had I learnt but a tithe of your lessons, I'd be a master, indeed! Oh...and a little something to prolong your agony.~
IF ~~ THEN EXTERN ~PRIILMU~ PriEld1.17
END

IF ~~ THEN BEGIN PriEld3.2
SAY ~Yes, indeed. So many approaches - so few, so very few, women worthy of their use.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN PriEld3.3
SAY ~I...well...Dammit! He was a good man...a *great* poet. I cannot abide the thought of his having to boil his loincloth to make broth out of the lice which infest it.~
IF ~~ THEN EXIT
END


// Eldoth, Upon Entering Thieve's Guild For The First Time
IF WEIGHT #-2 ~Global("EUETGFTFT","GLOBAL",1)~ THEN BEGIN EUETGFTFT1
SAY ~Ah, the sweet smell of ill-gotten gains. I wonder if any are lying about?~
IF ~~ THEN DO ~SetGlobal("EUETGFTFT","GLOBAL",2)~ EXIT
END

// Eldoth, Upon Entering Temple Of Tymora For The First Time
IF WEIGHT #-2 ~Global("EUETOTFTFT","GLOBAL",1)~ THEN BEGIN EUETOTFTFT1
SAY ~Let be quick, <CHARNAME>. I like not these precincts.~
++ ~Really? I'd have thought you, of all people, would feel right at home here.~ DO ~SetGlobal("EUETOTFTFT","GLOBAL",2)~ + EUETOTFTFT2
END

// Eldoth, Upon Entering Temple Of Tymora For The First Time (reply to PC)
IF ~~ EUETOTFTFT2
SAY ~Then I am pleased to save you from my error. The Lady has never glanced at me but with a cocked eye. This accounts for my conservative tastes and tactics, you see.~
IF ~~ EXIT
END

// Eldoth, On First Floor Of Candlekeep Library
IF WEIGHT #-2 ~Global("EOFFOCL","GLOBAL",1)~ THEN BEGIN EOFFOCL1
SAY ~<CHARNAME>, I owe you an apoplogy. What I had taken for a dull streak, was but the resdiuum of this dust-ridden mausoleum.~
++ ~It's quiet, I'll grant but not that bad. People learning and thinking can't be expected to sound like Carnival at Waterdeep, you know.~ DO ~SetGlobal("EOFFOCL","GLOBAL",2)~ + EOFFOCL2
END

// Eldoth, On First Floor Of Candlekeep Library (reply to PC)
IF ~~ EOFFOCL2
SAY ~I don't expect that...but learning should be to some purpose, not an end in itself. After a childhood here, where knowledge skulks, then dies, I am amazed you have survived a life on the road.~
IF ~~ EXIT
END
 
// Eldoth, On Reaching The First Level Of The Low Lantern (gambling ship)
IF WEIGHT #-2 ~Global("EORTFLOTLL","GLOBAL",1)~ THEN BEGIN EORTFLOTLL1
SAY ~Y'know, <CHARNAME>, I've been aboard more than a few ships but never one with quite these amenities. I wonder, when this is all done, if we might charter her for a quiet, celebratory cruise.~
++ ~If it is to be quiet, why sail away from the dock? This tub looks like it would flounder under attack by flying fish.~ DO ~SetGlobal("EORTFLOTLL","GLOBAL",2)~ + EORTFLOTLL2
END

// Eldoth, On Reaching The First Level Of The Low Lantern (gambling ship) (reply to PC)
IF ~~ EORTFLOTLL2
SAY ~By 'quiet' I meant it shouldn't be audible to the mainland from five leagues out at sea. And a suitable success on our part, aptly publicized...it would be a point of honor for many of these resplendently attired citizens to attend.~
++ ~Forget it! When this is done, I'm going to dig a hole, crawl in and become a radish. I most definitely am NOT going to sponsor your mass fleecing of the richest, and loudest talking, nobles in Baldur's Gate.~ + EORTFLOTLL3
END

// Eldoth, On Reaching The First Level Of The Low Lantern (gambling ship) (reply to PC)
IF ~~ EORTFLOTLL3
SAY ~Ha! Ha! I do hope your tubrous ambitions come to naught; you are so full of insight. A quick score would be in poor taste...and make it all the more difficult to evade retribution. A solid percentage from a more...permanent establishment, though, might be arranged.~
IF ~~ EXIT
END
END

//rumours file  for FAI

BEGIN ~rfried2~
IF ~True()~ THEN BEGIN Rumor1
SAY ~The sooner you lot are gone, the better I'll be pleased.~
IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN Rumor2
SAY ~Luskan's the place for vagrants like yourselves.  Head there, why don't you?~
IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN Rumor3
SAY ~'Tis said that Westgate is lovely this time of year.  Why don't you go there - or anywhere else - and see for yourselves?~
IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN Rumor4
SAY ~The custom you bring ain't worth the custom you drive off; nevermind the damages.~
IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN Rumor5
SAY ~Go away!~
IF ~~ THEN EXIT
END

IF ~True()~ THEN BEGIN Rumor5
SAY ~BEAT IT!!!~
IF ~~ THEN EXIT
END
