;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 21
Scriptname QF___LALLJourneyHome_07173151 Extends Quest Hidden

;BEGIN ALIAS PROPERTY NicoletteCorpse
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_NicoletteCorpse Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY HarkonDreamVersion
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_HarkonDreamVersion Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Imperifake1
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Imperifake1 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Ambarys
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Ambarys Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY HomeBurnedNote
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_HomeBurnedNote Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Hillevi
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Hillevi Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY GeneralFakius
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_GeneralFakius Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY BigBadWolf
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_BigBadWolf Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY BjornCorpse
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_BjornCorpse Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Feria
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Feria Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY PlayerHomeBurned
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_PlayerHomeBurned Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Imperifake4
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Imperifake4 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY PlayerHomeDoor
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_PlayerHomeDoor Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Niranye
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Niranye Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY InnTrigger
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_InnTrigger Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY FrontOfHomeTrigger
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_FrontOfHomeTrigger Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Elda
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Elda Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Fakecloak1
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Fakecloak1 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Fakecloak2
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Fakecloak2 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY LALBurnedCorpseActivator
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_LALBurnedCorpseActivator Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY UlfricFakecloak
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_UlfricFakecloak Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Checkpoint1Triggerbox
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Checkpoint1Triggerbox Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY DarkwaterTriggerbox
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_DarkwaterTriggerbox Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Imperifake3
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Imperifake3 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Imperifake5
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Imperifake5 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Imperifake2
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Imperifake2 Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY PlayerHomeOld
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_PlayerHomeOld Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY PlayerHomeOldStairs
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_PlayerHomeOldStairs Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY NearBedRef
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_NearBedRef Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY Oengul
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_Oengul Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY DreamSequenceDragon
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_DreamSequenceDragon Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_17
Function Fragment_17()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Player just walked into triggerbox of burned home
kmyQuest.FoundBurnedHome()
SetObjectiveCompleted(45)
SetObjectiveCompleted(55)
SetObjectiveDisplayed(60)
;if ArthChargenQuest.GetStage() < 35
;ArthChargenQuest.SetStage(35)
;endif
;ArthChargenQuest.CompleteAllObjectives()
;ArthChargenQuest.CompleteQuest()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_10
Function Fragment_10()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Just arrived at checkpoint 1
Alias_Feria.TryToDisable()
kmyQuest.ComeBackScene()
SetObjectiveCompleted(30)
SetObjectiveDisplayed(40)
Alias_UlfricFakeCloak.TryToEnable()
Alias_GeneralFakius.TryToEnable()
Alias_Fakecloak1.TryToEnable()
Alias_Fakecloak2.TryToEnable()
Alias_Imperifake1.TryToEnable()
Alias_Imperifake2.TryToEnable()
Alias_Imperifake3.TryToEnable()
Alias_Imperifake4.TryToEnable()
Alias_Imperifake5.TryToEnable()
kmyQuest.UnregisterForUpdate()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_4
Function Fragment_4()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Player must talk to NPCs for supplies
SetObjectiveCompleted(0)
kmyQuest.Stage10Thoughts()
SetObjectiveDisplayed(7)
SetObjectiveDisplayed(8)
SetObjectiveDisplayed(9)
Alias_BigBadWolf.TryToEnable()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_6
Function Fragment_6()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Dragon fight dream sequence
kmyQuest.DreamSequenceEnter()
Alias_DreamSequenceDragon.TryToEnable()
SetObjectiveDisplayed(22)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_9
Function Fragment_9()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Arrived at checkpoint 1, Feria scene ensues
kmyQuest.CheckFeriaDistance()
kmyQuest.FeriaUnfollow()
FeriaItsTooColdScene.Start()
;End of scene will set stage up
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
kmyQuest.HomeMapMarker(false)
SetObjectiveDisplayed(0)
FoalDisabled.SetValue(1)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_16
Function Fragment_16()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Clean up darkwater xing
Alias_UlfricFakeCloak.TryToDisable()
Alias_GeneralFakius.TryToDisable()
Alias_Fakecloak1.TryToDisable()
Alias_Fakecloak2.TryToDisable()
Alias_Imperifake1.TryToDisable()
Alias_Imperifake2.TryToDisable()
Alias_Imperifake3.TryToDisable()
Alias_Imperifake4.TryToDisable()
Alias_Imperifake5.TryToDisable()
;Player will do helgen and intro quest until they go home in stage 60
SetObjectiveDisplayed(45)
kmyQuest.Stage60Thoughts()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_5
Function Fragment_5()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Go to the inn to rest
SetObjectiveDisplayed(20)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_12
Function Fragment_12()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Set the main stage quest and start it up
SetObjectiveCompleted(40)
SetObjectiveDisplayed(45)
Game.EnablePlayerControls(true,true,true,true,true,true,true,true)
ThisQuest.SetStage(55)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_8
Function Fragment_8()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Talked to Feria and she is following. Begin journey home
SetObjectiveCompleted(25)
SetObjectiveDisplayed(30)
kmyQuest.FeriaFollowAgain()
kmyQuest.RegisterForUpdate(18.0)
;beees
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_18
Function Fragment_18()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
SetObjectiveCompleted(60)
kmyQuest.FoundBurnedHome2()
FoalDisabled.SetValue(0)
kmyQuest.HomeMapMarker(true)
ThisQuest.SetStage(200)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_19
Function Fragment_19()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Player is skipping Helgen
PlayerRef.MoveTo(HelgenMarker)
ThisQuest.SetStage(55)
SetObjectiveDisplayed(55)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_11
Function Fragment_11()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Arrived in darkwater crossing triggerbox to witness stormcloak arrest
UlfricArrestScene.Start()
Game.DisablePlayerControls(true,true,false,false,true,true,true,true)
;Should probably do all of this now to give the game time to catch up
Alias_PlayerHomeOld.TryToDisable()
Alias_PlayerHomeDoor.TryToDisable()
Alias_PlayerHomeBurned.TryToEnable()
Alias_BjornCorpse.TryToEnable()
Alias_NicoletteCorpse.TryToEnable()
Alias_HomeBurnedNote.TryToEnable()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_20
Function Fragment_20()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Post quest cleanup
kmyQuest.PostQuestCleanup()
CompleteAllObjectives()
Stop()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_7
Function Fragment_7()
;BEGIN AUTOCAST TYPE __LALLJourneyHomeScript
Quest __temp = self as Quest
__LALLJourneyHomeScript kmyQuest = __temp as __LALLJourneyHomeScript
;END AUTOCAST
;BEGIN CODE
;Dragon fight ended. Talk to Feria
kmyQuest.DreamSequenceExit()
SetObjectiveCompleted(21)
SetObjectiveCompleted(22)
SetObjectiveDisplayed(25)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

Scene Property FeriaItsTooColdScene  Auto  

Scene Property UlfricArrestScene  Auto  

Quest Property VanillaStartQuest  Auto  

Quest Property ThisQuest  Auto  

GlobalVariable Property MQQuickstart  Auto  

Actor Property PlayerRef  Auto  

GlobalVariable Property FoalDisabled  Auto  

ObjectReference Property HelgenMarker  Auto  
