Erikdeda1 Posted November 7, 2009 Share Posted November 7, 2009 This is the StealthArmorMKII mod night vision script but the recharging menu annoys me; so how do i disable power drain and the popping up menu? scn NVNightVisionQScript ;================================;Mr. Lab Technician - Quest control script for creating chemicals;Marvin Raymakers;[email protected];================================ short KeyCDshort KeyCD1short DoOnceshort Initializeshort MaxPowershort DoOnce0short DoOnce25short DoOnce50short DoOnce75short DoOnce100short GogglesPowershort GoggleRechargeshort AutoChargeshort UseEndurableshort AutoChargeButtonshort SECPowershort MFCPowershort ECPPowershort FiBPowerfloat fBatteryPowershort DrainPowershort ShowMenushort UnlockPowersshort IncExclshort ExcludeSECshort ExcludeMFCshort ExcludeECPshort ExcludeFiB begin gamemode ; Called by equiping the goggles if ( UnlockPowers == 1 ) if ( ShowMenu == -1 ) ShowMessage GoggleRechargeMsg Set GoggleRecharge to -1 Set ShowMenu to 0 endif ; Poweramounts for the different sources if ( Initialize == 0 ) Set Initialize to 1 Set SECPower to 90 Set MFCPower to 300 Set ECPPower to 600 Set FiBPower to 1200 endif ;================================ NIGHTVISION FUNCTION ================================ ; FOSE command for the "N" key if ( IsKeyPressed 49 ) if ( KeyCD == 0 ) if ( Player.IsImageSpaceActive NVGogglesISM == 1 ) ; Has nightvision? Set DrainPower to 0 ; Stop power draining Player.rimod NVGogglesISM ; remove nightvision PlaySound UIPipBoyLightOff elseif ( Player.IsImageSpaceActive NVGogglesISM == 0 ) ; Nightvision not active? if ( GogglesPower == 0 ) ; No power left? ShowMessage GoggleRechargeMsg ; Show menu for recharging Set GoggleRecharge to -1 else Set DrainPower to -1 ; otherwise start draining power and turn on nightvision Player.imod NVGogglesISM PlaySound UIPipBoyLightOn endif endif Set KeyCD to 1 endif elseif ( KeyCD == 1 ) Set KeyCD to 0 endif ; Recharging Menu if ( GoggleRecharge == -1 ) Set GoggleRecharge to GetButtonPressed Set DoOnce to 0 if ( GoggleRecharge == 0 ) return elseif ( GoggleRecharge == 1 ) ; Following is just the player choice of what to recharge with + setting the power to its max again if ( fBatteryPower < 10 ) Player.RemoveItem AmmoSmallEnergyCell 10 1 Set MaxPower to SECPower Set fBatteryPower to SECPower Set GogglesPower to 1 ShowMessage GogglesPoweredMsg else ShowMessage StillSomePowerLeftMsg ; If there's still some power left, you cant recharge yet. (though this is also controlled by a condition set on the messagebox itself) endif ; So you probably wont see this messagebox ever elseif ( GoggleRecharge == 2 ) if ( fBatteryPower < 10 ) Player.RemoveItem AmmoMicroFusionCell 5 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage GogglesPoweredMsg else ShowMessage StillSomePowerLeftMsg endif elseif ( GoggleRecharge == 3 ) if ( fBatteryPower < 10 ) Player.RemoveItem AmmoElectronChargePack 2 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage GogglesPoweredMsg else ShowMessage StillSomePowerLeftMsg endif elseif ( GoggleRecharge == 4 ) if ( fBatteryPower < 10 ) Player.RemoveItem FissionBattery 1 1 Set MaxPower to FiBPower Set fBatteryPower to FiBPower Set GogglesPower to 1 ShowMessage GogglesPoweredMsg else ShowMessage StillSomePowerLeftMsg endif elseif ( GoggleRecharge == 5 ) ; Auto charge sub-menu ShowMessage AutoChargeOnMsg Set AutoChargeButton to -1 endif endif if ( AutoChargeButton == -1 ) ; Sub-menu for auto charging Set AutoChargeButton to GetButtonPressed if ( AutoChargeButton == 0 ) Set UseEndurable to -1 Set AutoCharge to -1 ShowMessage AutoChargeA elseif ( AutoChargeButton == 1 ) Set UseEndurable to 1 Set AutoCharge to -1 ShowMessage AutoChargeB elseif ( AutoChargeButton == 2 ) ShowMessage IncExclMenuMsg Set IncExcl to -1 elseif ( AutoChargeButton == 3 ) Set AutoCharge to 0 if ( Player.IsImageSpaceActive NVGogglesISM == 1 ) ; i added this to prevent an exploit, though it's probably obsolete as the mod is now. Set DrainPower to -1 endif ShowMessage AutoChargeOffMsg endif endif if ( IncExcl == -1 ) Set IncExcl to GetButtonPressed if ( IncExcl == 0 ) ShowMessage AutoChargeOnMsg Set AutoChargeButton to -1 elseif ( IncExcl == 1 ) if ( ExcludeSEC == 1 ) Set ExcludeSEC to 0 else Set ExcludeSEC to 1 endif ShowMessage IncExclMenuMsg Set IncExcl to -1 elseif ( IncExcl == 2 ) if ( ExcludeMFC == 1 ) Set ExcludeMFC to 0 else Set ExcludeMFC to 1 endif ShowMessage IncExclMenuMsg Set IncExcl to -1 elseif ( IncExcl == 3 ) if ( ExcludeECP == 1 ) Set ExcludeECP to 0 else Set ExcludeECP to 1 endif ShowMessage IncExclMenuMsg Set IncExcl to -1 elseif ( IncExcl == 4 ) if ( ExcludeFiB == 1 ) Set ExcludeFiB to 0 else Set ExcludeFiB to 1 endif ShowMessage IncExclMenuMsg Set IncExcl to -1 elseif ( IncExcl == 5 ) ShowMessage IncExclOverviewMsg, ExcludeSEC, ExcludeMFC, ExcludeECP, ExcludeFiB Set IncExcl to -1 ShowMessage IncExclMenuMsg endif endif if ( DrainPower == -1 ) ; the power draining script with message to how much power is left. if fBatteryPower > 0 Set fBatteryPower to fBatteryPower - GetSecondsPassed if ( fBatteryPower <= ( MaxPower * 0.25 ) ) && ( DoOnce == 2 ) Set DoOnce to 3 ShowMessage NVGogglesDrain25 elseif ( fBatteryPower <= ( MaxPower * 0.5 ) ) && ( DoOnce == 1 ) Set DoOnce to 2 ShowMessage NVGogglesDrain50 elseif ( fBatteryPower <= ( MaxPower * 0.75 ) ) && ( DoOnce == 0 ) Set DoOnce to 1 ShowMessage NVGogglesDrain75 endif elseif ( DoOnce == 3 ) ; When power is used up, this happens, though if you have auto charging on, this part never turns true ShowMessage NVGoggles0 ; So goggles will stay on with auto charge. Handy. :) Set GogglesPower to 0 ; With auto charging on, this will only happen when player runs out of power sources Set DoOnce to 4 ; Usualy power is recharged BEFORE power runs out Player.rimod NVGogglesISM PlaySound UIPipBoyLightOff Set DrainPower to 0 endif endif ; AmmoSmallEnergyCell, AmmoMicroFusionCell, AmmoElectronChargePack, FissionBattery if ( AutoCharge == -1 ) ; Auto charge is on if ( UseEndurable == -1 ) ; Option A If fBatteryPower <= ( MaxPower * 0.02 ) Set DoOnce to 0 if ( Player.GetItemCount AmmoSmallEnergyCell >= 10 ) && ( ExcludeSEC == 0 ) ; The script will first check this and remove it if player has it Player.RemoveItem AmmoSmallEnergyCell 10 1 Set MaxPower to SECPower Set fBatteryPower to SECPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount AmmoMicroFusionCell >= 5 ) && ( ExcludeMFC == 0 ) ; Otherwise it will remove this. Player.RemoveItem AmmoMicroFusionCell 5 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount AmmoElectronChargePack >= 2 ) && ( ExcludeECP == 0 ) ; etc. Player.RemoveItem AmmoElectronChargePack 2 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount FissionBattery >= 1 ) && ( ExcludeFiB == 0 ) ; etc. Player.RemoveItem FissionBattery 1 1 Set MaxPower to FiBPower Set fBatteryPower to FiBPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg else Set AutoCharge to 0 ; If no sources are found a message is displayed. ShowMessage AutoChargeDisabledMsg endif endif elseif ( UseEndurable == 1 ) ; Option B If fBatteryPower <= ( MaxPower * 0.02 ) Set DoOnce to 0 if ( Player.GetItemCount FissionBattery >= 1 ) && ( ExcludeFiB == 0 ) Player.RemoveItem FissionBattery 1 1 Set MaxPower to FiBPower Set fBatteryPower to FiBPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount AmmoElectronChargePack >= 2 ) && ( ExcludeECP == 0 ) Player.RemoveItem AmmoElectronChargePack 2 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount AmmoMicroFusionCell >= 5 ) && ( ExcludeMFC == 0 ) Player.RemoveItem AmmoMicroFusionCell 5 1 Set MaxPower to ECPPower Set fBatteryPower to ECPPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg elseif ( Player.GetItemCount AmmoSmallEnergyCell >= 10 ) && ( ExcludeSEC == 0 ) Player.RemoveItem AmmoSmallEnergyCell 10 1 Set MaxPower to SECPower Set fBatteryPower to SECPower Set GogglesPower to 1 ShowMessage NVAutoChargedMsg else Set AutoCharge to 0 ShowMessage AutoChargeDisabledMsg endif endif endif endif endifend Link to comment Share on other sites More sharing options...
csb Posted November 8, 2009 Share Posted November 8, 2009 Comment out the lines dealing with ShowMenu and ShowMessage. For the power thing, just keep it a constant value. Link to comment Share on other sites More sharing options...
Erikdeda1 Posted November 8, 2009 Author Share Posted November 8, 2009 Damn it...every time I try to delete a line and try to save it complains and won't save...more help :biggrin: ? :thanks: Link to comment Share on other sites More sharing options...
Erikdeda1 Posted November 10, 2009 Author Share Posted November 10, 2009 bump Link to comment Share on other sites More sharing options...
Erikdeda1 Posted November 12, 2009 Author Share Posted November 12, 2009 bump Link to comment Share on other sites More sharing options...
Recommended Posts