// creator  : weidu.exe (version 23100)
// argument : _VAIL.DLG
// game		 : .
// source	 : ./override/_VAIL.DLG
// dialog	 : ./DIALOG.TLK
// dialogF  : (none)

BEGIN ~_VAIL~

IF ~True()
~ THEN BEGIN 0 // from:
  SAY #81849 /* ~I awake from dark slumber and see before me... a deva? Certainly you must be such a creature to have rescued me. My name is Vail. Please honor me with your name as well.~ */
  IF ~Global("Baldurian","GLOBAL",1)
~ THEN REPLY #81850 /* ~I am <CHARNAME>, and I have come seeking the Helm of Balduran.~ */ DO ~AddexperienceParty(500)
~ GOTO 1
  IF ~Global("Baldurian","GLOBAL",1)
~ THEN REPLY #81851 /* ~Who I am is unimportant. Who you are is equally unimportant. I seek the Helm of Balduran and nothing else matters.~ */ DO ~AddexperienceParty(500)
~ GOTO 2
  IF ~~ THEN REPLY #81852 /* ~I am <CHARNAME>, now give me the reward that is due to me for releasing you.~ */ DO ~AddexperienceParty(500)
~ GOTO 9
  IF ~~ THEN REPLY #81853 /* ~We have come to relieve you of all your treasure.  By force, if necessary.~ */ DO ~AddexperienceParty(500)
~ GOTO 8
END

IF ~~ THEN BEGIN 1 // from: 0.0
  SAY #81854 /* ~The Helm of Balduran? I am acquainted with that trinket. Might I ask why you are looking for it? Or, more importantly, who told you to come to me?~ */
  IF ~~ THEN REPLY #81855 /* ~You may not! Your answer confirms what I thought! You must have the Helm!~ */ GOTO 2
  IF ~~ THEN REPLY #81856 /* ~I was hired by Degrodel to retrieve it. He said you hapless chaps would have it, and would perhaps trade it for your freedom.~ */ GOTO 3
END

IF ~~ THEN BEGIN 2 // from: 1.0 0.1
  SAY #81857 /* ~You are that set in your path? So be it. I do own that item. It is mine won fair and square through hard work and honest labor. If you intend to take it, I will first ask you to reconsider. We are both adventuring sorts, whether hired or driven by spirit. You can see why I should not like to let my prize go, can't you?~ */
  IF ~~ THEN REPLY #81858 /* ~I care not! You will hand it over or face my wrath!~ */ GOTO 8
  IF ~~ THEN REPLY #81859 /* ~I see your point, though I must insist. I have been hired to retrieve it and I cannot return empty-handed.~ */ GOTO 4
  IF ~~ THEN REPLY #81860 /* ~You have moved me. If it means so much, I shall not take it from you.~ */ GOTO 7
END

IF ~~ THEN BEGIN 3 // from: 1.1
  SAY #81861 /* ~That is what he said? Well, he was wrong. As much as I am grateful for your help, the item you seek is very important to me. I earned it through hard work, and take good care of it. Am I to relinquish such a historical curiosity that means so much to me? I ask you to reconsider. We are both adventuring sorts, whether hired or driven by spirit. Leave me my prize; you know I well deserve it.~ */
  IF ~~ THEN REPLY #81862 /* ~I do not care! Deliver it or you shall suffer!~ */ GOTO 8
  IF ~~ THEN REPLY #81863 /* ~I hear you, but I am steadfast. I have a job to complete and must return with the Helm.~ */ GOTO 4
  IF ~~ THEN REPLY #81864 /* ~Your words ring true. I will not take this item from you.~ */ GOTO 7
  IF ~Global("X#VAIL3","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VAIL3","GLOBAL",1)~ EXTERN ~_KIVANJ~ 427
  IF ~Global("X#VAIL3","GLOBAL",0)
InParty("garrick")
InMyArea("garrick")
!StateCheck("garrick",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#VAIL3","GLOBAL",1)~ EXTERN ~_GARRIJ~ 264
END

IF ~~ THEN BEGIN 4 // from: 3.1 2.1
  SAY #81865 /* ~If you wish to force the matter I shall yield. Do not think me such an easy foe however, as you must still retrieve the Helm yourself. You did not think I had it with me, did you? Had I been wearing it I might not have suffered the fate from which you rescued me. Search, as you will, where this note dictates. Perhaps you will find it, perhaps not. I will help you no further. Does this satiate you, or must we fight as well?~ */
  IF ~~ THEN REPLY #81866 /* ~You will die for your trickery!~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 5
  IF ~~ THEN REPLY #81869 /* ~I will leave you with your life. I have what I want.~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 6
  IF ~~ THEN REPLY #81870 /* ~I want nothing with your lies!  Hand over the helm or I'll take it by force.~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 8
  IF ~Global("X#KivanVail2","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#KivanVail2","GLOBAL",1)~ EXTERN ~_KIVANJ~ 207
END

IF ~~ THEN BEGIN 5 // from: 12.0 4.0
  SAY #81871 /* ~If I must, but I will not go quietly!~ */
  IF ~~ THEN DO ~ActionOverride("rance",Enemy())
ActionOverride("cailan",Enemy())
ActionOverride("faizah",Enemy())
ActionOverride("achen",Enemy())
Enemy()
~ EXIT
  IF ~Global("X#KivanVail3","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#KivanVail3","GLOBAL",1)~ EXTERN ~_KIVANJ~ 206
END

IF ~~ THEN BEGIN 6 // from: 12.1 4.1
  SAY #81872 /* ~Then get out of my sight. I thank you for reviving me, but do not expect much more.~ */
  IF ~~ THEN DO ~ActionOverride("rance",EscapeArea())
ActionOverride("cailan",EscapeArea())
ActionOverride("faizah",EscapeArea())
ActionOverride("achen",EscapeArea())
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 7 // from: 3.2 2.2
  SAY #81873 /* ~I am... relieved. Do not think you will go away empty-handed for your compassion. I... I will give up another item nearly as dear to me. Perhaps the two should not be separated, but you have done well by me. The Cloak of Balduran is with a favored consort of mine in the Undercellar. Quenash is her name. Go there and she will give it to you. She will know I sent you. Now please leave me.~ */
  IF ~~ THEN DO ~SetGlobal("Baldurian","GLOBAL",2)
SetGlobal("MACHelmQuestDone","GLOBAL",2)
EraseJournalEntry(79485)
EraseJournalEntry(81867)
EraseJournalEntry(79699)
ActionOverride("rance",EscapeArea())
ActionOverride("cailan",EscapeArea())
ActionOverride("faizah",EscapeArea())
ActionOverride("achen",EscapeArea())
EscapeArea()
~ UNSOLVED_JOURNAL #81874 /* ~The Cloak of Balduran

The elf Vail has told me that he gave the cloak of Balduran to a consort of his in the Undercellars.  Quenash is her name.~ */ EXIT
  IF ~Global("X#KivanVail4","GLOBAL",0)
InParty("kivan")
InMyArea("kivan")
!StateCheck("kivan",CD_STATE_NOTVALID)
~ THEN DO ~SetGlobal("X#KivanVail4","GLOBAL",1)~ EXTERN ~_KIVANJ~ 204
END

IF ~~ THEN BEGIN 8 // from: 12.2 4.2 3.0 2.0 0.3
  SAY #81875 /* ~You are probably going to kill me anyway, so I will fight as best I can, as any of my fellows would!~ */
  IF ~~ THEN DO ~ActionOverride("rance",Enemy())
ActionOverride("cailan",Enemy())
ActionOverride("faizah",Enemy())
ActionOverride("achen",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 9 // from: 0.2
  SAY #81876 /* ~Sorry, but I have no reward for you, and I must be on my way immediately. There are many things that might have been happening while I was trapped in this stone form.~ */
  IF ~~ THEN DO ~ActionOverride("rance",EscapeArea())
ActionOverride("cailan",EscapeArea())
ActionOverride("faizah",EscapeArea())
ActionOverride("achen",EscapeArea())
EscapeArea()
~ EXIT
END

IF ~~ THEN BEGIN 10 // from:
  SAY #98903 /* ~Yes, well, thank you, and farewell.~ */
  IF ~~ THEN DO ~SetGlobal("Baldurian","GLOBAL",2)
SetGlobal("MACHelmQuestDone","GLOBAL",2)
EraseJournalEntry(79485)
EraseJournalEntry(81867)
EraseJournalEntry(79699)
ActionOverride("rance",EscapeArea())
ActionOverride("cailan",EscapeArea())
ActionOverride("faizah",EscapeArea())
ActionOverride("achen",EscapeArea())
EscapeArea()
~ UNSOLVED_JOURNAL #81874 /* ~The Cloak of Balduran

The elf Vail has told me that he gave the cloak of Balduran to a consort of his in the Undercellars.  Quenash is her name.~ */ EXIT
END

IF ~~ THEN BEGIN 11 // from:
  SAY #98905 /* ~Then we stand together!~ */
  IF ~~ THEN DO ~ActionOverride("rance",Enemy())
ActionOverride("cailan",Enemy())
ActionOverride("faizah",Enemy())
ActionOverride("achen",Enemy())
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 12 // from:
  SAY #98907 /* ~You have the scroll! If you are not content, I will fight.~ */
  IF ~~ THEN REPLY #81866 /* ~You will die for your trickery!~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 5
  IF ~~ THEN REPLY #81869 /* ~I will leave you with your life. I have what I want.~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 6
  IF ~~ THEN REPLY #81870 /* ~I want nothing with your lies!  Hand over the helm or I'll take it by force.~ */ DO ~GiveItem("_CRLVAIL",LastTalkedToBy)
SetGlobal("Baldurian","GLOBAL",2)
~ UNSOLVED_JOURNAL #81867 /* ~The Helm of Balduran

The elf Vail has given me a scroll which apparently discloses the location of the Helm of Balduran.  I tire of these paltry riddles.~ */ GOTO 8
END
