4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

366 lines
10 KiB

Scriptname _00E_MQ10b_Questfunctions extends Quest
Import _00E_QuestFunctions
;=====================================================================================
; FUNCTIONS
;=====================================================================================
function SetUp()
MQ07b_Suntemple_Beacon_InConstruction.Disable()
Game.SetHudCartMode()
Game.DisablePlayerControls(1, 1, 1, 1, 1, 1, 1)
_00E_MC_JesparRef.MoveTo(MQ10b_SC01_JesparMarkerREF)
MQ10b_FisherwomanREF.Enable()
MQ10b_FisherwomanREF.MoveTo(MQ10b_FisherwomanMarkerREF)
PlayerREF.MoveTo(Mq10bPlayerMarkerRef)
Levelsystem.RemoveSilence()
_00E_Music_Special_Dreams.Remove()
MQ07b_NuminosREF.Enable()
LeuchtfeuerSwitcher.Enable()
_00E_SilenceLongTransitionHighPriority.Remove()
EndFunction
Function RemoveSilences()
Levelsystem.RemoveSilence()
EndFunction
Function StartScene()
MQ10b_SC1_Ship.ForceStart()
EndFunction
Function WakeUp()
FadeToBlackBack.ApplyCrossFade()
PlayerREF.PlayIdle(TG05_GetUp)
Game.ShowFirstPersonGeometry(false)
Utility.Wait(1)
FadeToBlackHoldImod.Remove()
Utility.Wait(6.75)
Game.SetHudCartMode(false)
Game.EnablePlayerControls()
Game.ShowFirstPersonGeometry(true)
Game.SetPlayerAIDriven(false)
EndFunction
Function StartCQJ03()
If CQJ02.IsCompleted()
CQJ03.SetStage(5)
EndIf
Game.RequestAutoSave()
EndFunction
Function PortToDunehome()
FadeToBlackImod.Apply()
Utility.Wait(2)
FadeToBlackHoldImod.ApplyCrossFade()
Self.SetStage(30)
PlayerREF.MoveTo(MQ10b_SC02_PlayerMarker)
_00E_SilenceLongTransitionHighPriority.Remove()
Levelsystem.RemoveSilence()
Fischerin.MoveTo(MQ10b_SC02_FisherWomanMarker)
_00E_MC_JesparRef.MoveTO(MQ10b_SC02_JesparMarker)
Done = True
Utility.Wait(1)
FadeToBlackBackLongImod.ApplyCrossFade()
Timescale.SetValue(10)
Game.RequestAutoSave()
_00E_TeleportGlobal.SetValue(0)
EndFunction
Function PortJespar()
Levelsystem.RemoveSilence()
_00E_SilenceAbruptHighPriority.remove()
Actor JesparActor = _00E_MC_JesparRef as actor
Levelsystem.TeleportNPC(JesparActor, MQ10bJesparPortMarker)
If !CQC02.IsCompleted() && CQC02.IsRunning()
CQC02.SetStage(35)
Elseif CQC02.IsCompleted()
CQC03.SetStage(5)
EndIf
_00E_QuestFunctions.EnableReferenceFormList(_00E_MQ09b_NehrimeseSoldiersFRM)
EndFunction
Function SetUpTempleScene()
_00E_MC_LishariREF.EquipItem(_03E_27Wegesschwert, true,true)
_00E_MC_LeoraREF.Disable()
_00E_MC_TealorREF.MoveTo(MQ10b_SC02_TealorStartMarkerREF)
_00E_MC_JorrekRef.MoveTo(MQ10b_SC02_JorekStartMarkerREF001)
_00E_MC_LishariREF.MoveTo(_00E_MQ08aPrologue_LishariMarker)
_00E_MC_LishariREF.Enable()
_00E_MC_NataraREF.MoveTo(_00E_MQ08Prologue_NataraChair)
_00E_MC_NataraREF.Enable()
_00E_MC_YuslanRef.MoveTo(_00E_MQ08aPrologue_YuslanChair)
_00E_MC_JorrekRef.Enable()
MQ10b_SC2_Temple.ForceStart()
EndFunction
Function ShipShakeCamera()
While !Done
Game.ShakeCamera(PlayerREF, Utility.RandomFloat(0.01, 0.04), 3)
Utility.Wait(3)
EndWhile
EndFunction
Function AddSilence()
_00E_SilenceLongTransitionHighPriority.Add()
EndFunction
Function FadeOutScene()
SetObjectiveCompleted(20)
_00E_MC_LeoraREF.Disable()
MQ07b_Suntemple_Beacon_InConstruction.Disable()
FadeToBlackImod.Apply()
Utility.Wait(1)
FadeToBlackHoldImod.Apply()
FadeToBlackImod.Remove()
Utility.Wait(1)
_00E_MC_JesparRef.MoveTo(MQ10bJesparPortMarker)
Game.DisablePlayerControls(1, 1, 1, 1, 1, 1, 1)
PlayerREF.MoveTo(MQ01b_S2_PlayerMarker)
PlayerREF.MoveTo(CaliaStool)
Utility.Wait(1) ; Give some time to the PC and Jespar to finish any "exit furniture" animations
If !((PlayerREF.GetSitState() == 3 ) || (PlayerREF.GetSitState() == 2 ))
CaliaStool.Activate(PlayerREF, True)
EndIf
SuntempleEmporium_ClearWeatherLinker.Disable()
SetStage(50)
Levelsystem.SkipTimeToHour(20)
EndFunction
Function SitJespar()
_00E_MC_JesparRef.Disable()
_00E_MC_JesparRef.MoveTo(JesparStool)
_00E_MC_JesparRef.Enable()
EndFunction
Function TealorPortToBeacon()
Levelsystem.RemoveSilence()
_00E_MC_TealorREF.MoveTo(MQ05Prologue_SC2_TealorTalkMarker)
EndFunction
Function FadeBack()
Game.EnablePlayerControls()
FadeToBlackBack.Apply()
FadeToBlackHoldImod.Remove()
EndFunction
Function KillLishari()
Levelsystem.SetAllowIdleChatter(True)
MQ10bLishariDead.Enable()
MQ10bLishariDead.SetOutfit(_00E_LisharisArmor_Outfit)
MQ10bLishariDead.AddItem(_50E_NP_LishariArmor, 1)
MQ10bLishariDead.AddItem(_50E_NP_LishariBoots, 1)
MQ10bLishariDead.EquipItem(_50E_NP_LishariArmor, True)
MQ10bLishariDead.EquipItem(_50E_NP_LishariArmor, True)
MQ10bLishari.Disable()
MQ10bTavernDoor.Lock(False)
_00E_MC_LishariREF.disable()
LeuchtfeuerSwitcher.Enable()
MQ07b_Suntemple_Beacon_InConstruction.Disable()
EndFunction
Function KillLishari2()
Game.EnablePlayerControls()
MQ10bBottle.Enable()
EndFunction
Function StopMusic()
_00E_SilenceLongTransitionHighPriority.Remove()
EndFunction
Function PortTealor()
_00E_MC_TealorRef.MoveTo(MQ10bTealorPortMarker)
_00E_MC_TealorRef.EvaluatePackage()
EndFunction
Function StartLexilScene()
MQ10b_SC4_Tealor.ForceStart()
Actor lexilRef = Alias_Lexil.GetActorReference()
lexilRef.Disable()
lexilRef.MoveTo(MQ10bTealorPortMarker)
lexilRef.Enable()
EndFunction
Function DayTimer()
RegisterForUpdateGameTime(24)
GameDay = GameDaysPassed.GetValue() as Int
ENdFunction
Event OnUpdateGameTime() ; because of how we registered, this event occurs every 30 minutes of game time
if GameDaysPassed.GetValue() + 1 >= GameDay
SetStage(125)
UnregisterForUpdateGameTime()
endif
endEvent
Function LockDoors()
_00E_MC_LishariREF.EvaluatePackage()
_00E_MC_YuslanRef.EvaluatePackage()
EndFunction
Function UnblockDoors()
_00E_TeleportGlobal.SetValueInt(0)
MQ10b_SC02_SecondExitDoorREF.SetOpen(True)
MQ10b_SC02_SecondExitDoorREF.Lock(False)
MQ10b_SC02_SecondExitDoorREF.BlockActivation(False)
EndFunction
Function FinishQuest()
If !CQJ03.IsCompleted()
CQJ03.SetStage(15)
EndIf
MQ12a.SetStage(5)
MQ10bLexilContainer.RemoveAllItems(PlayerREF, true, true)
MQ10bLishariDead.disable()
Levelsystem.GiveEP(1000)
Levelsystem.RemoveSilence()
FS_NQ03.SetStage(10)
EndFunction
Function PortLishari()
_00E_MC_LishariREF.MoveTo(MQ10b_SC02_LishariLeanMarker)
_00E_MC_LishariREF.EvaluatePackage()
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
bool done = false
int GameDay
Quest Property CQC02 Auto
Quest Property CQC03 Auto
Quest Property CQJ03 Auto
Quest Property CQJ02 Auto
Quest Property MQ12a Auto
Quest Property FS_NQ03 Auto
_00E_QuestFunctions Property Levelsystem Auto
Actor Property _00E_MC_LishariREF Auto
Actor Property _00E_MC_NataraREF Auto
Actor Property _00E_MC_TealorREF Auto
Actor Property _00E_MC_YuslanRef Auto
Actor Property _00E_MC_JorrekRef Auto
Actor Property _00E_MC_LeoraREF Auto
Actor Property MQ10bLishariDead Auto
Actor Property PlayerREF Auto
ReferenceAlias Property Alias_Lexil Auto
Armor Property _50E_NP_LishariArmor Auto
Armor Property _50E_NP_LishariBoots Auto
GlobalVariable Property GameDaysPassed Auto
GlobalVariable Property Timescale Auto
GlobalVariable Property _00E_TeleportGlobal Auto
ObjectReference Property MQ01b_S2_PlayerMarker Auto
ObjectReference Property MQ10bLishari Auto
ObjectReference Property _00E_MC_JesparRef Auto
ObjectReference Property Fischerin Auto
ObjectReference Property Mq10bPlayerMarkerRef Auto
ObjectReference Property MQ10bJesparPortMarker Auto
ObjectReference Property MQ10bTavernDoor Auto
ObjectReference Property MQ10bBottle Auto
ObjectReference Property MQ10bTealorPortMarker Auto
ObjectReference Property MQ07b_Suntemple_Beacon_InConstruction Auto
ObjectReference Property MQ10b_SC01_JesparMarkerREF Auto
ObjectReference Property MQ10b_SC02_FisherWomanMarker Auto
ObjectReference Property MQ10b_SC02_PlayerMarker Auto
ObjectReference Property MQ10b_SC02_JesparMarker Auto
ObjectReference Property MQ10b_SC02_TealorStartMarkerREF Auto
ObjectReference Property MQ10b_SC02_JorekStartMarkerREF001 Auto
ObjectReference Property _00E_MQ08aPrologue_LishariMarker Auto
ObjectReference Property _00E_MQ08Prologue_NataraChair Auto
ObjectReference Property _00E_MQ08aPrologue_YuslanChair Auto
ObjectReference Property LeuchtfeuerSwitcher Auto
ObjectReference Property MQ10bLexilContainer Auto
ObjectReference Property MQ10b_FisherwomanMarkerREF Auto
ObjectReference Property JesparStool Auto
ObjectReference Property MQ10b_SC02_SecondExitDoorREF Auto
ObjectReference Property MQ10b_FisherwomanREF Auto
ObjectReference Property CaliaStool Auto
ObjectReference Property SuntempleEmporium_ClearWeatherLinker Auto
ObjectReference Property MQ05Prologue_SC2_TealorTalkMarker Auto
ObjectReference Property MQ10b_SC02_LishariLeanMarker Auto
ObjectReference Property MQ07b_NuminosREF Auto
Weapon Property _03E_27Wegesschwert Auto
ImageSpaceModifier Property FadeToBlackImod Auto
ImageSpaceModifier Property FadeToBlackBackLongImod Auto
ImageSpaceModifier Property FadeToBlackBack Auto
ImageSpaceModifier Property FadeToBlackHoldImod Auto
Scene Property MQ10b_SC1_Ship Auto
Scene Property MQ10b_SC2_Temple Auto
Scene Property MQ10b_SC4_Tealor Auto
Idle Property TG05_GetUp Auto
Outfit Property _00E_LisharisArmor_Outfit Auto
Formlist Property _00E_MQ09b_NehrimeseSoldiersFRM Auto
MusicType Property _00E_Music_Special_Dreams Auto
MusicType Property _00E_SilenceAbruptHighPriority Auto
MusicType Property _00E_SilenceLongTransitionHighPriority Auto