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

BEGIN ~UDDOOR02~

IF ~Global("PlayerLooksLikeDrow","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #52320 /* ~Sarn! Nind ph' naut Ilythiiri!~ */
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 110
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN GOTO 2
END

IF ~~ THEN BEGIN 1 // from: VICONIJ:110.0
  SAY #52323 /* ~Nindol orn tlu jivvin. Ssussun pholor dos, shebali!~ */
  IF ~~ THEN DO ~Enemy()~ EXTERN ~VICONIJ~ 111
END

IF ~~ THEN BEGIN 2 // from: 0.1
  SAY #52325 /* ~Nindol orn tlu jivvin. Olot dos, colnbluth!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~Global("PlayerLooksLikeDrow","GLOBAL",1)
Global("udSpeakOnce","LOCALS",0)~ THEN BEGIN 3 // from:
  SAY #52326 /* ~Hold, this area is closed to all but the raiding parties. You will return to the city proper or you will be killed.~ */
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN DO ~SetGlobal("udSpeakOnce","LOCALS",1)~ EXTERN ~VICONIJ~ 112
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN DO ~SetGlobal("udSpeakOnce","LOCALS",1)~ GOTO 5
END

IF ~~ THEN BEGIN 4 // from: VICONIJ:112.1 VICONIJ:112.0
  SAY #52334 /* ~No one is to pass unless we say so. Your words may get you a sweet seat in the dueling tavern, woman, but they hold little sway here.~ */
  IF ~~ THEN GOTO 5
END

IF ~~ THEN BEGIN 5 // from: VICONIJ:112.2 4.0 3.1
  SAY #52340 /* ~There is nothing to be said. No one passes without just cause. Return to the city.~ */
  IF ~~ THEN REPLY #52342 /* ~Come now, we should help each other. Perhaps I could pad your wage a bit?~ */ GOTO 6
  IF ~~ THEN REPLY #52343 /* ~Then we will have to fight! You will yield the passage to me!~ */ GOTO 9
  IF ~IsValidForPartyDialog("Viconia")~ THEN REPLY #52344 /* ~Viconia, what should we do?~ */ EXTERN ~VICONIJ~ 113
  IF ~~ THEN REPLY #52352 /* ~It is urgent that we pass! An elven attack is planned against our forces!~ */ GOTO 7
END

IF ~~ THEN BEGIN 6 // from: VICONIJ:113.1 5.0
  SAY #52353 /* ~You wish to bribe me? You would dare dishonor my position with the taint of gold?~ */
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 114
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN REPLY #52368 /* ~It is a donation to your house, one that will build future alliances beyond these petty dealings.~ */ GOTO 13
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN REPLY #52369 /* ~What, you are above taking a little gold?~ */ GOTO 8
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN REPLY #52388 /* ~You are right, of course. I shouldn't have said such a thing.~ */ GOTO 12
  IF ~!IsValidForPartyDialogue("VICONIA")~ THEN REPLY #52390 /* ~But we are in dire times! We must get through! There... is going to be an attack!~ */ GOTO 11
END

IF ~~ THEN BEGIN 7 // from: VICONIJ:113.2 5.3
  SAY #52359 /* ~What? That cannot be true! We would have been apprised of the situation by our commanders!~ */
  IF ~IsValidForPartyDialogue("VICONIA")~ THEN EXTERN ~VICONIJ~ 115
  IF ~!IsValidForPartyDialogue("VICONIA")
ReactionGT(LastTalkedToBy(Myself),18)~ THEN GOTO 10
  IF ~!IsValidForPartyDialogue("VICONIA")
ReactionLT(LastTalkedToBy(Myself),19)~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 10.1 7.2 6.2
  SAY #52363 /* ~Your words ring of lies. You have not the guile to maintain your falsehood! You will fall here!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN 9 // from: VICONIJ:113.0 16.0 12.0 5.1
  SAY #52365 /* ~Light take you, devil! You will not survive here today!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN 10 // from: VICONIJ:115.0 7.1
  SAY #52379 /* ~Hmm... You maintain this as fact? Speak your word again and I shall see if I believe. May you die by the webs of Lolth if you speak untrue.~ */
  IF ~CheckStatGT(LastTalkedToBy(),16,CHR)~ THEN REPLY #52383 /* ~There's no cause to doubt me. Take the side of caution and let us join the slaughter.~ */ GOTO 15
  IF ~CheckStatLT(LastTalkedToBy(),17,CHR)~ THEN REPLY #52384 /* ~You delay when there's no cause to doubt. Let us go join the slaughter.~ */ GOTO 8
  IF ~CheckStatGT(LastTalkedToBy(),16,INT)~ THEN REPLY #52385 /* ~Perhaps I should return and report your delay. The Matrons will appreciate your observance of duty while the bodies of our people fall to elves above!~ */ GOTO 14
  IF ~~ THEN REPLY #52394 /* ~Perhaps I should also offer some coin as an incentive?~ */ GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 13.4 10.3 6.4
  SAY #52391 /* ~You change your story as you see fit! There is no truth to any of this! You will be struck down as the liars you are!~ */
  IF ~~ THEN DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN 12 // from: 6.3
  SAY #52392 /* ~But you did, and now you pretend like it did not happen? There is something very wrong here. I shall err on the side of caution!~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 13 // from: VICONIJ:114.0 6.1
  SAY #52393 /* ~That sounds better, I think. Fine, I shall take what you offer and place it towards the future of my house. That is, if it is sufficient to honor it properly.~ */
  IF ~PartyGoldGT(499)~ THEN REPLY #52399 /* ~The house of a door guard? 500 gold will be enough, I think.~ */ GOTO 16
  IF ~PartyGoldGT(999)
CheckStatGT(LastTalkedToBy(),16,CHR)~ THEN REPLY #52400 /* ~I offer what I can and I hope it does please. 1,000 gold.~ */ DO ~TakePartyGold(1000)~ GOTO 17
  IF ~PartyGoldGT(999)
CheckStatLT(LastTalkedToBy(),17,CHR)~ THEN REPLY #52401 /* ~You will have what I can afford. 1,000 gold.~ */ GOTO 16
  IF ~PartyGoldGT(4999)~ THEN REPLY #52404 /* ~5,000 gold for your blessings on my journey.~ */ DO ~TakePartyGold(5000)~ GOTO 17
  IF ~~ THEN REPLY #52405 /* ~I cannot afford enough to honor your house but I must go bolster our troops.~ */ GOTO 11
  IF ~CheckStatGT(LastTalkedToBy(),16,INT)~ THEN REPLY #52406 /* ~So the honor of your house has a value in gold? Perhaps I should tell the Matron Mothers about the price of your respect.~ */ GOTO 14
END

IF ~~ THEN BEGIN 14 // from: 13.5 10.2
  SAY #52396 /* ~You have made your point. Pass then, but do not return this way or I will correct my generosity.~ */
  IF ~~ THEN DO ~Unlock("Gate")
OpenDoor("Gate")~ EXIT
END

IF ~~ THEN BEGIN 15 // from: 10.0
  SAY #52397 /* ~Very well, though I will not greet your return so generously. Do not come back this way.~ */
  IF ~~ THEN DO ~Unlock("Gate")
OpenDoor("Gate")~ EXIT
END

IF ~~ THEN BEGIN 16 // from: 13.2 13.0
  SAY #52403 /* ~You disgrace your dishonorable offer by making it laughable. No, I think you will die here.~ */
  IF ~~ THEN GOTO 9
END

IF ~~ THEN BEGIN 17 // from: 13.3 13.1
  SAY #52407 /* ~That will be sufficient. Go, but do not return this way or I shall correct my generosity.~ */
  IF ~~ THEN DO ~Unlock("Gate")
OpenDoor("Gate")~ EXIT
END

IF ~True()~ THEN BEGIN 18 // from:
  SAY #62077 /* ~Go.  Leave before I change my mind.~ */
  IF ~~ THEN EXIT
END
