diff --git a/OnItemAdded Optimization.esp b/OnItemAdded Optimization.esp index 3e334bc3..0946ae31 100644 Binary files a/OnItemAdded Optimization.esp and b/OnItemAdded Optimization.esp differ diff --git a/Werewolf prevent crafting perk.esp b/Werewolf prevent crafting perk.esp deleted file mode 100644 index b6700583..00000000 Binary files a/Werewolf prevent crafting perk.esp and /dev/null differ diff --git a/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.pex b/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.pex new file mode 100644 index 00000000..9df2a288 Binary files /dev/null and b/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.pex differ diff --git a/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.pex b/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.pex new file mode 100644 index 00000000..53d24103 Binary files /dev/null and b/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.pex differ diff --git a/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.pex b/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.pex new file mode 100644 index 00000000..3b0b384b Binary files /dev/null and b/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.pex differ diff --git a/scripts/PRKF__00E_SE_DismantlePerk_03009D21.pex b/scripts/PRKF__00E_SE_DismantlePerk_03009D21.pex new file mode 100644 index 00000000..fb841312 Binary files /dev/null and b/scripts/PRKF__00E_SE_DismantlePerk_03009D21.pex differ diff --git a/scripts/_00e_fs_nq05_functions.pex b/scripts/_00e_fs_nq05_functions.pex index e3236303..c3cd59b8 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_nq07_functions.pex b/scripts/_00e_fs_nq07_functions.pex index 96f917ce..9ea0e0bf 100644 Binary files a/scripts/_00e_fs_nq07_functions.pex and b/scripts/_00e_fs_nq07_functions.pex differ diff --git a/scripts/_00e_fs_smelter_workbench.pex b/scripts/_00e_fs_smelter_workbench.pex index df6ba4f3..9d388d99 100644 Binary files a/scripts/_00e_fs_smelter_workbench.pex and b/scripts/_00e_fs_smelter_workbench.pex differ diff --git a/scripts/_00e_theriantrophist_blockcraftingsc.pex b/scripts/_00e_theriantrophist_blockcraftingsc.pex index 18229200..08ec7b4d 100644 Binary files a/scripts/_00e_theriantrophist_blockcraftingsc.pex and b/scripts/_00e_theriantrophist_blockcraftingsc.pex differ diff --git a/scripts/_00e_theriantrophist_summonlabsc.pex b/scripts/_00e_theriantrophist_summonlabsc.pex index 39c93a9f..cd98a319 100644 Binary files a/scripts/_00e_theriantrophist_summonlabsc.pex and b/scripts/_00e_theriantrophist_summonlabsc.pex differ diff --git a/scripts/fs_nq05_alchemyscript.pex b/scripts/fs_nq05_alchemyscript.pex index 2eb9d3d6..b2aa9879 100644 Binary files a/scripts/fs_nq05_alchemyscript.pex and b/scripts/fs_nq05_alchemyscript.pex differ diff --git a/scripts/fs_nq07_alchemyscript.pex b/scripts/fs_nq07_alchemyscript.pex index 783c2e2c..129900ee 100644 Binary files a/scripts/fs_nq07_alchemyscript.pex and b/scripts/fs_nq07_alchemyscript.pex differ diff --git a/scripts/qf_fs_nq05_0101c82f.pex b/scripts/qf_fs_nq05_0101c82f.pex index 02344fe2..99b5d6b9 100644 Binary files a/scripts/qf_fs_nq05_0101c82f.pex and b/scripts/qf_fs_nq05_0101c82f.pex differ diff --git a/scripts/qf_fs_nq07_0101ca09.pex b/scripts/qf_fs_nq07_0101ca09.pex index 91966513..1c44c82f 100644 Binary files a/scripts/qf_fs_nq07_0101ca09.pex and b/scripts/qf_fs_nq07_0101ca09.pex differ diff --git a/source/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.psc b/source/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.psc new file mode 100644 index 00000000..49d802d6 --- /dev/null +++ b/source/scripts/PRKF__00E_CraftQuestPotionPe_0300146D.psc @@ -0,0 +1,19 @@ +;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment +;NEXT FRAGMENT INDEX 12 +Scriptname PRKF__00E_CraftQuestPotionPe_0300146D Extends Perk Hidden + +;BEGIN FRAGMENT Fragment_7 +Function Fragment_7(ObjectReference akTargetRef, Actor akActor) +;BEGIN CODE +if FS_NQ05.GetStage() >= 40 + Game.GetPlayer().RemovePerk(Self) + return +endif +(FS_NQ05 as _00E_FS_NQ05_Functions).AskCreatePotion() +;END CODE +EndFunction +;END FRAGMENT + +;END FRAGMENT CODE - Do not edit anything between this and the begin comment + +Quest Property FS_NQ05 Auto diff --git a/source/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.psc b/source/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.psc new file mode 100644 index 00000000..114f92e3 --- /dev/null +++ b/source/scripts/PRKF__00E_FS_NQ07_CraftPotio_0300146E.psc @@ -0,0 +1,19 @@ +;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment +;NEXT FRAGMENT INDEX 10 +Scriptname PRKF__00E_FS_NQ07_CraftPotio_0300146E Extends Perk Hidden + +;BEGIN FRAGMENT Fragment_0 +Function Fragment_0(ObjectReference akTargetRef, Actor akActor) +;BEGIN CODE +if FS_NQ07.GetStage() >= 120 + Game.GetPlayer().RemovePerk(Self) + return +endif +(FS_NQ07 as _00E_FS_NQ07_Functions).AskCreatePotion() +;END CODE +EndFunction +;END FRAGMENT + +;END FRAGMENT CODE - Do not edit anything between this and the begin comment + +Quest Property FS_NQ07 Auto diff --git a/source/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.psc b/source/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.psc new file mode 100644 index 00000000..837eadf4 --- /dev/null +++ b/source/scripts/PRKF__00E_SE_2_0_12_UpgradeP_030090B3.psc @@ -0,0 +1,16 @@ +;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment +;NEXT FRAGMENT INDEX 3 +Scriptname PRKF__00E_SE_2_0_12_UpgradeP_030090B3 Extends Perk Hidden + +;BEGIN FRAGMENT Fragment_0 +Function Fragment_0(ObjectReference akTargetRef, Actor akActor) +;BEGIN CODE +if akTargetRef.IsActivationBlocked() + akTargetRef.Activate(akActor, true) + akTargetRef.BlockActivation(False) +endif +;END CODE +EndFunction +;END FRAGMENT + +;END FRAGMENT CODE - Do not edit anything between this and the begin comment diff --git a/source/scripts/PRKF__00E_SE_DismantlePerk_03009D21.psc b/source/scripts/PRKF__00E_SE_DismantlePerk_03009D21.psc new file mode 100644 index 00000000..8b1f77ca --- /dev/null +++ b/source/scripts/PRKF__00E_SE_DismantlePerk_03009D21.psc @@ -0,0 +1,26 @@ +;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment +;NEXT FRAGMENT INDEX 8 +Scriptname PRKF__00E_SE_DismantlePerk_03009D21 Extends Perk Hidden + +;BEGIN FRAGMENT Fragment_0 +Function Fragment_0(ObjectReference akTargetRef, Actor akActor) +;BEGIN CODE + int iButton = _00E_Smelting_DismantlingMSG.Show() + + If iButton == 0 ; if the player wants to process ore into ingots + akTargetRef.Activate(akActor, true) + ElseIf iButton == 1 ; if the player wants to dismantle items back into crafting components, disable player controls + Game.DisablePlayerControls(true, true, true, true, true, true, true, true) + _00E_Dismantling_SmelterREF.Activate(akActor) + Else + return + EndIf +;END CODE +EndFunction +;END FRAGMENT + +;END FRAGMENT CODE - Do not edit anything between this and the begin comment + +Message Property _00E_Smelting_DismantlingMSG Auto + +ObjectReference Property _00E_Dismantling_SmelterREF Auto diff --git a/source/scripts/_00e_fs_nq05_functions.psc b/source/scripts/_00e_fs_nq05_functions.psc index b4c98e85..2c437e02 100644 --- a/source/scripts/_00e_fs_nq05_functions.psc +++ b/source/scripts/_00e_fs_nq05_functions.psc @@ -197,6 +197,22 @@ Function PrepareEnde4() EndFunction +Function AskCreatePotion() + + Int qStage = Self.GetStage() + If qStage >= 30 && qStage < 40 + If FS_NQ05_AlchemyMessagebox.Show() == 0 + Self.SetStage(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 ;===================================================================================== @@ -266,4 +282,5 @@ 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 \ No newline at end of file +Sound Property _00E_FS_NQ05_FemaleMumblingM Auto +Message Property FS_NQ05_AlchemyMessagebox Auto diff --git a/source/scripts/_00e_fs_nq07_functions.psc b/source/scripts/_00e_fs_nq07_functions.psc index fa42a5df..425ef5c2 100644 --- a/source/scripts/_00e_fs_nq07_functions.psc +++ b/source/scripts/_00e_fs_nq07_functions.psc @@ -554,6 +554,20 @@ Function UpdateAarosCarryTraySpell() ; Version 2.0.8 Update EndIf EndFunction +Function AskCreatePotion() + + If Self.GetStage() == 115 + If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0 + Self.SetStage(120) + PlayerREF.RemoveItem(FoodMead, 1) + PlayerREF.RemoveItem(FrostMirriam, 2) + PlayerREF.RemoveItem(FoodBananenschnaps, 1) + PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) + EndIf + EndIf + +EndFunction + ;===================================================================================== ; PROPERTIES @@ -593,6 +607,7 @@ GlobalVariable Property _00E_AchievementsEnabled Auto GlobalVariable Property _00E_TeleportGlobal Auto Message Property _00E_FS_NQ07_Thoughts Auto +Message Property _00E_FS_NQ07_AlchemyMessagebox Auto MiscObject Property Gold001 Auto MiscObject Property _00E_FS_NQ07_Borstenbeutel Auto @@ -651,10 +666,13 @@ ObjectReference Property _00E_FS_NQ07_AuroraTeleportMarkerREF Auto ImageSpaceModifier Property MAGShockExpMassImod Auto Potion Property FoodMead Auto +Potion Property FoodBananenschnaps Auto Potion Property _00E_DalSarkerHoneywine Auto Potion Property FoodChickenCooked Auto Potion Property FoodCabbagePotatoSoup Auto +Ingredient Property FrostMirriam Auto + Spell Property _00E_AbCarryDrinkTray_Old Auto Spell Property _00E_AbCarryDrinkTray_New Auto Spell Property _00E_FS_NQ07_LightSpell Auto diff --git a/source/scripts/_00e_fs_smelter_workbench.psc b/source/scripts/_00e_fs_smelter_workbench.psc index 55053ba4..814c7a6d 100644 --- a/source/scripts/_00e_fs_smelter_workbench.psc +++ b/source/scripts/_00e_fs_smelter_workbench.psc @@ -7,28 +7,5 @@ Message Property _00E_Smelting_DismantlingMSG Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto ObjectReference Property _00E_Dismantling_SmelterREF Auto -Event OnInit() - BlockActivation() -Endevent - -Event OnActivate(ObjectReference akActionRef) - - ; block the player from activating the smelter when being transformed in werewolf due to animation bugs - If akActionRef == PlayerREF && PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace - _00E_Theriantrophist_CantCraftMSG.Show() - ElseIf akActionRef == PlayerREF && !(PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace) - int iButton = _00E_Smelting_DismantlingMSG.Show() - - If iButton == 0 ; if the player wants to process ore into ingots - Self.Activate(akActionRef, true) - ElseIf iButton == 1 ; if the player wants to dismantle items back into crafting components, disable player controls - Game.DisablePlayerControls(true, true, true, true, true, true, true, true) - _00E_Dismantling_SmelterREF.Activate(PlayerREF) - Else - return - EndIf - Else - Self.Activate(akActionRef, true) ; if it's not the player but an NPC - EndIf - -Endevent \ No newline at end of file +; The script is obsolete as of 2.0.12 and has been replaced with a perk. +; Do not add it to new references. diff --git a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc index e327f187..cd80b341 100644 --- a/source/scripts/_00e_theriantrophist_blockcraftingsc.psc +++ b/source/scripts/_00e_theriantrophist_blockcraftingsc.psc @@ -6,12 +6,15 @@ Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto Bool bActivationBlocked = False -; This script is obsolete since 2.0.12 and has been replaced with a perk +; This script is obsolete since 2.0.12 and has been replaced with a perk. +; Do not add it to new references. Event OnActivate(ObjectReference akActionRef) ; Unlock activators, blocked by previous version of the script if IsActivationBlocked() BlockActivation(False) - Activate(akActionRef, true) + if Game.GetPlayer().GetRace() != _00E_Theriantrophist_PlayerWerewolfRace + Activate(akActionRef, true) + endif endif EndEvent diff --git a/source/scripts/_00e_theriantrophist_summonlabsc.psc b/source/scripts/_00e_theriantrophist_summonlabsc.psc index 3ab7f32f..deb9731d 100644 --- a/source/scripts/_00e_theriantrophist_summonlabsc.psc +++ b/source/scripts/_00e_theriantrophist_summonlabsc.psc @@ -1,67 +1,22 @@ Scriptname _00E_Theriantrophist_SummonLabSC extends activemagiceffect -ObjectReference Property _00E_Theriantrophist_SummonPortableLaboratory_Target Auto - Event OnEffectStart(Actor akTarget, Actor akCaster) if PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace _00E_Theriantrophist_CantCraftMSG.Show() else - CheckforQuestPotions() + (FS_NQ05 as _00E_FS_NQ05_Functions).AskCreatePotion() + (FS_NQ07 as _00E_FS_NQ07_Functions).AskCreatePotion() Utility.Wait(1.0) _00E_Theriantrophist_SummonPortableLaboratory_Target.activate(PlayerREF, true) endif EndEvent -Function CheckforQuestPotions() - - If (FS_NQ05.GetStage() < 40 && FS_NQ05.GetStage() >= 30) - int iButton1 = FS_NQ05_AlchemyMessagebox.Show() - - if iButton1 == 0 - FS_NQ05.SetStage(40) - PlayerREF.RemoveItem(Vynroot, 1) - PlayerREF.RemoveItem(SkeeverTail, 1) - PlayerREF.RemoveItem(MothWingMonarch, 1) - PlayerREF.RemoveItem(Garlic, 1) - PlayerREF.RemoveItem(_00E_FS_NQ05_Rezept, 1) - ElseIf iButton1 == 1 - ; - EndIf - Endif - - If (FS_NQ07.GetStage() == 115) - int iButton2 = _00E_FS_NQ07_AlchemyMessagebox.Show() - - if iButton2 == 0 - FS_NQ07.SetStage(120) - PlayerREF.RemoveItem(FoodMead, 1) - PlayerREF.RemoveItem(FrostMirriam, 2) - PlayerREF.RemoveItem(FoodBananenschnaps, 1) - PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) - ElseIf iButton2 == 1 - ; - EndIf - EndIf - -EndFunction - +ObjectReference Property _00E_Theriantrophist_SummonPortableLaboratory_Target Auto Actor Property PlayerREF Auto Message Property _00E_Theriantrophist_CantCraftMSG Auto Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto Quest Property FS_NQ05 Auto -Book Property _00E_FS_NQ05_Rezept Auto -Ingredient Property Vynroot Auto -Ingredient Property SkeeverTail Auto -Ingredient Property MothWingMonarch Auto -Ingredient Property Garlic Auto -Message Property FS_NQ05_AlchemyMessagebox Auto - Quest Property FS_NQ07 Auto -Book Property _00E_FS_NQ07_Rezept Auto -Potion Property FoodMead Auto -Ingredient Property FrostMirriam Auto -Potion Property FoodBananenschnaps Auto -Message Property _00E_FS_NQ07_AlchemyMessagebox Auto \ No newline at end of file diff --git a/source/scripts/fs_nq05_alchemyscript.psc b/source/scripts/fs_nq05_alchemyscript.psc index d308e009..44717a8c 100644 --- a/source/scripts/fs_nq05_alchemyscript.psc +++ b/source/scripts/fs_nq05_alchemyscript.psc @@ -12,22 +12,4 @@ Message Property FS_NQ05_AlchemyMessagebox Auto Bool bActivationBlocked = False -Event OnActivate(ObjectReference akActionRef) - If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False - bActivationBlocked = True - - Int qStage = FS_NQ05.GetStage() - If qStage >= 30 && qStage < 40 - If FS_NQ05_AlchemyMessagebox.Show() == 0 - FS_NQ05.SetStage(40) - PlayerREF.RemoveItem(Nirnroot, 1) - PlayerREF.RemoveItem(SkeeverTail, 1) - PlayerREF.RemoveItem(MothWingMonarch, 1) - PlayerREF.RemoveItem(Garlic, 1) - PlayerREF.RemoveItem(FS_NQ05_Rezept, 1) - EndIf - EndIf - - bActivationBlocked = False - EndIf -EndEvent \ No newline at end of file +; This script is obsolete as of 2.0.12, replaced with a perk diff --git a/source/scripts/fs_nq07_alchemyscript.psc b/source/scripts/fs_nq07_alchemyscript.psc index 5b827ac8..5a777a2b 100644 --- a/source/scripts/fs_nq07_alchemyscript.psc +++ b/source/scripts/fs_nq07_alchemyscript.psc @@ -11,21 +11,4 @@ Message Property _00E_FS_NQ07_AlchemyMessagebox Auto Bool bActivationBlocked = False - -Event OnActivate(ObjectReference akActionRef) - If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False - bActivationBlocked = True - - If FS_NQ07.GetStage() == 115 - If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0 - PlayerREF.RemoveItem(FoodMead, 1) - PlayerREF.RemoveItem(FrostMirriam, 2) - PlayerREF.RemoveItem(FoodBananenschnaps, 1) - PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1) - FS_NQ07.SetStage(120) - EndIf - EndIf - - bActivationBlocked = False - EndIf -EndEvent +; This script is obsolete as of 2.0.12, replaced with a perk diff --git a/source/scripts/qf_fs_nq05_0101c82f.psc b/source/scripts/qf_fs_nq05_0101c82f.psc index 4d1bde00..5e09b309 100644 --- a/source/scripts/qf_fs_nq05_0101c82f.psc +++ b/source/scripts/qf_fs_nq05_0101c82f.psc @@ -69,6 +69,7 @@ SetObjectiveCompleted(37) SetObjectiveCompleted(38) SetObjectiveCompleted(39) SetObjectiveDisplayed(40) +Game.GetPlayer().RemovePerk(_00E_FS_NQ05_CraftPotionPerk) kmyQuest.MoveMirellStandby() ;END CODE EndFunction @@ -331,6 +332,7 @@ Function Fragment_12() ;BEGIN CODE SetObjectivecompleted(20) SetObjectiveDisplayed(30) +Game.GetPlayer().AddPerk(_00E_FS_NQ05_CraftPotionPerk) ;END CODE EndFunction ;END FRAGMENT @@ -369,3 +371,4 @@ EndFunction ;END FRAGMENT CODE - Do not edit anything between this and the begin comment GlobalVariable Property _00E_AchievementsEnabled Auto +Perk Property _00E_FS_NQ05_CraftPotionPerk Auto diff --git a/source/scripts/qf_fs_nq07_0101ca09.psc b/source/scripts/qf_fs_nq07_0101ca09.psc index dda09102..98d8cf41 100644 --- a/source/scripts/qf_fs_nq07_0101ca09.psc +++ b/source/scripts/qf_fs_nq07_0101ca09.psc @@ -97,6 +97,7 @@ _00E_FS_NQ07_Functions kmyQuest = __temp as _00E_FS_NQ07_Functions SetObjectiveDisplayed(35) SetObjectiveCompleted(20) kmyQuest.GivePlayerCraftingPlan() +Game.GetPlayer().AddPerk(_00E_FS_NQ07_CraftPotionPerk) ;END CODE EndFunction ;END FRAGMENT @@ -470,6 +471,7 @@ Quest __temp = self as Quest _00E_FS_NQ07_Functions kmyQuest = __temp as _00E_FS_NQ07_Functions ;END AUTOCAST ;BEGIN CODE +Game.GetPlayer().RemovePerk(_00E_FS_NQ07_CraftPotionPerk) kmyQuest.CleanAuroraHome() SetObjectiveCompleted(30) SetObjectiveDisplayed(40) @@ -605,3 +607,5 @@ EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment + +Perk Property _00E_FS_NQ07_CraftPotionPerk Auto