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

BEGIN ~UDSVIR04~ 2 // non-zero flags may indicate non-pausing dialogue

IF ~Global("PlayerLooksLikeDrow","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #50810 /* ~Da laden stoone od gam. Welcome to my makeshift inn. I say, I must, I have not seen your like here in quite some time come.~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 4.0 2.0 0.0
  SAY #51107 /* ~I stand ready to offer quiet of soft beds if you wish. Ask and you shall have, you shall.~ */
  IF ~Global("RescuedSvirfChild","GLOBAL",1)
Global("TalkedToSvirfDad","GLOBAL",0)~ THEN REPLY #51108 /* ~Is there a gnome here who had lost his son? I may have some news for him.~ */ GOTO 2
  IF ~~ THEN REPLY #51109 /* ~How is it that you can operate here when there are potential raids by Drow?~ */ GOTO 3
  IF ~~ THEN REPLY #51110 /* ~No small talk. Just let me see your services.~ */ DO ~StartStore("udsvir04",LastTalkedToBy)~ EXIT
  IF ~~ THEN REPLY #51146 /* ~May I see what services you offer?~ */ DO ~StartStore("udsvir04",LastTalkedToBy)~ EXIT
  IF ~Global("TalkedToVithal","GLOBAL",1)
Global("AskedForBook","GLOBAL",0)~ THEN REPLY #51554 /* ~You haven't run across a 'lost' bit of gear, have you? Belonging to a Mage?~ */ GOTO 10
  IF ~Global("AskedForBook","GLOBAL",1)
~ THEN REPLY #51605 /* ~I have returned to ask about that Mage's Book of Rituals.~ */ GOTO 15
END

IF ~~ THEN BEGIN 2 // from: 1.0
  SAY #51111 /* ~You must mean Therndle Daglefodd you must. He has not seen his boy for several wakings. You may find him with his metalworks.~ */
  IF ~~ THEN GOTO 1
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #51144 /* ~The Drow leaves us be to be. There's no real interest in wiping us out. Small outpost, we are.~ */
  IF ~~ THEN GOTO 4
END

IF ~~ THEN BEGIN 4 // from: 3.0
  SAY #51145 /* ~Still, sometimes they come with murder in mind. More for sport, I think, because they never follow too deep. Peaceful most times though. Most times.~ */
  IF ~~ THEN GOTO 1
END

IF ~Global("PlayerLooksLikeDrow","GLOBAL",1)~ THEN BEGIN 5 // from:
  SAY #51152 /* ~Oh no, I would not dream of you staying here, good Drow. This place is beneath you, so far beneath.~ */
  IF ~~ THEN GOTO 6
END

IF ~~ THEN BEGIN 6 // from: 5.0
  SAY #51154 /* ~Please, accept my apologies for the state of this place. There are surely better places for you to sleep. Safer as well.~ */
  IF ~~ THEN REPLY #51156 /* ~You will display your services and you will do so now!~ */ DO ~StartStore("udsvir04",LastTalkedToBy)
~ EXIT
  IF ~~ THEN REPLY #51157 /* ~Very well, I shall seek my shelter elsewhere.~ */ GOTO 7
  IF ~Global("RescuedSvirfChild","GLOBAL",1)
Global("TalkedToSvirfDad","GLOBAL",0)~ THEN REPLY #51159 /* ~Is there one among you that has lost their child? I would speak to him.~ */ GOTO 8
  IF ~Global("TalkedToVithal","GLOBAL",1)
!Global("AskedForBook","GLOBAL",2)
~ THEN REPLY #51624 /* ~You haven't run across a 'lost' bit of gear, have you? Belonging to a Mage?~ */ GOTO 18
END

IF ~~ THEN BEGIN 7 // from: 6.1
  SAY #51158 /* ~That is for the best, it is. I know this, I do.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 8 // from: 6.2
  SAY #51160 /* ~I beg you, torment him not! He is worried no end, and your games will upset! Therndle Daglefodd is who you ask of, but please, leave him be.~ */
  IF ~~ THEN REPLY #51163 /* ~I will do as I see fit. Now, display your services!~ */ DO ~StartStore("udsvir04",LastTalkedToBy)~ EXIT
  IF ~~ THEN REPLY #51164 /* ~It is none of your concern what I do. I will continue with my mission as I see fit.~ */ GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.1
  SAY #51166 /* ~As you would have it.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 10 // from: 1.4
  SAY #51559 /* ~You find a lot in the tunnels, you do. There's no harm in picking up what has fallen from dead hands.~ */
  IF ~~ THEN REPLY #51561 /* ~Well, the mage is no longer dead. He would like the return of his Book of Rituals.~ */ GOTO 11
  IF ~~ THEN REPLY #51562 /* ~Is that what you call stealing a man's gear off his still warm corpse?~ */ GOTO 12
  IF ~~ THEN REPLY #51563 /* ~I do not fault you your scavenging skills. I merely wish to get the book he had.~ */ GOTO 13
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #51567 /* ~No longer dead? That be quite the recovery. Fine you may have his book, but a finder's fee is what I require.~ */
  IF ~~ THEN GOTO 14
END

IF ~~ THEN BEGIN 12 // from: 10.1
  SAY #51597 /* ~Not even a corpse was left! It was no defilement! Most of his gear was destroyed anyway, it was! If it means so much then I shall give you the book he had... for a small fee.~ */
  IF ~~ THEN GOTO 14
END

IF ~~ THEN BEGIN 13 // from: 10.2
  SAY #51599 /* ~Is that all? I see no problem with you recovering that little slip of pages... for a small fee, you know.~ */
  IF ~~ THEN GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.0 12.0 11.0
  SAY #51600 /* ~I have even kept it separate from what other inventory I might have. A curious read, it is. 300 gold too much for your purse?~ */
  IF ~PartyGoldGT(299)~ THEN REPLY #51612 /* ~Very well. Take the 300 coin.~ */ DO ~TakePartyGold(300)
EraseJournalEntry(57854)~ UNSOLVED_JOURNAL #57851 /* ~A Mage's Proposal.

I located the svirfneblin Innkeeper that took Vithal's book of ritual. I had to pay a 300 gold finder's fee.~ */ GOTO 17
  IF ~~ THEN REPLY #51613 /* ~I will not pay that.~ */ UNSOLVED_JOURNAL #57851 /* ~A Mage's Proposal.

I located the svirfneblin Innkeeper that took Vithal's book of ritual. I had to pay a 300 gold finder's fee.~ */ GOTO 16
END

IF ~~ THEN BEGIN 15 // from: 1.5
  SAY #51609 /* ~Have you the 300 gold I asked for?~ */
  IF ~PartyGoldGT(299)~ THEN REPLY #51610 /* ~Here it is.~ */ DO ~TakePartyGold(300)~ GOTO 17
  IF ~~ THEN REPLY #51611 /* ~No, I do not.~ */ GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.1 14.1
  SAY #51617 /* ~Then we have nothing more to discuss. Safe tunnels to you.~ */
  IF ~~ THEN DO ~SetGlobal("AskedForBook","GLOBAL",1)~ EXIT
END

IF ~~ THEN BEGIN 17 // from: 15.0 14.0
  SAY #51620 /* ~Then we have a trade, we do. I thank you for your patronage.~ */
  IF ~~ THEN DO ~SetGlobal("AskedForBook","GLOBAL",2)
GiveItem("miscA3",LastTalkedToBy)~ EXIT
END

IF ~~ THEN BEGIN 18 // from: 6.3
  SAY #51626 /* ~Er, yes... I did... was that of interest to you? Perhaps I could interest you in buying... er... no, you can just have it. A gift, to foster better relations, it is.~ */
  IF ~~ THEN DO ~SetGlobal("AskedForBook","GLOBAL",2)
GiveItem("miscA3",LastTalkedToBy)
EraseJournalEntry(57854)~ UNSOLVED_JOURNAL #57856 /* ~A Mage's Proposal.

I located the svirfneblin Innkeeper that took Vithal's book of rituals. I approached him while under Adalon's Drow-form illusion and he gave the book with no questions asked. The Drow are certainly feared here.~ */ EXIT
END
