enderalse/source/scripts/_00e_fs_nqr02_functions.psc

279 lines
7.9 KiB
Plaintext

Scriptname _00E_FS_NQR02_Functions extends Quest
Import _00E_QuestFunctions
;=====================================================================================
; EVENTS
;=====================================================================================
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function SetUpSC01()
SetObjectiveDisplayed(5)
FS_NQR02_TharaelREF.Enable()
FS_NQR02_TharaelREF.RemoveItem(_00E_FS_NQR_TharaelsBow, 1, true)
FS_NQR02_TharaelREF.RemoveItem(_00E_FS_NQR_TharaelsArrows, 55, true)
FS_NQR02_DummyToDisableREF.Disable()
FS_NQR02_IAmInTheWayDogREF.Disable()
FS_NQR02_TharaelREF.AddToFaction(PlayerAlliesFaction)
FS_NQR02_TharaelREF.MoveTo(FS_NQR02_SC01_TharaelMarker)
FS_NQR02_TharaelREF.SetAlpha(1.0)
FS_NQR02_TharaelREF.SetOutfit(_00E_FeinlederrstungCowl)
FS_NQR02_TharaelREF.EquipItemEx(_00E_FS_NQR05_Tharael_Dagger, 1, true)
EndFunction
Function SetUpSC02()
SetObjectiveCompleted(5)
SetObjectiveDisplayed(10)
FS_NQR02_QalianREF.Enable()
FS_NQR02_QalianREF.BlockActivation(True)
FS_NQR02_SC02_WhoreREF.Enable()
FS_NQR02_SC02_MeetingQalian.ForceStart()
EndFunction
Function BlockBedrollActivation()
FS_NQR02_QalianBedrollREF.BlockActivation(True)
EndFunction
Function UnblockActivationQalian()
FS_NQR02_QalianREF.BlockActivation(False)
EndFunction
Function SetUpSC03()
SetObjectiveCompleted(11)
SetObjectiveDisplayed(15)
FS_NQR02_SC02_WhoreREF.Disable()
FS_NQR02_SC03_DisableMarker.Disable()
FS_NQR02_SC03_QalianLeadsGroupToPit.ForceStart()
FS_NQR02_Banditparent.Enable()
EndFunction
Function SetUpSC04()
_00E_QuestFunctions.SetNPCAsCompanion(FS_NQR02_TharaelREF, True, 550, 400, 400)
FS_NQR02_SC04_TarPit.ForceStart()
EndFunction
Function MoveGroup()
FadeToBlackIMOD.Apply()
Utility.Wait(2)
FadeToBlackHoldIMOD.ApplyCrossFade(2)
PlayerREF.MoveTo(FS_NQR02_SC04_PlayerMarker)
FS_NQR02_TharaelREF.MoveTo(FS_NQR02_SC04_TharaelMarker)
FS_NQR02_QalianREF.MoveTo(FS_NQR02_SC04_QalianMarker)
FadeToBlackBackIMOD.ApplyCrossFade(1)
EndFunction
;Removed this function since it's pretty unnecessary - Till
;Function PortIfNotNear()
;
; If FS_NQR02_TharaelREF.GetDistance(PlayerREF) >= 750
; FS_NQR02_TharaelREF.MoveTo(PlayerREF)
; EndIf
;
; If FS_NQR02_QalianREF.GetDistance(PlayerREF) >= 750
; FS_NQR02_QalianREF.MoveTo(PlayerREF)
; EndIf
;
;EndFunction
Function SetUpSC05()
SetObjectiveCompleted(15)
SetObjectiveDisplayed(20)
FS_NQR02_SC05_CorpseDiscovery.ForceStart()
EndFunction
Function UpdateObjectivesSkeleton()
SetObjectiveCompleted(20)
SetObjectiveDisplayed(25)
EndFunction
Function TharaelResetAnimation()
; Debug.SendAnimationEvent(FS_NQR02_TharaelREF, "IdleForceDefaultState")
EndFunction
Function Dig()
FS_NQR02_TharaelREF.SetGhost(True)
FS_NQR02_QalianREF.SetGhost(True)
FadeToBlackIMOD.Apply()
Utility.Wait(2)
FadeToBlackHoldIMOD.ApplyCrossFade(2)
If FS_NQR02_SC05_OilPoolREF.IsEnabled()
FS_NQR02_SC05_OilPoolREF.Disable()
EndIf
FS_NQR02_SC05_DirtPilEREF.Enable()
FS_NQR02_SC05CollisionREF.Enable()
FS_NQR02_OpenLidREF.BlockActivation(True)
FS_NQR02_TharaelREF.MoveTo(FS_NQR02_SC05_QalianMarker)
PlayerREF.MoveTo(FS_NQR02_SC05_PlayerMarker)
FadeToBlackBackIMOD.ApplyCrossFade(1)
EndFunction
Function OpenLid()
SetObjectiveDisplayed(27)
FS_NQR02_OpenLidREF.BlockActivation(False)
; FS_NQR02_OpenLidREF.SetOpen(True)
EndFunction
Function UpdateObjectivesCorpse()
if FS_NQR02_OpenLidREF.GetOpenState() != 1
FS_NQR02_OpenLidREF.SetOpen(True)
EndIf
if FS_NQR02_OpenLidREF.GetOpenState() != 1 || FS_NQR02_OpenLidREF.GetOpenState() == 2
FS_NQR02_OpenLidREF.Disable()
EndIf
SetObjectiveCompleted(27)
SetObjectiveCompleted(25)
SetObjectiveDisplayed(30)
EndFunction
Function SetUpSC06()
_00E_QuestFunctions.SetNPCAsCompanion(FS_NQR02_TharaelREF, False)
FS_NQR02_TharaelREF.EquipItemEx(_00E_FS_NQR05_Tharael_Dagger, 1, true)
SetObjectiveCompleted(30)
SetObjectiveDisplayed(35)
FS_NQR02_SC06_QalianConfrontation.ForceStart()
EndFunction
Function TharaelKillQalian()
FS_NQR02_QalianREF.SetGhost(False)
FS_NQR02_QalianREF.GetActorBase().SetEssential(False)
FS_NQR02_TharaelREF.PlayIdleWithTarget(pa_1HMKillMoveDualWieldA, FS_NQR02_QalianREF)
;FS_NQR02_TharaelREF.PlayIdleWithTarget(pa_1HMKillMoveShortJ, FS_NQR02_QalianREF)
Utility.Wait(5)
; FS_NQR02_QalianREF.Kill(FS_NQR02_TharaelREF)
EndFunction
Function FinishUp()
SetObjectiveCompleted(35)
_00E_QuestFunctions.SetNPCAsCompanion(FS_NQR02_TharaelREF, False)
Levelsystem.RemoveSilence()
Levelsystem.RemoveCombatSoundtracks()
Levelsystem.SetAllowIdleChatter(True)
Levelsystem.GiveEP(__Config_iRewardEXP)
FS_NQR03.SetStage(5)
Self.CompleteQuest()
Levelsystem.TeleportNPC(FS_NQR02_TharaelREF, _00E_NPCDumpMarker)
FS_NQR02_TharaelREF.Disable()
FS_NQR02_DummyToDisableREF.Enable()
FS_NQR02_IAmInTheWayDogREF.Enable()
FS_NQR02_SC03_DisableMarker.Enable()
FS_TharaelDialogue.SetStage(5)
FS_EnvironmentScene04.SetStage(5)
If _00E_AchievementsEnabled.GetValueInt() == 1
If _00E_FS_NQR02_SparedQalian.GetValueInt() == 0
Steam.UnlockAchievement("END_QALIAN_01")
Else
Steam.UnlockAchievement("END_QALIAN_02")
EndIf
EndIf
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
int __Config_iRewardEXP = 500
_00E_QuestFunctions Property Levelsystem Auto
Actor Property FS_NQR02_TharaelREF Auto
Actor Property FS_NQR02_QalianREF Auto
Actor Property FS_NQR02_SC02_WhoreREF Auto
Actor Property FS_NQR02_DummyToDisableREF Auto
Actor Property FS_NQR02_IAmInTheWayDogREF Auto
Actor Property PlayerREF Auto
Actor Property FS_NQR02_Banditparent Auto
ObjectReference Property FS_NQR02_SC01_TharaelMarker Auto
ObjectReference Property FS_NQR02_SC04_TharaelMarker Auto
ObjectReference Property FS_NQR02_SC04_QalianMarker Auto
ObjectReference Property FS_NQR02_SC04_PlayerMarker Auto
ObjectReference Property FS_NQR02_SC05_OilPoolREF Auto
ObjectReference Property FS_NQR02_SC05_DirtPilEREF Auto
ObjectReference Property FS_NQR02_SC05CollisionREF Auto
ObjectReference Property FS_NQR02_SC05_PlayerMarker Auto
ObjectReference Property FS_NQR02_SC05_QalianMarker Auto
ObjectReference Property FS_NQR02_OpenLidREF Auto
ObjectReference Property _00E_NPCDumpMarker Auto
ObjectReference Property FS_NQR02_QalianBedrollREF Auto
ObjectReference Property FS_NQR02_SC03_DisableMarker Auto
Idle Property pa_1HMKillMoveShortJ Auto
Idle Property pa_1HMKillMoveShortD Auto
Idle Property pa_1HMKillMoveShortK Auto
Idle Property pa_1HMKillMoveShortA Auto
Idle Property pa_1HMKillMoveShortC Auto
Idle Property pa_1HMKillMoveDualWieldA Auto
Idle Property pa_1HMKillMoveShortB Auto
Idle Property KillMoveDualWield Auto
Idle Property KillMoveDualWield00 Auto
Idle Property KillMoveDualWieldDecap00 Auto
Scene Property FS_NQR02_SC01_TharaelBarracksSC Auto
Scene Property FS_NQR02_SC02_MeetingQalian Auto
Scene Property FS_NQR02_SC03_QalianLeadsGroupToPit Auto
Scene Property FS_NQR02_SC04_TarPit Auto
Scene Property FS_NQR02_SC05_CorpseDiscovery Auto
Scene Property FS_NQR02_SC06_QalianConfrontation Auto
Faction Property PlayerAlliesFaction Auto
Quest Property FS_NQR03 Auto
Quest Property FS_TharaelDialogue Auto
Quest Property FS_EnvironmentScene04 Auto
Weapon Property _00E_FS_NQR05_Tharael_Dagger Auto
Outfit Property _00E_FeinlederrstungCowl Auto
Outfit Property _00E_FS_NQR_Rhalata_Voice_OutfitMask Auto
ImageSpaceModifier Property FadeToBlackIMOD Auto
ImageSpaceModifier Property FadeToBlackHoldIMOD Auto
ImageSpaceModifier Property FadeToBlackBackIMOD Auto
Weapon Property _00E_FS_NQR_TharaelsBow Auto
Ammo Property _00E_FS_NQR_TharaelsArrows Auto
GlobalVariable Property _00E_FS_NQR02_SparedQalian Auto
GlobalVariable Property _00E_AchievementsEnabled Auto