scn SomeQuestScriptfloat fQuestDelayTimeint bDoOnceint bTrapKeybegin gamemodeif bDoOnce == 0 set fQuestDelayTime to 0.1 set bTrapKey to 0 set bDoOnce to 1endifif player.getequipped SomeHelmet || player.getequipped ThisHelmet || player.getequipped ThatHelmet || player.getequipped YetAnotherHelmet if bTrapKey != 1 && iskeypressedif player.isspelltarget NightVisionAbility != 1 player.addspell NightVisionAbility else player.removespell NightVisionAbility endif elseif bTrapKey && iskeypressed != 1 set bTrapKey to 0 endifelseif player.isspelltarget NightVisionAbility player.removespell NightVisionAbilityendifend
scn FookNVGScript ; by HugePinball, Cipscis, JustinOtherInt bFullChargeInt bNVEquippedInt bTurningOnInt bIsNPressedInt bBeepedInt iSecInt bDoOnceFloat fChargeFloat fChargePercentBegin OnAdd Player If bFookNVGEnabledGLOB Else Return EndIf If Player.GetItemCount FookNVGActivatorARMO If bFookNVGActivatorGLOB Else Player.RemoveItem FookNVGActivatorARMO 1 1 EndIf ElseIf (NVSE == 0) || bFookNVGActivatorGLOB Set bFookNVGActivatorGLOB to 1 Player.AddItem F 1 1 Player.AddItem FookNVGActivatorARMO 1 1 Player.RemoveItem F 1 1 EndIfEnd;==============================================Begin OnEquip Player If bFookNVGEnabledGLOB Else Return EndIf Set bFookNVGIsOnGLOB to 0 Set bNVEquipped to 1 If NVSE Else Set bFookNVGActivatorGLOB to 1 Set iFookNVGMeterTypeGLOB to 0 EndIf If bFookNVGActivatorGLOB If Player.GetItemCount FookNVGActivatorARMO Else Player.AddItem F 1 1 Player.AddItem FookNVGActivatorARMO 1 1 Player.RemoveItem F 1 1 EndIf EndIf If iFookNVGChargeDurationGLOB Set fChargePercent to fCharge / (60 * iFookNVGChargeDurationGLOB) * 100 Set bFullCharge to 1 If bFookNVGMessagesGLOB If bDoOnce Return Else Set bDoOnce to 1 ShowMessage FookNVGChargeLevelMESG fChargePercent EndIf EndIf If iFookNVGMeterTypeGLOB; SetUIfloat "HUDMainMenu\_NVCharge" fChargePercent Else; SetUIfloat "HUDMainMenu\_NVCharge" -1 EndIf EndIfEnd;=============================================Begin OnUnequip Player If bFookNVGEnabledGLOB Else Return EndIf Set bFookNVGIsOnGLOB to 0 Set bNVEquipped to 0 Set bDoOnce to 0 If iFookNVGChargeDurationGLOB If NVSE; SetUIfloat "HUDMainMenu\_NVCharge" -1 EndIf EndIf If iFookNVGIMADSetGLOB If IsImageSpaceActive FookNVGAmberIMAD RIMOD FookNVGAmberIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGAquaIMAD RIMOD FookNVGAquaIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGGreenIMAD RIMOD FookNVGGreenIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGRedIMAD RIMOD FookNVGRedIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGYellowIMAD RIMOD FookNVGYellowIMAD PlaySound UIPipBoyLightOff EndIf Else If IsImageSpaceActive FookNVGAmber02IMAD RIMOD FookNVGAmber02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGAqua02IMAD RIMOD FookNVGAqua02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGGreen02IMAD RIMOD FookNVGGreen02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGRed02IMAD RIMOD FookNVGRed02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGYellow02IMAD RIMOD FookNVGYellow02IMAD PlaySound UIPipBoyLightOff EndIf EndIfEnd;=================================================Begin GameMode If (bFookNVGEnabledGLOB == 0) Return ElseIf (bNVEquipped == 0) Return EndIf If iFookNVGChargeDurationGLOB Set fChargePercent to fCharge / (60 * iFookNVGChargeDurationGLOB) If iFookNVGMeterTypeGLOB ; Meter If bNVEquipped; SetUIfloat "HUDMainMenu\_NVCharge" fChargePercent Else; SetUIfloat "HUDMainMenu\_NVCharge" -1 EndIf EndIf If bFookNVGWarningBeepsGLOB If bNVEquipped If bFookNVGIsOnGLOB If bBeeped ElseIf (fCharge > 0) If (fCharge < 10) PlaySound FookNVGChargeBeepSOUN Set bBeeped to 1 EndIf EndIf If (fCharge < iSec) Set bBeeped to 0 Set iSec to iSec - 1 EndIf EndIf EndIf EndIf If (fCharge > 0) If bFookNVGIsOnGLOB Set fCharge to (fCharge - GetSecondsPassed) ElseIf fCharge < (60 * iFookNVGChargeDurationGLOB) Set fCharge to fCharge + GetSecondsPassed * 2 If bFullCharge Set bFullCharge to 0 EndIf ElseIf (bFullCharge == 0) Set bFullCharge to 1 If bFookNVGMessagesGLOB ShowMessage FookNVGChargedMESG EndIf EndIf ElseIf bFookNVGIsOnGLOB Set bFookNVGIsOnGLOB to 0 If bFookNVGWarningBeepsGLOB Set iSec to -1 EndIf If bFookNVGMessagesGLOB ShowMessage FookNVGDischargedMESG EndIf If bFookNVGActivatorGLOB Player.UnequipItem FookNVGActivatorARMO 0 1 EndIf Else ; Recharge Set fCharge to fCharge + GetSecondsPassed * 2 EndIf ; Track NV charge EndIf ; NV Charge Meter code If bFookNVGActivatorGLOB If Player.GetItemCount FookNVGActivatorARMO If (Player.GetEquipped FookNVGActivatorARMO != bFookNVGIsOnGLOB) Set bFookNVGIsOnGLOB to (bFookNVGIsOnGLOB == 0) If bFookNVGWarningBeepsGLOB Set bBeeped to bFookNVGIsOnGLOB If iFookNVGChargeDurationGLOB Set iSec to fCharge EndIf EndIf EndIf Else Player.AddItem F 1 1 Player.AddItem FookNVGActivatorARMO 1 1 Player.RemoveItem F 1 1 EndIf Else; If (bIsNPressed != IsKeyPressed FookNVGHotkeyGLOB) ; 'N' key Set bIsNPressed to (bIsNPressed == 0) If bIsNPressed ; 'N' pressed Set bFookNVGIsOnGLOB to (bFookNVGIsOnGLOB == 0) If bFookNVGIsOnGLOB If bFookNVGWarningBeepsGLOB Set bBeeped to 1 If iFookNVGChargeDurationGLOB Set iSec to fCharge EndIf EndIf EndIf EndIf; EndIf EndIf If bFookNVGIsOnGLOB Set bTurningOn to 0 If iFookNVGIMADSetGLOB If Player.GetEquipped FookNVGGreenFLST If IsImageSpaceActive FookNVGGreenIMAD Else IMOD FookNVGGreenIMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGRedFLST If IsImageSpaceActive FookNVGRedIMAD Else IMOD FookNVGRedIMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGAmberFLST If IsImageSpaceActive FookNVGAmberIMAD Else IMOD FookNVGAmberIMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGYellowFLST If IsImageSpaceActive FookNVGYellowIMAD Else IMOD FookNVGYellowIMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGAquaFLST If IsImageSpaceActive FookNVGAquaIMAD Else IMOD FookNVGAquaIMAD Set bTurningOn to 1 EndIf EndIf Else If Player.GetEquipped FookNVGGreenFLST If IsImageSpaceActive FookNVGGreen02IMAD Else IMOD FookNVGGreen02IMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGRedFLST If IsImageSpaceActive FookNVGRed02IMAD Else IMOD FookNVGRed02IMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGAmberFLST If IsImageSpaceActive FookNVGAmber02IMAD Else IMOD FookNVGAmber02IMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGYellowFLST If IsImageSpaceActive FookNVGYellow02IMAD Else IMOD FookNVGYellow02IMAD Set bTurningOn to 1 EndIf ElseIf Player.GetEquipped FookNVGAquaFLST If IsImageSpaceActive FookNVGAqua02IMAD Else IMOD FookNVGAqua02IMAD Set bTurningOn to 1 EndIf EndIf EndIf If bTurningOn PlaySound FookNVGOnSOUN If bFookNVGMessagesGLOB Set fChargePercent to fCharge / (60 * iFookNVGChargeDurationGLOB) * 100 ShowMessage FookNVGChargeLevelMESG fChargePercent EndIf EndIf Else If iFookNVGIMADSetGLOB If IsImageSpaceActive FookNVGAmberIMAD RIMOD FookNVGAmberIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGAquaIMAD RIMOD FookNVGAquaIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGGreenIMAD RIMOD FookNVGGreenIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGRedIMAD RIMOD FookNVGRedIMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGYellowIMAD RIMOD FookNVGYellowIMAD PlaySound UIPipBoyLightOff EndIf Else If IsImageSpaceActive FookNVGAmber02IMAD RIMOD FookNVGAmber02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGAqua02IMAD RIMOD FookNVGAqua02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGGreen02IMAD RIMOD FookNVGGreen02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGRed02IMAD RIMOD FookNVGRed02IMAD PlaySound UIPipBoyLightOff ElseIf IsImageSpaceActive FookNVGYellow02IMAD RIMOD FookNVGYellow02IMAD PlaySound UIPipBoyLightOff EndIf EndIf EndIf If NVSE; If bFookNVGIsOnGLOB != GetUIfloat "HUDMainMenu\_NVOn"; SetUIfloat "HUDMainMenu\_NVOn" bFookNVGIsOnGLOB; EndIf EndIfEnd
int bIsNPressedBegin GameMode ; Toggle night vision when the "N" key is pressed if bIsNPressed != IsKeyPressed 49 ; N set bIsNPressed to IsKeyPressed 49 if bIsNPressed if IsImagespaceActive NightVision RemoveImageSpaceModifier NightVision else ApplyImagespaceModifier NightVision endif endif endif ; Remove night vision if the player stops wearing approved equipment if IsImagespaceActive NightVision if player.GetEquipped NightVisionHelmetFormList else RemoveImagespaceModifier NightVision endif endifEnd
int bIsNPressedBegin GameMode ; Toggle night vision when the "N" key is pressed if bIsNPressed != IsKeyPressed 49 ; N set bIsNPressed to IsKeyPressed 49 if bIsNPressed if IsImagespaceActive NightVision RemoveImageSpaceModifier NightVision else ApplyImagespaceModifier NightVision endif endif endif ; Remove night vision if the player stops wearing approved equipment if IsImagespaceActive NightVision if player.GetEquipped NightVisionHelmetFormList else RemoveImagespaceModifier NightVision endif endifEnd
scn TUPAMNightVisionint bIsNPressedBegin GameMode ; Toggle night vision when the "N" key is pressed if bIsNPressed != IsKeyPressed 49 ; N set bIsNPressed to IsKeyPressed 49 if bIsNPressed if IsImagespaceActive DTNightVision1 RemoveImageSpaceModifier DTNightVision1 RemoveImageSpaceModifier DTNightVision2 PlaySound UIPipBoyLightOff else ApplyImagespaceModifier DTNightVision1 ApplyImagespaceModifier DTNightVision2 PlaySound UIPipBoyLightOff endif endif endif ; Remove night vision if the player stops wearing approved equipment if IsImagespaceActive DTNightVision15 if player.GetEquipped NightVisionHelmetFormList else RemoveImagespaceModifier DTNightVision1 RemoveImagespaceModifier DTNightVision2 PlaySound UIPipBoyLightOff endif endifEnd