enderalse/source/scripts/_00e_fs_nqr03_functions.psc

380 lines
9.3 KiB
Plaintext
Raw Normal View History

Scriptname _00E_FS_NQR03_Functions extends Quest
Import Utility
2024-02-29 22:28:19 +00:00
int function _GetScriptVersion() Global
return 1
endFunction
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnUpdateGameTime()
2024-01-10 14:08:24 +00:00
SetCurrentStageID(10)
EndEvent
Event OnUpdate()
Game.EnablePlayerControls()
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function SetUp()
SetObjectiveDisplayed(5)
RegisterForSingleUpdateGameTime(24)
EndFunction
Function UnlockDoorEnableTharael()
FS_NQR03_BardREF.Enable()
FS_NQR03_BardREF.BlockActivation()
FS_NQR03_SC99_BardSC.ForceStart()
FS_NQR03_TharaelREF.Enable()
FS_NQR03_TharaelREF.MoveTo(FS_NQR03_SC01_TharaelMarkerREF)
FS_NQR03_TharaelREF.SetOutfit(_00E_FS_TharaelOutfit)
FS_NQR03_TharaelREF.RemoveItem(_00E_FS_NQR05_Tharael_Dagger, 2)
FS_NQR03_LethoREF.Enable()
SetObjectiveDisplayed(5, False)
SetObjectiveDisplayed(10)
FS_NQR03_DoorREF.Lock(False)
FS_NQR03_SC01_TharaelShedDiscussion.ForceStart()
FS_NQR03_SC03_SecretDoorREF.BlockActivation(True)
EndFunction
Function TharaelFailsave()
if FS_NQR03_TharaelREF.IsDisabled()
FS_NQR03_TharaelREF.Enable()
FS_NQR03_TharaelREF.MoveTo(FS_NQR03_SC01_TharaelMarkerREF)
EndIf
if !FS_NQR03_SC01_TharaelShedDiscussion.IsPlaying()
FS_NQR03_SC01_TharaelShedDiscussion.ForceStart()
endif
EndFunction
Function DisableBard()
FS_NQR03_BardREF.Disable()
FS_NQR03_SC99_BardSC.Stop()
EndFunction
Function OpenDoor()
FS_NQR03_SC03_SecretDoorREF.SetOpen(True)
EndFunction
Function PlayerEquipRobes()
PlayerREF.AddItem(_00E_FS_RhalataRobes_NoviceWithHood, 1)
PlayerREF.EquipItem(_00E_FS_RhalataRobes_NoviceWithHood)
EndFunction
Function SetUpBrotherSorrow()
SetObjectiveCompleted(10)
SetObjectiveDisplayed(15)
if !FS_NQR03_SC01_TharaelShedDiscussion.IsPlaying()
FS_NQR03_SC01_TharaelShedDiscussion.ForceStart()
EndIf
FS_NQR03_RhalataTempleDoorREF.Lock(False)
FS_NQR03_TharaelREF.AddItem(_00E_FS_NQR05_Tharael_Dagger, 2)
EndFunction
Function TeleportBrotherGalang()
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(FS_NQR03_LethoREF, FS_NQR03_BrotherGriefMarkerREF)
2024-01-10 14:08:24 +00:00
SetCurrentStageID(20)
SetObjectiveCompleted(10)
SetObjectiveDisplayed(15)
EndFunction
Function StartSC02()
FS_NQR03_SC02_TempleScene_01.ForceStart()
EndFunction
Function RemovePages()
2024-01-10 14:08:24 +00:00
FS_NQR_SQ_01.SetCurrentStageID(5)
if PlayerREF.GetItemCount(_00E_FS_NQR02_MissingPages) >= 1
PlayerREF.RemoveItem(_00E_FS_NQR02_MissingPages, 1)
EndIf
2024-02-13 10:50:42 +00:00
if SKSE.GetVersion()
FS_NQR03_RhalataTemple.SetName(_00E_sRhalataTempleName.GetName())
endif
EndFunction
Function ModDistrust(int iAmount)
_00E_FS_NQR_RhalataMistrust.Mod(iAmount)
EndFunction
Function AddNote()
PlayerREF.AddItem(_00E_FS_NQR03_SeerMoneyNote, 1)
EndFunction
Function StartSC04()
SetObjectiveDisplayed(55)
FS_NQR03_SC04_TempleScene_02.ForceStart()
EndFunction
Function AddRewardMoney()
PlayerREF.RemoveItem(_00E_FS_NQR03_SeerMoneyNote, 1)
PlayerREF.AddItem(Gold001, 300)
SetObjectiveCompleted(55)
EndFunction
Function UpdateObjectives_01()
SetObjectiveCompleted(15)
SetObjectiveDisplayed(20)
EndFunction
Function TeleportPlayer()
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(FS_NQR03_BrotherGreedREF, FS_NQR03_BrotherGreedMarkerREF)
FS_NQR03_BrotherGreedREF.EvaluatePackage()
_00E_PlayerFunctions.GetTeleportControl().TeleportPlayer(FS_NQR03_DarkValleyMarkerREF)
2024-01-10 14:08:24 +00:00
SetCurrentStageID(75)
RegisterForSingleUpdate(2)
EndFunction
Function GivePlayerNote()
PlayerREF.AddItem(_00E_FS_NQR03_BrotherGreedNote, 1)
SetObjectiveCompleted(20)
SetObjectiveDisplayed(25)
Utility.Wait(2)
EndFunction
Function UpdateObjectives_02()
SetObjectiveCompleted(25)
SetObjectiveDisplayed(30)
EndFunction
Function UpdateObjectives_03()
SetObjectiveCompleted(30)
FS_NQR03_SisterPrideREF.SetGhost(False)
2024-01-10 14:08:24 +00:00
if GetCurrentStageID() == 90
SetObjectiveDisplayed(40)
2024-01-10 14:08:24 +00:00
Elseif GetCurrentStageID() == 95
SetObjectiveDisplayed(40)
SetObjectiveDisplayed(45)
if PlayerREF.GetItemCount(HumanHeart) < 1
SetObjectiveDisplayed(60)
endif
EndIf
EndFunction
Function ClearPlayerAlias()
FS_NQR03_BrotherGreedREF.SetOutfit(_00E_FS_TharaelOutfit)
SetObjectiveCompleted(60)
EndFunction
Function TakeHeartReal()
PlayerREF.AddItem(_00E_FS_NQR03_BrotherGreedNote_02, 1)
ModDistrust(-10)
UpdateStageAndObjectivesGivenHeart()
EndFunction
Function TakeHeartFake()
PlayerREF.AddItem(_00E_FS_NQR03_BrotherGreedNote_02, 1)
ModDistrust(10)
FS_NQR03_GivenFakeHeart.SetValueInt(1)
UpdateStageAndObjectivesGivenHeart()
EndFunction
Function UpdateStageAndObjectivesGivenHeart()
2024-01-10 14:08:24 +00:00
SetCurrentStageID(100)
if IsObjectiveDisplayed(45) && !IsObjectiveDisplayed(40)
SetObjectiveCompleted(45)
Elseif IsObjectiveDisplayed(40) && !IsObjectiveDisplayed(45)
SetObjectiveCompleted(40)
Else
SetObjectiveCompleted(40)
SetObjectiveCompleted(45)
EndIf
SetObjectiveDisplayed(50)
EndFunction
Function TeleportBrotherGreed()
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(FS_NQR03_BrotherGreedREF, FS_NQR03_TeleportBackMarkerBrotherGreed)
EndFunction
Function TeleportPlayerAndBrotherGreed()
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(FS_NQR03_BrotherGreedREF, FS_NQR03_TeleportBackMarkerBrotherGreed)
FS_NQR03_BrotherGreedREF.EvaluatePackage()
_00E_PlayerFunctions.GetTeleportControl().TeleportPlayer(FS_NQR03_TeleportBackMarkerPlayer)
RegisterForSingleUpdate(2)
SetObjectiveCompleted(50)
SetObjectiveDisplayed(51)
EndFunction
Function RemoveHeart()
If FS_NQR03_GivenFakeHeart.GetValueInt() == 1
PlayerREF.RemoveItem(HumanHeart, 1)
Else
PlayerREF.RemoveItem(_00E_FS_NQR03_NessahsHeart, 1)
EndIf
EndFunction
Function FinishUp()
PlayerREF.AddItem(_01E_FS_TeleportrolleRhalataTemple, 3)
FS_NQR03_DoorREF.Lock(True)
SetObjectiveCompleted(50) ; in case the player didn't teleport back with the brother greed
SetObjectiveCompleted(51)
_00E_PlayerFunctions.GetSoundControl().RemoveSilence()
2024-02-05 02:17:04 +00:00
_00E_PlayerFunctions.GetSoundControl().RemoveCombatSoundtracks()
AllowIdleChatter.SetValue(1)
FS_NQR03_SC03_SecretDoorREF.SetOpen(False)
FS_NQR03_SC03_SecretDoorREF.BlockActivation(True)
FS_NQR03_TharaelREF.Disable()
FS_NQR03_SphereREF.Enable()
_00E_EPHandler.GiveEP(iRewardEXP)
2024-01-10 14:08:24 +00:00
FS_NQR04.SetCurrentStageID(5)
EndFunction
Function ClearAliasesEnvironmentScene02()
FS_NQR03_SC02_Flavour_NoviceFemale.Clear()
FS_NQR03_SC02_Flavour_VoiceMale.Clear()
EndFunction
Function ClearAliasesEnvironmentScene03()
FS_NQR03_Flavour_03_Akolythe_Male.Clear()
FS_NQR03_Flavour_03_Akolythe_Female.Clear()
EndFunction
Function ClearAliasesEnvironmentScene01()
FS_NQR03_SC01_Scion.Clear()
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
ReferenceAlias Property FS_NQR03_SC02_Flavour_VoiceMale Auto
ReferenceAlias Property FS_NQR03_SC02_Flavour_NoviceFemale Auto
ReferenceAlias Property FS_NQR03_Flavour_03_Akolythe_Male Auto
ReferenceAlias Property FS_NQR03_Flavour_03_Akolythe_Female Auto
ReferenceAlias Property FS_NQR03_SC01_Scion Auto
int Property iRewardEXP = 1000 Auto Hidden
int Property iPagesRewardEXP = 250 Auto Hidden
GlobalVariable Property AllowIdleChatter Auto
Actor Property FS_NQR03_TharaelREF Auto
Actor Property FS_NQR03_BrotherGreedREF Auto
Actor Property FS_NQR03_LethoREF Auto
Actor Property FS_NQR03_SisterPrideREF Auto
Actor Property PlayerREF Auto
Actor Property FS_NQR03_BardREF Auto
Armor Property _00E_FS_RhalataRobes_NoviceWithHood Auto
Book Property _00E_FS_NQR03_SeerMoneyNote Auto
Book Property _00E_FS_NQR03_BrotherGreedNote Auto
Book Property _00E_FS_NQR03_BrotherGreedNote_02 Auto
Quest Property FS_NQR04 Auto
Quest Property FS_NQR_SQ_01 Auto
ObjectReference Property FS_NQR03_DoorREF Auto
ObjectReference Property FS_NQR03_SC03_SecretDoorREF Auto
ObjectReference Property FS_NQR03_BrotherGriefMarkerREF Auto
ObjectReference Property FS_NQR03_DarkValleyMarkerREF Auto
ObjectReference Property FS_NQR03_BrotherGreedMarkerREF Auto
ObjectReference Property FS_NQR03_TeleportBackMarkerBrotherGreed Auto
ObjectReference Property FS_NQR03_TeleportBackMarkerPlayer Auto
ObjectReference Property FS_NQR03_RhalataTempleDoorREF Auto
ObjectReference Property FS_NQR03_SC01_TharaelMarkerREF Auto
ObjectReference Property FS_NQR03_SphereREF Auto
Outfit Property _00E_FS_TharaelOutfit Auto
Ingredient Property _00E_FS_NQR03_NessahsHeart Auto
Ingredient Property HumanHeart Auto
Scroll Property _01E_FS_TeleportrolleRhalataTemple Auto
GlobalVariable Property _00E_FS_NQR_RhalataMistrust Auto
GlobalVariable Property FS_NQR03_GivenFakeHeart Auto
MiscObject Property _00E_FS_NQR02_MissingPages Auto
MiscObject Property Gold001 Auto
Scene Property FS_NQR03_SC01_TharaelShedDiscussion Auto
Scene Property FS_NQR03_SC02_TempleScene_01 Auto
Scene Property FS_NQR03_SC04_TempleScene_02 Auto
Scene Property FS_NQR03_SC99_BardSC Auto
Weapon Property _00E_FS_NQR05_Tharael_Dagger Auto
Message Property _00E_sRhalataTempleName Auto
Cell Property FS_NQR03_RhalataTemple Auto