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

BEGIN ~UHKID01~

IF ~NumTimesTalkedTo(0)
!GlobalGT("ParentsUpset","GLOBAL",0)
!Dead("uhkid02")
!StateCheck("uhkid02",STATE_SLEEPING)
!Dead("uhkid03")
!StateCheck("uhkid03",STATE_SLEEPING)~ THEN BEGIN 0 // from:
  SAY #33392 /* ~Er...<PRO_SIRMAAM>?  My name is Dirbert and me an' my friends here want to be adventurers like you.  Real strong an' powerful, like.~ */
  IF ~~ THEN DO ~SetGlobal("TalkedToDerbert","GLOBAL",1)
~ EXTERN ~UHKID02~ 0
END

IF ~~ THEN BEGIN 1 // from: UHKID03:0.0
  SAY #33395 /* ~I knows we can!  But... everyone says we're all too young an' all.~ */
  IF ~~ THEN EXTERN ~UHKID03~ 1
END

IF ~~ THEN BEGIN 2 // from: UHKID03:1.0
  SAY #33397 /* ~Since... since you're already an adventurer an' all, <PRO_SIRMAAM>, I was hopin'... I was hopin' you might maybe... maybe buy some swords for us?  Some bastard swords?~ */
  IF ~~ THEN EXTERN ~UHKID02~ 1
END

IF ~~ THEN BEGIN 3 // from: UHKID03:2.0
  SAY #33400 /* ~Er... swords and some ale, then.  If... if we give you th' money, <PRO_SIRMAAM>, would you buy us some?~ */
  IF ~~ THEN REPLY #33402 /* ~Who am I to deny the young?  I'll get you your swords and ale, if that's what you wish.~ */ GOTO 4
  IF ~~ THEN REPLY #33403 /* ~I'll get you your swords... but no ale.  You've barely fuzz on your chins.~ */ GOTO 5
  IF ~~ THEN REPLY #33404 /* ~I'll buy you ale, boys... but you'd just cut yourselves with a sword in your hands.~ */ UNSOLVED_JOURNAL #2321 /* ~Idle hands in Imnesvale.

I have agreed to buy some ale for three boys in the Umar Hills village.  They wanted swords and I said no, but I'm not about to refuse the boys a good time.  One of the local merchants should have what they need.~ */ GOTO 6
  IF ~~ THEN REPLY #33405 /* ~Forget it, boys.  I've got better things to do.~ */ GOTO 7
END

IF ~~ THEN BEGIN 4 // from: UHKID03:7.0 UHKID02:5.0 3.0
  SAY #33407 /* ~Great!  Gee, thanks, <PRO_SIRMAAM>!  You're the greatest!  Here... here's the gold we've saved.  Get us three bastard swords, I guess, and a keg of Baalor's ale from Min Minling.~ */
  IF ~~ THEN DO ~GiveGoldForce(200)
SetGlobal("DirbertMission","GLOBAL",1)
SetGlobalTimer("Dirbert","GLOBAL",ONE_DAY)
~ UNSOLVED_JOURNAL #2319 /* ~Idle hands in Imnesvale.

I have, perhaps foolishly, agreed to buy three bastard swords and some Baalor's ale for three youngsters in the village of Imnesvale.  Mind you, how much trouble could they get into?  One of the local merchants named Min Minling should have what they need.~ */ EXTERN ~UHKID02~ 2
END

IF ~~ THEN BEGIN 5 // from: UHKID03:7.1 UHKID02:5.1 3.1
  SAY #33409 /* ~O-okay... with three bastard swords, we could at least become adventurers!  Here's some of the gold we've saved up.  Thanks, <PRO_SIRMAAM>!  You're the greatest!~ */
  IF ~~ THEN DO ~GiveGoldForce(100)
SetGlobal("DirbertMission","GLOBAL",2)
SetGlobalTimer("Dirbert","GLOBAL",ONE_DAY)
~ UNSOLVED_JOURNAL #2320 /* ~Idle hands in Imnesvale.

I have agreed to buy three young prospective adventurers a few bastard swords from the local merchants.  Truly, how much trouble could they get into?~ */ EXTERN ~UHKID02~ 3
END

IF ~~ THEN BEGIN 6 // from: UHKID03:7.2 UHKID02:5.2 3.2
  SAY #33415 /* ~No, we wouldn't!  We know how to use swords!  But... but if you'd buy us some ale, that'd be super.  Here's some gold we've saved up for it...~ */
  IF ~~ THEN DO ~GiveGoldForce(100)
SetGlobal("DirbertMission","GLOBAL",3)
SetGlobalTimer("Dirbert","GLOBAL",ONE_DAY)
~ EXTERN ~UHKID03~ 4
END

IF ~~ THEN BEGIN 7 // from: 3.3
  SAY #33422 /* ~Awww... please?  Please?  Pretty please?~ */
  IF ~~ THEN EXTERN ~UHKID02~ 5
END

IF ~~ THEN BEGIN 8 // from: UHKID02:5.3
  SAY #33429 /* ~(sigh)  You're so mean...~ */
  IF ~~ THEN EXTERN ~UHKID03~ 6
END

IF ~Global("DirbertMission","GLOBAL",0)
!GlobalGT("ParentsUpset","GLOBAL",0)
!Dead("uhkid02")
!StateCheck("uhkid02",STATE_SLEEPING)
!Dead("uhkid03")
!StateCheck("uhkid03",STATE_SLEEPING)~ THEN BEGIN 9 // from: UHKID03:13.0 UHKID02:12.0
  SAY #33433 /* ~Please won't you reconsider?  We want to be just like you, honest!  Just a few swords and some ale?~ */
  IF ~~ THEN EXTERN ~UHKID02~ 6
END

IF ~~ THEN BEGIN 10 // from: UHKID03:7.3
  SAY #33441 /* ~Awww...~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 11 // from: UHKID03:7.4 13.3
  SAY #33442 /* ~Eeek!  Run for it!~ */
  IF ~~ THEN EXTERN ~UHKID02~ 7
END

IF ~GlobalGT("DirbertMission","GLOBAL",0)
!GlobalGT("ParentsUpset","GLOBAL",0)
GlobalTimerExpired("Dirbert","GLOBAL")
!Dead("uhkid02")
!StateCheck("uhkid02",STATE_SLEEPING)
!Dead("uhkid03")
!StateCheck("uhkid03",STATE_SLEEPING)~ THEN BEGIN 12 // from:
  SAY #33445 /* ~Hey, <PRO_SIRMAAM>!  We've been waiting forever for you t' get our stuff!  You're a thief, you are!~ */
  IF ~~ THEN EXTERN ~UHKID02~ 8
END

IF ~~ THEN BEGIN 13 // from: UHKID03:9.0 16.10
  SAY #33448 /* ~We want our money back, then, <PRO_SIRMAAM>!~ */
  IF ~~ THEN REPLY #33449 /* ~Forget it.  Consider it a lesson learned.~ */ DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)~ SOLVED_JOURNAL #23550 /* ~Idle hands in Imnesvale.

Well, I didn't get the three kids in Imnesvale what they'd asked for.  I don't need the grief I would get from their parents.  I kept their money, too, just to teach the brats a lesson.~ */ GOTO 14
  IF ~Global("DirbertMission","GLOBAL",1)
PartyGoldGT(199)
~ THEN REPLY #33450 /* ~Fine.  Here's your money.  I've got better things to do.~ */ DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)
TakePartyGold(200)
~ SOLVED_JOURNAL #9976 /* ~Idle hands in Imnesvale.

Well, I didn't get the three kids in Imnesvale what they'd asked for.  I don't need the grief I would get from their parents.  I gave their money back, just to be fair.~ */ GOTO 15
  IF ~GlobalGT("DirbertMission","GLOBAL",1)
PartyGoldGT(99)
~ THEN REPLY #33452 /* ~Fine.  Here's your money.  I've got better things to do.~ */ DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)
TakePartyGold(100)
~ SOLVED_JOURNAL #9976 /* ~Idle hands in Imnesvale.

Well, I didn't get the three kids in Imnesvale what they'd asked for.  I don't need the grief I would get from their parents.  I gave their money back, just to be fair.~ */ GOTO 15
  IF ~~ THEN REPLY #33451 /* ~Better get lost, brats, before I slice you open a new mouth to whine with!~ */ DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)~ SOLVED_JOURNAL #23550 /* ~Idle hands in Imnesvale.

Well, I didn't get the three kids in Imnesvale what they'd asked for.  I don't need the grief I would get from their parents.  I kept their money, too, just to teach the brats a lesson.~ */ GOTO 11
END

IF ~~ THEN BEGIN 14 // from: 13.0
  SAY #33453 /* ~Kobold!  Thief!!~ */
  IF ~~ THEN EXTERN ~UHKID03~ 10
END

IF ~~ THEN BEGIN 15 // from: 13.2 13.1
  SAY #33456 /* ~Well, at least we got our money back.  Let's go!~ */
  IF ~~ THEN EXTERN ~UHKID02~ 9
END

IF ~GlobalGT("DirbertMission","GLOBAL",0)
!GlobalGT("ParentsUpset","GLOBAL",0)~ THEN BEGIN 16 // from: UHKID02:13.0
  SAY #33457 /* ~So... have you got our stuff?~ */
  IF ~Global("DirbertMission","GLOBAL",1)
PartyHasItem("MISC97")
NumItemsParty("SW1H01",3)
~ THEN REPLY #33458 /* ~Yes, I got your keg of ale and your swords, here.~ */ DO ~TakePartyItem("MISC97")
TakePartyItemNum("SW1H01",3)~ GOTO 17
  IF ~Global("DirbertMission","GLOBAL",2)
NumItemsParty("SW1H01",3)
~ THEN REPLY #33459 /* ~Yes, I got your swords here.~ */ DO ~TakePartyItemNum("SW1H01",3)~ GOTO 19
  IF ~Global("DirbertMission","GLOBAL",3)
PartyHasItem("MISC97")~ THEN REPLY #33460 /* ~Yes, I got a keg of ale for you, here.~ */ DO ~TakePartyItem("MISC97")
~ GOTO 21
  IF ~Global("DirbertMission","GLOBAL",1)
NumItemsParty("SW1H01",3)
~ THEN REPLY #33461 /* ~Well, I got your swords.  That's going to be it, though.~ */ DO ~TakePartyItemNum("SW1H01",3)~ GOTO 19
  IF ~Global("DirbertMission","GLOBAL",1)
PartyHasItem("MISC97")
~ THEN REPLY #33462 /* ~Well, I got your ale.  That's going to be it, though.~ */ DO ~TakePartyItem("MISC97")
~ GOTO 21
  IF ~Global("DirbertMission","GLOBAL",2)
PartyHasItem("MISC97")
NumItemsParty("SW1H01",3)~ THEN REPLY #33463 /* ~Yeah, I got your swords... and some ale for you, too.~ */ DO ~TakePartyItem("MISC97")
TakePartyItemNum("SW1H01",3)~ GOTO 17
  IF ~Global("DirbertMission","GLOBAL",2)
PartyHasItem("MISC97")
~ THEN REPLY #33464 /* ~Well, I didn't get your swords... but I did buy you some ale.~ */ DO ~TakePartyItem("MISC97")
~ GOTO 21
  IF ~Global("DirbertMission","GLOBAL",3)
PartyHasItem("MISC97")
NumItemsParty("SW1H01",3)
~ THEN REPLY #33466 /* ~Yes, I got your ale... and I got you some bastard swords, as well.~ */ DO ~TakePartyItemNum("MISC97",3)
TakePartyItem("SW1H01")~ GOTO 17
  IF ~Global("DirbertMission","GLOBAL",3)
NumItemsParty("SW1H01",3)
~ THEN REPLY #33469 /* ~Well, I didn't get your ale... but I did get you some swords.~ */ DO ~TakePartyItemNum("SW1H01",3)~ GOTO 19
  IF ~~ THEN REPLY #33471 /* ~No, but I will soon.~ */ GOTO 23
  IF ~~ THEN REPLY #33472 /* ~I've changed my mind.  You're too young for any of this stuff.~ */ GOTO 13
END

IF ~~ THEN BEGIN 17 // from: 16.7 16.5 16.0
  SAY #33480 /* ~Baalor ale and our bastard swords!  Wow!  You are the best, <SIRMAAM>!  Thanks!~ */
  IF ~~ THEN DO ~AddExperienceParty(2000)~ EXTERN ~UHKID02~ 10
END

IF ~~ THEN BEGIN 18 // from: UHKID03:11.0
  SAY #33484 /* ~Let's go!  Whoo-hoo!~ */
  IF ~~ THEN DO ~SetGlobal("ParentsUpset","GLOBAL",3)
SetGlobalTimer("KidsRunOff","GLOBAL",ONE_DAY)
SetGlobal("AdventureTime","AR1100",1)~ UNSOLVED_JOURNAL #15743 /* ~Idle hands in Imnesvale.

Well, I bought the three kids in Imnesvale what I promised them, and they've run off to enjoy it.  Hopefully, they don't get into too much trouble... and here's to hoping their parents don't get wind of this.~ */ EXIT
END

IF ~~ THEN BEGIN 19 // from: 16.8 16.3 16.1
  SAY #33486 /* ~Our swords!  Wow!  You're the best, <SIRMAAM>!~ */
  IF ~~ THEN DO ~AddExperienceParty(1000)~ EXTERN ~UHKID03~ 12
END

IF ~~ THEN BEGIN 20 // from: UHKID03:12.0
  SAY #33488 /* ~Let's go!  For adventure!!~ */
  IF ~~ THEN DO ~SetGlobal("ParentsUpset","GLOBAL",1)
SetGlobalTimer("KidsRunOff","GLOBAL",ONE_DAY)
SetGlobal("AdventureTime","AR1100",1)~ UNSOLVED_JOURNAL #15743 /* ~Idle hands in Imnesvale.

Well, I bought the three kids in Imnesvale what I promised them, and they've run off to enjoy it.  Hopefully, they don't get into too much trouble... and here's to hoping their parents don't get wind of this.~ */ EXIT
END

IF ~~ THEN BEGIN 21 // from: 16.6 16.4 16.2
  SAY #33490 /* ~Ale!  Baalor Ale!  Wow, you're the greatest, <SIRMAAM>!~ */
  IF ~~ THEN DO ~AddExperienceParty(1000)~ EXTERN ~UHKID02~ 11
END

IF ~~ THEN BEGIN 22 // from: UHKID02:11.0
  SAY #33494 /* ~I know a place!  Come on!~ */
  IF ~~ THEN DO ~SetGlobal("ParentsUpset","GLOBAL",2)
SetGlobalTimer("KidsRunOff","GLOBAL",ONE_DAY)
SetGlobal("AdventureTime","AR1100",1)~ UNSOLVED_JOURNAL #15743 /* ~Idle hands in Imnesvale.

Well, I bought the three kids in Imnesvale what I promised them, and they've run off to enjoy it.  Hopefully, they don't get into too much trouble... and here's to hoping their parents don't get wind of this.~ */ EXIT
END

IF ~~ THEN BEGIN 23 // from: 16.9
  SAY #33504 /* ~Alright... I guess we'll wait a bit longer for it.  We're mighty anxious to start our adventurin', though.~ */
  IF ~~ THEN EXIT
END

IF ~Global("ParentsUpset","GLOBAL",3)
~ THEN BEGIN 24 // from:
  SAY #33522 /* ~YAAAAAA (hic!) AAAAH!  Run from the (hic!) dragon!!~ [CHILM07] */
  IF ~~ THEN EXTERN ~UHKID03~ 14
END

IF ~Global("ParentsUpset","GLOBAL",2)
~ THEN BEGIN 25 // from:
  SAY #33531 /* ~... Ize being (hic!) sooooo glahd ti seeze ye... (hic!)  yooze soooo neyce ti usssz beyssz... (hic!)~ [DRUNK1] */
  IF ~~ THEN DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)
SetGlobalTimer("KidsLeaveCave","GLOBAL",2000)
ActionOverride("uhkid02",PlayDead(2000))
ActionOverride("uhkid03",PlayDead(2000))
PlayDead(2000)~ SOLVED_JOURNAL #9977 /* ~Idle hands in Imnesvale.

I stumbled across the three kids from Imnesvale for whom I bought the ale. They were drunk and passed out in a cave outside the village.  I wonder how long they've been missing for?  No doubt that keg's going to last them a while, heh...~ */ EXIT
END

IF ~Global("ParentsUpset","GLOBAL",1)
~ THEN BEGIN 26 // from:
  SAY #33534 /* ~AAAAHH!!  What... what IS that?!~ [TUTHH04] */
  IF ~~ THEN EXTERN ~UHKID03~ 15
END

IF ~~ THEN BEGIN 27 // from: UHKID02:15.0
  SAY #33539 /* ~Adventuring isn't as fun as we thought!  Run, run!!~ */
  IF ~~ THEN DO ~EraseJournalEntry(2319)
EraseJournalEntry(2320)
EraseJournalEntry(2321)
EraseJournalEntry(15743)
ActionOverride("uhkid02",EscapeArea())
ActionOverride("uhkid03",EscapeArea())
EscapeArea()~ SOLVED_JOURNAL #15721 /* ~Idle hands in Imnesvale.

Well, I finally encountered the three kids from Imnesvale I gave the swords to.  They just about got themselves killed at the hands a shadow creature.  Hopefully the scare will dissuade them from such foolishness for a while, yet, but I doubt it...~ */ EXIT
END
