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

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)
Global("BeholderPlot","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #28003 /* ~This must not come to pass. The everseeing eye of Helm must be made aware of what they intend.~ [OISIGX02] */
  IF ~OR(5)
Class(Player1,CLERIC)
Class(Player1,FIGHTER_CLERIC)
Class(Player1,CLERIC_MAGE)
Class(Player1,CLERIC_THIEF)
Class(Player1,FIGHTER_MAGE_CLERIC)
!Kit(Player1,GODHELM)
!Kit(Player1,GODTALOS)
!Kit(Player1,GODLATHANDER)
~ THEN GOTO 1
  IF ~!Class(Player1,CLERIC)
!Class(Player1,FIGHTER_CLERIC)
!Class(Player1,CLERIC_MAGE)
!Class(Player1,CLERIC_THIEF)
!Class(Player1,FIGHTER_MAGE_CLERIC)
~ THEN GOTO 2
  IF ~Kit(Player1,GODHELM)
~ THEN GOTO 57
END

IF WEIGHT #1 ~False()
~ THEN BEGIN 1 // from: 0.0
  SAY #28258 /* ~You there. You have the look of a <MANWOMAN> of faith.  I would ask a service of you. If you perform well you may gain the favor of the Temple of Helm.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #28248 /* ~You. I would speak with you. I would hire you as mercenaries in the service of Helm. I would prefer a <MANWOMAN> of faith, but you will be adequate.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 3 // from: 57.0 2.0 1.0
  SAY #28259 /* ~Follow me to the temple of Helm. I will discuss what is required of you there. Do not take too long; Helm requires you now.~ */
  IF ~~ THEN DO ~//SetInterrupt(FALSE)
//DialogueInterrupt(FALSE)
//MoveToPointNoInterrupt([2844.1560])
//MoveToPointNoInterrupt([2002.1061])
OpenDoor("DOOR0901")
//DialogueInterrupt(TRUE)
//SetInterrupt(TRUE)
EscapeAreaMove("AR0901",690,565,2)
~ UNSOLVED_JOURNAL #34388 /* ~Investigate and destroy the Cult of the Eyeless.

After witnessing the eyeless priest's speech, I was approached by a priest of Helm who expressed a need to investigate this new cult further.  He asked me to follow him to the temple of Helm to discuss the matter further.~ */ EXIT
END

IF WEIGHT #2 ~OR(5)
Class(Player1,CLERIC)
Class(Player1,FIGHTER_CLERIC)
Class(Player1,CLERIC_MAGE)
Class(Player1,CLERIC_THIEF)
Class(Player1,FIGHTER_MAGE_CLERIC)
InPartySlot(LastTalkedToBy,0)
ReputationGT(Player1,14)
Alignment(Player1,MASK_GENEUTRAL)
Global("BeholderPlot","GLOBAL",0)
Global("NoHelpBeholder","GLOBAL",0)
~ THEN BEGIN 4 // from:
  SAY #28278 /* ~Welcome. I had hoped you would come. You bear the signs of one that is good of heart, but that also gives weight to all sides of an argument.~ */
  IF ~~ THEN GOTO 8
END

IF WEIGHT #3 ~OR(5)
Class(Player1,CLERIC)
Class(Player1,FIGHTER_CLERIC)
Class(Player1,CLERIC_MAGE)
Class(Player1,CLERIC_THIEF)
Class(Player1,FIGHTER_MAGE_CLERIC)
InPartySlot(LastTalkedToBy,0)
ReputationLT(Player1,15)
Alignment(Player1,MASK_GENEUTRAL)
Global("BeholderPlot","GLOBAL",0)
Global("NoHelpBeholder","GLOBAL",0)
~ THEN BEGIN 5 // from:
  SAY #28280 /* ~I thought you would not come. I know of you; your actions prove you not as loyal to good as you could be, though you give thought to either side of an argument.~ */
  IF ~~ THEN GOTO 8
END

IF WEIGHT #4 ~!Class(Player1,CLERIC)
!Class(Player1,FIGHTER_CLERIC)
!Class(Player1,CLERIC_MAGE)
!Class(Player1,CLERIC_THIEF)
!Class(Player1,FIGHTER_MAGE_CLERIC)
InPartySlot(LastTalkedToBy,0)
ReputationGT(Player1,14)
Global("BeholderPlot","GLOBAL",0)
Global("NoHelpBeholder","GLOBAL",0)
~ THEN BEGIN 6 // from:
  SAY #28281 /* ~Good, you have arrived. Know first that I will give no more trust than you prove worthy of. Despite your fine reputation you are unknown until it is verified by deeds.~ */
  IF ~~ THEN GOTO 10
END

IF WEIGHT #5 ~!Class(Player1,CLERIC)
!Class(Player1,FIGHTER_CLERIC)
!Class(Player1,CLERIC_MAGE)
!Class(Player1,CLERIC_THIEF)
!Class(Player1,FIGHTER_MAGE_CLERIC)
InPartySlot(LastTalkedToBy,0)
ReputationLT(Player1,15)
Global("BeholderPlot","GLOBAL",0)
Global("NoHelpBeholder","GLOBAL",0)
~ THEN BEGIN 7 // from:
  SAY #28282 /* ~It is about time you have arrived.  First, I must say that I know your reputation. It is now irrelevant. You will be judged according to how you serve.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 8 // from: 5.0 4.0
  SAY #28289 /* ~We are aligned in a like fashion, and I think you would do well to pledge your service to the guidance of Helm. Here is the problem that I wish to pose to you.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 10.0 8.0
  SAY #28291 /* ~You heard that fool in the street?  If what he says is true, it threatens to upset a delicate balance.  A new power would only disrupt the way of things.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 10 // from: 7.0 6.0
  SAY #28296 /* ~The task I ask will be treacherous but you seem capable.  Serve well and you will be rewarded.  Display any treachery and it will be seen.  Now to the task.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 11 // from: 9.0
  SAY #28307 /* ~If he is lying, then whatever cult he is proposing can only serve to hurt those it bilks into following him.~ */
  IF ~~ THEN REPLY #28309 /* ~What signs point to this? I would not wish to upset a legitimate faith.~ */ GOTO 12
  IF ~~ THEN REPLY #28310 /* ~I will do whatever I can to help you. What do you require?~ */ GOTO 15
  IF ~~ THEN REPLY #28311 /* ~He played on the people's insecurity. Can you not offer better than he?~ */ GOTO 14
  IF ~~ THEN REPLY #56709 /* ~What's the matter? Can't you compete? Looks like a buyer's market to me.~ */ GOTO 14
  IF ~~ THEN REPLY #56710 /* ~There's no way you're setting me up to fight some new deity. I'm not stupid.~ */ GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 14.1 11.4 11.0
  SAY #28313 /* ~Nothing points to the emergence of a new deity. It would be impossible to hide such an event from the Great Guard that is Helm.~ */
  IF ~~ THEN GOTO 13
END

IF ~~ THEN BEGIN 13 // from: 12.0
  SAY #28314 /* ~What does remain unseen is the fate of those that have chosen to follow. We have lost some of our younger faithful, and they must be accounted for.~ */
  IF ~~ THEN REPLY #28315 /* ~Then I will help as I can. Can you detail what is required?~ */ GOTO 15
  IF ~~ THEN REPLY #28316 /* ~This prophet preyed on the people's need for security. Can you not offer this?~ */ GOTO 14
  IF ~~ THEN REPLY #28317 /* ~I will not risk angering a new god. I refuse your offer.~ */ GOTO 21
  IF ~~ THEN REPLY #56711 /* ~Poor Helm can't compete on his own? I find that amusing.~ */ GOTO 14
  IF ~~ THEN REPLY #56712 /* ~All right, all right. I'll see what can be done, but it's not going to be free.~ */ GOTO 15
END

IF ~~ THEN BEGIN 14 // from: 13.3 13.1 11.3 11.2
  SAY #28322 /* ~Helm offers unwavering stability; true faith has no instant reward. Helm very rarely appears in physical form. Walking with mortals is not the way of the gods.~ */
  IF ~~ THEN REPLY #28324 /* ~Then this man's claims are doubly disturbing. I will help, but what must I do?~ */ GOTO 15
  IF ~~ THEN REPLY #28325 /* ~And if this turns out to be a legitimate faith, what then?~ */ GOTO 12
  IF ~~ THEN REPLY #28326 /* ~I cannot risk angering a god. I will not help.~ */ GOTO 21
  IF ~~ THEN REPLY #56713 /* ~But telling mortals what to do is. Yeah, I know the drill. All right, what do you need?~ */ GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 23.1 14.3 14.0 13.4 13.0 11.1
  SAY #28328 /* ~He of the Unsleeping Eyes must know of this cult.  The blindness they promote is abhorrent to Helm.  We ask you to investigate and identify what is happening.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #28334 /* ~The Vigilant One informs that the cult is underground and close, but we cannot see past the sewers. You must infiltrate, as friend or conqueror. The sewer entrances are marked on your map.~ */
  IF ~~ THEN GOTO 17
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #28336 /* ~You must suffer the filth of the sewers to find the filth of the cult. They are not hiding amidst the pipes, so there must be a passage leading further away.~ */
  IF ~~ THEN REPLY #28339 /* ~It is as good as done. I will return with the answers you seek.~ */ GOTO 18
  IF ~~ THEN REPLY #28340 /* ~And what is the payment for this task?~ */ GOTO 20
  IF ~Global("chapter","GLOBAL",2)
Global("ShadowWork","GLOBAL",1)~ THEN REPLY #46132 /* ~I may do this, but I am gathering a large amount of gold to rescue a friend and would need a reward.~ */ GOTO 20
  IF ~~ THEN REPLY #56714 /* ~Fine, fine, let's just get it over with.~ */ GOTO 18
  IF ~~ THEN REPLY #28341 /* ~Err... I changed my mind. I won't anger a deity, especially if it involves the sewers.~ */ GOTO 21
END

IF ~~ THEN BEGIN 18 // from: 23.3 23.2 20.2 20.1 17.3 17.0
  SAY #28344 /* ~May the Great Guard give light to all wrongs against you. You may seek healing and tools to aid you here as you need. Ask an acolyte and you will receive.~ */
  IF ~~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #28346 /* ~Our resources are thin at the moment, but an ally of Helm and servant of Torm is awaiting you in the sewers now. Seek Keldorn to serve with you. Faith guide you both.~ */
  IF ~!IsValidForPartyDialog("Anomen")
!IsValidForPartyDialog("Viconia")
!IsValidForPartyDialog("Jaheira")~ THEN DO ~SetGlobal("BeholderPlot","GLOBAL",1)
EraseJournalEntry(34386)~ UNSOLVED_JOURNAL #34407 /* ~Investigate and destroy the Cult of the Eyeless.

I have agreed to investigate this cult of the 'Unseeing Eye' for Oisig, cleric of Helm.  He has offered the services of his temple for healing and equipment, and in exchange I must look into this cult and see what is occurring. The temple of the cult is below ground, and access to it is likely to be found through the sewers, although Oisig could not say exactly where. I should infiltrate them, 'as friend or conqueror.'~ */ EXIT
  IF ~IsValidForPartyDialog("Anomen")~ THEN DO ~SetGlobal("BeholderPlot","GLOBAL",1)
EraseJournalEntry(34386)~ UNSOLVED_JOURNAL #34407 /* ~Investigate and destroy the Cult of the Eyeless.

I have agreed to investigate this cult of the 'Unseeing Eye' for Oisig, cleric of Helm.  He has offered the services of his temple for healing and equipment, and in exchange I must look into this cult and see what is occurring. The temple of the cult is below ground, and access to it is likely to be found through the sewers, although Oisig could not say exactly where. I should infiltrate them, 'as friend or conqueror.'~ */ EXTERN ~ANOMENJ~ 232
  IF ~!IsValidForPartyDialog("Anomen")
IsValidForPartyDialog("Viconia")~ THEN DO ~SetGlobal("BeholderPlot","GLOBAL",1)
EraseJournalEntry(34386)~ UNSOLVED_JOURNAL #34407 /* ~Investigate and destroy the Cult of the Eyeless.

I have agreed to investigate this cult of the 'Unseeing Eye' for Oisig, cleric of Helm.  He has offered the services of his temple for healing and equipment, and in exchange I must look into this cult and see what is occurring. The temple of the cult is below ground, and access to it is likely to be found through the sewers, although Oisig could not say exactly where. I should infiltrate them, 'as friend or conqueror.'~ */ EXTERN ~VICONIJ~ 71
  IF ~!IsValidForPartyDialog("Anomen")
!IsValidForPartyDialog("Viconia")
IsValidForPartyDialog("Jaheira")~ THEN DO ~SetGlobal("BeholderPlot","GLOBAL",1)
EraseJournalEntry(34386)~ UNSOLVED_JOURNAL #34407 /* ~Investigate and destroy the Cult of the Eyeless.

I have agreed to investigate this cult of the 'Unseeing Eye' for Oisig, cleric of Helm.  He has offered the services of his temple for healing and equipment, and in exchange I must look into this cult and see what is occurring. The temple of the cult is below ground, and access to it is likely to be found through the sewers, although Oisig could not say exactly where. I should infiltrate them, 'as friend or conqueror.'~ */ EXTERN ~JAHEIRAJ~ 424
END

IF ~~ THEN BEGIN 20 // from: 17.2 17.1
  SAY #28348 /* ~There will be reward. Do not tax your welcome by demanding it now. You will be given your due when the time is right.~ */
  IF ~~ THEN REPLY #28349 /* ~So... nothing then. Needless to say, this is not enough. I won't do it.~ */ GOTO 21
  IF ~~ THEN REPLY #28350 /* ~I will help as best I can.~ */ GOTO 18
  IF ~~ THEN REPLY #61176 /* ~Very well, though I will be most displeased if it turns out you are lying.~ */ GOTO 18
END

IF ~~ THEN BEGIN 21 // from: 23.0 20.0 17.4 14.2 13.2
  SAY #28351 /* ~Hmm. Your refusal is displeasing. Know that Helm frowns upon you, and will do so until you change your course.~ */
  IF ~!IsValidForPartyDialog("Anomen")~ THEN GOTO 22
  IF ~IsValidForPartyDialog("Anomen")~ THEN EXTERN ~ANOMENJ~ 238
END

IF ~~ THEN BEGIN 22 // from: 21.0 ANOMENJ:238.0
  SAY #28352 /* ~You have another chance though, which is rare in Helm's sight. Return when you see fit to do what you must. We have not the means to do this without you... at this time.~ */
  IF ~~ THEN DO ~SetGlobal("NoHelpBeholder","GLOBAL",1)~ EXIT
END

IF WEIGHT #6 ~Global("NoHelpBeholder","GLOBAL",1)
!Dead("UnseeingEye")
~ THEN BEGIN 23 // from:
  SAY #28353 /* ~Helm sees your intent to return to his service. Have you reconsidered? Will you help?~ */
  IF ~~ THEN REPLY #28354 /* ~My decision is unchanged.~ */ GOTO 21
  IF ~~ THEN REPLY #28355 /* ~Go back over what was required of me.~ */ DO ~SetGlobal("NoHelpBeholder","GLOBAL",0)~ GOTO 15
  IF ~~ THEN REPLY #28356 /* ~Yes, I will help you.~ */ DO ~SetGlobal("NoHelpBeholder","GLOBAL",0)~ GOTO 18
  IF ~~ THEN REPLY #61177 /* ~All right, all right, but I will expect ample reward when I am done.~ */ DO ~SetGlobal("NoHelpBeholder","GLOBAL",0)~ GOTO 18
END

IF WEIGHT #7 ~Global("BeholderPlot","GLOBAL",1)
~ THEN BEGIN 24 // from:
  SAY #28357 /* ~Your return was foreseen, though what you would say is unknown. Is this cult to be believed? Speak what you know.~ [OISIGX06] */
  IF ~~ THEN REPLY #28358 /* ~I have nothing to say just yet.~ */ GOTO 25
  IF ~!Dead("UnseeingEye")
Global("TalkedToCult","GLOBAL",1)
~ THEN REPLY #28359 /* ~I have met with some. They put out their eyes in reverence to their lord!~ */ GOTO 26
  IF ~!Dead("UnseeingEye")
Global("KnowBeholder","GLOBAL",1)
~ THEN REPLY #28360 /* ~This cult worships a beholder! I think the majority are magically enslaved!~ */ GOTO 27
  IF ~Dead("UnseeingEye")
~ THEN REPLY #28361 /* ~It was a beholder cult! I have destroyed the beast and all of its plans!~ */ DO ~EraseJournalEntry(2025)
EraseJournalEntry(2028)
EraseJournalEntry(2065)
EraseJournalEntry(2069)
EraseJournalEntry(34387)
EraseJournalEntry(34388)
EraseJournalEntry(34391)
EraseJournalEntry(34399)
EraseJournalEntry(34407)
EraseJournalEntry(34413)
EraseJournalEntry(34416)
EraseJournalEntry(34417)
EraseJournalEntry(34418)
EraseJournalEntry(34419)
EraseJournalEntry(34420)
EraseJournalEntry(34422)
EraseJournalEntry(30375)
SetGlobal("BeholderPlot","GLOBAL",2)
SetGlobalTimer("Vakola","GLOBAL",TWO_DAYS)
ReputationInc(1)
AddXPObject(Player1,45750)
AddXPObject(Player2,45750)
AddXPObject(Player3,45750)
AddXPObject(Player4,45750)
AddXPObject(Player5,45750)
AddXPObject(Player6,45750)
~ SOLVED_JOURNAL #47712 /* ~Investigate and destroy the Cult of the Eyeless.

I completed the task for the church and found the source of the cult of this Unseeing Eye.  The cult was run by a blind Beholder, yet the creature was still immensely powerful and I was lucky to be able to destroy it.  The entire cult has been routed as a result of the Beholder's death.~ */ GOTO 30
END

IF ~~ THEN BEGIN 25 // from: 26.2 24.0
  SAY #28362 /* ~Return to searching. This must be laid bare before Helm, that all might be seen and judged.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 26 // from: 24.1
  SAY #28363 /* ~This was known. We took the prophet in the street to his word when we saw his own eyes. Have you anything else?~ */
  IF ~Global("KnowBeholder","GLOBAL",1)
~ THEN REPLY #28364 /* ~This cult worships a beholder! I think the majority are magically enslaved!~ */ GOTO 27
  IF ~Dead("UnseeingEye")
~ THEN REPLY #28365 /* ~It was a beholder cult! I have destroyed the beast and all of its plans!~ */ DO ~SetGlobal("BeholderPlot","GLOBAL",2)
SetGlobalTimer("Vakola","GLOBAL",TWO_DAYS)
ReputationInc(1)
~ GOTO 30
  IF ~!Dead("UnseeingEye")
~ THEN REPLY #28366 /* ~Not at this time.~ */ GOTO 25
END

IF ~~ THEN BEGIN 27 // from: 26.0 24.2
  SAY #28367 /* ~A beholder cult! Such beasts are an affront to the eyes of Helm! What would bring this creature here? It is foolish to come this close to a Helmite temple.~ */
  IF ~~ THEN GOTO 28
END

IF ~~ THEN BEGIN 28 // from: 27.0
  SAY #28368 /* ~You have a clear duty here. A lesser <MANWOMAN> might shrink from this, but you must not. The disorder the beast will bring is to be stopped.~ */
  IF ~~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #28369 /* ~Such cults are never populated by willing followers. The blindings must end, and they must end soon! Use whatever means you can. Helm watches, and bids you swift victory!~ */
  IF ~~ THEN UNSOLVED_JOURNAL #34418 /* ~Investigate and destroy the Cult of the Eyeless.

I have informed Oisig of the nature of this beholder cult... and he has commanded me to return to the temple below and destroy the creature.   I am unsure how this is to be accomplished, but it must be done somehow.~ */ EXIT
END

IF ~~ THEN BEGIN 30 // from: 26.1 24.3
  SAY #28370 /* ~A beholder cult in the very heart of Helm's sight? You have done a great service removing it! We will send clergy to remove all taint of its presence.~ */
  IF ~Global("PlayerHasStronghold","GLOBAL",0)
OR(5)
Class(Player1,CLERIC)
Class(Player1,FIGHTER_CLERIC)
Class(Player1,CLERIC_MAGE)
Class(Player1,CLERIC_THIEF)
Class(Player1,FIGHTER_MAGE_CLERIC)
~ THEN GOTO 31
  IF ~!Class(Player1,CLERIC)
!Class(Player1,FIGHTER_CLERIC)
!Class(Player1,CLERIC_MAGE)
!Class(Player1,CLERIC_THIEF)
!Class(Player1,FIGHTER_MAGE_CLERIC)
~ THEN GOTO 32
  IF ~Global("PlayerHasStronghold","GLOBAL",1)
~ THEN GOTO 32
END

IF ~~ THEN BEGIN 31 // from: 30.0
  SAY #28371 /* ~Now, to what you are due. You are one that walks in faith with Helm's ideals, and you have earned a payment that is beyond mere wealth.~ */
  IF ~~ THEN REPLY #28375 /* ~I require nothing. It was an honor to serve.~ */ GOTO 35
  IF ~~ THEN REPLY #28376 /* ~Good, I have been waiting for this.~ */ GOTO 35
END

IF ~~ THEN BEGIN 32 // from: 30.2 30.1
  SAY #28372 /* ~To your reward. Such service would earn greatness for one of the flock, but you are occupied elsewhere and will have to be content with mere gold and trinkets.~ */
  IF ~~ THEN GOTO 33
END

IF ~~ THEN BEGIN 33 // from: 32.0
  SAY #28373 /* ~You will not be disappointed, though the spiritual rewards could have been much more. You are welcome here, so long as you maintain a favorable reputation.~ */
  IF ~~ THEN DO ~GiveItemCreate("BLUN20",LastTalkedToBy,0,0,0)
GiveGoldForce(7000)
~ GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 41.0 33.0
  SAY #28374 /* ~Oh! Speak with Guardian Telwyn as you leave. He may have a task suited to you, though Helm reserves true blessings for those that follow.~ */
  IF ~!Global("chapter","GLOBAL",2)~ THEN EXIT
  IF ~Global("chapter","GLOBAL",2)
~ THEN REPLY #42409 /* ~Before I go, I was wondering if I might ask a question of you?~ */ GOTO 50
END

IF ~~ THEN BEGIN 35 // from: 31.1 31.0
  SAY #28377 /* ~You are granted a place in Helm's sight. You are aligned with many of us, though you lack direction.~ */
  IF ~~ THEN DO ~GiveGoldForce(8000)~ GOTO 36
END

IF ~~ THEN BEGIN 36 // from: 35.0
  SAY #28378 /* ~You are given quarters here, a personal space to house your belongings.  You are honored.~ */
  IF ~~ THEN REPLY #28379 /* ~I am indeed! I accept with all mine heart!~ */ GOTO 37
  IF ~~ THEN REPLY #28380 /* ~I cannot accept this.~ */ GOTO 40
END

IF ~~ THEN BEGIN 37 // from: 40.1 36.0
  SAY #28381 /* ~Then know the duties: you must be vigilant, fair and diligent. Protect the weak, the unpopular, the injured, and the young. Do not sacrifice them for others.~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 38 // from: 37.0
  SAY #28382 /* ~You must anticipate attacks and be ready, know your foes, and care mindfully for your weapons so that you can perform your duties properly when called upon.~ */
  IF ~~ THEN JOURNAL #55569 /* ~Cleric Stronghold.

I have been welcomed into service of the Temple to Helm. I am to be given space in the temple, a sanctuary whenever I need. I may store any possessions that I wish to within the Temple containers. As a priest of Helm, I am responsible for the well being of the flock. I am to find Acolyte Byron within the Temple immediately. Byron will tell me of my responsibilities and give me my first assignment.
~ */ FLAGS 128 GOTO 39
END

IF ~~ THEN BEGIN 39 // from: 38.0
  SAY #28383 /* ~Never betray trust. This is all-important. All else pales. These are the tenets, now seek Acolyte Byron here for your new duties. Welcome to Helm's sight.~ */
  IF ~!IsValidForPartyDialog("Anomen")
!IsValidForPartyDialog("Keldorn")~ THEN REPLY #42411 /* ~Before I go to Acolyte Byron, I was wondering if I might ask a question of you?~ */ DO ~SetGlobal("PlayerHasStronghold","GLOBAL",1)
SetGlobal("JoinHelm","GLOBAL",1)
CreateCreature("HELMBYR",[1066.774],4)
~ GOTO 50
  IF ~IsValidForPartyDialog("Anomen")~ THEN DO ~SetGlobal("PlayerHasStronghold","GLOBAL",1)
SetGlobal("JoinHelm","GLOBAL",1)
CreateCreature("HELMBYR",[1066.774],4)~ EXTERN ~ANOMENJ~ 239
  IF ~!IsValidForPartyDialog("Anomen")
IsValidForPartyDialog("Keldorn")~ THEN DO ~SetGlobal("PlayerHasStronghold","GLOBAL",1)
SetGlobal("JoinHelm","GLOBAL",1)
CreateCreature("HELMBYR",[1066.774],4)~ EXTERN ~KELDORJ~ 162
END

IF ~~ THEN BEGIN 40 // from: 36.1
  SAY #28384 /* ~You cannot? This is your duty and your calling. Do you cast aside that duty? Is that your true wish?~ */
  IF ~~ THEN REPLY #28385 /* ~I am sure. I do not wish to join with you.~ */ GOTO 41
  IF ~~ THEN REPLY #28386 /* ~I would be foolish to say no.~ */ GOTO 37
END

IF ~~ THEN BEGIN 41 // from: 40.0
  SAY #28387 /* ~Then you are not worthy. You have turned down a gift that some will never receive. So be it. You are welcome here, though you will not belong. Farewell.~ */
  IF ~~ THEN GOTO 34
END

IF WEIGHT #8 ~Global("BeholderPlot","GLOBAL",2)
Global("JoinHelm","GLOBAL",0)
Class(Player1,CLERIC_ALL)~ THEN BEGIN 42 // from:
  SAY #28388 /* ~You have missed a chance that will not come again. You are welcome here, but you do not belong.~ */
  IF ~OR(3)
!Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",1)
Dead("c6bodhi")~ THEN EXIT
  IF ~Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",0)
!Dead("c6bodhi")~ THEN REPLY #53268 /* ~I have come to ask for Helm's aid in a matter of utmost importance, High Watcher.~ */ GOTO 58
END

IF WEIGHT #9 ~Global("BeholderPlot","GLOBAL",2)
Global("JoinHelm","GLOBAL",1)
Global("Stripped","GLOBAL",0)
~ THEN BEGIN 43 // from:
  SAY #28389 /* ~Your service to Helm will be remembered. Do not fail him in intent or deed. He sees all.~ [OISIGX07] */
  IF ~OR(2)
!Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",1)~ THEN EXIT
  IF ~Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",0)~ THEN REPLY #53269 /* ~I have come to ask for Helm's aid in a matter of utmost importance, High Watcher.~ */ GOTO 58
END

IF ~~ THEN BEGIN 44 // from:
  SAY #29339 /* ~What is this, Guardian? I had heard you were commissioning a new work for the temple. Is this it?~ */
  IF ~~ THEN EXTERN ~SCTELWYN~ 27
END

IF ~~ THEN BEGIN 45 // from:
  SAY #29341 /* ~And why not? It resembles the works of Prism, though of course it cannot be. It has an odd look to it, like the time between the dark and the dawn. I find it pleasing.~ */
  IF ~~ THEN GOTO 46
END

IF ~~ THEN BEGIN 46 // from: 45.0
  SAY #29343 /* ~It carries the sheen of illithium but it is smudged? Good. Helm's armor is unblemished, but the acolytes should not think it easy to attain without tireless work.~ */
  IF ~~ THEN GOTO 47
END

IF ~~ THEN BEGIN 47 // from: 46.0
  SAY #29344 /* ~Place it someplace prominent, Guardian; it will serve. I had worried you might expend our coffers on that overrated Sir Sarles, but this pleases me. Fine work.~ */
  IF ~~ THEN EXTERN ~SCTELWYN~ 28
END

IF WEIGHT #12 /* Triggers after states #: 49 59 even though they appear after this state */
~!InPartySlot(LastTalkedToBy,0)
NumTimesTalkedToGT(0)~ THEN BEGIN 48 // from:
  SAY #33186 /* ~I sense that you are not the true voice for your group. Matters I speak of are for leaders to hear.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #10 ~Global("Stripped","GLOBAL",2)
~ THEN BEGIN 49 // from:
  SAY #37864 /* ~You have sullied your honor and that of your church. Get out!~ [OISIGX08] */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 50 // from: 39.0 34.1 ANOMENJ:239.0
  SAY #42410 /* ~If it is within my power to answer and does not conflict with my faith, I shall strive to provide it to you.  What do you wish to ask?~ */
  IF ~~ THEN REPLY #42412 /* ~I am searching for a friend named Imoen who is being held by the Cowled Wizards.  Do you know anything of them?~ */ GOTO 52
  IF ~~ THEN REPLY #42413 /* ~Can you tell me anything of the Shadow Thieves here in Athkatla?~ */ GOTO 54
  IF ~~ THEN REPLY #42414 /* ~Nothing, I suppose.  I shall take my leave of you.~ */ GOTO 51
END

IF ~~ THEN BEGIN 51 // from: 56.1 53.1 50.2
  SAY #42415 /* ~As you wish.  May the Watcher guard you.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 52 // from: 56.0 50.0
  SAY #42416 /* ~Nothing that you do not know already, I suspect.  The Council outlaws magic, and yet the cowled ones act upon whatever plots they wish.~ */
  IF ~~ THEN GOTO 53
END

IF ~~ THEN BEGIN 53 // from: 52.0
  SAY #42417 /* ~They must cooperate with the Council, but likely provide no information of their activities.  We do not associate with these wizards, so I know little of them.~ */
  IF ~~ THEN REPLY #42418 /* ~Can you tell me anything of the Shadow Thieves here in Athkatla?~ */ GOTO 54
  IF ~~ THEN REPLY #42419 /* ~I shall be on my way, then.~ */ GOTO 51
END

IF ~~ THEN BEGIN 54 // from: 53.0 50.1
  SAY #42420 /* ~Helm's followers do not associate with brigands, and we are concerned about the war with another guild the Shadow Thieves seem to have engaged in.~ */
  IF ~~ THEN GOTO 55
END

IF ~~ THEN BEGIN 55 // from: 54.0
  SAY #42421 /* ~It is troubling that we know nothing of this other group.  They are a mystery, though they are obviously competing with the Shadow Thieves.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 56 // from:
  SAY #42422 /* ~If Amn is fortunate, they will destroy each other and Helm will not be forced to watch the backs of his helpless faithful.~ */
  IF ~~ THEN REPLY #42423 /* ~I am searching for a friend named Imoen who is being held by the Cowled Wizards.  Do you know anything of them?~ */ GOTO 52
  IF ~~ THEN REPLY #42424 /* ~I'll be on my way, then.~ */ GOTO 51
END

IF ~~ THEN BEGIN 57 // from: 0.2
  SAY #52581 /* ~You there! I know you to be a Priest of Helm. Your god calls upon you and you must answer.~ */
  IF ~~ THEN GOTO 3
END

IF ~~ THEN BEGIN 58 // from: 59.1 43.1 42.1
  SAY #53270 /* ~In this, as in all things, Helm shall perform his duty.  What is this matter, <CHARNAME>?  Tell me and I shall tell you how Helm may aid you.~ */
  IF ~Global("JoinHelm","GLOBAL",1)~ THEN REPLY #53273 /* ~I must do battle with a powerful vampire here in the city, and I cannot face her alone.  I ask for the church's aid.~ */ GOTO 60
  IF ~Global("JoinHelm","GLOBAL",0)
ReputationGT(Player1,14)~ THEN REPLY #53274 /* ~I must do battle with a powerful vampire here in the city, and I cannot face her alone.  I ask for the church's aid.~ */ GOTO 60
  IF ~Global("JoinHelm","GLOBAL",0)
ReputationLT(Player1,15)~ THEN REPLY #53275 /* ~I must do battle with a powerful vampire here in the city, and I cannot face her alone.  I ask for the church's aid.~ */ GOTO 63
END

IF WEIGHT #11 ~Global("BeholderPlot","GLOBAL",2)
!Class(Player1,CLERIC_ALL)~ THEN BEGIN 59 // from:
  SAY #53271 /* ~May Helm watch over you and guard you from danger in your future endeavours, <GABBER>.  Now... if you will excuse me, there is much I must attend to.~ */
  IF ~OR(3)
!Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",1)
Dead("c6bodhi")~ THEN EXIT
  IF ~Global("Chapter","GLOBAL",6)
Global("OisigDecided","LOCALS",0)
!Dead("c6bodhi")~ THEN REPLY #53272 /* ~I have come to ask for Helm's aid in a matter of utmost importance, High Watcher.~ */ GOTO 58
END

IF ~~ THEN BEGIN 60 // from: 58.1 58.0
  SAY #53276 /* ~I know of this vampire... Bodhi, yes?  Helm knows that she endangers all.  We are guardians, servants... I wish we could join you in this struggle.~ */
  IF ~~ THEN GOTO 61
END

IF ~~ THEN BEGIN 61 // from: 60.0
  SAY #53277 /* ~But we have nothing to aid you with.  I would suggest you approach the paladins of the Radiant Heart if you have not already.~ */
  IF ~~ THEN GOTO 62
END

IF ~~ THEN BEGIN 62 // from: 64.0 61.0
  SAY #53279 /* ~I have given you my decision.  Now you may go.~ */
  IF ~~ THEN DO ~SetGlobal("OisigDecided","GLOBAL",1)~ UNSOLVED_JOURNAL #8302 /* ~Allies recruited for the struggle against Bodhi.

I asked the Temple of Helm to help fight Bodhi, but they said they couldn't. They suggested that I ask the Most Noble Order of the Radiant Heart, if I haven't already.~ */ EXIT
END

IF ~~ THEN BEGIN 63 // from: 58.2
  SAY #53281 /* ~I know of the dread creature you speak of... Bodhi.  Helm watches this one, but he raises no hand against her at this time.  We will not aid you in a battle.~ */
  IF ~~ THEN GOTO 64
END

IF ~~ THEN BEGIN 64 // from: 63.0
  SAY #53282 /* ~Seek out the paladins of the Radiant Heart, if you have not already... ask them for aid in this righteous battle.  They are the warriors that you seek.~ */
  IF ~~ THEN GOTO 62
END
