enderalse/source/scripts/_00e_fs_nq05_functions.psc

278 lines
7.6 KiB
Plaintext
Raw Normal View History

Scriptname _00E_FS_NQ05_Functions extends Quest
Import Utility
Import Game
Import _00E_QuestFunctions
_00E_QuestFunctions Property Levelsystem Auto
;=====================================================================================
; FUNCTIONS
;=====================================================================================
Function GivePlayerRecipe()
Mirell.RemoveItem(_00E_FS_NQ05_Rezept, 1, false, PlayerREF)
If FS_NQ05_Posting01REF.IsEnabled()
FS_NQ05_Posting01REF.Disable()
FS_NQ05_Posting02REF.Disable()
EndIf
EndFunction
Function UpdateGlobals()
_00E_FS_NQ05_GarlicCountGlobal.Value = PlayerREF.GetItemCount(Garlic)
_00E_FS_NQ05_MothWingMonarchCountGlobal.Value = PlayerREF.GetItemCount(MothWingMonarch)
_00E_FS_NQ05_SkeeverTailCountGlobal.Value = PlayerREF.GetItemCount(SkeeverTail)
_00E_FS_NQ05_VynrootCountGlobal.Value = PlayerREF.GetItemCount(Vynroot)
wait(0.5)
UpdateCurrentInstanceGlobal(_00E_FS_NQ05_VynrootCountGlobal)
UpdateCurrentInstanceGlobal(_00E_FS_NQ05_SkeeverTailCountGlobal)
UpdateCurrentInstanceGlobal(_00E_FS_NQ05_MothWingMonarchCountGlobal)
UpdateCurrentInstanceGlobal(_00E_FS_NQ05_GarlicCountGlobal)
Wait(0.5)
SetObjectiveDisplayed(36)
SetObjectiveDisplayed(37)
SetObjectiveDisplayed(38)
SetObjectiveDisplayed(39)
wait(1.5)
ModObjectiveGlobal(0, _00E_FS_NQ05_SkeeverTailCountGlobal, 36, 1, true, true, false)
ModObjectiveGlobal(0, _00E_FS_NQ05_GarlicCountGlobal, 37, 1, true, true, false)
ModObjectiveGlobal(0, _00E_FS_NQ05_MothWingMonarchCountGlobal, 38, 1, true, true, false)
ModObjectiveGlobal(0, _00E_FS_NQ05_VynrootCountGlobal, 39, 1, true, true, false)
2022-07-28 20:04:13 +00:00
ReferenceAlias PlayerAlias = GetAlias(6) as ReferenceAlias
PlayerAlias.ForceRefTo(PlayerREF)
PlayerAlias.AddInventoryEventFilter(SkeeverTail)
PlayerAlias.AddInventoryEventFilter(Garlic)
PlayerAlias.AddInventoryEventFilter(MothWingMonarch)
PlayerAlias.AddInventoryEventFilter(Vynroot)
EndFunction
Function MoveMirellStandby()
Tochter.RemoveItem(FS_NQ05_Elixier, 1, false, PlayerREF)
FS_NQ05_SceneGoAway.ForceStart()
FS_NQ05_Haustuer.Lock(false)
EndFunction
Function MoveMirellStandby2()
Mirell.MoveTo(FS_NQ05MirellStandbyMarker)
Mirell.EvaluatePackage()
EndFunction
Function PrepareKeller()
wait(3)
_00E_FS_NQ05_FemaleMumblingM.Play(PlayerREF)
FS_NQ05_CollisionsBox.Disable()
FS_NQ05AushangStatic.Disable()
Wait(2)
2022-07-28 20:04:13 +00:00
SetCurrentStageID(60)
FS_NQ05_SceneTochter.ForceStart()
EndFunction
Function Warten()
Levelsystem.FadeToBlack()
wait(3)
Mirell.MoveTo(FS_NQ05MirellWohnzimmerMarker)
Levelsystem.FadeToBlackBack()
2022-07-28 20:04:13 +00:00
SetCurrentStageID(75)
EndFunction
Function KellerScene()
Mirell.EvaluatePackage()
FS_NQ05_SceneKeller.ForceStart()
EndFunction
Function DayTimer()
RegisterForUpdateGameTime(24)
GameDay = GameDaysPassed.GetValue() as Int
EndFunction
Function GiveMirellElixir()
PlayerREF.RemoveItem(FS_NQ05_Elixier, 1)
PlayerREF.AddItem(FS_NQ05_Amulett, 1)
Levelsystem.GiveEP(300)
EndFunction
Function PrepareEnde1()
FS_NQ05Jaildoor.Lock(false)
FS_NQ05Jaildoor.PlayGamebryoAnimation("Open")
Mirell.MoveTo(FS_NQ05MirellTodMarker)
Tochter.MoveTo(FS_NQ05TochterTodMarker)
Mirell.Kill()
Tochter.Kill()
FS_NQ05_Blutspray2.Enable()
FS_NQ05_Blutspray3.Enable()
EndFunction
Function MirellAttacksPlayer()
Mirell.RemoveFromAllFactions()
2022-07-28 20:04:13 +00:00
Mirell.SetActorValue("Aggression", 2)
Mirell.AddItem(FS_NQ05_Amulett, 1)
Mirell.SetGhost(false)
wait(0.1)
Mirell.StartCombat(PlayerREF)
EndFunction
Function PrepareEnde2()
Levelsystem.GiveEP(350)
Tochter.SetGhost(false)
2022-07-28 20:04:13 +00:00
Tochter.SetActorValue("Aggression", 2)
Tochter.RemoveFromAllFactions()
EndFunction
Function CloseDoorAfterEnde2()
FS_NQ05_Haustuer.Lock(255)
EndFunction
Function PrepareEnde3()
FS_NQ05Jaildoor.Lock(false)
FS_NQ05Jaildoor.PlayGamebryoAnimation("Open")
Mirell.MoveTo(FS_NQ05MirellGrabMarker)
FS_NQ05_Grabstein.Enable()
FS_NQ05_GrabsteinMarker.Enable()
Mirell.EvaluatePackage()
Tochter.Disable()
FS_NQ05_Blutspray1.Disable()
FS_NQ05_Ratte.Disable()
EndFunction
Function GivePlayerBelohnung()
PlayerREF.RemoveItem(FS_NQ05_Elixier, 1)
PlayerREF.AddItem(FS_NQ05_Amulett, 1)
Levelsystem.GiveEP(400)
EndFunction
Function PrepareEnde4()
FS_NQ05_Haustuer.Lock(255)
Mirell.MoveTo(FS_NQ05MirellKuratoriumMarker)
Mirell.EvaluatePackage()
Tochter.MoveTo(FS_NQ05TochterKuratoriumMarker)
Tochter.EvaluatePackage()
Tochter.BlockActivation(True)
EndFunction
Function AskCreatePotion()
2022-07-28 20:04:13 +00:00
Int qStage = GetCurrentStageID()
If qStage >= 30 && qStage < 40
If FS_NQ05_AlchemyMessagebox.Show() == 0
SetCurrentStageID(40)
PlayerREF.RemoveItem(Vynroot, 1)
PlayerREF.RemoveItem(SkeeverTail, 1)
PlayerREF.RemoveItem(MothWingMonarch, 1)
PlayerREF.RemoveItem(Garlic, 1)
PlayerREF.RemoveItem(_00E_FS_NQ05_Rezept, 1)
EndIf
EndIf
EndFunction
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnUpdateGameTime() ; because of how we registered, this event occurs every 30 minutes of game time
2022-07-28 20:04:13 +00:00
if (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 80)
SetCurrentStageID(90)
UnregisterForUpdateGameTime()
2022-07-28 20:04:13 +00:00
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 150)
SetCurrentStageID(160)
UnregisterForUpdateGameTime()
2022-07-28 20:04:13 +00:00
Elseif (GameDaysPassed.GetValue() + 1 >= GameDay && GetCurrentStageID() == 180)
SetCurrentStageID(190)
UnregisterForUpdateGameTime()
Endif
EndEvent
;=====================================================================================
; PROPERTIES
;=====================================================================================
int GameDay
Actor Property Mirell Auto
Actor Property Tochter Auto
Actor Property PlayerREF Auto
Actor Property FS_NQ05_Ratte Auto
Armor Property FS_NQ05_Amulett Auto
Book Property _00E_FS_NQ05_Rezept Auto
GlobalVariable Property GameDaysPassed Auto
GlobalVariable Property _00E_FS_NQ05_VynrootCountGlobal Auto
GlobalVariable Property _00E_FS_NQ05_SkeeverTailCountGlobal Auto
GlobalVariable Property _00E_FS_NQ05_MothWingMonarchCountGlobal Auto
GlobalVariable Property _00E_FS_NQ05_GarlicCountGlobal Auto
Ingredient Property Vynroot Auto
Ingredient Property SkeeverTail Auto
Ingredient Property MothWingMonarch Auto
Ingredient Property Garlic Auto
MiscObject Property FS_NQ05_Elixier Auto
ObjectReference Property FS_NQ05Trapdoor Auto
ObjectReference Property FS_NQ05_Haustuer Auto
ObjectReference Property FS_NQ05AushangStatic Auto
ObjectReference Property FS_NQ05MirellStandbyMarker Auto
ObjectReference Property FS_NQ05Jaildoor Auto
ObjectReference Property FS_NQ05MirellTodMarker Auto
ObjectReference Property FS_NQ05TochterTodMarker Auto
ObjectReference Property FS_NQ05MirellWohnzimmerMarker Auto
ObjectReference Property FS_NQ05_Blutspray1 Auto
ObjectReference Property FS_NQ05_Blutspray2 Auto
ObjectReference Property FS_NQ05_Blutspray3 Auto
ObjectReference Property FS_NQ05MirellGrabMarker Auto
ObjectReference Property FS_NQ05MirellKuratoriumMarker Auto
ObjectReference Property FS_NQ05TochterKuratoriumMarker Auto
ObjectReference Property FS_NQ05_Grabstein Auto
ObjectReference Property FS_NQ05_GrabsteinMarker Auto
ObjectReference Property FS_NQ05_CollisionsBox Auto
ObjectReference Property FS_NQ05_Posting01REF Auto
ObjectReference Property FS_NQ05_Posting02REF Auto
Scene Property FS_NQ05_SceneKeller Auto
Scene Property FS_NQ05_SceneTochter Auto
Scene Property FS_NQ05_SceneGoAway Auto
Sound Property _00E_FS_NQ05_FemaleMumblingM Auto
Message Property FS_NQ05_AlchemyMessagebox Auto