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

BEGIN ~UHFEM01~ 2 // non-zero flags may indicate non-pausing dialogue
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF ~~ THEN BEGIN 0 // from: UHMAY01:2.0
  SAY #31983 /* ~Please... listen to my husband!~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 3
END

IF ~~ THEN BEGIN 1 // from: UHMAY01:14.0
  SAY #32049 /* ~It's the ogres, my husband... you know it is.~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 15
END

IF ~~ THEN BEGIN 2 // from: UHMAY01:15.0
  SAY #32053 /* ~They're in the hills... too close to the village, I say!~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 16
END

IF ~~ THEN BEGIN 3 // from: UHMAY01:17.0
  SAY #32054 /* ~Pfaw!  That is just old legends!  Umar has been gone for over five hundred years, my husband!~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 18
END

IF ~~ THEN BEGIN 4 // from: UHMAY01:27.0
  SAY #32154 /* ~Perhaps <HESHE> is speaking of the abandoned cabin in the hills, husband?~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 28
END

IF WEIGHT #1 /* Triggers after states #: 8 even though they appear after this state */
~Global("VillageSaved","GLOBAL",0)~ THEN BEGIN 5 // from:
  SAY #32401 /* ~I beg of you, my <LADYLORD>... please help us!  Find out what is killing everyone and put an end to it!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 /* Triggers after states #: 8 even though they appear after this state */
~Global("VillageSaved","GLOBAL",1)
!GlobalGT("rangerprotector","GLOBAL",0)~ THEN BEGIN 6 // from:
  SAY #32402 /* ~We are so thankful to you, my <LADYLORD>!  Imnesvale is now safe once again and we can sleep in peace!~ */
  IF ~Global("OgreAlliance","GLOBAL",1)
~ THEN GOTO 7
  IF ~Global("OgreAlliance","GLOBAL",0)
~ THEN EXIT
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #32403 /* ~I suppose the peace with those ogres is... is good, as well.  I don't know what I will do if I see one of them come to the village, however.  They are so frightening!~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #0 ~GlobalGT("ParentsUpset","GLOBAL",0)
Global("MEUpset","LOCALS",0)
~ THEN BEGIN 8 // from:
  SAY #32404 /* ~Helm's patience, my <LADYLORD>!  Whatever are you thinking buying our son, Valsben, anything!  Now he's gone and run off to act like a fool and probably get himself killed!  Shame on you!~ */
  IF ~~ THEN DO ~SetGlobal("MEUpset","LOCALS",1)
~ EXIT
END

IF WEIGHT #3 ~GlobalGT("rangerprotector","GLOBAL",0)
!GlobalGT("rangerprotector","GLOBAL",4)
!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 9 // from:
  SAY #37906 /* ~Greetings to you, my <LADYLORD>.  You are a friend of our ranger, here, correct?  You are very welcome here in Imnesvale.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~GlobalGT("rangerprotector","GLOBAL",0)
GlobalGT("rangerprotector","GLOBAL",4)
!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 10 // from:
  SAY #37907 /* ~Your friend... our former ranger... is no longer welcome here, I can assure you.  I think it would be best if you all left.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #5 ~Global("rangerprotector","GLOBAL",1)
InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 11 // from:
  SAY #37908 /* ~You are most welcome here, ranger.  Anything my husband or I can provide for you, we will do so most gladly.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #6 ~GlobalGT("rangerprotector","GLOBAL",1)
!GlobalGT("rangerprotector","GLOBAL",4)
InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 12 // from:
  SAY #37909 /* ~I see you have proven yourself yet again, my <PRO_LADYLORD>.  My husband was lucky, indeed, to have found you to protect us.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 ~GlobalGT("rangerprotector","GLOBAL",4)
InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 13 // from:
  SAY #37910 /* ~I... despite all you have done for us, you are no longer worthy of being the village's ranger.  I find it very... very sad, what you have done.  You should be ashamed of yourself, my <PRO_LADYLORD>.~ */
  IF ~~ THEN EXIT
END
