Refactored ingredient tracking in The Elixir: removed scripts from ingredients, moved logic to player alias in FS_NQ05, replaced custom globals tracking with ModObjectiveGlobal, automatically toggling objective status
parent
526342f179
commit
906c698b8a
13 changed files with 106 additions and 82 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 |
Loading…
Reference in new issue