diff --git a/scripts/_00E_TeleportControl.pex b/scripts/_00E_TeleportControl.pex index 35595f7c..853a0afe 100644 Binary files a/scripts/_00E_TeleportControl.pex and b/scripts/_00E_TeleportControl.pex differ diff --git a/scripts/_00e_class_openclassmenuscript.pex b/scripts/_00e_class_openclassmenuscript.pex index de9b9812..05d43176 100644 Binary files a/scripts/_00e_class_openclassmenuscript.pex and b/scripts/_00e_class_openclassmenuscript.pex differ diff --git a/scripts/_00e_cqj05_functions.pex b/scripts/_00e_cqj05_functions.pex index a4fdd7ef..aa1e37de 100644 Binary files a/scripts/_00e_cqj05_functions.pex and b/scripts/_00e_cqj05_functions.pex differ diff --git a/scripts/_00e_fs_nq03_functions.pex b/scripts/_00e_fs_nq03_functions.pex index 89824410..66d30c25 100644 Binary files a/scripts/_00e_fs_nq03_functions.pex and b/scripts/_00e_fs_nq03_functions.pex differ diff --git a/scripts/_00e_fs_nqr05_anistuckfixsc.pex b/scripts/_00e_fs_nqr05_anistuckfixsc.pex index 8232df26..c21fb6c3 100644 Binary files a/scripts/_00e_fs_nqr05_anistuckfixsc.pex and b/scripts/_00e_fs_nqr05_anistuckfixsc.pex differ diff --git a/scripts/_00e_fs_nqr05_bossfight_tharaelsc.pex b/scripts/_00e_fs_nqr05_bossfight_tharaelsc.pex index 920270e6..ed4efca6 100644 Binary files a/scripts/_00e_fs_nqr05_bossfight_tharaelsc.pex and b/scripts/_00e_fs_nqr05_bossfight_tharaelsc.pex differ diff --git a/scripts/_00e_mq01_functions.pex b/scripts/_00e_mq01_functions.pex index f35288a0..6fd446d1 100644 Binary files a/scripts/_00e_mq01_functions.pex and b/scripts/_00e_mq01_functions.pex differ diff --git a/scripts/_00e_mq07a_functions.pex b/scripts/_00e_mq07a_functions.pex index 13fe5ea1..1b82cfcc 100644 Binary files a/scripts/_00e_mq07a_functions.pex and b/scripts/_00e_mq07a_functions.pex differ diff --git a/scripts/_00e_mq12c_anistuckfixsc.pex b/scripts/_00e_mq12c_anistuckfixsc.pex index 0a234fdc..fd229214 100644 Binary files a/scripts/_00e_mq12c_anistuckfixsc.pex and b/scripts/_00e_mq12c_anistuckfixsc.pex differ diff --git a/scripts/_00e_mq13c_functions.pex b/scripts/_00e_mq13c_functions.pex index 3fa1668e..a149d3eb 100644 Binary files a/scripts/_00e_mq13c_functions.pex and b/scripts/_00e_mq13c_functions.pex differ diff --git a/scripts/_00e_mq16_functions.pex b/scripts/_00e_mq16_functions.pex index 7620f1bb..7f33587a 100644 Binary files a/scripts/_00e_mq16_functions.pex and b/scripts/_00e_mq16_functions.pex differ diff --git a/scripts/_00e_mq17_blackguardianbuttonsc.pex b/scripts/_00e_mq17_blackguardianbuttonsc.pex index 7df75767..b73e99f9 100644 Binary files a/scripts/_00e_mq17_blackguardianbuttonsc.pex and b/scripts/_00e_mq17_blackguardianbuttonsc.pex differ diff --git a/scripts/_00e_mq17_functions.pex b/scripts/_00e_mq17_functions.pex index fff19756..e8b617ee 100644 Binary files a/scripts/_00e_mq17_functions.pex and b/scripts/_00e_mq17_functions.pex differ diff --git a/scripts/_00e_myradsystem02.pex b/scripts/_00e_myradsystem02.pex index e1351c3d..8bbdc4a1 100644 Binary files a/scripts/_00e_myradsystem02.pex and b/scripts/_00e_myradsystem02.pex differ diff --git a/scripts/_00e_nq_g_07_functions.pex b/scripts/_00e_nq_g_07_functions.pex index c01679e6..9303bab2 100644 Binary files a/scripts/_00e_nq_g_07_functions.pex and b/scripts/_00e_nq_g_07_functions.pex differ diff --git a/scripts/_00e_peaceweedplayeraliasscript.pex b/scripts/_00e_peaceweedplayeraliasscript.pex index 54cf1e1f..c80c7077 100644 Binary files a/scripts/_00e_peaceweedplayeraliasscript.pex and b/scripts/_00e_peaceweedplayeraliasscript.pex differ diff --git a/source/scripts/_00E_TeleportControl.psc b/source/scripts/_00E_TeleportControl.psc index 8e75aa66..57914853 100644 --- a/source/scripts/_00E_TeleportControl.psc +++ b/source/scripts/_00E_TeleportControl.psc @@ -6,10 +6,7 @@ Function TeleportPlayer(ObjectReference TeleportTarget) Game.DisablePlayerControls(abCamSwitch = true) Wait(3) - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf - Wait(2) + _00E_EquipControl.SheatheWeapon(PlayerREF) TeleportIn() PlayerREF.MoveTo(TeleportTarget) TeleportOut() diff --git a/source/scripts/_00e_class_openclassmenuscript.psc b/source/scripts/_00e_class_openclassmenuscript.psc index 4b3dca59..ae1771c5 100644 --- a/source/scripts/_00e_class_openclassmenuscript.psc +++ b/source/scripts/_00e_class_openclassmenuscript.psc @@ -59,17 +59,10 @@ Function EnterClassMenu() bool bDisableFighting = (SKSE.GetVersion() > 0) DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) Player.ForceRefTo(PlayerREF) - Bool isFirstPerson = False - isFirstPerson = PlayerREF.GetAnimationVariableBool("IsFirstPerson") - If isFirstPerson == true - _00E_Meditate_FirstPerson.SetValueInt(1) - Else - _00E_Meditate_FirstPerson.SetValueInt(0) - EndIf - if PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_Meditate_FirstPerson.SetValue(PlayerREF.GetAnimationVariableBool("isFirstPerson") as float) + + _00E_EquipControl.SheatheWeapon(PlayerREF) Form[] equippedTorches = New Form[2] _00E_TorchControl.UnequipTorches(equippedTorches) diff --git a/source/scripts/_00e_cqj05_functions.psc b/source/scripts/_00e_cqj05_functions.psc index f1cacdd8..bb226bb5 100644 --- a/source/scripts/_00e_cqj05_functions.psc +++ b/source/scripts/_00e_cqj05_functions.psc @@ -66,9 +66,7 @@ Function PlayKissAnimation() Game.SetPlayerAIDriven(True) Game.DisablePlayerControls(true, true, true, false, true, true, true, true) - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) Utility.Wait(0.5) @@ -146,9 +144,7 @@ EndFunction Function GetIntoPosition() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) EndFunction diff --git a/source/scripts/_00e_fs_nq03_functions.psc b/source/scripts/_00e_fs_nq03_functions.psc index 447abdeb..ea4bf60d 100644 --- a/source/scripts/_00e_fs_nq03_functions.psc +++ b/source/scripts/_00e_fs_nq03_functions.psc @@ -61,9 +61,7 @@ EndFunction Function StartMemory1() _00E_FS_NQ03_SpiritActorREF.Enable() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) OBJEyeofMagnusVanishM.Play(PlayerREF) _00E_MQ07a_WordOfTheDeadTransformSpiritM.Play(PlayerREF) _00E_FS_NQ03_ShockApply.Apply() @@ -224,14 +222,18 @@ EndFunction Function PlayCommentLetter() - PlayerRef.SheatheWeapon() - wait(0.1) + _00E_EquipControl.SheatheWeapon(PlayerREF) + ;_00E_FS_NQ03_ReadNoteMarker.Enable() SetObjectiveCompleted(60) Game.ForceThirdPerson() Game.SetPlayerAIDriven(True) Game.DisablePlayerControls() - PlayerREF.UnequipItem(PlayerREF.GetEquippedObject(0)) + + if PlayerREF.GetEquippedWeapon(true) + PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon(true)) + endif + wait(0.5) PlayerREF.PlayIdle(IdleNoteRead) FS_NQ03_SC17_CommentLetter.ForceStart() @@ -298,7 +300,8 @@ Function PlayerSheatheWeapon() SetObjectiveCompleted(70) endif - PlayerRef.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(PlayerREF) + Game.EnablePlayerControls() Game.SetPlayerAIDriven(False) SetObjectiveDisplayed(95) diff --git a/source/scripts/_00e_fs_nqr05_anistuckfixsc.psc b/source/scripts/_00e_fs_nqr05_anistuckfixsc.psc index 45923dec..8a0fb8d4 100644 --- a/source/scripts/_00e_fs_nqr05_anistuckfixsc.psc +++ b/source/scripts/_00e_fs_nqr05_anistuckfixsc.psc @@ -7,7 +7,7 @@ Event OnTriggerEnter(ObjectReference akActionRef) PlayerREF.AddItem(GasTrapDummy, 1, 1) PlayerREF.EquipItem(GasTrapDummy, 0, 1) Utility.Wait(1) - PlayerREF.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(PlayerREF) PlayerREF.RemoveItem(GasTrapDummy, 1, 1) Self.Disable() EndIf diff --git a/source/scripts/_00e_fs_nqr05_bossfight_tharaelsc.psc b/source/scripts/_00e_fs_nqr05_bossfight_tharaelsc.psc index e2fbeead..022aa898 100644 --- a/source/scripts/_00e_fs_nqr05_bossfight_tharaelsc.psc +++ b/source/scripts/_00e_fs_nqr05_bossfight_tharaelsc.psc @@ -81,7 +81,7 @@ Function CastSpecialAttack() FS_NQR05_TharaelREF.Say(FS_NQR05_D99_TharaelLaunch_BossfightTopic) FS_NQR05_FatherREF.SetGhost(True) _00E_FS_NQR05_TharaelSpecialAttackOngoing.SetValueInt(1) - FS_NQR05_FatherREF.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(FS_NQR05_FatherREF) FS_NQR05_FatherREF.StopCombat() FS_NQR05_FatherREF.StopCombatAlarm() FS_NQR05_FatherREF.EvaluatePackage() diff --git a/source/scripts/_00e_mq01_functions.psc b/source/scripts/_00e_mq01_functions.psc index b2d0f807..80f85303 100644 --- a/source/scripts/_00e_mq01_functions.psc +++ b/source/scripts/_00e_mq01_functions.psc @@ -48,10 +48,7 @@ EndFunction function EndHeadache() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - Utility.Wait(3) - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) PlayerREF.RestoreActorValue("Health", PlayerREF.GetActorValue("Health")) _00E_NPCUncorkPotionAndDrinkM.Play(PlayerREF) diff --git a/source/scripts/_00e_mq07a_functions.psc b/source/scripts/_00e_mq07a_functions.psc index bd131292..8c3d3247 100644 --- a/source/scripts/_00e_mq07a_functions.psc +++ b/source/scripts/_00e_mq07a_functions.psc @@ -302,10 +302,8 @@ EndFunction Function StartMemory() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf - + _00E_EquipControl.SheatheWeapon(PlayerREF) + OBJEyeofMagnusVanishM.Play(PlayerREF) _00E_MQ07a_WordOfTheDeadTransformSpiritM.Play(PlayerREF) _00E_MQ07a_WordOfTheDeadTransformIMOD.Apply() @@ -630,7 +628,7 @@ Function EndDream() MQ07a_ZuraREF.Kill(MQ07a_ZuraREF) PlayerREF.DispelSpell(_00E_MQ07a_MageIceSpike) PlayerREF.DispelSpell(_00E_MQ07a_MageIceSTorm) - PlayerREF.SheatheWeapon() ; Needed for the player to lay down in the bed in SC11 + _00E_EquipControl.SheatheWeapon(PlayerREF) ; Needed for the player to lay down in the bed in SC11 weap = PlayerREF.GetEquippedWeapon(0) If weap PlayerREF.UnEquipItem(weap, abSilent = True) diff --git a/source/scripts/_00e_mq12c_anistuckfixsc.psc b/source/scripts/_00e_mq12c_anistuckfixsc.psc index a1df8d75..09ace33a 100644 --- a/source/scripts/_00e_mq12c_anistuckfixsc.psc +++ b/source/scripts/_00e_mq12c_anistuckfixsc.psc @@ -7,7 +7,7 @@ Event OnTriggerEnter(ObjectReference akActionRef) PlayerREF.AddItem(GasTrapDummy, 1, 1) PlayerREF.EquipItem(GasTrapDummy, 0, 1) Utility.Wait(1) - PlayerREF.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(PlayerREF) PlayerREF.RemoveItem(GasTrapDummy, 1, 1) Self.Disable() EndIf diff --git a/source/scripts/_00e_mq13c_functions.psc b/source/scripts/_00e_mq13c_functions.psc index 09442938..d4853eee 100644 --- a/source/scripts/_00e_mq13c_functions.psc +++ b/source/scripts/_00e_mq13c_functions.psc @@ -234,7 +234,8 @@ Function StartSC04() MQ13c_SC03_SteelbirdREF.StopCombat() akCompanionRomance.StopCombat() akCompanionRomance.StopCombatAlarm() - akCompanionRomance.SheatheWeapon() + + _00E_EquipControl.SheatheWeapon(akCompanionRomance) if akCompanionRomance.GetDistance(PlayerREF) >= 200 akCompanionRomance.MoveTo(MQ13c_SC04_CompMarker) diff --git a/source/scripts/_00e_mq16_functions.psc b/source/scripts/_00e_mq16_functions.psc index 3a9a2654..60134cfc 100644 --- a/source/scripts/_00e_mq16_functions.psc +++ b/source/scripts/_00e_mq16_functions.psc @@ -263,7 +263,7 @@ EndFunction Function TealorSheatheWeapon() - akTealor.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(akTealor) EndFunction diff --git a/source/scripts/_00e_mq17_blackguardianbuttonsc.psc b/source/scripts/_00e_mq17_blackguardianbuttonsc.psc index b375139b..fd286cd5 100644 --- a/source/scripts/_00e_mq17_blackguardianbuttonsc.psc +++ b/source/scripts/_00e_mq17_blackguardianbuttonsc.psc @@ -4,10 +4,9 @@ Event OnActivate(ObjectReference akActionRef) if MQ17.GetCurrentStageID() == 55 - if Game.GetPlayer().IsWeaponDrawn() - Game.GetPlayer().SheatheWeapon() - Utility.Wait(4) - EndIf + if _00E_EquipControl.SheatheWeapon(Game.GetPlayer()) + Utility.Wait(2.5) + endif QSTOculoryRingM.Play(Self) MQ17.SetCurrentStageID(60) diff --git a/source/scripts/_00e_mq17_functions.psc b/source/scripts/_00e_mq17_functions.psc index d6b3db5c..10f4607a 100644 --- a/source/scripts/_00e_mq17_functions.psc +++ b/source/scripts/_00e_mq17_functions.psc @@ -234,10 +234,7 @@ EndFunction Function TrapPlayer() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf - + _00E_EquipControl.SheatheWeapon(PlayerREF) _00E_Func_AIWalk.PlayerAIWalk(False) Game.ForceThirdPerson() Game.DisablePlayerControls(True, True, True, True, True, True, True) @@ -353,7 +350,7 @@ Function StartFight() Game.SetHudCartMode(False) MQ17_Generator_Left_REF003.SetMotionType(4) MQ17_Generator_Right_REF003.SetMotionType(4) - akCompanion.SheatheWeapon() + _00E_EquipControl.SheatheWeapon(akCompanion) akCompanion.UnequipItem(_02E_11Eichenbogen) akCompanion.RemoveItem(_02E_11Eichenbogen) akCompanion.RemoveItem(_00E_MQ11a_SC12_FireArrows) @@ -492,9 +489,7 @@ EndFunction Function PlayKiss() - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) PlayerREF.UnequipItem(PlayerREF.GetEquippedShield()) diff --git a/source/scripts/_00e_myradsystem02.psc b/source/scripts/_00e_myradsystem02.psc index 5a0b6d02..5162e5d7 100644 --- a/source/scripts/_00e_myradsystem02.psc +++ b/source/scripts/_00e_myradsystem02.psc @@ -127,10 +127,10 @@ endfunction Function CallFlightAnimation(Actor akMyrad) FadeToBlackAndBackQuick.Apply() - If (PlayerREF as Actor).IsWeaponDrawn() - (PlayerREF as Actor).SheatheWeapon() - EndIf + + _00E_EquipControl.SheatheWeapon(PlayerREF as Actor) Wait(0.75) + ObjectReference objTakeOffMarker = akMyrad.GetLinkedRef(_00E_FS_MyradTakeOffMarker) akMyrad.MoveTo(objTakeOffMarker) akMyrad.SetScale(1) diff --git a/source/scripts/_00e_nq_g_07_functions.psc b/source/scripts/_00e_nq_g_07_functions.psc index e53fd6a1..d9e9d8da 100644 --- a/source/scripts/_00e_nq_g_07_functions.psc +++ b/source/scripts/_00e_nq_g_07_functions.psc @@ -223,9 +223,7 @@ Function RemovePotion() _00E_SC_Mael.StopCombatAlarm() _00E_SC_Mael.SetCrimeFaction(A_CrimeFaction) PlayerREF.RemoveItem(_00E_NQ_G_07_PetrifiedPotion, 1) - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) EndFunction @@ -1057,14 +1055,22 @@ Function RemoveFromFactions() _00E_SC_DijaamOnelys.RemoveFromAllFactions() _00E_SC_Mael.RemoveFromAllFactions() - If _00E_SC_DijaamOnelys.GetEquippedObject(0) != NONE - _00E_SC_DijaamOnelys.UnequipItem(_00E_SC_DijaamOnelys.GetEquippedObject(0)) + If _00E_SC_DijaamOnelys.GetEquippedWeapon(true) + _00E_SC_DijaamOnelys.UnequipItem(_00E_SC_DijaamOnelys.GetEquippedWeapon(true)) EndIf - If _00E_SC_DijaamOnelys.GetEquippedObject(1) != NONE - _00E_SC_DijaamOnelys.UnequipItem(_00E_SC_DijaamOnelys.GetEquippedObject(1)) + If _00E_SC_DijaamOnelys.GetEquippedWeapon(false) + _00E_SC_DijaamOnelys.UnequipItem(_00E_SC_DijaamOnelys.GetEquippedWeapon(false)) EndIf + If _00E_SC_DijaamOnelys.GetEquippedSpell(0) + _00E_SC_DijaamOnelys.UnequipSpell(_00E_SC_DijaamOnelys.GetEquippedSpell(0), 0) + EndIf + + If _00E_SC_DijaamOnelys.GetEquippedSpell(1) + _00E_SC_DijaamOnelys.UnequipSpell(_00E_SC_DijaamOnelys.GetEquippedSpell(1), 1) + EndIf + EndFunction Function CleanSounds() @@ -1531,9 +1537,7 @@ Function SetupAndStartSC07D() _00E_SC_DijaamOnelys.RemoveItem(_00e_Calia_Necklace, 1) _00E_SC_DijaamOnelys.MoveTo(_00E_NQ_G_07Dijaam_DijaamSitMarker) PlayerREF.MoveTo(_00E_NQ_G_07Dijaam_PlayerHideoutStandMarker) - If PlayerREF.IsWeaponDrawn() - PlayerREF.SheatheWeapon() - EndIf + _00E_EquipControl.SheatheWeapon(PlayerREF) _00E_NQ_G_07Dijaam_ScarabREF.SetMotionType(4) EndFunction diff --git a/source/scripts/_00e_peaceweedplayeraliasscript.psc b/source/scripts/_00e_peaceweedplayeraliasscript.psc index e0e5f493..b9500ea4 100644 --- a/source/scripts/_00e_peaceweedplayeraliasscript.psc +++ b/source/scripts/_00e_peaceweedplayeraliasscript.psc @@ -165,8 +165,7 @@ Function _TryStartSmoking() If PlayerRef.IsWeaponDrawn() _UnlockSmokingStage() - PlayerRef.SheatheWeapon() - Utility.Wait(2.0) + _00E_EquipControl.SheatheWeapon(PlayerREF) _LockSmokingStage() If SmokingStage != SMOKING_STAGE_PREPARING ; The smoking was cancelled while we were waiting Return