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

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

IF WEIGHT #2 /* Triggers after states #: 19 25 even though they appear after this state */
~Global("Pala","GLOBAL",3)
InParty("Mazzy")
CombatCounter(0)
!See([ENEMY])
Global("TemsupNoTalkBattle","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #24345 /* ~Good day to you, wanderers. What humble assistance can my Church and I offer?~ */
  IF ~ReactionLT(LastTalkedToBy,NEUTRAL_LOWER)
~ THEN REPLY #24346 /* ~I shall get right to the point, your grace. We have reason to believe that you have an agent of evil in your midst.~ */ DO ~SetGlobal("TalkedToTemSup","GLOBAL",1)~ GOTO 2
  IF ~~ THEN REPLY #24347 /* ~Shut up and listen, old man. We know your buddy Barl's been poisoning people and we're gonna kill him. Where is he?~ */ DO ~SetGlobal("TalkedToTemSup","GLOBAL",1)~ GOTO 4
  IF ~ReactionGT(LastTalkedToBy,HOSTILE_UPPER)
~ THEN REPLY #24348 /* ~We have come to speak with you about Barl, your grace. My small companion here, Mazzy, has good cause to believe that this fellow is an agent of evil.~ */ DO ~SetGlobal("TalkedToTemSup","GLOBAL",1)~ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.2
  SAY #24349 /* ~Evil? Among us? Surely you must be mistaken! Barl is a terrible acolyte, I admit. But I shouldn't think him to be evil.~ */
  IF ~~ THEN REPLY #24350 /* ~I assure you this is true.  Barl supplies Wallace, a local merchant, with potions... and one of those potions poisoned Mazzy's sister.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 0.0
  SAY #24351 /* ~This is highly unusual. I have no reason to believe mere strangers off the street when they accuse one of my priests of attempted murder.~ */
  IF ~~ THEN REPLY #24352 /* ~I understand your position. If you could only look for some evidence, perhaps search Barl's chambers.~ */ GOTO 5
  IF ~~ THEN REPLY #24353 /* ~You would do well to listen to me, priest. You would not want to get me angry.~ */ GOTO 4
END

IF ~~ THEN BEGIN 3 // from: 1.0
  SAY #24354 /* ~This is a highly unusual request. Barl's privacy must be respected... but if it clear things up, perhaps I could search his chambers.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 4 // from: 2.1 0.1
  SAY #24359 /* ~You would dare to threaten me? In the very temple of my god? Begone now, lest I call death down upon you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 5 // from: 2.0
  SAY #24361 /* ~This is a highly unusual request. Barl's privacy must be respected... However, if you display proper devotion to the church, perhaps we could come to an understanding.~ */
  IF ~PartyGoldGT(299)
~ THEN REPLY #24362 /* ~I understand, your grace. Will 300 gold pieces be a clear sign of devotion?~ */ DO ~TakePartyGold(300)~ GOTO 6
  IF ~~ THEN REPLY #24365 /* ~What kind of devotion do you speak of?~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 8.2 5.0 3.0
  SAY #24367 /* ~Let us, then, put this matter behind us. I shall look into Barl's chamber right now.  If I find hard evidence we will call Barl and see what he has to say about it. Wait here, if you would.~ */
  IF ~~ THEN DO ~StartCutSceneMode()
StartCutScene("Cut40a")~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 8.0 5.1
  SAY #24369 /* ~I refer to the gilded kind, of course. The church is struggling with Waukeen gone. 300 gp would show your devotion. Return when you have it. Until then, leave and speak of this to no one.~ */
  IF ~~ THEN DO ~SetGlobal("Devotion","GLOBAL",1)~ UNSOLVED_JOURNAL #34692 /* ~Save Mazzy's sister, Pala

The Temple Superior will not listen to us, nor search Barl's quarters for evidence of his poisoning until we gather a donation for the temple in the amount of 300 gp.~ */ EXIT
END

IF WEIGHT #3 /* Triggers after states #: 19 25 even though they appear after this state */
~Global("Devotion","GLOBAL",1)
Global("Pala","GLOBAL",3)
InParty("Mazzy")
CombatCounter(0)
!See([ENEMY])
Global("TemsupNoTalkBattle","GLOBAL",0)~ THEN BEGIN 8 // from:
  SAY #24370 /* ~You have returned. Are you ready to show your devotion?~ */
  IF ~~ THEN REPLY #24371 /* ~What kind of devotion was that again?~ */ GOTO 7
  IF ~~ THEN REPLY #24372 /* ~We are not ready to pay.~ */ GOTO 9
  IF ~PartyGoldGT(299)~ THEN REPLY #24373 /* ~Of course. Here it is.~ */ GOTO 6
END

IF ~~ THEN BEGIN 9 // from: 8.1
  SAY #24374 /* ~Return when you have 300 gp. Until then, leave and speak of this to no one.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 /* Triggers after states #: 19 25 even though they appear after this state */
~True()
CombatCounter(0)
!See([ENEMY])
Global("TemsupNoTalkBattle","GLOBAL",0)~ THEN BEGIN 10 // from:
  SAY #45196 /* ~Welcome to the temple of Waukeen, supplicant.  Is there something that I can do for you?~ */
  IF ~~ THEN REPLY #45197 /* ~I thought Waukeen was dead.  How can you still worship her?~ */ GOTO 11
  IF ~!Dead("Faldorn")~ THEN REPLY #45199 /* ~You aren't going to turn me away because I'm a stranger?~ */ GOTO 14
  IF ~~ THEN REPLY #45198 /* ~I'd like to see your services, please.~ */ GOTO 17
  IF ~~ THEN REPLY #45200 /* ~Nothing.  I'll be going.~ */ GOTO 18
END

IF ~~ THEN BEGIN 11 // from: 16.0 10.0
  SAY #45201 /* ~Contrary to the belief of some, my <GIRLBOY>, Waukeen is not dead.  She is simply missing.  The goddess of joy, Lliira, grants power to her worshippers in her stead, for now.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #45203 /* ~Some have, indeed, abandoned the Waukeenar faith for Lliira, Shaundakar and Tymora, thinking she will never return.  But this town was founded by Waukeen... we cannot abandon her.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #45204 /* ~I have faith, child.  And that is more than enough for most here in this town, you will see.~ */
  IF ~!Dead("Faldorn")~ THEN REPLY #45205 /* ~You aren't going to turn me away because I'm a stranger?~ */ GOTO 14
  IF ~~ THEN REPLY #45206 /* ~I'd like to see your services, please.~ */ GOTO 17
  IF ~~ THEN REPLY #45207 /* ~I'll be on my way.~ */ GOTO 18
END

IF ~~ THEN BEGIN 14 // from: 13.0 10.1
  SAY #45208 /* ~Certainly not, my <GIRLBOY>.  Waukeen is the goddess of trade... how would it look if I turned you away, simply because we have never met?~ */
  IF ~~ THEN GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.0
  SAY #45209 /* ~No, you are welcome in the home of the merchant's friend.  Of the rest of the people in this frightened town... I cannot speak for them.  I simply pray that things will change.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #45210 /* ~They are good people, child, who have been through much.  Do not think too harshly of them.~ */
  IF ~~ THEN REPLY #45211 /* ~I thought Waukeen was dead.  How can you still worship her?~ */ GOTO 11
  IF ~~ THEN REPLY #45212 /* ~I'd like to see your services.~ */ GOTO 17
  IF ~~ THEN REPLY #45213 /* ~I'll be on my way.~ */ GOTO 18
END

IF ~~ THEN BEGIN 17 // from: 16.1 13.1 10.2
  SAY #45214 /* ~Of course.  The Waukeenar are always willing to serve... at a fair and honest price, of course.~ */
  IF ~~ THEN DO ~StartStore("temsup",LastTalkedToBy)~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 16.2 13.2 10.3
  SAY #45215 /* ~May fortune seek you, child.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~Global("SearchBarl","GLOBAL",1)
!Dead("barl")
CombatCounter(0)
!See([ENEMY])
Global("TemsupNoTalkBattle","GLOBAL",0)~ THEN BEGIN 19 // from:
  SAY #46918 /* ~Perhaps your idea is not so ludicrous after all. I have found some suspicious paraphernalia in Barl's chambers. An alchemy set and a symbol of Talona, the Mistress of Poison.~ */
  IF ~~ THEN DO ~SetGlobal("SearchBarl","GLOBAL",2)~ GOTO 20
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #46919 /* ~Members of the faith have strayed during Waukeen's Absence but never to these sorts of depths. I know not what to say, Mazzy. Let us summon Barl and see what he has to say about this.~ */
  IF ~~ THEN GOTO 21
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #46920 /* ~Barl, approach us please! These good people would speak with you.~ */
  IF ~~ THEN DO ~StartCutSceneMode()
StartCutScene("Cut40b")~ EXIT
END

IF ~~ THEN BEGIN 22 // from:
  SAY #46922 /* ~Barl, I have just returned from your chambers. What do think it is that I've found?~ */
  IF ~~ THEN EXTERN ~BARL~ 7
END

IF ~~ THEN BEGIN 23 // from:
  SAY #46924 /* ~But enter them I did, Barl. I found alchemists' poisons, bottles and a holy symbol of Talona. You have betrayed Waukeen.~ */
  IF ~~ THEN EXTERN ~BARL~ 8
END

IF ~~ THEN BEGIN 24 // from:
  SAY #46927 /* ~I am very sorry, Mazzy. We had a viper in our midst and did not know it. I wish Waukeen's Blessing upon your sister. Perhaps that bottle is indeed an antidote.~ */
  IF ~~ THEN EXTERN ~MAZZYJ~ 116
END

IF WEIGHT #1 ~Global("MazzyDeadAllFailed","GLOBAL",1)
Global("TemSupSpeaks","LOCALS",1)
CombatCounter(0)
!See([ENEMY])~ THEN BEGIN 25 // from:
  SAY #61211 /* ~I... I am sorry, my friends... Mazzy is beyond my power to recover.  Unless Barl possessed the antidote on his person, all hope for her dear sister is lost...~ */
  IF ~~ THEN DO ~SetGlobal("TemSupSpeaks","LOCALS",2)~ GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #61212 /* ~Aye.  Here it is.  Take this brew to the lass, if you would, so Mazzy's death is not in vain.~ */
  IF ~~ THEN DO ~GiveItemCreate("misc7d",LastTalkedToBy,0,0,0)
MoveToPoint([783.582])~ EXIT
END
