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

BEGIN ~LAVOK~
//////////////////////////////////////////////////
// WARNING: this file contains non-trivial WEIGHTs
//////////////////////////////////////////////////

IF WEIGHT #0 ~NumTimesTalkedTo(0)
Global("TalkedLavok","GLOBAL",0)~ THEN BEGIN 0 // from:
  SAY #18655 /* ~You!  You are the ones who have caused the sphere to travel once again!  You fools!!  I was close to escaping!!~ [LAVOK02] */
  IF ~IsValidForPartyDialog("Valygar")
~ THEN DO ~SetGlobal("TalkedLavok","GLOBAL",1)
SetGlobal("TriggerAstralPlane","GLOBAL",1)~ EXTERN ~VALYGARJ~ 4
  IF ~!IsValidForPartyDialog("Valygar")
~ THEN DO ~SetGlobal("TalkedLavok","GLOBAL",1)
SetGlobal("TriggerAstralPlane","GLOBAL",1)
~ GOTO 31
END

IF ~~ THEN BEGIN 1 // from:
  SAY #18657 /* ~You will die, mortals!  You and your kind have stood in my way for far too long!!~ [LAVOK07] */
  IF ~~ THEN EXTERN ~VALYGARJ~ 5
END

IF ~~ THEN BEGIN 2 // from:
  SAY #18659 /* ~You understand nothing, mortal!  I am not who you seek... this be merely the body!  And your intrusion has caused the sphere to leap back to my own dimension!!~ [LAVOK08] */
  IF ~~ THEN DO ~

~ GOTO 31
END

IF WEIGHT #1 ~Global("TalkedLavok","GLOBAL",1)
//IsValidForPartyDialog("Valygar")
See("Valygar")
!Dead("Valygar")
!StateCheck("Valygar",STATE_SLEEPING)
InParty("Valygar")~ THEN BEGIN 3 // from:
  SAY #18660 /* ~Wh-where am I?  The... force that possessed me is... is gone?~ [LAVOK10] */
  IF ~~ THEN DO ~AddExperienceParty(28750)
SetGlobal("TalkedLavok","GLOBAL",2)~ EXTERN ~VALYGARJ~ 6
END

IF ~~ THEN BEGIN 4 // from:
  SAY #18664 /* ~Who might you be?  I... I can barely see you...~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 7
END

IF ~~ THEN BEGIN 5 // from:
  SAY #18666 /* ~Corthala... yes, I remember this now.  My family.  Oh, I am dying, Valygar Corthala, of that you can be certain.  Nothing would bring me greater relief.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 8
END

IF ~~ THEN BEGIN 6 // from:
  SAY #18669 /* ~Nor do I intend to fool you, young one.  I have been imprisoned in my own mind by that strange force for half an eternity.  Death would be a blessing.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 9
END

IF ~~ THEN BEGIN 7 // from:
  SAY #18671 /* ~No, no.  I am he.  I am all those things that you have said and more.~ */
  IF ~~ THEN GOTO 8
END

IF ~~ THEN BEGIN 8 // from: 7.0
  SAY #18672 /* ~I have spent half an eternity keeping that force from prying the secrets of the sphere from my mind.  I could not unleash it upon... my home.  Thank you for ending its existence.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 10
END

IF ~~ THEN BEGIN 9 // from:
  SAY #18674 /* ~Indeed it is.  I have had years of pain and anguish to consider my sins.  I can offer to you nothing other than my sorrow, Valygar, if I have brought you pain.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 11
END

IF ~~ THEN BEGIN 10 // from:
  SAY #18678 /* ~If I could call it all back...  Ah... if I could go back and convince the man I once was that the sphere was a mission of pride doomed to failure.~ */
  IF ~~ THEN GOTO 11
END

IF ~~ THEN BEGIN 11 // from: 10.0
  SAY #18679 /* ~But I cannot.  Death shall release me soon enough from my overlong life.~ */
  IF ~~ THEN GOTO 12
END

IF ~~ THEN BEGIN 12 // from: 11.0
  SAY #18681 /* ~I would ask one thing of you, Valygar Corthala, although I know you have no reason to grant it to me.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 12
END

IF ~~ THEN BEGIN 13 // from:
  SAY #18683 /* ~I would wish to see the sky of my homeworld one final time.  To be at peace, knowing that I have died in the place I was born so long ago.~ */
  IF ~~ THEN GOTO 32
END

IF ~~ THEN BEGIN 14 // from:
  SAY #18685 /* ~It is no trick, my descendant.  I have no strength left for tricks, nor any desire.  I humbly beg it of you.~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 14
END

IF WEIGHT #2 ~Global("TalkedLavok","GLOBAL",1)
!IsValidForPartyDialog("Valygar")
~ THEN BEGIN 15 // from:
  SAY #18702 /* ~Wh-where am I?  The... the force that possessed me is... is gone?~ [LAVOK10] */
  IF ~~ THEN REPLY #18703 /* ~What force?  I see nothing but an evil necromancer bleeding to death before me.~ */ DO ~AddExperienceParty(28750)
SetGlobal("TalkedLavok","GLOBAL",2)
~ GOTO 16
  IF ~~ THEN REPLY #18704 /* ~You are in your planar sphere, dying.  Where did you think you would be?~ */ DO ~SetGlobal("TalkedLavok","GLOBAL",2)~ GOTO 16
  IF ~~ THEN REPLY #18705 /* ~What's this?  Have you lost your senses, old man?~ */ DO ~SetGlobal("TalkedLavok","GLOBAL",2)~ GOTO 17
END

IF ~~ THEN BEGIN 16 // from: 15.1 15.0
  SAY #18706 /* ~The force is...  gone.  I thank you for releasing me from the burden of containing this creature.  I have been a prisoner in my own mind longer than I can remember.~ */
  IF ~~ THEN REPLY #18707 /* ~Containing the force?  Why would you do that?~ */ GOTO 19
  IF ~~ THEN REPLY #18708 /* ~Just how long have you been a prisoner?~ */ GOTO 40
END

IF ~~ THEN BEGIN 17 // from: 15.2
  SAY #18709 /* ~I am dying, friend... but I see clear.  Thank you for releasing me from the long burden of fighting that force... even I would not release such a being upon my home.~ */
  IF ~~ THEN REPLY #18710 /* ~I am no friend of yours.  Are you not the evil wizard Lavok?~ */ GOTO 20
  IF ~~ THEN REPLY #18711 /* ~What do you mean 'fighting' the force?  I saw no manner of demon and I saw no fight.~ */ GOTO 40
  IF ~~ THEN REPLY #18712 /* ~Just how long have you been fighting this thing?~ */ GOTO 40
END

IF ~~ THEN BEGIN 18 // from: 40.0
  SAY #18713 /* ~It took all my power to keep him from prying the knowledge of the sphere from what remained of my soul... and it has been so long I can barely remember when it all began.~ */
  IF ~~ THEN REPLY #18715 /* ~You seem to be trying to sound almost noble... are you not the terrible necromancer Lavok?~ */ GOTO 20
  IF ~~ THEN REPLY #18716 /* ~Why would you bother trying to fight the force at all?~ */ GOTO 19
END

IF ~~ THEN BEGIN 19 // from: 18.1 16.0
  SAY #18714 /* ~I would not allow it to pry the secrets of the sphere from me!  If it escaped, it would have devastated the entire plane eventually.  Even I could not allow that.~ */
  IF ~Global("vgMentionLavok","GLOBAL",1)~ THEN REPLY #18736 /* ~You?  Are you not the evil necromancer Lavok?~ */ GOTO 20
  IF ~Global("vgMentionLavok","GLOBAL",0)~ THEN REPLY #61339 /* ~Spare me your words necromancer.  Your end is near.~ */ GOTO 25
END

IF ~~ THEN BEGIN 20 // from: 19.0 18.0 17.0
  SAY #18717 /* ~You know of me?  Has word of my foul existence lived to even this day?~ */
  IF ~Global("vgMentionLavokDrain","GLOBAL",1)~ THEN REPLY #18718 /* ~I know of you through your descendant Valygar.  He said you would try to take over his body to extend your life, and that you had done as much to others before.~ */ GOTO 21
  IF ~Global("vgMentionLavokDrain","GLOBAL",0)~ THEN REPLY #61340 /* ~I know who you are, but little beyond that.~ */ GOTO 22
END

IF ~~ THEN BEGIN 21 // from: 20.0
  SAY #18719 /* ~Corthala...?  Yes, I do remember, now.  My family.  Aye, I am everything he said and more.~ */
  IF ~~ THEN GOTO 22
END

IF ~~ THEN BEGIN 22 // from: 21.0 20.1
  SAY #18720 /* ~I was the scourge of the living before I left this plane... I terrorized my own blood and tampered with the laws of life and death.  Evil and arrogant was I, indeed.~ */
  IF ~~ THEN GOTO 41
END

IF ~~ THEN BEGIN 23 // from: 41.0
  SAY #18721 /* ~... Ah... if I could go back and convince the man I once was that the sphere was a mission of pride doomed to failure.~ */
  IF ~Global("vgMentionLavok","GLOBAL",1)~ THEN GOTO 42
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 24 // from: 42.0
  SAY #18722 /* ~If you meet Valygar again, tell him that I am sorry for all the grief and sorrow that I have brought to him, for what little good it might do.~ */
  IF ~~ THEN GOTO 25
END

IF ~~ THEN BEGIN 25 // from: 24.0 23.1 19.1
  SAY #18723 /* ~I... I can feel my last breaths coming upon me, but I have some time yet.  Time enough for one last bargain.  You... you, there, <PRO_RACE>... might I bargain with you?~ */
  IF ~~ THEN REPLY #18724 /* ~Tell me what you wish and I shall consider it.~ */ GOTO 43
  IF ~

~ THEN REPLY #18725 /* ~I would rather maintain my distance and wait for your death to come.  I trust no necromancer... especially not one that I have just fought and lost friends battling.~ */ GOTO 52
END

IF ~~ THEN BEGIN 26 // from: 46.0
  SAY #18726 /* ~This... is all I ask, no tricks or subterfuge.  I... beg it of you, stranger.~ */
  IF ~~ THEN REPLY #18730 /* ~As you wish, Lavok.  I shall do as you request.~ */ GOTO 47
  IF ~

~ THEN REPLY #18731 /* ~I do not trust you... who knows what you might attempt to pull?  I will find another way.~ */ GOTO 51
END

IF WEIGHT #5 /* Triggers after states #: 28 57 even though they appear after this state */
~Global("LavokOutside","GLOBAL",1)
~ THEN BEGIN 27 // from:
  SAY #18737 /* ~Ah, it is the sky, after all.  I had forgotten how it looked after so long.  I thank you... I... I wish...~ [LAVOK17] */
  IF ~~ THEN DO ~DestroyItem("MINHP1")
EraseJournalEntry(6509)
EraseJournalEntry(6534)
EraseJournalEntry(7994)
EraseJournalEntry(7995)
EraseJournalEntry(8126)
EraseJournalEntry(8127)
EraseJournalEntry(8128)
EraseJournalEntry(8129)
EraseJournalEntry(10128)
EraseJournalEntry(16302)
EraseJournalEntry(16343)
EraseJournalEntry(16524)
EraseJournalEntry(16544)
EraseJournalEntry(16569)
EraseJournalEntry(20179)
EraseJournalEntry(20365)
EraseJournalEntry(20453)
EraseJournalEntry(23371)
EraseJournalEntry(23409)
EraseJournalEntry(3422)
EraseJournalEntry(6557)
EraseJournalEntry(7241)
EraseJournalEntry(9705)
EraseJournalEntry(9919)
EraseJournalEntry(10047)
EraseJournalEntry(23551)
AddXPObject(Player1,45500)
AddXPObject(Player2,45500)
AddXPObject(Player3,45500)
AddXPObject(Player4,45500)
AddXPObject(Player5,45500)
AddXPObject(Player6,45500)
Kill(Myself)~ SOLVED_JOURNAL #6556 /* ~Lavok is dead, the sphere returned.

The planar sphere has returned to our home plane, and I have fulfilled my end of the bargain by bringing Lavok outside of the sphere to die under his home sky.  He passed peacefully and with little comment other than to thank me.~ */ EXIT
END

IF WEIGHT #3 ~Global("LavokOutside","GLOBAL",1)
Global("PlayerHasStronghold","GLOBAL",0)
Class(Player1,MAGE_ALL)~ THEN BEGIN 28 // from:
  SAY #18738 /* ~Ah, it is the sky, after all.  I had forgotten how it looked after so long.  I thank you... and I wish to repay you for your kindness...~ [LAVOK18] */
  IF ~~ THEN DO ~AddXPObject(Player1,45500)
AddXPObject(Player2,45500)
AddXPObject(Player3,45500)
AddXPObject(Player4,45500)
AddXPObject(Player5,45500)
AddXPObject(Player6,45500)
~ GOTO 29
END

IF ~~ THEN BEGIN 29 // from: 28.0
  SAY #18739 /* ~... I sense within you a power and ability similar to my own, yes?  You are a mage.  Yes, I am correct.~ */
  IF ~~ THEN GOTO 30
END

IF ~~ THEN BEGIN 30 // from: 29.0
  SAY #18740 /* ~Take the planar sphere, mage.  I grant it to you, in payment for my release.  Use it... use it far more wisely than I ever did...~ */
  IF ~~ THEN DO ~DestroyItem("MINHP1")
EraseJournalEntry(6509)
EraseJournalEntry(6534)
EraseJournalEntry(7994)
EraseJournalEntry(7995)
EraseJournalEntry(8126)
EraseJournalEntry(8127)
EraseJournalEntry(8128)
EraseJournalEntry(8129)
EraseJournalEntry(10128)
EraseJournalEntry(16302)
EraseJournalEntry(16343)
EraseJournalEntry(16524)
EraseJournalEntry(16544)
EraseJournalEntry(16569)
EraseJournalEntry(20179)
EraseJournalEntry(20365)
EraseJournalEntry(20453)
EraseJournalEntry(23371)
EraseJournalEntry(23409)
EraseJournalEntry(3422)
EraseJournalEntry(6557)
EraseJournalEntry(7241)
EraseJournalEntry(9705)
EraseJournalEntry(9919)
EraseJournalEntry(10047)
EraseJournalEntry(23551)
SetGlobal("PlayerHasStronghold","GLOBAL",1)
SetGlobal("PCSphere","GLOBAL",1)
Kill(Myself)~ SOLVED_JOURNAL #5822 /* ~Lavok is dead, the sphere returned.

Lavok has returned the sphere to our home plane and is now dead.  Before he died, however, he granted the sphere to me... perhaps because I am a magic-user myself, I do not know.  He asked me to use the construct wisely... more wisely than himself... and then died.  What secrets lay in the place and how it even operates, I am not sure... but it is a grander base than any other mage might have, that is certain.~ */ EXIT
END

IF ~~ THEN BEGIN 31 // from: 2.0 0.1
  SAY #37250 /* ~I have been denied the material plane!  I will have my revenge!!~ [LAVOK09] */
  IF ~~ THEN DO ~SetGlobal("TriggerAstralPlane","GLOBAL",1)
Enemy()
~ EXIT
END

IF ~~ THEN BEGIN 32 // from: 13.0
  SAY #37251 /* ~I am dying... and I wish to die there.  Under my own sun.~ */
  IF ~~ THEN GOTO 33
END

IF ~~ THEN BEGIN 33 // from: 32.0
  SAY #37252 /* ~In return... in return I shall tell you how to return the sphere to our own plane.  I... I am glad that you entered the sphere when you did.~ */
  IF ~~ THEN GOTO 34
END

IF ~~ THEN BEGIN 34 // from: 33.0
  SAY #37253 /* ~I was able to keep from the force... the fact that the sphere had a defense against intrusion.  It would automatically travel to another plane...~ */
  IF ~~ THEN GOTO 35
END

IF ~~ THEN BEGIN 35 // from: 34.0
  SAY #37254 /* ~A trap... that would allow me to deal with the intruders... at will.  But... that was another time.  Bring me home, Valygar Corthala, and I will tell you how...~ */
  IF ~~ THEN EXTERN ~VALYGARJ~ 13
END

IF ~~ THEN BEGIN 36 // from:
  SAY #37255 /* ~Very well.  The sphere... the sphere is powered by the heart of a powerful demon.  Our last trip, now, would have depleted the power source of the last heart the sphere had...~ */
  IF ~~ THEN GOTO 37
END

IF ~~ THEN BEGIN 37 // from: 36.0
  SAY #37256 /* ~You need to go out into the plane... and acquire the heart of another demon.  I... know not how, but you must...~ */
  IF ~~ THEN GOTO 38
END

IF ~~ THEN BEGIN 38 // from: 37.0
  SAY #37257 /* ~Bring the heart to the engine room of the sphere and place it inside the engine golem at the center there... and I will pre-set the controls while you are gone.~ */
  IF ~~ THEN GOTO 39
END

IF ~~ THEN BEGIN 39 // from: 38.0
  SAY #37258 /* ~But go quickly, Valygar... there are things that will stir in the planes and take notice of the sphere now that it is here!  Go!  And I... will try to hang on long enough...~ */
  IF ~~ THEN DO ~SetGlobal("ToldDemonsHeart","GLOBAL",1)~ UNSOLVED_JOURNAL #9705 /* ~Inside the planar sphere.

I have encountered and defeated Lavok, only to discover that an evil force had inhabited his body.  The dying Lavok is once again himself, openly regretful of his evil past, and is not at all what Valygar was expecting.  The necromancer wishes nothing more than to die under the skies of Faerun.

He said that when the sphere is entered it automatically travels between the planes as a self-defense measure.  To get back home, I have to go outside and find the heart of a demon, and then place it in the great golem that powers the sphere.  While I hunt, Lavok will set the machine so that it will return to Faerun.  There is no other way home.~ */ EXIT
END

IF ~~ THEN BEGIN 40 // from: 17.2 17.1 16.1
  SAY #37263 /* ~I met up with that evil presence long, long ago during my planar travels.  He has possessed me ever since, trying to find its way somewhere where it could do the most harm.~ */
  IF ~~ THEN GOTO 18
END

IF ~~ THEN BEGIN 41 // from: 22.0
  SAY #37264 /* ~I have had an age and more to consider my sins.  If I could call it all back... if I could call back my brother and my son... my granddaughter and grandsons... I...~ */
  IF ~~ THEN GOTO 23
END

IF ~~ THEN BEGIN 42 // from: 23.0
  SAY #37265 /* ~But I cannot, of course.  Death will be a blessed release after my overlong and cursed life.~ */
  IF ~~ THEN GOTO 24
END

IF ~~ THEN BEGIN 43 // from: 53.0 52.0 25.0
  SAY #37266 /* ~The... the sphere has been moved.  I can sense this.  It was... an automatic defense against intrusion that I kept hidden from the presence...~ */
  IF ~~ THEN GOTO 44
END

IF ~~ THEN BEGIN 44 // from: 43.0
  SAY #37268 /* ~He waited for one to open the door and enter.  I knew that would cause the sphere to automatically travel the planes as a defense and drain the last of the power.  My only hope...~ */
  IF ~~ THEN GOTO 45
END

IF ~~ THEN BEGIN 45 // from: 44.0
  SAY #37269 /* ~But now that the presence is gone, you need to return to your home plane.  I... I shall tell you how, in return for one thing... one small thing...~ */
  IF ~~ THEN GOTO 46
END

IF ~~ THEN BEGIN 46 // from: 53.1 52.1 45.0
  SAY #37270 /* ~I have been traveling for so long... I wish to see my home one last time.  When... we return to the Prime, take me outside, and let me die under the sky of the place I was born...~ */
  IF ~~ THEN GOTO 26
END

IF ~~ THEN BEGIN 47 // from: 26.0
  SAY #37271 /* ~Very good.  The... the sphere is powered by the heart of a powerful demon.  Or... or at least it was.  You must go outside of the sphere... and get another heart.~ */
  IF ~~ THEN GOTO 48
END

IF ~~ THEN BEGIN 48 // from: 47.0
  SAY #37272 /* ~I know this will be difficult, but you defeated the presence... so I hope that you will have strength enough for this last task.  Get a heart... and return...~ */
  IF ~~ THEN GOTO 49
END

IF ~~ THEN BEGIN 49 // from: 48.0
  SAY #37273 /* ~Go to the engine room and place it in the golem that serves as the power source.  I will... pre-set the controls... so that we shall return to the Prime...~ */
  IF ~~ THEN GOTO 50
END

IF ~~ THEN BEGIN 50 // from: 49.0
  SAY #37274 /* ~But go... go quickly.  I do not know how much longer I can maintain my existence...~ */
  IF ~~ THEN DO ~SetGlobal("ToldDemonsHeart","GLOBAL",1)~ UNSOLVED_JOURNAL #6557 /* ~Inside the planar sphere.

I have encountered and defeated Lavok, only to discover that an evil force had inhabited his body.  The dying Lavok is once again himself, openly regretful of his evil past. He wishes nothing more than to die under the skies of Faerun.

He said that when the sphere is entered it automatically travels between the planes as a self-defense measure.  To get back home, I have to go outside and find the heart of a demon, and then place it in the great golem that powers the sphere.  While I hunt, Lavok will set the machine so that it will return to Faerun.  There is no other way home.~ */ EXIT
END

IF ~~ THEN BEGIN 51 // from: 52.2 26.1
  SAY #37275 /* ~Then... then you will be stuck here on this plane.  As am I.  I... I hope you will think about this, <PRO_RACE>, and think quickly.  I have as little wish to die here as you do...~ */
  IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN 52 // from: 25.1
  SAY #37276 /* ~But you are... no longer... on your home plane.  Bargain with me, stranger... and I shall tell you how to return...~ */
  IF ~~ THEN REPLY #37277 /* ~Not on our plane?  What are you talking about?~ */ GOTO 43
  IF ~~ THEN REPLY #37278 /* ~Very well... let me hear what you wish.~ */ GOTO 46
  IF ~~ THEN REPLY #37279 /* ~Nevertheless, I shall find another way.~ */ GOTO 51
END

IF WEIGHT #6 /* Triggers after states #: 57 even though they appear after this state */
~Global("ToldDemonsHeart","GLOBAL",0)~ THEN BEGIN 53 // from:
  SAY #37280 /* ~So... have you decided differently?  Have you... seen that there is no other way home?~ [LAVOK11] */
  IF ~~ THEN REPLY #37281 /* ~How is it that we are in some other plane?  How did we get here?~ */ GOTO 43
  IF ~~ THEN REPLY #37282 /* ~What do you wish in return for telling us how to return, necromancer?~ */ GOTO 46
  IF ~~ THEN REPLY #37283 /* ~I have not given up hope, yet, Lavok.~ */ GOTO 54
END

IF ~~ THEN BEGIN 54 // from: 53.2
  SAY #37284 /* ~As... as you wish.  But I would not wait much... longer...~ */
  IF ~~ THEN EXIT
END

IF WEIGHT #7 /* Triggers after states #: 57 even though they appear after this state */
~Global("ToldDemonsHeart","GLOBAL",1)
!PartyHasItem("MISC6M")~ THEN BEGIN 55 // from:
  SAY #37285 /* ~You must find the heart of a demon, you must!!  It... it must be strong enough to power the sphere!  Go, <RACE>!~ [LAVOK12] */
  IF ~~ THEN EXIT
END

IF WEIGHT #8 /* Triggers after states #: 57 even though they appear after this state */
~Global("ToldDemonsHeart","GLOBAL",1)
PartyHasItem("MISC6M")~ THEN BEGIN 56 // from:
  SAY #37286 /* ~Yes... yes!  That heart will do!  Go to the engine room... and place it within the golem!  Go, quickly!~ [LAVOK13] */
  IF ~~ THEN EXIT
END

IF WEIGHT #4 ~Global("PowerObsidianSphere","GLOBAL",1)
Global("LavokOutside","GLOBAL",0)~ THEN BEGIN 57 // from:
  SAY #37287 /* ~We... we are returned to our own plane.  Please... please, stranger.  As per our bargain... let me see my sun one last time...~ [LAVOK14] */
  IF ~~ THEN REPLY #37288 /* ~Aye, I will do as you ask.~ */ GOTO 58
  IF ~~ THEN REPLY #37289 /* ~No, I do not trust you... you may yet pull some trick!~ */ GOTO 59
END

IF ~~ THEN BEGIN 58 // from: 57.0
  SAY #37290 /* ~I... am most grateful.  If... you could but carry me, my strength has all but fled... my last moments... are upon me...~ [LAVOK15] */
  IF ~~ THEN DO ~StartCutSceneMode()
DestroyItem(MINHP1)
FadeToColor([30.0],0)
Wait(1)
ActionOverride(Player1,Wait(1))
ActionOverride(Player2,Wait(1))
ActionOverride(Player3,Wait(1))
ActionOverride(Player4,Wait(1))
ActionOverride(Player5,Wait(1))
ActionOverride(Player6,Wait(1))
ActionOverride(Player1,LeaveAreaLUAPanic("AR0400","",[251.694],4))
ActionOverride(Player1,LeaveAreaLUA("AR0400","",[251.694],4))
ActionOverride(Player2,LeaveAreaLUA("AR0400","",[270.743],4))
ActionOverride(Player3,LeaveAreaLUA("AR0400","",[200.701],4))
ActionOverride(Player4,LeaveAreaLUA("AR0400","",[238.740],2))
ActionOverride(Player5,LeaveAreaLUA("AR0400","",[371.659],2))
ActionOverride(Player6,LeaveAreaLUA("AR0400","",[436.621],2))
SetGlobal("LavokOutside","GLOBAL",1)
MultiplayerSync()
EndCutSceneMode()
MoveBetweenAreas("AR0400",[319.680],0)~ EXIT
END

IF ~~ THEN BEGIN 59 // from: 57.1
  SAY #37291 /* ~Aye... it is nothing less than I expected.  I deserve nothing more, I suppose, after all my evil...~ [LAVOK16] */
  IF ~OR(2)
!Class(Player1,MAGE_ALL)
Global("PlayerHasStronghold","GLOBAL",1)
~ THEN SOLVED_JOURNAL #16007 /* ~Lavok is dead, the sphere returned.

The sphere has returned to Athkatla and our home plane, but not trusting the wizard Lavok I have let him die inside the sphere rather than allow him to be brought outside where he might harm others.  The necromancer died with little comment.~ */ GOTO 60
  IF ~Class(Player1,MAGE_ALL)
Global("PlayerHasStronghold","GLOBAL",0)
~ THEN SOLVED_JOURNAL #5822 /* ~Lavok is dead, the sphere returned.

Lavok has returned the sphere to our home plane and is now dead.  Before he died, however, he granted the sphere to me... perhaps because I am a magic-user myself, I do not know.  He asked me to use the construct wisely... more wisely than himself... and then died.  What secrets lay in the place and how it even operates, I am not sure... but it is a grander base than any other mage might have, that is certain.~ */ GOTO 61
END

IF ~~ THEN BEGIN 60 // from: 62.0 59.0
  SAY #37292 /* ~... I... I wish I had... had...  ah...~ */
  IF ~~ THEN DO ~DestroyItem("MINHP1")
EraseJournalEntry(6509)
EraseJournalEntry(6534)
EraseJournalEntry(7994)
EraseJournalEntry(7995)
EraseJournalEntry(8126)
EraseJournalEntry(8127)
EraseJournalEntry(8128)
EraseJournalEntry(8129)
EraseJournalEntry(10128)
EraseJournalEntry(16302)
EraseJournalEntry(16343)
EraseJournalEntry(16524)
EraseJournalEntry(16544)
EraseJournalEntry(16569)
EraseJournalEntry(20179)
EraseJournalEntry(20365)
EraseJournalEntry(20453)
EraseJournalEntry(23371)
EraseJournalEntry(23409)
EraseJournalEntry(3422)
EraseJournalEntry(6557)
EraseJournalEntry(7241)
EraseJournalEntry(9705)
EraseJournalEntry(9919)
EraseJournalEntry(10047)
EraseJournalEntry(23551)
Kill(Myself)~ EXIT
END

IF ~~ THEN BEGIN 61 // from: 59.1
  SAY #37293 /* ~... I... I sense within you... a kindred power.  You... you are a mage, yes?~ */
  IF ~~ THEN GOTO 62
END

IF ~~ THEN BEGIN 62 // from: 61.0
  SAY #37294 /* ~Yes... I see that you are.  I... I grant you the sphere, mage.  Do... do with it far... far better than I ever did.  It is yours... to use wisely...~ */
  IF ~~ THEN DO ~DestroyItem("MINHP1")
EraseJournalEntry(6509)
EraseJournalEntry(6534)
EraseJournalEntry(7994)
EraseJournalEntry(7995)
EraseJournalEntry(8126)
EraseJournalEntry(8127)
EraseJournalEntry(8128)
EraseJournalEntry(8129)
EraseJournalEntry(10128)
EraseJournalEntry(16302)
EraseJournalEntry(16343)
EraseJournalEntry(16524)
EraseJournalEntry(16544)
EraseJournalEntry(16569)
EraseJournalEntry(20179)
EraseJournalEntry(20365)
EraseJournalEntry(20453)
EraseJournalEntry(23371)
EraseJournalEntry(23409)
EraseJournalEntry(3422)
EraseJournalEntry(6557)
EraseJournalEntry(7241)
EraseJournalEntry(9705)
EraseJournalEntry(9919)
EraseJournalEntry(10047)
EraseJournalEntry(23551)
SetGlobal("PlayerHasStronghold","GLOBAL",1)
SetGlobal("PCSphere","GLOBAL",1)~ GOTO 60
END
