BEGIN ~BHARRNES~

IF WEIGHT #1 ~NumberOfTimesTalkedTo(0)~ THEN BEGIN 0
  SAY @1
  IF ~GlobalGT("BHEscortSpawn","GLOBAL",0)~ THEN REPLY @2 GOTO 3
  IF ~~ THEN REPLY @3 GOTO 1
END

IF ~~ THEN BEGIN 1
  SAY @4
  IF ~~ THEN REPLY @5 GOTO 2
  IF ~~ THEN REPLY @6 GOTO 12
END

IF ~~ THEN BEGIN 2
  SAY @7
  IF ~~ THEN EXTERN ~BHTELLIS~ 6
END

IF ~~ THEN BEGIN 3
  SAY @8
  IF ~~ THEN REPLY @9 GOTO 4
END

IF ~~ THEN BEGIN 4
  SAY @10
  IF ~~ THEN REPLY @11 GOTO 5
END

IF ~~ THEN BEGIN 5
  SAY @12
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6
  SAY @13
  IF ~~ THEN REPLY @15 JOURNAL @14 GOTO 7
  IF ~~ THEN REPLY @16 GOTO 8
END

IF ~~ THEN BEGIN 7
  SAY @17
  IF ~~ THEN DO ~SetGlobal("BHMayorStopsParty","GLOBAL",1)~ EXIT
END

IF ~~ THEN BEGIN 8
  SAY @18
  IF ~~ THEN REPLY @20 JOURNAL @19 GOTO 7
END

IF ~~ THEN BEGIN 9
  SAY @21
  IF ~~ THEN REPLY @22 GOTO 10
END

IF ~~ THEN BEGIN 10
  SAY @23
  IF ~~ THEN REPLY @24 GOTO 11
END

IF ~~ THEN BEGIN 11
  SAY @25
  IF ~~ THEN REPLY @15 GOTO 7
  IF ~~ THEN REPLY @16 GOTO 8
END

IF ~~ THEN BEGIN 12
  SAY @26
  IF ~Global("BHWaterMonsters","GLOBAL",1)~ THEN REPLY @27 GOTO 13
  IF ~~ THEN REPLY @28 GOTO 14
END

IF ~~ THEN BEGIN 13
  SAY @29
  IF ~GlobalLT("BHMayorStopsParty","GLOBAL",1)~ THEN REPLY @31 DO ~RevealAreaOnMap("BH2200") SetGlobal("BHWaterMonsters","GLOBAL",1) SetGlobal("BHMayorGivesWaterQuest","GLOBAL",1)~ UNSOLVED_JOURNAL @30 GOTO 15
  IF ~Global("BHMayorStopsParty","GLOBAL",1)~ THEN REPLY @31 DO ~RevealAreaOnMap("BH2200") SetGlobal("BHWaterMonsters","GLOBAL",1) SetGlobal("BHMayorGivesWaterQuest","GLOBAL",1)~ UNSOLVED_JOURNAL @30 EXIT
END

IF ~~ THEN BEGIN 14
  SAY @32
  IF ~GlobalLT("BHMayorStopsParty","GLOBAL",1)~ THEN REPLY @31 DO ~RevealAreaOnMap("BH2200") SetGlobal("BHWaterMonsters","GLOBAL",1) SetGlobal("BHMayorGivesWaterQuest","GLOBAL",1)~ UNSOLVED_JOURNAL @30 GOTO 15
  IF ~Global("BHMayorStopsParty","GLOBAL",1)~ THEN REPLY @31 DO ~RevealAreaOnMap("BH2200") SetGlobal("BHWaterMonsters","GLOBAL",1) SetGlobal("BHMayorGivesWaterQuest","GLOBAL",1)~ UNSOLVED_JOURNAL @30 EXIT
END

IF WEIGHT #3 ~GlobalLT("BHMayorStopsParty","GLOBAL",1)~ THEN BEGIN 15
  SAY @33
  IF ~~ THEN REPLY @34 GOTO 16
END

IF ~~ THEN BEGIN 16
  SAY @35
  IF ~~ THEN GOTO 6
END

IF WEIGHT #2 ~Global("BHMayorGivesWaterQuest","GLOBAL",1) Global("BHToldMayorAboutWater","BH2101",0)~ THEN BEGIN 17
  SAY @36
  IF ~~ THEN REPLY @37 EXIT
  IF ~Dead("BHLIZKNG")~ THEN REPLY @31 GOTO 20
  IF ~Global("BHMayorGivesWaterQuest","GLOBAL",3)~ THEN REPLY @38 GOTO 24
END

IF WEIGHT #0 ~PartyHasItem("BHPLOT04")~ THEN BEGIN 18
  SAY @39
  IF ~~ THEN REPLY @40 GOTO 19
END

IF ~~ THEN BEGIN 19
  SAY @41
  IF ~~ THEN DO ~Polymorph(MAGE_FEMALE_HUMAN) SetGlobal("BHGuardWarning","BH2101",3) CreateCreature("BHSHARG1",[-1.-1],0) CreateCreature("BHSHARG1",[-1.-1],0) CreateCreature("BHSHARG1",[-1.-1],0) Shout(ALERT) Enemy()~ EXIT
END

IF ~~ THEN BEGIN 20
  SAY @42
  IF ~~ THEN REPLY @43 GOTO 21
END

IF ~~ THEN BEGIN 21
  SAY @44
  IF ~~ THEN REPLY @45 GOTO 22
END

IF ~~ THEN BEGIN 22
  SAY @46
  IF ~~ THEN REPLY @47 GOTO 23
END

IF ~~ THEN BEGIN 23
  SAY @48
  IF ~!IfValidForPartyDialogue("BHFABIO")~ THEN DO ~SetGlobal("BHMayorGivesWaterQuest","GLOBAL",2) SetGlobal("BHToldMayorAboutWater","BH2101",1)~ EXIT
  IF ~IfValidForPartyDialogue("BHFABIO")~ THEN EXTERN ~BFABIO~ 17
END

IF ~~ THEN BEGIN 24
  SAY @49
  IF ~~ THEN REPLY @50 GOTO 25
END

IF ~~ THEN BEGIN 25
  SAY @51
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26
  SAY @52
  IF ~~ THEN DO ~SetGlobal("BHMayorGivesWaterQuest","GLOBAL",4)~ EXIT
END

IF WEIGHT #4 ~GlobalLT("BHMayorGivesWaterQuest","GLOBAL",1) Global("BHMayorStopsParty","GLOBAL",1)~ THEN BEGIN 27
  SAY @53
  IF ~~ THEN REPLY @54 GOTO 28
END

IF ~~ THEN BEGIN 28
  SAY @55
  IF ~~ THEN REPLY @56 GOTO 12
END
