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

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

IF WEIGHT #0 ~NumTimesTalkedTo(0)
!Dead("uhman01")
!Dead("uhfarm01")
!Dead("uhfarm02")
!Dead("uhmay01")
!StateCheck("uhman01",STATE_SLEEPING)
!StateCheck("uhfarm01",STATE_SLEEPING)
!StateCheck("uhfarm02",STATE_SLEEPING)
!StateCheck("uhmay01",STATE_SLEEPING)~ THEN BEGIN 0 // from:
  SAY #31974 /* ~Oy, mayor!  When is this crisis going t' be solved, aye?~ [UHMAN201] */
  IF ~~ THEN EXTERN ~UHFARM01~ 0
END

IF ~~ THEN BEGIN 1 // from: UHFARM02:0.0
  SAY #31978 /* ~Aye!  You just hired a group o' those adventurers, didn't you?  Where in the abyss are they?!~ */
  IF ~~ THEN EXTERN ~UHMAY01~ 1
END

IF ~~ THEN BEGIN 2 // from: UHFEM02:1.0
  SAY #31987 /* ~Ye're both daft!  'Tis the wolves that have been wandering the hills, sure enough!  Hungry, they is!~ */
  IF ~~ THEN EXTERN ~UHFARM02~ 1
END

IF ~~ THEN BEGIN 3 // from: UHMAY01:4.0
  SAY #31991 /* ~Well, they can't come soon enough!~ */
  IF ~~ THEN EXTERN ~UHFARM01~ 2
END

IF WEIGHT #4 /* Triggers after states #: 16 20 21 even though they appear after this state */
~Global("VillageSaved","GLOBAL",0)~ THEN BEGIN 4 // from:
  SAY #32306 /* ~Eh?  What is it ye want, stranger?~ */
  IF ~Global("WainwrightJob","GLOBAL",0)
~ THEN REPLY #32307 /* ~Just what is going on in this village, anyway?~ */ GOTO 5
  IF ~Global("WainwrightJob","GLOBAL",1)
~ THEN REPLY #32308 /* ~Do you know anything about these killings?~ */ GOTO 5
  IF ~~ THEN REPLY #32309 /* ~Who are you?~ */ GOTO 9
  IF ~~ THEN REPLY #32310 /* ~Nothing, really.~ */ GOTO 10
END

IF ~~ THEN BEGIN 5 // from: 9.0 4.1 4.0
  SAY #32311 /* ~I'll tell ye what is going on, me <LADYLORD>... the wolves that have been in the hills these past years are coming at us, they are!~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #32312 /* ~Fer weeks, now, they've been preyin' on us... sneakin' into the village at night and tearin' people apart.  Then their bodies disappear the next night.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 6.0
  SAY #32314 /* ~'Tis a gruesome sight t' be sure.  I've seen 'em, too... them wolves look at me from afar with smarts in their eyes.  'Tis the truth!~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #32320 /* ~The rest of the village is full o' fools!  Them ogres... I seen 'em and they ain't so bad.  And the Umar stuff is nothin' but a load o' nonsense!~ */
  IF ~~ THEN REPLY #32321 /* ~Has nothing been done to hunt these wolves?~ */ GOTO 11
  IF ~~ THEN REPLY #32322 /* ~Why would wolves come back to take away bodies a day later?~ */ GOTO 12
  IF ~~ THEN REPLY #32323 /* ~What do you know about the ogres?~ */ GOTO 13
  IF ~~ THEN REPLY #32324 /* ~What's this about Umar?~ */ GOTO 15
  IF ~~ THEN REPLY #32325 /* ~I'll be going, then.~ */ GOTO 10
END

IF ~~ THEN BEGIN 9 // from: 4.2
  SAY #32326 /* ~I be Nelleck... one of the Imnesvale guards, is all.  Wish I could go and do more against 'em wolves, but I can't leave the village alone, true enough.~ */
  IF ~~ THEN REPLY #32327 /* ~What exactly is going on, here?~ */ GOTO 5
  IF ~~ THEN REPLY #32328 /* ~I'll be going, then.~ */ GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 15.3 14.3 12.3 11.3 9.1 8.4 4.3
  SAY #32329 /* ~On yer way then, stranger.  We don't need any more trouble here, that's fer certain.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11 // from: 15.0 14.0 12.0 8.0
  SAY #32333 /* ~Bloody mayor hired a halfling runt and her troupe to find out what's been happenin'.  They haven't come back... wolves ripped 'em apart is my guess.~ */
  IF ~~ THEN REPLY #32334 /* ~Why would wolves come back to take away bodies a day later?~ */ GOTO 12
  IF ~~ THEN REPLY #32335 /* ~What do you know about the ogres?~ */ GOTO 13
  IF ~~ THEN REPLY #32337 /* ~What's this about Umar?~ */ GOTO 15
  IF ~~ THEN REPLY #32338 /* ~I'll be going, then.~ */ GOTO 10
END

IF ~~ THEN BEGIN 12 // from: 15.1 14.1 11.0 8.1
  SAY #32339 /* ~Don't rightly know.  Ain't nothin' natural, that's for sure.  They just seem to up an' vanish, as far as I can tell.~ */
  IF ~~ THEN REPLY #32342 /* ~Has nothing been done to hunt these wolves?~ */ GOTO 11
  IF ~~ THEN REPLY #32343 /* ~What do you know about the ogres?~ */ GOTO 13
  IF ~~ THEN REPLY #32344 /* ~What's this about Umar?~ */ GOTO 15
  IF ~~ THEN REPLY #32346 /* ~I'll be going, then.~ */ GOTO 10
END

IF ~~ THEN BEGIN 13 // from: 15.2 12.1 11.1 8.2
  SAY #32347 /* ~They used t' belong to that big rebel army down in the south o' Amn... deserters likely.  Seen 'em on my patrols... don't look like they're up to anythin'.~ */
  IF ~~ THEN GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #32345 /* ~Led by a big ogre fellow... Madulf,  I think. Wants to be left alone.  Fact that he'd talk first rather than kill ye makes him not th' worst sort in my books.~ */
  IF ~~ THEN REPLY #32348 /* ~Has nothing been done to hunt these wolves?~ */ GOTO 11
  IF ~~ THEN REPLY #32349 /* ~Why would wolves come back to take away bodies a day later?~ */ GOTO 12
  IF ~~ THEN REPLY #32350 /* ~What's this about Umar?~ */ GOTO 15
  IF ~~ THEN REPLY #32351 /* ~I'll be going, then.~ */ GOTO 10
END

IF ~~ THEN BEGIN 15 // from: 14.2 12.2 11.2 8.3
  SAY #32352 /* ~Just a load o' bull, is all.  Ye wants t' know about Umar, go talk t' Vincenzo at the inn.  He loves t' talk out o' his arse, he does.~ */
  IF ~~ THEN REPLY #32353 /* ~Has nothing been done to hunt these wolves?~ */ GOTO 11
  IF ~~ THEN REPLY #32354 /* ~Why would wolves come back to take away bodies a day later?~ */ GOTO 12
  IF ~~ THEN REPLY #32355 /* ~What do you know about the ogres?~ */ GOTO 13
  IF ~~ THEN REPLY #32356 /* ~I'll be going, then.~ */ GOTO 10
END

IF WEIGHT #1 ~Global("ParentsUpset","GLOBAL",1)
Global("NUpset","LOCALS",0)
~ THEN BEGIN 16 // from:
  SAY #32357 /* ~I can't believe you went an bought those fool kids swords!  Neller's my son, and he's good fer nothin'.  Those kids are going t' get themselves killed!~ */
  IF ~~ THEN DO ~SetGlobal("NUpset","LOCALS",1)
~ EXIT
END

IF WEIGHT #5 /* Triggers after states #: 20 21 even though they appear after this state */
~Global("VillageSaved","GLOBAL",1)
!GlobalGT("rangerprotector","GLOBAL",0)~ THEN BEGIN 17 // from:
  SAY #32358 /* ~Yer a mighty respectable sort, I suppose.  I'd've thought it was them wolves causin' the problem... good to know they're gone, too, though.~ */
  IF ~Global("OgreAlliance","GLOBAL",1)
~ THEN GOTO 18
  IF ~Global("OgreAlliance","GLOBAL",0)
~ THEN EXIT
END

IF ~~ THEN BEGIN 18 // from: 17.0
  SAY #32359 /* ~I hears that you set up them ogres to help protect us, too.  I could surely use th' help... an' the merchants are cacklin' like hens at the extra business.~ */
  IF ~~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #32360 /* ~Sure will look strange, though, when an ogre or two comes strollin' through the village plain as day...~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #2 ~Global("ParentsUpset","GLOBAL",2)
Global("NUpset","LOCALS",0)
~ THEN BEGIN 20 // from:
  SAY #32382 /* ~I hears ye were the one who went an' bought me fool son Neller a load o' spirits.  (sigh)  Boy's probably passed out somewheres.  Hope th' wolves don't get 'im.~ */
  IF ~~ THEN DO ~SetGlobal("NUpset","LOCALS",1)
~ EXIT
END

IF WEIGHT #3 ~Global("ParentsUpset","GLOBAL",3)
Global("NUpset","LOCALS",0)
~ THEN BEGIN 21 // from:
  SAY #32383 /* ~Ye went an' bought them fool kids swords AND spirits?  They're probably runnin' all over the countryside, foolish as ye please!  What were ye thinkin'?~ */
  IF ~~ THEN DO ~SetGlobal("NUpset","LOCALS",1)
~ EXIT
END

IF WEIGHT #6 ~GlobalGT("rangerprotector","GLOBAL",0)
!GlobalGT("rangerprotector","GLOBAL",4)
!Global("umarplot","GLOBAL",1)
!Global("ogronattack","GLOBAL",1)
!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 22 // from:
  SAY #37980 /* ~Ye may have helped protect us, but ye ain't the ranger o' the village.  We've a long history o' havin' a ranger, here.  Glad I don't have t' protect th' place.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 ~GlobalGT("rangerprotector","GLOBAL",4)
!InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 23 // from:
  SAY #37981 /* ~Maybe ye all should just go... an' take yer former ranger friend, there, with ye.  Our village... we'll find our way just fine without the likes o' <PRO_HIMHER>.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 ~GlobalGT("rangerprotector","GLOBAL",0)
!GlobalGT("rangerprotector","GLOBAL",4)
!Global("umarplot","GLOBAL",1)
!Global("ogronattack","GLOBAL",1)
InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 24 // from:
  SAY #37982 /* ~Yer doin' a fine job, there, my <PRO_LADYLORD> ranger... Merella would o' been proud, in fact.  Is there anythin' yer needin' help with?~ */
  IF ~Global("igenplot","GLOBAL",1)~ THEN REPLY #37983 /* ~What do you know about what's going on in the forest to the west?~ */ GOTO 25
  IF ~Global("ogrealliance","GLOBAL",0)
!GlobalGT("ogronattack","GLOBAL",0)
!Dead("Madulf")~ THEN REPLY #37984 /* ~Have there been any problems with Madulf and his followers?~ */ GOTO 28
  IF ~Global("ogrealliance","GLOBAL",1)
!GlobalGT("ogronattack","GLOBAL",0)
!Dead("Madulf")~ THEN REPLY #37985 /* ~How has the alliance with Madulf been working out?~ */ GOTO 29
  IF ~Global("igenplot","GLOBAL",2)
!Dead("rigen01")~ THEN REPLY #37986 /* ~I trust there's been no further trouble from Lord Igen and his men?~ */ GOTO 31
  IF ~Global("igenplot","GLOBAL",2)
Dead("rigen01")~ THEN REPLY #37987 /* ~I trust no one has come to take vengeance for Lord Igen, or continue his disturbance of the wilderness?~ */ GOTO 32
  IF ~Global("ogronattack","GLOBAL",2)
!Dead("Madulf")~ THEN REPLY #37988 /* ~I take it everyone is thankful for the alliance with Madulf, now?~ */ GOTO 33
  IF ~Global("ogronattack","GLOBAL",3)
!Dead("Madulf")~ THEN REPLY #37989 /* ~I take it people have changed their minds, here, about Madulf and his followers?  The alliance goes well?~ */ GOTO 34
  IF ~GlobalGT("ogronattack","GLOBAL",1)~ THEN REPLY #37990 /* ~There have been no further sightings of the ogrons, I take it?~ */ GOTO 35
  IF ~Global("umarplot","GLOBAL",2)~ THEN REPLY #37991 /* ~The village has been quiet since the Umar business, I take it?~ */ GOTO 36
  IF ~~ THEN REPLY #37992 /* ~You know quite a bit about the area's history, Nelleck... what can you tell me about it?~ */ GOTO 37
  IF ~~ THEN REPLY #37993 /* ~No, thanks.~ */ GOTO 40
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #37994 /* ~Not much, my <PRO_LADYLORD> ranger... that noble came an' didn't even talk to the Minister.  Just marched on over there with 'is men, easy as ye please.~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 26 // from: 25.0
  SAY #37995 /* ~There was lots o' relics and such left from th' days when mithril was mined in th' hills... but most of it's long gone.  I don't think he'll find none.~ */
  IF ~~ THEN GOTO 27
END

IF ~~ THEN BEGIN 27 // from: 26.0
  SAY #37996 /* ~'At don't mean he won't disturb the forest, or burn it down while he's goin' about 'is business.  Tsk... a real shame.  Me pa said that area's all holy ground.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 28 // from: 24.1
  SAY #37997 /* ~None.  Like I've said before... Madulf an 'em are pretty quiet an' keep t' themselves, mostly.  I don't think they wants any trouble.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 29 // from: 24.2
  SAY #37998 /* ~Better than ye'd think, my <PRO_LADYLORD>.  Madulf and a couple o' others have been in an' out a few times... buyin' food an' usin' the inn.~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 30 // from: 29.0
  SAY #37999 /* ~Folks were scared at first, but they've been real polite.  Keepin' a low profile, too... as low as 'em big 'uns can get, anyway.  The merchants like it, anyhow.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 31 // from: 24.3
  SAY #38000 /* ~Nay.  They're long gone... an' good riddance.  Got what they came for, didn't they?  Heh...~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 32 // from: 24.4
  SAY #38001 /* ~Nay... no one's come.  Nasty bugger wasn't liked much even by them other nobles, I guess.  The sacred ground will stay as it is, more or less undisturbed.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 33 // from: 24.5
  SAY #38002 /* ~Aye.  Even Johanna went an' thanked Madulf, personally.  And now Imnesvale's got defenders like no one else.  Who'd 'ave thought, aye, m'<PRO_LADYLORD>?~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 34 // from: 24.6
  SAY #38005 /* ~Aye.  No one expected Madulf and his followers t' actually help anyone.  They been by t' trade things, an' such... real polite.  People are mighty thankful.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 35 // from: 24.7
  SAY #38006 /* ~Nay, my <PRO_LADYLORD>.  No sightings.  Been a long time since them orcs attacked... an' I think they'll think twice, now, 'fore they try it again.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 36 // from: 24.8
  SAY #38009 /* ~Aye, things have been going very well an' smoothly, like.  We're all mighty grateful to have ye here, my <PRO_LADYLORD> ranger.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 37 // from: 24.9
  SAY #38011 /* ~Well... the village has been here for centuries, my <PRO_LADYLORD>. Even during Umar's rule... although it was a darker place, then, an' mostly just farms an' such.~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 38 // from: 37.0
  SAY #38012 /* ~There was a rush a few centuries back... found mithril in th' hills.  Temples and such were built all o'er the place, then abandoned when the mines ran dry.~ */
  IF ~~ THEN GOTO 39
END

IF ~~ THEN BEGIN 39 // from: 38.0
  SAY #38013 /* ~All the nobles an' priests left, an' everythin' they built has fallen into ruin. Lots o' creatures moved into them dark places...'at's why we needed a ranger.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 40 // from: 24.10
  SAY #38016 /* ~As ye wish, my <PRO_LADYLORD>... anythin' ye wish, I'll always be glad t' help ye.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #9 ~GlobalGT("rangerprotector","GLOBAL",4)
InPartySlot(LastTalkedToBy,0)~ THEN BEGIN 41 // from:
  SAY #38017 /* ~Despite all ye've done fer us, yer no longer welcome here, my <PRO_LADYLORD>.  Yer type... well, maybe ye'd better just be on yer way.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #10 ~Global("ogronattack","GLOBAL",1)
Dead("Madulf")~ THEN BEGIN 42 // from:
  SAY #38018 /* ~There's ogrons come from the hills, my <LADYLORD>... orcs with ogre blood in 'em.  They're gathered near the cave north o' the river, plannin' to attack the village.~ */
  IF ~~ THEN GOTO 43
END

IF ~~ THEN BEGIN 43 // from: 42.0
  SAY #38022 /* ~We'll have t' leave the village, unless somethin' is done.  Maybe ye should go an' talk to the Minister, if ye haven't, already.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #11 ~Global("ogronattack","GLOBAL",1)
Global("ogrealliance","GLOBAL",0)
!Dead("Madulf")~ THEN BEGIN 44 // from:
  SAY #38023 /* ~There's ogrons come from th' hills, my <LADYLORD>... orcs mixed with ogre blood.  That ogre, Madulf, an' his followers... they've been fightin' them for the village.~ */
  IF ~~ THEN GOTO 45
END

IF ~~ THEN BEGIN 45 // from: 44.0
  SAY #38026 /* ~Madulf's given us some time, but the ogrons have him holed up in the cave north o' the river.  He needs help... talk to the Minister, if ye haven't already.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #12 ~Global("ogronattack","GLOBAL",1)
Global("ogrealliance","GLOBAL",1)
!Dead("Madulf")~ THEN BEGIN 46 // from:
  SAY #38030 /* ~There's ogrons come from th' hills, my <LADYLORD> ranger... orcs mixed with ogre blood.  Madulf an' his followers, they've kept their word and fought against 'em.~ */
  IF ~~ THEN GOTO 47
END

IF ~~ THEN BEGIN 47 // from: 46.0
  SAY #38031 /* ~They've bought us some time... but the ogrons cornered 'em in a cave north o' the river.  They need help.  Best go an' see the Minister, if ye haven't already.~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #13 ~Global("umarplot","GLOBAL",1)~ THEN BEGIN 48 // from:
  SAY #38033 /* ~My <LADYLORD>!  The... the witch, Umar, has returned an' warns us all to leave 'fore she murders us all!  I can hardly believe it t' be true!~ */
  IF ~~ THEN GOTO 49
END

IF ~~ THEN BEGIN 49 // from: 48.0
  SAY #38034 /* ~The Minister has asked for ye... go an' speak to him, if ye haven't already.  He knows where the witch to be... ye must protect us, my <LADYLORD>!~ */
  IF ~~ THEN EXIT
END
