*Or even 1.0 and tell users to press and momentarily hold the hotkey(s)
I can't wait 'til the input events are available and none of this matters.


Event OnUpdate() If Input.IsKeyPressed(iQuitGameHotkey) Debug.QuitGame() ElseIf bMenuHotkeyPressed != Input.IsKeyPressed(iMenuHotkey) bMenuHotkeyPressed = !bMenuHotkeyPressed If bMenuHotkeyPressed Debug.ToggleMenus() EndIf ElseIf PlayerREF.GetItemCount(Torch01) If bTorchHotkeyPressed != Input.IsKeyPressed(iTorchHotkey) bTorchHotkeyPressed = !bTorchHotkeyPressed If bTorchHotkeyPressed bEquipTorch = !bEquipTorch If bEquipTorch PlayerREF.EquipItem(Torch01, False, True) Else PlayerREF.UnequipItem(Torch01, False, True) EndIf EndIf ElseIf bTorchHotkeyPressed2 != Input.IsKeyPressed(iTorchHotkey2) bTorchHotkeyPressed2 = !bTorchHotkeyPressed2 If bTorchHotkeyPressed2 bEquipTorch2 = !bEquipTorch2 If bEquipTorch2 PlayerREF.EquipItem(Torch01, False, True) Else PlayerREF.UnequipItem(Torch01, False, True) EndIf EndIf EndIf EndIfEndEvent

Event OnUpdate() If Input.IsKeyPressed(iQuitGameHotkey) Debug.QuitGame() ElseIf bMenuHotkeyPressed != Input.IsKeyPressed(iMenuHotkey) bMenuHotkeyPressed = !bMenuHotkeyPressed If bMenuHotkeyPressed Debug.ToggleMenus() EndIf ElseIf PlayerREF.GetItemCount(Torch01) If bTorchHotkeyPressed != Input.IsKeyPressed(iTorchHotkey) bTorchHotkeyPressed = !bTorchHotkeyPressed If bTorchHotkeyPressed bEquipTorch = !bEquipTorch If bEquipTorch PlayerREF.EquipItem(Torch01, False, True) Else PlayerREF.UnequipItem(Torch01, False, True) EndIf EndIf ElseIf bTorchHotkeyPressed2 != Input.IsKeyPressed(iTorchHotkey2) bTorchHotkeyPressed2 = !bTorchHotkeyPressed2 If bTorchHotkeyPressed2 bEquipTorch2 = !bEquipTorch2 If bEquipTorch2 PlayerREF.EquipItem(Torch01, False, True) Else PlayerREF.UnequipItem(Torch01, False, True) EndIf EndIf EndIf EndIfEndEvent


Event OnUpdate() ;If bGetGameLoaded(); <---------------------- This lets you rebind the key only once shortly after the game has loaded If Game.GetPlayer(); <----------------------- Checks for player ;Debug.MessageBox("HotkeyMod enabled."); <---------------- My debug notification to get to the source of problem Float fSKSE = SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001 If fSKSE >= 1.0502 PlayerAliasScript.Quickening() If Input.IsKeyPressed(35) UnregisterForUpdate(); <------------------ unregisters after key is pressed, so that you won't get multiple threads ;Debug.MessageBox("Key h is pressed."); <---------------------- another debug PlayerAliasScript.iTorchHotkey = 0 Debug.Notification("Press and hold an unused key...") Utility.Wait(1) Int iDXScanCode = 0 While !Input.IsKeyPressed(iDXScancode) iDXScancode += 1 If iDXScancode == 265 iDXScancode = 1 Debug.Notification("Press and hold an unused key...") EndIf EndWhile PlayerAliasScript.iTorchHotkey = iDXScancode Debug.Notification("New key selected: " + PlayerAliasScript.iTorchHotkey) EndIf RegisterForUpdate(5); <----------------- register again to make the OnUpdate event block working again Else PlayerAlias.UnregisterForUpdate() PlayerAliasScript.bQuickening = False Debug.MessageBox("Torch Hotkey requires Skyrim Script Extender v1.5.2 or higher.") EndIf EndIfEndEventEvent SomeEvent() iSomeHotkey = 0 Utility.Wait(1) iSomeHotkey = iGetKeyPressed() Debug.Notification("New key selected: " + iSomeHotkey)EndEventInt Function iGetKeyPressed(Int aiDXScanCode = 1) Debug.Notification("Press and hold an unused key...") While !Input.IsKeyPressed(aiDXScancode) aiDXScancode += 1 If aiDXScancode == 265 aiDXScancode = 1 Debug.Notification("Press and hold an unused key...") EndIf EndWhile Return aiDXScanCodeEndFunctionIf bGetGameLoaded() ; Maintenance code that runs once per save load Else ; Reiterating, normal code EndIf
Bool Function bGetGameLoaded() If SomeActorFromYourMod.GetActorValue("BrainCondition") ; Initializes at 100 SomeActorFromYourMod.SetActorValue("BrainCondition", 0) ; This does not stick to a save Return True Else Return False EndIfEndFunction
Scriptname HM_PlayerAliasScript extends ReferenceAliasBool bEquipTorchBool bTorchHotkeyPressedBool bToggleMenuHotkeyPressedBool bQuitGameHotkeyPressedBool bCommandHotkeyPressedBool bTradeHotkeyPressedActor Property PlayerREF AutoBool Property bQuickening AutoInt Property iTorchCount AutoInt Property iTorchHotkey Auto ConditionalInt Property iToggleMenuHotkey Auto ConditionalInt Property iQuitGameHotkey Auto ConditionalInt Property iTradeHotkey Auto ConditionalInt Property iCommandHotkey Auto ConditionalLight Property Torch01 AutoGlobalVariable Property HM_FollowerHotkeyTrade AutoGlobalVariable Property HM_FollowerHotkeyCommand AutoActor Property SvenREF AutoActor Property FaendalREF AutoActor Property AnnekkeREF AutoActor Property BenorREF AutoActor Property BorgakhREF AutoActor Property BrelynaMaryonRef AutoActor Property AraneaREF AutoActor Property DerkeethusREF AutoActor Property illiaRef AutoActor Property EolaREF AutoActor Property ErandurRef AutoActor Property GhorbashREF AutoActor Property GolldirRef AutoActor Property HirelingBelrandRef AutoActor Property HirelingEriktheSlayerref AutoActor Property HirelingJenassaREF AutoActor Property HirelingMarcurioRef AutoActor Property HirelingStenvarRef AutoActor Property HirelingVorstagRef AutoActor Property HousecarlMarkarthRef AutoActor Property HousecarlRiftenRef AutoActor Property HousecarlSolitudeRef AutoActor Property HousecarlWhiterunRef AutoActor Property HousecarlWindhelmRef AutoActor Property JzargoRef AutoActor Property KharjoREF AutoActor Property LobRef AutoActor Property OgolRef AutoActor Property RiaREF AutoActor Property RoggiREF AutoActor Property TorvarREF AutoActor Property UgorRef AutoActor Property AdelaisaREF AutoActor Property AhtarREF AutoActor Property CosnachREF AutoActor Property MjollRef AutoActor Property UthgerdRef AutoFaction Property CurrentFollowerFaction AutoEvent OnUpdate() If bTorchHotkeyPressed != Input.IsKeyPressed(iTorchHotkey) bTorchHotkeyPressed = !bTorchHotkeyPressed If bTorchHotkeyPressed bEquipTorch = !bEquipTorch If bEquipTorch PlayerREF.EquipItem(Torch01, False, True) Else PlayerREF.UnequipItem(Torch01, False, True) EndIf EndIf RegisterForUpdate(0.1) ElseIf bQuickening RegisterForUpdate(0.1) EndIf If bToggleMenuHotkeyPressed !=Input.IsKeyPressed(iToggleMenuHotkey) bToggleMenuHotkeyPressed = !bToggleMenuHotkeyPressed If bToggleMenuHotkeyPressed Debug.ToggleMenus() EndIf EndIf If bQuitGameHotkeyPressed !=Input.IsKeyPressed(iQuitGameHotkey) bQuitGameHotkeyPressed = !bQuitGameHotkeyPressed If bQuitGameHotkeyPressed Debug.QuitGame() EndIf EndIf If bTradeHotkeyPressed != Input.IsKeyPressed(iTradeHotkey) bTradeHotkeyPressed = !bTradeHotkeyPressed If bTradeHotkeyPressed Trading() EndIf EndIf If bCommandHotkeyPressed != Input.IsKeyPressed(iCommandHotkey) bCommandHotkeyPressed = !bCommandHotkeyPressed If bCommandHotkeyPressed Command() EndIf EndIfEndEventEvent OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akFormReference, ObjectReference akSourceContainer) Quickening()EndEventEvent OnItemRemoved(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) Quickening()EndEventFunction Quickening() iTorchCount = GetActorReference().GetItemCount(Torch01) If bQuickening != iTorchCount As Bool bQuickening = !bQuickening If bQuickening RegisterForUpdate(0.1) Else UnregisterForUpdate() EndIf EndIf EndFunctionFunction Trading() RegisterForUpdate(1) If (SvenREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(SvenREF) <= 150 SvenREF.OpenInventory() ElseIf (FaendalREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(FaendalREF) <= 150 FaendalREF.OpenInventory() ElseIf (AnnekkeREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AnnekkeREF) <= 150 AnnekkeREF.OpenInventory() ElseIf (BenorREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BenorREF) <= 150 BenorREF.OpenInventory() ElseIf (BorgakhREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BorgakhREF) <= 150 BorgakhREF.OpenInventory() ElseIf (BrelynaMaryonRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BrelynaMaryonRef) <= 150 BrelynaMaryonRef.OpenInventory() ElseIf (AraneaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AraneaREF) <= 150 AraneaREF.OpenInventory() ElseIf (DerkeethusREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(DerkeethusREF) <= 150 DerkeethusREF.OpenInventory() ElseIf (illiaRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(illiaRef) <= 150 illiaRef.OpenInventory() ElseIf (EolaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(EolaREF) <= 150 EolaREF.OpenInventory() ElseIf (ErandurRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(ErandurRef) <= 150 ErandurRef.OpenInventory() ElseIf (GhorbashREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(GhorbashREF) <= 150 GhorbashREF.OpenInventory() ElseIf (GolldirRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(GolldirRef) <= 150 GolldirRef.OpenInventory() ElseIf (HirelingBelrandRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingBelrandRef) <= 150 HirelingBelrandRef.OpenInventory() ElseIf (HirelingEriktheSlayerref.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingEriktheSlayerref) <= 150 HirelingEriktheSlayerref.OpenInventory() ElseIf (HirelingJenassaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingJenassaREF) <= 150 HirelingJenassaREF.OpenInventory() ElseIf (HirelingMarcurioRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingMarcurioRef) <= 150 HirelingMarcurioRef.OpenInventory() ElseIf (HirelingStenvarRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingStenvarRef) <= 150 HirelingStenvarRef.OpenInventory() ElseIf (HirelingVorstagRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingVorstagRef) <= 150 HirelingVorstagRef.OpenInventory() ElseIf (HousecarlMarkarthRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlMarkarthRef) <= 150 HousecarlMarkarthRef.OpenInventory() ElseIf (HousecarlRiftenRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlRiftenRef) <= 150 HousecarlRiftenRef.OpenInventory() ElseIf (HousecarlSolitudeRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlSolitudeRef) <= 150 HousecarlSolitudeRef.OpenInventory() ElseIf (HousecarlWhiterunRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlWhiterunRef) <= 150 HousecarlWhiterunRef.OpenInventory() ElseIf (HousecarlWindhelmRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlWindhelmRef) <= 150 HousecarlWindhelmRef.OpenInventory() ElseIf (JzargoRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(JzargoRef) <= 150 JzargoRef.OpenInventory() ElseIf (KharjoREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(KharjoREF) <= 150 KharjoREF.OpenInventory() ElseIf (LobRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(LobRef) <= 150 LobRef.OpenInventory() ElseIf (OgolRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(OgolRef) <= 150 OgolRef.OpenInventory() ElseIf (RiaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(RiaREF) <= 150 RiaREF.OpenInventory() ElseIf (RoggiREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(RoggiREF) <= 150 RoggiREF.OpenInventory() ElseIf (TorvarREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(TorvarREF) <= 150 TorvarREF.OpenInventory() ElseIf (UgorRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(UgorRef) <= 150 UgorRef.OpenInventory() ElseIf (AdelaisaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AdelaisaREF) <= 150 AdelaisaREF.OpenInventory() ElseIf (AhtarREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AhtarREF) <= 150 AhtarREF.OpenInventory() ElseIf (CosnachREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(CosnachREF) <= 150 CosnachREF.OpenInventory() ElseIf (MjollRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(MjollRef) <= 150 MjollRef.OpenInventory() ElseIf (UthgerdRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(UthgerdRef) <= 150 UthgerdRef.OpenInventory() EndIfEndFunctionFunction Command() RegisterForUpdate(1) If (SvenREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(SvenREF) <= 500 SvenREF.SetDoingFavor() ElseIf (FaendalREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(FaendalREF) <= 500 FaendalREF.SetDoingFavor() ElseIf (AnnekkeREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AnnekkeREF) <= 500 AnnekkeREF.SetDoingFavor() ElseIf (BenorREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BenorREF) <= 500 BenorREF.SetDoingFavor() ElseIf (BorgakhREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BorgakhREF) <= 500 BorgakhREF.SetDoingFavor() ElseIf (BrelynaMaryonRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(BrelynaMaryonRef) <= 500 BrelynaMaryonRef.SetDoingFavor() ElseIf (AraneaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AraneaREF) <= 500 AraneaREF.SetDoingFavor() ElseIf (DerkeethusREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(DerkeethusREF) <= 500 DerkeethusREF.SetDoingFavor() ElseIf (illiaRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(illiaRef) <= 500 illiaRef.SetDoingFavor() ElseIf (EolaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(EolaREF) <= 500 EolaREF.SetDoingFavor() ElseIf (ErandurRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(ErandurRef) <= 500 ErandurRef.SetDoingFavor() ElseIf (GhorbashREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(GhorbashREF) <= 500 GhorbashREF.SetDoingFavor() ElseIf (GolldirRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(GolldirRef) <= 500 GolldirRef.SetDoingFavor() ElseIf (HirelingBelrandRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingBelrandRef) <= 500 HirelingBelrandRef.SetDoingFavor() ElseIf (HirelingEriktheSlayerref.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingEriktheSlayerref) <= 500 HirelingEriktheSlayerref.SetDoingFavor() ElseIf (HirelingJenassaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingJenassaREF) <= 500 HirelingJenassaREF.SetDoingFavor() ElseIf (HirelingMarcurioRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingMarcurioRef) <= 500 HirelingMarcurioRef.SetDoingFavor() ElseIf (HirelingStenvarRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingStenvarRef) <= 500 HirelingStenvarRef.SetDoingFavor() ElseIf (HirelingVorstagRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HirelingVorstagRef) <= 500 HirelingVorstagRef.SetDoingFavor() ElseIf (HousecarlMarkarthRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlMarkarthRef) <= 500 HousecarlMarkarthRef.SetDoingFavor() ElseIf (HousecarlRiftenRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlRiftenRef) <= 500 HousecarlRiftenRef.SetDoingFavor() ElseIf (HousecarlSolitudeRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlSolitudeRef) <= 500 HousecarlSolitudeRef.SetDoingFavor() ElseIf (HousecarlWhiterunRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlWhiterunRef) <= 500 HousecarlWhiterunRef.SetDoingFavor() ElseIf (HousecarlWindhelmRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(HousecarlWindhelmRef) <= 500 HousecarlWindhelmRef.SetDoingFavor() ElseIf (JzargoRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(JzargoRef) <= 500 JzargoRef.SetDoingFavor() ElseIf (KharjoREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(KharjoREF) <= 500 KharjoREF.SetDoingFavor() ElseIf (LobRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(LobRef) <= 500 LobRef.SetDoingFavor() ElseIf (OgolRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(OgolRef) <= 500 OgolRef.SetDoingFavor() ElseIf (RiaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(RiaREF) <= 500 RiaREF.SetDoingFavor() ElseIf (RoggiREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(RoggiREF) <= 500 RoggiREF.SetDoingFavor() ElseIf (TorvarREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(TorvarREF) <= 500 TorvarREF.SetDoingFavor() ElseIf (UgorRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(UgorRef) <= 500 UgorRef.SetDoingFavor() ElseIf (AdelaisaREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AdelaisaREF) <= 500 AdelaisaREF.SetDoingFavor() ElseIf (AhtarREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(AhtarREF) <= 500 AhtarREF.SetDoingFavor() ElseIf (CosnachREF.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(CosnachREF) <= 500 CosnachREF.SetDoingFavor() ElseIf (MjollRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(MjollRef) <= 500 MjollRef.SetDoingFavor() ElseIf (UthgerdRef.GetFactionRank(CurrentFollowerFaction) >= 0) && Game.GetPlayer().GetDistance(UthgerdRef) <= 500 UthgerdRef.SetDoingFavor() EndIfEndFunction
Scriptname HM_HotkeyScript extends Quest Conditional{Hotkey Script for your pleasure}; This script has been developed by JustinOther and rongphale and Aenara and Ingenue and AmethystDeciver, oh crab the whole offcial forum took part in it, I'm just the [censored] uploading it!!!; Shall be improved and streamlined in future.; Chicken alias...yeah funny...took me a minute to understand what that was...it's early in the morning...:DLight Property Torch01 AutoReferenceAlias Property ChickenAlias AutoReferenceAlias Property PlayerAlias AutoHM_PlayerAliasScript Property PlayerAliasScript AutoMessage Property HM_ConfigureMenu AutoEvent OnInit() ChickenAlias.GetActorReference().SetScale(0) ChickenAlias.GetActorReference().EnableAI(False) ChickenAlias.GetActorReference().Enable() PlayerAlias.AddInventoryEventFilter(Torch01) RegisterForUpdate(1)EndEventEvent OnUpdate() DebugMessage() If Game.GetPlayer() Float fSKSE = SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001 If fSKSE >= 1.0502 PlayerAliasScript.Quickening() If Input.IsKeyPressed(65) UnregisterForUpdate() Int iButton = HM_ConfigureMenu.Show() If (iButton == 0) PlayerAliasScript.iTorchHotkey = 0 Debug.Notification("Press and hold an unused key...") Utility.Wait(1) Int iDXScanCode = 0 While !Input.IsKeyPressed(iDXScancode) iDXScancode += 1 If iDXScancode == 265 iDXScancode = 1 EndIf EndWhile PlayerAliasScript.iTorchHotkey = iDXScancode Debug.MessageBox("New key selected(DXcode): " + PlayerAliasScript.iTorchHotkey) ElseIf (iButton == 1) PlayerAliasScript.iToggleMenuHotkey = 0 Debug.Notification("Press and hold an unused key...") Utility.Wait(1) Int iDXScanCode = 0 While !Input.IsKeyPressed(iDXScancode) iDXScancode += 1 If iDXScancode == 265 iDXScancode = 1 EndIf EndWhile PlayerAliasScript.iToggleMenuHotkey = iDXScancode Debug.MessageBox("New key selected(DXcode): " + PlayerAliasScript.iToggleMenuHotkey) ElseIf (iButton == 2) PlayerAliasScript.iTradeHotkey = 0 Debug.Notification("Press and hold an unused key...") Utility.Wait(1) Int iDXScanCode = 0 While !Input.IsKeyPressed(iDXScancode) iDXScancode += 1 If iDXScancode == 265 iDXScancode = 1 EndIf EndWhile PlayerAliasScript.iTradeHotkey = iDXScancode Debug.MessageBox("New key selected(DXcode): " + PlayerAliasScript.iTradeHotkey) ElseIf (iButton == 3) PlayerAliasScript.iCommandHotkey = 0 Debug.Notification("Press and hold an unused key...") Utility.Wait(1) Int iDXScanCode = 0 While !Input.IsKeyPressed(iDXScancode) iDXScancode += 1 If iDXScancode == 265 iDXScancode = 1 EndIf EndWhile PlayerAliasScript.iCommandHotkey = iDXScancode Debug.MessageBox("New key selected(DXcode): " + PlayerAliasScript.iCommandHotkey) EndIf RegisterForUpdate(1) EndIf Else PlayerAlias.UnregisterForUpdate() PlayerAliasScript.bQuickening = False Debug.Notification("Hotkey Mod requires Skyrim Script Extender v1.5.2 or higher.") EndIf EndIfEndEventBool Function bGetGameLoaded() If ChickenAlias.GetActorReference().GetActorValue("BrainCondition") ChickenAlias.GetActorReference().SetActorValue("BrainCondition", 0) Return True Else Return False EndIfEndFunctionFunction DebugMessage() If bGetGameLoaded() Float fSKSE = SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001 If fSKSE >= 1.0502 Debug.Notification("Hotkey Mod Version 0.2 active!") EndIf EndIfEndFunction