diff --git a/Removed scripts from FS_NQ5 ingredients, added playerevents.esp b/Removed scripts from FS_NQ5 ingredients, added playerevents.esp new file mode 100644 index 00000000..f60c8ac7 Binary files /dev/null and b/Removed scripts from FS_NQ5 ingredients, added playerevents.esp differ diff --git a/scripts/_00e_fs_nq05_functions.pex b/scripts/_00e_fs_nq05_functions.pex index 6efaaa4e..e73bf492 100644 Binary files a/scripts/_00e_fs_nq05_functions.pex and b/scripts/_00e_fs_nq05_functions.pex differ diff --git a/scripts/_00e_fs_nq05_garlicscript.pex b/scripts/_00e_fs_nq05_garlicscript.pex index 23a4b823..fcbace03 100644 Binary files a/scripts/_00e_fs_nq05_garlicscript.pex and b/scripts/_00e_fs_nq05_garlicscript.pex differ diff --git a/scripts/_00e_fs_nq05_monarchscript.pex b/scripts/_00e_fs_nq05_monarchscript.pex index c6a1ee0e..0e6fc5af 100644 Binary files a/scripts/_00e_fs_nq05_monarchscript.pex and b/scripts/_00e_fs_nq05_monarchscript.pex differ diff --git a/scripts/_00e_fs_nq05_playeralias.pex b/scripts/_00e_fs_nq05_playeralias.pex new file mode 100644 index 00000000..72623948 Binary files /dev/null and b/scripts/_00e_fs_nq05_playeralias.pex differ diff --git a/scripts/_00e_fs_nq05_skeeverscript.pex b/scripts/_00e_fs_nq05_skeeverscript.pex index e38a0e01..f2b1686a 100644 Binary files a/scripts/_00e_fs_nq05_skeeverscript.pex and b/scripts/_00e_fs_nq05_skeeverscript.pex differ diff --git a/scripts/_00e_fs_nq05_vynrootscript.pex b/scripts/_00e_fs_nq05_vynrootscript.pex index 9ea6a727..21c0efce 100644 Binary files a/scripts/_00e_fs_nq05_vynrootscript.pex and b/scripts/_00e_fs_nq05_vynrootscript.pex differ diff --git a/source/scripts/_00e_fs_nq05_functions.psc b/source/scripts/_00e_fs_nq05_functions.psc index 664606bc..0ede7ba8 100644 --- a/source/scripts/_00e_fs_nq05_functions.psc +++ b/source/scripts/_00e_fs_nq05_functions.psc @@ -22,21 +22,23 @@ EndFunction Function UpdateGlobals() - _00E_FS_NQ05_VynrootCountGlobal.SetValue(PlayerREF.GetItemCount(Vynroot)) - _00E_FS_NQ05_SkeeverTailCountGlobal.SetValue(PlayerREF.GetItemCount(SkeeverTail)) - _00E_FS_NQ05_MothWingMonarchCountGlobal.SetValue(PlayerREF.GetItemCount(MothWingMonarch)) - _00E_FS_NQ05_GarlicCountGlobal.SetValue(PlayerREF.GetItemCount(Garlic)) - wait(0.9) - UpdateCurrentInstanceGlobal(_00E_FS_NQ05_VynrootCountGlobal) - UpdateCurrentInstanceGlobal(_00E_FS_NQ05_SkeeverTailCountGlobal) - UpdateCurrentInstanceGlobal(_00E_FS_NQ05_MothWingMonarchCountGlobal) - UpdateCurrentInstanceGlobal(_00E_FS_NQ05_GarlicCountGlobal) - wait(0.1) + _00E_FS_NQ05_VynrootCountGlobal.SetValue(0) + _00E_FS_NQ05_SkeeverTailCountGlobal.SetValue(0) + _00E_FS_NQ05_MothWingMonarchCountGlobal.SetValue(0) + _00E_FS_NQ05_GarlicCountGlobal.SetValue(0) + SetObjectiveDisplayed(36) SetObjectiveDisplayed(37) SetObjectiveDisplayed(38) SetObjectiveDisplayed(39) + Wait(1.5) + + ModObjectiveGlobal(PlayerREF.GetItemCount(SkeeverTail), _00E_FS_NQ05_SkeeverTailCountGlobal, 36, 1, true, true, true) + ModObjectiveGlobal(PlayerREF.GetItemCount(Garlic), _00E_FS_NQ05_GarlicCountGlobal, 37, 1, true, true, true) + ModObjectiveGlobal(PlayerREF.GetItemCount(MothWingMonarch), _00E_FS_NQ05_MothWingMonarchCountGlobal, 38, 1, true, true, true) + ModObjectiveGlobal(PlayerREF.GetItemCount(Vynroot), _00E_FS_NQ05_VynrootCountGlobal, 39, 1, true, true, true) + EndFunction Function TestFunction() ;DELETE FOR RELEASE diff --git a/source/scripts/_00e_fs_nq05_garlicscript.psc b/source/scripts/_00e_fs_nq05_garlicscript.psc index 1190d419..16f74835 100644 --- a/source/scripts/_00e_fs_nq05_garlicscript.psc +++ b/source/scripts/_00e_fs_nq05_garlicscript.psc @@ -1,23 +1,6 @@ Scriptname _00E_FS_NQ05_GarlicScript extends ObjectReference -Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) - -If FS_NQ05.GetStage() == 35 - - If akNewContainer == PlayerREF - _00E_FS_NQ05_GarlicCountGlobal.SetValue(PlayerREF.GetItemCount(Garlic)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_GarlicCountGlobal) - FS_NQ05.SetObjectiveDisplayed(37, true, true) - - ElseIf akOldContainer == PlayerREF - _00E_FS_NQ05_GarlicCountGlobal.SetValue(PlayerREF.GetItemCount(Garlic)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_GarlicCountGlobal) - FS_NQ05.SetObjectiveDisplayed(37, true, true) - EndIf - -EndIf - -EndEvent +; Replaced with OnItemAdded/OnItemRemoved in _00E_FS_NQ05_PlayerAlias Actor Property PlayerREF Auto Quest Property FS_NQ05 Auto diff --git a/source/scripts/_00e_fs_nq05_monarchscript.psc b/source/scripts/_00e_fs_nq05_monarchscript.psc index b39b221e..a5d9d8ce 100644 --- a/source/scripts/_00e_fs_nq05_monarchscript.psc +++ b/source/scripts/_00e_fs_nq05_monarchscript.psc @@ -1,23 +1,6 @@ Scriptname _00E_FS_NQ05_MonarchScript extends ObjectReference -Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) - -If FS_NQ05.GetStage() == 35 - - If akNewContainer == PlayerREF - _00E_FS_NQ05_MothWingMonarchCountGlobal.SetValue(PlayerREF.GetItemCount(MothWingMonarch)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_MothWingMonarchCountGlobal) - FS_NQ05.SetObjectiveDisplayed(38, true, true) - - ElseIf akOldContainer == PlayerREF - _00E_FS_NQ05_MothWingMonarchCountGlobal.SetValue(PlayerREF.GetItemCount(MothWingMonarch)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_MothWingMonarchCountGlobal) - FS_NQ05.SetObjectiveDisplayed(38, true, true) - EndIf - -EndIf - -EndEvent +; Replaced with OnItemAdded/OnItemRemoved in _00E_FS_NQ05_PlayerAlias Actor Property PlayerREF Auto Quest Property FS_NQ05 Auto diff --git a/source/scripts/_00e_fs_nq05_playeralias.psc b/source/scripts/_00e_fs_nq05_playeralias.psc new file mode 100644 index 00000000..698fac3f --- /dev/null +++ b/source/scripts/_00e_fs_nq05_playeralias.psc @@ -0,0 +1,90 @@ +Scriptname _00E_FS_NQ05_PlayerAlias extends ReferenceAlias + +Event OnInit() + AddInventoryEventFilter(SkeeverTail) + AddInventoryEventFilter(Garlic) + AddInventoryEventFilter(MothWingMonarch) + AddInventoryEventFilter(Vynroot) +EndEvent + +Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) + + If FS_NQ05.GetStage() != 35 + If FS_NQ05.GetStage() > 35 + if akBaseItem != SkeeverTail ; keep the rarest item as filter + RemoveInventoryEventFilter(Garlic) + RemoveInventoryEventFilter(MothWingMonarch) + RemoveInventoryEventFilter(Vynroot) + endif + endif + return + endif + + if akBaseItem == Garlic + FS_NQ05.ModObjectiveGlobal(aiItemCount, _00E_FS_NQ05_GarlicCountGlobal, 37, 1, true, true, true) + return + endif + + if akBaseItem == MothWingMonarch + FS_NQ05.ModObjectiveGlobal(aiItemCount, _00E_FS_NQ05_MothWingMonarchCountGlobal, 38, 1, true, true, true) + return + endif + + if akBaseItem == SkeeverTail + FS_NQ05.ModObjectiveGlobal(aiItemCount, _00E_FS_NQ05_SkeeverTailCountGlobal, 36, 1, true, true, true) + return + endif + + if akBaseItem == Vynroot + FS_NQ05.ModObjectiveGlobal(aiItemCount, _00E_FS_NQ05_VynrootCountGlobal, 39, 1, true, true, true) + return + endif + +EndEvent + +Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) + + If FS_NQ05.GetStage() != 35 + If FS_NQ05.GetStage() > 35 + if akBaseItem != SkeeverTail + RemoveInventoryEventFilter(Garlic) + RemoveInventoryEventFilter(MothWingMonarch) + RemoveInventoryEventFilter(Vynroot) + endif + endif + return + endif + + if akBaseItem == Garlic + FS_NQ05.ModObjectiveGlobal(0 - aiItemCount, _00E_FS_NQ05_GarlicCountGlobal, 37, 1, true, true, true) + return + endif + + if akBaseItem == MothWingMonarch + FS_NQ05.ModObjectiveGlobal(0 - aiItemCount, _00E_FS_NQ05_MothWingMonarchCountGlobal, 38, 1, true, true, true) + return + endif + + if akBaseItem == SkeeverTail + FS_NQ05.ModObjectiveGlobal(0 - aiItemCount, _00E_FS_NQ05_SkeeverTailCountGlobal, 36, 1, true, true, true) + return + endif + + if akBaseItem == Vynroot + FS_NQ05.ModObjectiveGlobal(0 - aiItemCount, _00E_FS_NQ05_VynrootCountGlobal, 39, 1, true, true, true) + return + endif + +endEvent + +Quest Property FS_NQ05 Auto + +Ingredient Property Garlic Auto +Ingredient Property MothWingMonarch Auto +Ingredient Property Vynroot Auto +Ingredient Property SkeeverTail Auto + +GlobalVariable Property _00E_FS_NQ05_GarlicCountGlobal Auto +GlobalVariable Property _00E_FS_NQ05_MothWingMonarchCountGlobal Auto +GlobalVariable Property _00E_FS_NQ05_SkeeverTailCountGlobal Auto +GlobalVariable Property _00E_FS_NQ05_VynrootCountGlobal Auto diff --git a/source/scripts/_00e_fs_nq05_skeeverscript.psc b/source/scripts/_00e_fs_nq05_skeeverscript.psc index a6598d1b..e4c3a54a 100644 --- a/source/scripts/_00e_fs_nq05_skeeverscript.psc +++ b/source/scripts/_00e_fs_nq05_skeeverscript.psc @@ -1,23 +1,6 @@ Scriptname _00E_FS_NQ05_SkeeverScript extends ObjectReference -Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) - -If FS_NQ05.GetStage() == 35 - - If akNewContainer == PlayerREF - _00E_FS_NQ05_SkeeverTailCountGlobal.SetValue(PlayerREF.GetItemCount(SkeeverTail)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_SkeeverTailCountGlobal) - FS_NQ05.SetObjectiveDisplayed(36, true, true) - - ElseIf akOldContainer == PlayerREF - _00E_FS_NQ05_SkeeverTailCountGlobal.SetValue(PlayerREF.GetItemCount(SkeeverTail)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_SkeeverTailCountGlobal) - FS_NQ05.SetObjectiveDisplayed(36, true, true) - EndIf - -EndIf - -EndEvent +; Replaced with OnItemAdded/OnItemRemoved in _00E_FS_NQ05_PlayerAlias Actor Property PlayerREF Auto Quest Property FS_NQ05 Auto diff --git a/source/scripts/_00e_fs_nq05_vynrootscript.psc b/source/scripts/_00e_fs_nq05_vynrootscript.psc index dbbf0fcb..53d33d35 100644 --- a/source/scripts/_00e_fs_nq05_vynrootscript.psc +++ b/source/scripts/_00e_fs_nq05_vynrootscript.psc @@ -1,23 +1,6 @@ Scriptname _00E_FS_NQ05_VynrootScript extends ObjectReference -Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) - -If FS_NQ05.GetStage() == 35 - - If akNewContainer == PlayerREF - _00E_FS_NQ05_VynrootCountGlobal.SetValue(PlayerREF.GetItemCount(Vynroot)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_VynrootCountGlobal) - FS_NQ05.SetObjectiveDisplayed(39, true, true) - - ElseIf akOldContainer == PlayerREF - _00E_FS_NQ05_VynrootCountGlobal.SetValue(PlayerREF.GetItemCount(Vynroot)) - FS_NQ05.UpdateCurrentInstanceGlobal(_00E_FS_NQ05_VynrootCountGlobal) - FS_NQ05.SetObjectiveDisplayed(39, true, true) - EndIf - -EndIf - -EndEvent +; Replaced with OnItemAdded/OnItemRemoved in _00E_FS_NQ05_PlayerAlias Actor Property PlayerREF Auto Quest Property FS_NQ05 Auto