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

BEGIN ~UDSVIR03~

IF ~NumTimesTalkedTo(0)
Global("PlayerLooksLikeDrow","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #50799 /* ~Ahh, travelers to our fair city. That would be rare enough, but you are surfacers by the look of you.~ [GOLDAN02] */
  IF ~OR(4)
Dead("Viconia")
!InParty("Viconia")
!See("Viconia")
StateCheck("Viconia",STATE_SLEEPING)~ THEN DO ~EraseJournalEntry(57761)~ GOTO 2
  IF ~!Dead("Viconia")
InParty("Viconia")
See("Viconia")
!StateCheck("Viconia",STATE_SLEEPING)~ THEN DO ~EraseJournalEntry(57761)~ GOTO 1
END

IF ~~ THEN BEGIN 1 // from: 0.1
  SAY #50803 /* ~Surprising that you travel with the darkness of a Drow. I mean no disrespect, but it is surprising.~ */
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN GOTO 2
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 91
END

IF ~~ THEN BEGIN 2 // from: 3.0 1.0 0.0
  SAY #50804 /* ~Come, I would have words with you, if you are willing to hear.~ */
  IF ~~ THEN REPLY #50807 /* ~Speak and I will listen, though I'm not sure what I can do for you.~ */ GOTO 4
  IF ~~ THEN REPLY #50808 /* ~Another group of backtunnel weaklings need my help. What a surprise.~ */ GOTO 5
  IF ~~ THEN REPLY #50809 /* ~I am willing to listen as long as it is gold that is speaking.~ */ GOTO 6
  IF ~~ THEN REPLY #50824 /* ~I will trade you words. I need information about some fugitives I am chasing.~ */ GOTO 11
END

IF ~~ THEN BEGIN 3 // from: VICONIJ:91.0
  SAY #50806 /* ~No offense intended, but your kind does not often come for social visits, no.~ */
  IF ~~ THEN GOTO 2
END

IF ~~ THEN BEGIN 4 // from: 2.0
  SAY #50812 /* ~It is a matter that I would prefer to trust to an outsider. Too much svirfneblin blood has been spilled over this as it is.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 5 // from: 2.1
  SAY #50813 /* ~Spare your tone. We are not weak. There is no shame in knowing when you are outmatched. Too much svirfneblin blood has been shed over this already.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 6 // from: 2.2
  SAY #50814 /* ~Gold and gems will not speak for me. We do not keep our treasured items this close to Drow encampments, but I do have other things of worth.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 7 // from: 11.0 6.0 5.0 4.0
  SAY #50815 /* ~I will give you details of the task first, and you may decide if you wish to accept. I tap rock that you will.~ */
  IF ~!IsValidForPartyDialogue("VICONIA")
!IsValidForPartyDialogue("KELDORN")~ THEN GOTO 8
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 160
  IF ~IsValidForPartyDialogue("KELDORN")
!IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~KELDORJ~ 215
END

IF ~~ THEN BEGIN 8 // from: VICONIJ:160.0 7.0
  SAY #50816 /* ~As you can see, our granitehome village is quite empty. I have sent the majority to deeper climes far from here. It was no longer safe, and it is our own fault.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 9 // from: 8.0
  SAY #50817 /* ~We tunneled too deep recently, and unearthed a monstrosity. A strange cavern that yielded death, a monster we have not seen outside of dreaming.~ */
  IF ~~ THEN GOTO 10
END

IF ~~ THEN BEGIN 10 // from: 9.0
  SAY #50819 /* ~The task I ask of you is simple to explain, but difficult in deed. I ask that the beast be killed, and the tunnel be closed.~ */
  IF ~~ THEN REPLY #50820 /* ~Could you not just collapse the tunnel upon the creature?~ */ GOTO 12
  IF ~~ THEN REPLY #50822 /* ~You little munchkins are supposed to be diggers, why not bury it yourselves?~ */ GOTO 12
END

IF ~~ THEN BEGIN 11 // from: 2.3
  SAY #50825 /* ~I will help as I can, but my matter takes importance. Too much svirfneblin blood has been shed over this already.~ */
  IF ~~ THEN GOTO 7
END

IF ~~ THEN BEGIN 12 // from: 10.1 10.0
  SAY #50828 /* ~The tunnel will readily collapse, of that we are sure. What is unsure is whether that would kill the beast now that it is awakened.~ */
  IF ~!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("IMOEN2")
!IsValidForPartyDialogue("HAERDALIS")~ THEN REPLY #50830 /* ~Awakened? What kind of creature are you putting me up against?~ */ GOTO 13
  IF ~!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("IMOEN2")
!IsValidForPartyDialogue("HAERDALIS")~ THEN REPLY #50831 /* ~I get the feeling that this creature is not natural?~ */ GOTO 13
  IF ~IsValidForPartyDialogue("CERND")~ THEN EXTERN ~CERNDJ~ 120
  IF ~!IsValidForPartyDialogue("CERND")
IsValidForPartyDialogue("IMOEN2")~ THEN EXTERN ~IMOEN2J~ 32
  IF ~!IsValidForPartyDialogue("CERND")
!IsValidForPartyDialogue("IMOEN2")
IsValidForPartyDialogue("HAERDALIS")~ THEN EXTERN ~HAERDAJ~ 124
END

IF ~~ THEN BEGIN 13 // from: 12.1 12.0
  SAY #50829 /* ~As I said, it is a beast out of dreams, or nightmares, if you prefer. It is not of the rock. I do not know what to call it.~ */
  IF ~~ THEN REPLY #50833 /* ~The goal is clear enough. Now I must mention what I will need from you.~ */ GOTO 14
  IF ~~ THEN REPLY #50834 /* ~Yeah yeah, kill and bury it. Easy enough to say, but what will be my reward.~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.1 13.0
  SAY #50832 /* ~I am listening, but keep in mind that we are not the richest of granitehomes. We are under constant pressure with the Drow being so close.~ */
  IF ~~ THEN REPLY #50937 /* ~I require no payment for helping others, but I seek two surfacers that came this way.~ */ GOTO 15
  IF ~~ THEN REPLY #50938 /* ~I don't care about that. You will pay me, and you will tell me about two surfacers I seek.~ */ GOTO 15
END

IF ~~ THEN BEGIN 15 // from: 14.1 14.0
  SAY #50936 /* ~Surfacers other than you? Ahh, I know of them, but you will have a hard time finding. They passed within the city of the Drow, Ust Natha.~ */
  IF ~~ THEN GOTO 16
END

IF ~~ THEN BEGIN 16 // from: 15.0
  SAY #50990 /* ~Now before you ask, I may know a way into the Drow city. Well, I know a being that might help you. She could see you safely inside, but after that you would surely be dead.~ */
  IF ~IsValidForPartyDialogue("VICONIA")
~ THEN GOTO 17
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN GOTO 18
END

IF ~~ THEN BEGIN 17 // from: 16.0
  SAY #50991 /* ~No offense, Malla Drow, but I see you do not wear the symbols of any House that I know. You would fare no better in there, especially with your current companions.~ */
  IF ~!IsValidForPartyDialogue("KORGAN")
!IsValidForPartyDialogue("MINSC")~ THEN EXTERN ~VICONIJ~ 96
  IF ~IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~KORGANJ~ 151
  IF ~IsValidForPartyDialogue("MINSC")
!IsValidForPartyDialogue("KORGAN")~ THEN EXTERN ~MINSCJ~ 180
END

IF ~~ THEN BEGIN 18 // from: VICONIJ:96.0 16.1
  SAY #50993 /* ~If such is the risk you would take, I will gladly point you in her direction. The great staircase goes to her lair. It is the blackest of all the tunnels, but there is glorious light on the other side.~ */
  IF ~~ THEN GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.0
  SAY #50994 /* ~She is called Adalon by choice, though 'My Lady' will suffice just as well. Show respect and you will have it in return.~ */
  IF ~~ THEN REPLY #50995 /* ~I don't need you if she knows about the two I seek and has a way to get to them.~ */ GOTO 20
  IF ~~ THEN REPLY #50996 /* ~If she is so powerful why don't you get her to help you? Why use me?~ */ GOTO 21
  IF ~~ THEN REPLY #51045 /* ~What manner of creature is this Adalon? Is she Svirfneblin like you?~ */ GOTO 22
END

IF ~~ THEN BEGIN 20 // from: 19.0
  SAY #51044 /* ~You may not need me specifically, but she does not entertain just anyone. She is a creature of... discriminating tastes, perhaps out of character for her species.~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 21 // from: 19.1
  SAY #51050 /* ~She is receptive to help, of course, but she more respects those that help themselves. She is a creature that keeps very particular company, perhaps more so than others of her kind.~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 22 // from: 19.2
  SAY #51052 /* ~Oh, goodness no. She is a creature of great beauty, as you will hopefully see. She does keep very particular company though, more so than others of her kind.~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 23 // from: 22.0 21.0 20.0
  SAY #51053 /* ~I'm sure she will see to your concerns if you approach politely, but I fear I must restrict your access until the needs of my village are met.~ */
  IF ~!IsValidForPartyDialogue("VICONIA")
!IsValidForPartyDialogue("AERIE")~ THEN GOTO 24
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 161
  IF ~!IsValidForPartyDialogue("VICONIA")
IsValidForPartyDialogue("AERIE")~ THEN EXTERN ~AERIEJ~ 160
END

IF ~~ THEN BEGIN 24 // from: VICONIJ:161.0 23.0
  SAY #51054 /* ~The passage to her lair is guarded against intruders by a force of her design. It is the blackest of dark, preventing even the Drow entry.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0
  SAY #51057 /* ~When the beast in the cavern is dispatched I will give you a 'light gem' to banish the darkness of the tunnel. I carry it with me always, but I will gladly give it to you for this service.~ */
  IF ~~ THEN REPLY #51059 /* ~Saying that was a mistake, fool! I will kill you and take the stone! Forget your deal!~ */ GOTO 27
  IF ~~ THEN REPLY #51060 /* ~I will help, but you will pay more than that. Now, where must I go?~ */ GOTO 26
  IF ~~ THEN REPLY #51061 /* ~Fair enough. Where must I go to find this beast you need killed?~ */ GOTO 26
END

IF ~~ THEN BEGIN 26 // from: VALYGARJ:91.1 25.2 25.1
  SAY #51065 /* ~I am glad of your decision. The passage is to the Northeast, guarded by one of my best breachgnomes. He will let you pass now.~ */
  IF ~~ THEN DO ~SetGlobal("PermissionToOpenDoor","GLOBAL",1)~ GOTO 28
END

IF ~~ THEN BEGIN 27 // from: 25.0
  SAY #51067 /* ~What?! This is madness! The dark has taken your senses! Guards! Ada gon' tonda! Gi!~ */
  IF ~!IsValidForPartyDialog("MINSC")
!IsValidForPartyDialog("JAHEIRA")
!IsValidForPartyDialog("KELDORN")
!IsValidForPartyDialog("VALYGAR")
!IsValidForPartyDialog("MAZZY")
!IsValidForPartyDialog("AERIE")~ THEN DO ~SetGlobal("SvirHostile","GLOBAL",1)
~ SOLVED_JOURNAL #57768 /* ~Svirfneblin Village Concerns.

I spoke with Goldander Blackenrock, Lord of the svirfneblin village. His pompous title revealed the shallow nature of his needs. He spoke of a means that I might enter the Drow city, by enlisting the aid of Adalon, a powerful creature that holds court at the base of the great staircase. Goldander wanted me to first perform a service for his village, defeating some creature that they had unearthed, and he offered to grant me access to Adalon as reward, giving me a glow stone or some such, so that I could pass through the darkness that protects her lair. I cut out the middleman and killed the lot of them.~ */ EXIT
  IF ~IsValidForPartyDialog("MINSC")~ THEN EXTERN ~MINSCJ~ 181
  IF ~!IsValidForPartyDialog("MINSC")
IsValidForPartyDialog("JAHEIRA")~ THEN EXTERN ~JAHEIRAJ~ 483
  IF ~!IsValidForPartyDialog("MINSC")
!IsValidForPartyDialog("JAHEIRA")
IsValidForPartyDialog("KELDORN")~ THEN EXTERN ~KELDORJ~ 216
  IF ~!IsValidForPartyDialog("MINSC")
!IsValidForPartyDialog("JAHEIRA")
!IsValidForPartyDialog("KELDORN")
IsValidForPartyDialog("VALYGAR")
~ THEN EXTERN ~VALYGARJ~ 91
  IF ~IsValidForPartyDialog("MAZZY")
!IsValidForPartyDialog("MINSC")
!IsValidForPartyDialog("JAHEIRA")
!IsValidForPartyDialog("KELDORN")
!IsValidForPartyDialog("VALYGAR")~ THEN EXTERN ~MAZZYJ~ 181
  IF ~IsValidForPartyDialog("AERIE")
!IsValidForPartyDialog("MINSC")
!IsValidForPartyDialog("JAHEIRA")
!IsValidForPartyDialog("KELDORN")
!IsValidForPartyDialog("VALYGAR")
!IsValidForPartyDialog("MAZZY")~ THEN EXTERN ~AERIEJ~ 161
END

IF ~~ THEN BEGIN 28 // from: 26.0
  SAY #51068 /* ~Take this Stoneshape scroll. It is linked magically to the stone of the cavern. When the beast is dead, use this to bring the cavern down upon it.  I shall make it a forbidden area forever after.~ */
  IF ~~ THEN GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #51069 /* ~Thank you, <CHARNAME>, you do not know the good you have done here.~ */
  IF ~~ THEN DO ~GiveItemCreate("miscA5",LastTalkedToBy,1,1,1)~ UNSOLVED_JOURNAL #57767 /* ~Svirfneblin Village Concerns.

I spoke with Goldander Blackenrock, Lord of the svirfneblin village. He said I might enter the Drow city by enlisting the aid of Adalon, a powerful creature that holds court at the base of the great staircase. Goldander has asked that I first perform a service for his village, defeating a creature that they had unearthed in a lower cavern, and he has offered to grant me access to Adalon as reward. He will give me a glow stone so that I can pass through the darkness that protects her lair, but only once the strange beast that threatens them is destroyed and the cavern is collapsed with an earthquake scroll.~ */ EXIT
END

IF ~Global("PlayerLooksLikeDrow","GLOBAL",0)
!Global("EarQ1","GLOBAL",10)~ THEN BEGIN 30 // from:
  SAY #51070 /* ~You are welcomed back. We had worried for your safety as though one of our own were in danger.~ [GOLDAN07] */
  IF ~!Dead("udbalor")~ THEN GOTO 32
  IF ~Dead("udbalor")~ THEN GOTO 31
END

IF ~~ THEN BEGIN 31 // from: 30.1
  SAY #51071 /* ~I heard the rumblings of your battle, <CHARNAME>, and I am glad to see you alive. I thank you immeasurably.~ */
  IF ~Global("EarQ1","GLOBAL",2)~ THEN GOTO 33
  IF ~!Global("EarQ1","GLOBAL",2)~ THEN GOTO 34
END

IF ~~ THEN BEGIN 32 // from: 30.0
  SAY #51075 /* ~I hope you have not given up on your promise. While the beast lives we are all in danger.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 33 // from: 31.0
  SAY #51080 /* ~With the tunnel collapsed, the creature will not be disturbed again. I know it is dead, but who knows what could happen with such things.~ */
  IF ~~ THEN REPLY #51082 /* ~It will trouble you no more.~ */ GOTO 35
  IF ~~ THEN REPLY #51083 /* ~I am through with your task. Now to payment.~ */ GOTO 35
END

IF ~~ THEN BEGIN 34 // from: 31.1
  SAY #51081 /* ~Despite your great action I must ask you to return to the cavern where you fought the evil thing. It must be collapsed with the scroll that I gave you.~ */
  IF ~~ THEN UNSOLVED_JOURNAL #57779 /* ~Svirfneblin Village Concerns.

Goldander Blackenrock was thrilled that I killed the beast that had been threatening his village, but he reminded me that I must also collapse the cavern it is in with the earthquake scroll he gave me.~ */ EXIT
END

IF ~~ THEN BEGIN 35 // from: 33.1 33.0
  SAY #51095 /* ~Yes, and with all haste. I will not delay your own goals a second longer. Please, accept this magical item as partial payment.~ */
  IF ~HasItem("misc9r",Myself)~ THEN DO ~GiveItemCreate("blun18",LastTalkedToBy,1,1,1)
SetGlobal("udGnomeQuest","GLOBAL",1)
EraseJournalEntry(57767)
EraseJournalEntry(57779)
SetGlobal("udMind","GLOBAL",41)
AddXPObject(Player1,25000)
AddXPObject(Player2,25000)
AddXPObject(Player3,25000)
AddXPObject(Player4,25000)
AddXPObject(Player5,25000)
AddXPObject(Player6,25000)
~ SOLVED_JOURNAL #57842 /* ~Svirfneblin Village Concerns.

Goldander was quite relieved that the creature would no longer be bothering his village. He reaffirmed his gratitude by giving me a magic item as reward, as well as the gem that would allow me to enter the lair of Adalon.~ */ GOTO 36
  IF ~!HasItem("misc9r",Myself)~ THEN DO ~GiveItemCreate("blun18",LastTalkedToBy,1,1,1)
SetGlobal("udGnomeQuest","GLOBAL",1)
EraseJournalEntry(57767)
EraseJournalEntry(57779)
SetGlobal("udMind","GLOBAL",41)
AddXPObject(Player1,25000)
AddXPObject(Player2,25000)
AddXPObject(Player3,25000)
AddXPObject(Player4,25000)
AddXPObject(Player5,25000)
AddXPObject(Player6,25000)
~ SOLVED_JOURNAL #57843 /* ~Svirfneblin Village Concerns.

Goldander was quite relieved that the creature would no longer be bothering his village, and he reaffirmed his gratitude by giving me a magic item as reward. He was, however, a little concerned that I had already pickpocketed the light gem that he had intended to give me. Oh well, as long as I got it.~ */ GOTO 37
END

IF ~~ THEN BEGIN 36 // from: 35.0
  SAY #51096 /* ~And also the light gem. With this you will be able to pass the great stairs and enter the lair of Adalon. I wish you well.~ */
  IF ~~ THEN DO ~GiveItem("misc9r",LastTalkedToBy)
SetGlobal("EarQ1","GLOBAL",10)~ EXIT
END

IF ~~ THEN BEGIN 37 // from: 35.1
  SAY #51097 /* ~And the light gem as well. Here... it... it does not seem to be here... it is gone! You have... You have taken it!~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 38 // from: 37.0
  SAY #51098 /* ~You have disgraced our deal, and stolen a precious item I would have been willing to give! We owe you nothing more! Get out of here!~ */
  IF ~~ THEN DO ~SetGlobal("EarQ1","GLOBAL",10)~ EXIT
END

IF ~Global("EarQ1","GLOBAL",10)~ THEN BEGIN 39 // from:
  SAY #51099 /* ~We have no more to discuss. Your efforts here were appreciated but we must move on to other concerns.~ [GOLDAN08] */
  IF ~~ THEN EXIT
END

IF ~Global("PlayerLooksLikeDrow","GLOBAL",1)~ THEN BEGIN 40 // from:
  SAY #51100 /* ~Iblith! Uh, forgive my outburst, Malla Drow, but I am not used to seeing your people... grace our granitehomes with your presence.~ [GOLDAN09] */
  IF ~~ THEN REPLY #51101 /* ~Go about your business, Goldander. I will not disturb you.~ */ GOTO 41
  IF ~~ THEN REPLY #51102 /* ~It is not surprising. Your people are quite literally beneath our notice.~ */ GOTO 42
  IF ~~ THEN REPLY #51103 /* ~And they never shall again! Defend yourself!~ */ GOTO 43
END

IF ~~ THEN BEGIN 41 // from: 40.0
  SAY #51104 /* ~As you wish it to be. My guards will not harass you... so long as you return the favor.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 42 // from: 40.1
  SAY #51105 /* ~Your views are well-known; Let us not risk unpleasantry by repeating them here. You are, of course, free to come and go as you will.~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 43 // from: 40.2
  SAY #51106 /* ~Madness! We are peaceful here! Guards! Od godden Steth!~ */
  IF ~~ THEN DO ~SetGlobal("SvirHostile","GLOBAL",1)
Enemy()~ EXIT
END
