// creator  : weidu.exe (version 23100)
// argument : _TREMAI.DLG
// game		 : .
// source	 : ./override/_TREMAI.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~_TREMAI~

IF ~NumberOfTimesTalkedTo(0)
Global("HelpVarci","GLOBAL",1)
!Dead("varci")
~ THEN BEGIN 0 // from:
  SAY #80187 /* ~There is nothing I can do, but I must do something.  'Tis a risk, and risk is everything!~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #80188 /* ~Varci!  Who have you brought here?!  I told you I must be alone with my thoughts!~ */
  IF ~~ THEN EXTERN ~_VARCI~ 7
END

IF ~~ THEN BEGIN 2 // from: _VARCI:7.0
  SAY #80189 /* ~You'll tell me later how you know in what alleys to learn such things.  For now however, you are correct.  We are in need of assistance and none in the clergy must know.  Greetings to you all.  I am Lord Priest Tremain Belde'ar, a humble servant of Our Smiling Lady Tymora.  My request of you is an odd and very dangerous one.  I will not hold you to it if you deem it too extreme.  I would have you enter The Water-Queen's House, and retrieve my son's body.  He and Varci sought to indulge their restless nature by sneaking about the place, and a high price was paid.~ */
  IF ~~ THEN EXTERN ~_VARCI~ 8
  IF ~Global("X#VicTrem","GLOBAL",0)
InParty("viconia")
InMyArea("viconia")
!StateCheck("viconia",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VicTrem","GLOBAL",1)~ EXTERN ~_VICONJ~ 130
END

IF ~~ THEN BEGIN 3 // from: _VARCI:8.0
  SAY #80190 /* ~A harsh sentence for a simple prank, but trespassing on holy ground, whatever the faith, is not a small crime.  You must bring his body to me, that I might restore his life to him.  If you can retrieve him, I will reward you whether I am able to revive him or not.  What say you?~ */
  IF ~~ THEN REPLY #80191 /* ~You are a man of some import.  Why do you not organize your own temple brethren to aid you?~ */ GOTO 4
  IF ~~ THEN REPLY #80192 /* ~I would know what payment I can expect.  I'll not take this task with out knowing what it is worth.~ */ GOTO 5
  IF ~~ THEN REPLY #80193 /* ~Luck or no, it would be a shame to lose your life because of the foolishness of youth.  I'll help as best I can.~ */ GOTO 8
  IF ~~ THEN REPLY #80194 /* ~Casson chose his path of his own free will.  I'll not risk my life to rescue the one he wasted.~ */ GOTO 7
  IF ~Global("X#JaheiraTremai","GLOBAL",0)
InParty("jaheira")
InMyArea("jaheira")
!StateCheck("jaheira",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#JaheiraTremai","GLOBAL",1)~ EXTERN ~_JAHEIJ~ 87
END

IF ~~ THEN BEGIN 4 // from: 5.1 3.0
  SAY #80195 /* ~An astute question.  High Priest Chanthalas has deemed that Casson knowingly took a risk, and luck determined his fate.  Since Tymora be the Lady of Luck, it is that fate we are officially to abide by.  I, however, disagree.  While Casson did dare and fail, I see no reason that I should not take the risk to rescue him.  It makes no sense to me for Tymora to grant her servants resurrection powers, if to use them would anger her or interfere with the "fate" of another.  So now I find I must move against the wishes of my church, but not the spirit of it.  To me, it seems that they are more concerned about incurring the wrath of the Umberlants, than in following the spirit of adventure.  You may anger her clergy by helping me, but I believe Tymora will smile on all of us.~ */
  IF ~~ THEN REPLY #80196 /* ~I have no desire to incur the wrath of any temple or deity.  I will not accept your offer.~ */ GOTO 7
  IF ~~ THEN REPLY #80192 /* ~I would know what payment I can expect.  I'll not take this task with out knowing what it is worth.~ */ GOTO 5
  IF ~~ THEN REPLY #80193 /* ~Luck or no, it would be a shame to lose your life because of the foolishness of youth.  I'll help as best I can.~ */ GOTO 8
  IF ~~ THEN REPLY #80194 /* ~Casson chose his path of his own free will.  I'll not risk my life to rescue the one he wasted.~ */ GOTO 7
  IF ~Global("X#GarTre","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#GarTre","GLOBAL",1)~ EXTERN ~_GARRIJ~ 125
END

IF ~~ THEN BEGIN 5 // from: 4.1 3.1
  SAY #80197 /* ~My position in the temple does not allow for the stockpiling of great wealth, but many an adventurer before you have made tidings in exchange for our blessing.  I can offer a meager amount of gold, but will better that with a magical item gifted me by one of said groups.  I hope this will suffice?~ */
  IF ~~ THEN REPLY #80198 /* ~Magic or no, I should require more than a "meager" amount of gold.  Certainly if many adventurers give so much, there be ample coin in church holdings?  Make that mine and we have a deal.~ */ GOTO 6
  IF ~~ THEN REPLY #80191 /* ~You are a man of some import.  Why do you not organize your own temple brethren to aid you?~ */ GOTO 4
  IF ~~ THEN REPLY #80193 /* ~Luck or no, it would be a shame to lose your life because of the foolishness of youth.  I'll help as best I can.~ */ GOTO 8
  IF ~~ THEN REPLY #80194 /* ~Casson chose his path of his own free will.  I'll not risk my life to rescue the one he wasted.~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #80199 /* ~I'll not compound my worries by taking out of the temple coffers!  It is an affront to even suggest such a thing!  Had we required mercenary thinking, we'd have hired mercenaries!  Varci, escort these misers out!~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 5.3 4.3 4.0 3.3
  SAY #80200 /* ~Your decision is painful, but reasonable from a certain perspective.  I apologize for taking up your time.  Varci, escort our guests to the door.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 5.2 4.2 3.2
  SAY #80201 /* ~There is hope for my son yet.  I cannot tell you where in the Umberlant Temple Casson would be kept, but I would advise you to be careful.  They seem a right unfriendly group, but once you get to know them they seem out-and-out heartless.  Please hurry!~ */
  IF ~~ THEN DO ~SetGlobal("HelpTremain","GLOBAL",1)
~ UNSOLVED_JOURNAL #80202 /* ~Tremain's son

I have promised Tremain Belde'ar that I will rescue the body of his son from the Temple of Umberlee near the docks.  I can find Tremain in a house just north of the Hall of Wonders.~ */ EXIT
  IF ~Global("X#AjantisTremain","GLOBAL",0)
InParty("ajantis")
InMyArea("ajantis")
!StateCheck("ajantis",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#AjantisTremain","GLOBAL",1)~ EXTERN ~_AJANTJ~ 73
END

IF ~!PartyHasItem("_MISC54")
!GlobalTimerExpired("Varci","GLOBAL")
Global("HelpTremain","GLOBAL",1)
Global("TremainMove","GLOBAL",0)
!Dead("varci")
~ THEN BEGIN 9 // from:
  SAY #80203 /* ~No success as yet, I see.  It is imperative that you bring the body of my son within the next few days, or his resurrection will be beyond my ability.~ */
  IF ~~ THEN EXIT
END

IF ~GlobalTimerExpired("Varci","GLOBAL")
Global("HelpTremain","GLOBAL",1)
Global("TremainMove","GLOBAL",0)
!Dead("varci")
~ THEN BEGIN 10 // from:
  SAY #80204 /* ~Your efforts are appreciated, fruitless thought they were.  The limit of my power has been exceeded with the passing of time, and death has firmly grasped my son's fate.  I would be alone now, Varci will see you to the door.~ */
  IF ~~ THEN EXTERN ~_VARCI~ 10
END

IF ~PartyHasItem("_MISC54")
!GlobalTimerExpired("Varci","GLOBAL")
Global("HelpTremain","GLOBAL",1)
Global("TremainMove","GLOBAL",0)
!Dead("varci")
~ THEN BEGIN 11 // from:
  SAY #80205 /* ~By all the gods, The Lady Who Smiles must be positively beaming this day!  Quickly, get the body inside where I prithee Tymora will grant it life anew.  I'll not waste another moment until my son's soul is on solid ground once more.  Come with, and see the wonder.~ */
  IF ~~ THEN DO ~TakePartyItem("_MISC54")
DestroyItem("_MISC54")
SetGlobal("TremainMove","GLOBAL",1)
MoveToPoint([420.320])
~ EXIT
END

IF ~Global("TremainMove","GLOBAL",1)
~ THEN BEGIN 12 // from:
  SAY #80206 /* ~Now the moment I have yearned for.  Please all, no noise.  I must concentrate.~ */
  IF ~~ THEN DO ~SetGlobal("TremainMove","GLOBAL",2)
CreateCreature("_CASSON",[413.334],0)
ActionOverride("casson",Dialog([PC]))
~ EXIT
END

IF ~~ THEN BEGIN 13 // from:
  SAY #80216 /* ~Blessed be Our Smiling Lady!  He lives!  Son, can you hear me?~ */
  IF ~~ THEN EXTERN ~_CASSON~ 1
END

IF ~~ THEN BEGIN 14 // from:
  SAY #80217 /* ~Oh, my dear dear boy... you are IN SUCH TROUBLE!  What in all the planes were you thinking child?!  Gallivanting through an Umberlant Temple like that?!  So help me, if turning you over my knee wouldn't kill you outright, you'd jump black to go right to blue!~ */
  IF ~~ THEN EXTERN ~_CASSON~ 2
END

IF ~~ THEN BEGIN 15 // from:
  SAY #80218 /* ~Oh, no you don't!  If you want to play the odds, you had best be sure you take responsibility for yourself!  The Goddess of Luck and Adventure does not endorse DUMB luck or foolish risks!  I swear, if your mother were alive to hear about this she'd drop dead where she stood, and THEN I'd have to raise her TOO!  Do you have any idea what this spell takes out of a person?!~ */
  IF ~~ THEN EXTERN ~_CASSON~ 3
END

IF ~~ THEN BEGIN 16 // from:
  SAY #80219 /* ~Not another word past your lips, young man!  You're off to your room and see if I let you out before you're four score and twenty!  March!~ */
  IF ~~ THEN EXTERN ~_CASSON~ 4
END

IF ~~ THEN BEGIN 17 // from: _VICONJ:130.1
  SAY #100820 /* ~Yes, but I will see he learns from it, when I raise him. That’s why I need your help.~ */
  IF ~~ THEN EXTERN ~_VARCI~ 8
END
