short BenirusGreet
short Doonce
short Doonce1
short Doonce2
short Doonce3
short SeeDoor
short Duration
float Timer
float Timer2
;Move Velwyn back to Anvil from IC at Stage 80
begin gamemode
if ( GetStage MS02 >=80 ) && ( MenuMode == 0 ) && ( Doonce == 0 ) && ( Player.GetInCell ICElvenGardensTheKingandQueenTavern == 0 )
VelwynBenirusRef.MoveTo MS02VelwynReturnMarker
VelwynBenirusRef.EvaluatePackage
Set Doonce to 1
endif
;Deals with Velwyn getting near the secret door
if ( Doonce3 == 0 )
if ( GetStage MS02 >= 87 ) && ( VelwynBenirusRef.GetDistance MS02BenirusManorOpenSecretDoor <= 400 )
set SeeDoor to 1
setstage ms02 88
VelwynBenirusRef.EvaluatePackage
Set Doonce3 to 1
endif
endif
;Stops the UseItem for SearchWall
if ( GetIsCurrentPackage MS02VelwynUsesDoor == 1 ) && ( Duration == 0 )
setpackduration 20
set Duration to 1
endif
end
;Forcegreet when Velwyn gets inside of Manor and set Velwyn to Follow
begin onPackageEnd MS02VelwynManorEscort
if BenirusGreet == 0
if ( GetStage MS02 <= 85 )
setstage MS02 87
VelwynBenirusRef.StartConversation player, Greeting
set BenirusGreet to 1
set MS02.BenirusFollow to 1
VelwynBenirusRef.EvaluatePackage
endif
endif
end
;Deals with the actual secret door open and Stage 90 set
begin OnPackageEnd MS02VelwynOpensDoor
set MS02.DoorCheck to 1
VelwynBenirusRef.EvaluatePackage
end
begin OnPackageEnd MS02VelwynUsesDoor
set MS02.Runaway to 1
VelwynBenirusRef.EvaluatePackage
setstage MS02 90
BenirusDoorRef.Activate VelwynBenirusRef
set Doonce2 to 1
end