Here is the script that adds it in. (I think)
;Sprint script created by Michael Justice, 12/18/08Scriptname SprintScriptshort setOnceshort msgOnce;Sprint variablesfloat sprintSpeedshort healOnce;AP drain variablesfloat apTickfloat apTimer;Sound variablesfloat breatheTimershort isAPLowshort isBreathing;View bob variablesfloat shakeTimerref explosionRef;FOV variablesfloat defaultFOVfloat default1stPersonFOVshort FOVChangefloat currentFOVfloat FOVIncrease;Controlsshort sneakKeyfloat sensitivityshort reSneakshort reEqpWepfloat reEqpWepTimershort reWalkBegin GameMode;Set controlsif(SprintSettings.customKey == 0) if(getControl 9 != -1) set SprintSettings.runKey to getControl 9 elseif(isKeyPressed SprintSettings.runKey == 0) setControl 9 SprintSettings.runKey endifendif;Add menu itemif(player.getItemCount sprintMenuArmor < 1) player.addItem sprintMenuArmor 1endif;Soundsif(SprintSettings.isSprinting == 1 && SprintSettings.breathingSound == 1) if(isBreathing == 0 && player.getav actionPoints < player.getbaseav actionPoints / 4 && breatheTimer <= 0) set isBreathing to 1 endifendifif(breatheTimer > 0) set breatheTimer to breatheTimer - getSecondsPassedelse if(isBreathing == 1) if(player.getav actionPoints < player.getbaseav actionPoints / 4) if(GetPCIssix Male == 1) playSound SprintBreatheLoop else playSound SprintFemaleBreatheLoop endif set breatheTimer to 8 else if(GetPCIssix Male == 1) playSound SprintBreatheEnd else playSound SprintFemaleBreatheEnd endif set isBreathing to 0 set breatheTimer to 10 endif endifendif;Triggers a HUD shudder regularly while sprintingif(SprintSettings.isSprinting == 1 && shakeTimer < 0 && SprintSettings.headBob == 1) set explosionRef to player.placeAtMe SprintExplosion explosionRef.disable explosionRef.markForDelete set shakeTimer to 1endifif(shakeTimer >= 0) set shakeTimer to shakeTimer - getSecondsPassedendif;Damage the player's action points every 1/10 seconds if they're sprintingset apTick to (25 - player.getav endurance) * SprintAPMultif(SprintSettings.isSprinting == 1 && apTimer < 0) set apTick to apTick / 10 player.Damageav ActionPoints apTick set apTimer to 0.1endifif(SprintSettings.isSprinting == 1 && apTimer >= 0) set apTimer to apTimer - getSecondsPassedendif;Repairs the damage we did to the player's legif(healOnce == 1) player.Restoreav LeftMobilityCondition 1 set healOnce to 0endif;Smoothly widens or narrows the FOV as necessaryif(FOVChange == 1) set currentFOV to currentFOV + 1 con_SetCameraFOV currentFOV if(currentFOV >= defaultFOV + FOVIncrease) set FOVChange to 0 endifSetNumericIniSetting "fdefault1stpersonfov:display" default1stPersonFOV ;Changing the FOV also changes this, so we need to change it back to its defaultendifelseif(FOVChange == -1) set currentFOV to currentFOV - 1 con_SetCameraFOV currentFOV if(currentFOV <= defaultFOV) set FOVChange to 0 endifSetNumericIniSetting "fdefault1stpersonfov:display" default1stPersonFOVendif;Tries to make sure the player's weapon gets re-equipped if they stop sprinting while the weapon is still being put awayif(SprintSettings.isSprinting == 0 && reEqpWep == 1 && reEqpWepTimer > 0) set reEqpWepTimer to reEqpWepTimer - getSecondsPassedendifif(SprintSettings.weaponsOut == 0 && reEqpWep == 1 && reEqpWepTimer <= 0) tapControl 4 set reEqpWep to 0endif;Forces the player into run mode if necessaryif(SprintSettings.isSprinting == 1 && player.isRunning == 0) tapControl 10 set reWalk to 1endifif(SprintSettings.isSprinting == 0 && reWalk == 1) tapControl 10 set reWalk to 0endif;Counts down timeoutif(SprintSettings.timeOut >= 0) set SprintSettings.timeOut to SprintSettings.timeOut - getSecondsPassedendif;Prevents sprinting right after firing or aiming a weaponif(SprintSettings.isSprinting == 0) if(isControlPressed 6 == 1) set SprintSettings.timeOut to 0.5 endif if(isControlPressed 4 == 1) set SprintSettings.timeOut to 1 endifendif;Prevents inadvertant walkingif(player.getav actionpoints < apTick || SprintSettings.timeOut > 0) disableControl 9else enableControl 9endif ;Begins the sprintif(SprintSettings.isSprinting == 0 && isKeyPressed SprintSettings.runKey == 1 && player.IsMoving == 1 && player.getav ActionPoints > apTick && player.getav LeftMobilityCondition > 0 && player.getav RightMobilityCondition > 0 && player.IsSwimming == 0 && player.getav InventoryWeight <= player.getav CarryWeight && IsControlPressed 6 == 0 && SprintSettings.timeOut < 0 && getPlayerControlsDisabled 1 0 1 0 1 0 0 == 0) set SprintSettings.isSprinting to 1 if(SprintSettings.customKey == 0) setControl 9 -1 endif if(SprintSettings.allowStrafe == 0) disableControl 2 ;Disables left and right strafe disableControl 3 endif set sprintSpeed to (player.getav agility * 4 + 40 * (1 - player.getav inventoryWeight / player.getav carryWeight)) * SprintSpeedMult player.modav SpeedMult sprintSpeed if(SprintSettings.FOVChangeOn == 1) if(FOVChange == 0) set defaultFOV to GetNumericIniSetting "fDefaultWorldFOV:display" set default1stPersonFOV to GetNumericIniSetting "fDefault1stPersonFOV:display" endif set FOVChange to 1 set currentFOV to defaultFOV set FOVIncrease to sprintSpeed / 10 endif player.Damageav LeftMobilityCondition 1 ;Damages the player's leg in order to force the game to reevaluate the player's speed set healOnce to 1 if(player.IsWeaponOut == 1) ;If the player had their weapon out, remember to re-equip it later set reEqpWep to 1 set reEqpWepTimer to 0.7 endif if(player.isSneaking == 1) ;If the player was sneaking, remember to go back to sneaking later set reSneak to 1 endif if(SprintSettings.weaponsOut == 0) DisablePlayerControls 0 0 1 0 0 0 1 else DisablePlayerControls 0 0 0 0 0 0 1 endif if(SprintSettings.turnRad > 1) set sensitivity to getNumericIniSetting "fMouseSensitivity:controls" set sensitivity to sensitivity / SprintSettings.turnRad setNumericIniSetting "fMouseSensitivity:controls" sensitivity ;increases turning radius endif if(SprintSettings.blur == 1) iMod SprintBlur endifendif;Ends the sprintif(SprintSettings.isSprinting == 1 && (player.IsMoving == 0 || IsKeyPressed SprintSettings.runKey == 0 || player.getav ActionPoints < apTick / 10 || player.IsSwimming == 1 || player.getav LeftMobilityCondition <= 0 || player.getav RightMobilityCondition <= 0 || player.getav InventoryWeight > player.getav CarryWeight || IsControlPressed 6 == 1 || SprintSettings.timeOut > 0 || getPlayerControlsDisabled 1 0 0 0 1 0 0 == 1)) set SprintSettings.isSprinting to 0 if(SprintSettings.allowStrafe == 0) enableControl 2 enableControl 3 endif set sprintSpeed to sprintSpeed * -1 player.modav SpeedMult sprintSpeed if(SprintSettings.FOVChangeOn == 1) set FOVChange to -1 endif player.Damageav LeftMobilityCondition 1 set healOnce to 1 EnablePlayerControls 0 0 1 0 0 0 1 if(reEqpWep == 1 && SprintSettings.weaponsOut == 0) ;Re-equip the player's weapon if they had it out before the sprint TapControl 4 endif if(reSneak == 1) ;Goes back to sneaking if necessary tapControl 8 set reSneak to 0 endif if(SprintSettings.turnRad > 1) set sensitivity to sensitivity * SprintSettings.turnRad setNumericIniSetting "fMouseSensitivity:controls" sensitivity ;Returns the turning radius to normal endif if(SprintSettings.blur == 1) riMod SprintBlur endif set SprintSettings.timeOut to 1endif;ShowMessage SprintDebugMessage, SprintFOSEVersionEnd
I think it's this line:
;Add menu itemif(player.getItemCount sprintMenuArmor < 1) player.addItem sprintMenuArmor 1endif
But when I delete that I get an error that apparently always existed, because I tried to save without even editing it and got an error saying setControl not found.
Is there a way to save while getting an error? Because when I press yes to save, it stays in the script and won't save.