Jump to content

Recommended Posts

Posted (edited)

This is a two-file CFG system that allows players to toggle between Automatic Sprint (for consistent movement speed) and Manual Sprint (for classic gameplay)

Logic & Stability

The minimal stamina consumption during the jump +moveup is a basic mechanism of the game engine and cannot be removed using configuration files cfg without the use of cheats or modifications to the source code. The system is optimal as it stands:

  • ON State (Automated): Maximum stamina consumption during jump +moveup; +sprint for maximum distance.

  • OFF State (Manual): Minimal stamina consumption during jump +moveup for a normal jump.

Features

  • Toggle Key: X switches the script ON/OFF.

  • ON State: W/A/S/D are always sprinting (automatic). MOUSE2 (Jump) maintains sprint while jumping.

  • OFF State: W/A/S/D move normally. SHIFT re-enables manual +sprint.

  • Stability: Includes aggressive movement clean-up clean\_all\_movement to prevent directional keys from getting stuck.

 

 

sprint_on.cfg sprint_off.cfg

Edited by Lorenzo Battistutta
  • Lorenzo Battistutta changed the title to Automatic Sprint Toggle - Stable CFG System
  • 2 weeks later...
Posted (edited)
  • Aggiornamento dello script alla versione 2
This is a robust two-file CFG system that allows players to toggle between **Automatic Sprint** (for consistent, speed-maintained movement) and **Manual Sprint** (for classic gameplay).

### Logic & Stability
The system incorporates aggressive bind cleanup and clear console echoes for reliability. The minimal stamina consumption during the jump (+moveup) is a basic mechanism of the game engine and cannot be removed using configuration files (cfg) without cheats or source code modifications.

* **ON State (Automatic):** Maximum stamina consumption during jump (+moveup; +sprint) for maximum distance.
* **OFF State (Manual):** Minimal stamina consumption during jump (+moveup) for a normal jump.
* **Stability:** Includes aggressive bind unbinds on all involved keys (W, A, S, D, MOUSE2, SHIFT, X) to prevent conflicts and ensure consistent state transitions.

### Features
* **Toggle Key (Primary):** **X** switches the script ON/OFF.
* **Reset Key (Immediate Exit):** **SHIFT** acts as an *immediate exit* from the Automatic ON state, restoring Manual Sprint instantly.
* **ON State:** W/A/S/D are always sprinting (automatic). MOUSE2 (Jump) maintains sprint while jumping.
* **OFF State:** W/A/S/D move normally. **SHIFT** re-enables the manual +sprint function.
* **Debug:** Echo messages confirm the state of the script after every action (X press or SHIFT press).

 

1. 🟢 sprint_on.cfg (ON State - Automatico)

 

Snippet di codice
 
// =========================================================
// SCRIPT: Sprint Toggle - ON (Automatic)
// Generated by LadyKaka77 with IA support
// =========================================================

// --- EXECUTION VERIFICATION ---
echo "^2>>> EXECUTED: sprint_on.cfg (AUTOMATIC SPRINT ON)"

// --- ALIASES ---
// Cleans all movement directional commands and the sprint flag
set clean_all_movement "-forward; -back; -moveleft; -moveright; -sprint"

// Transition alias: Executes cleaning and calls the OFF script
set transition_off "vstr clean_all_movement; exec sprint_off.cfg"


// --- BIND CLEANUP (Aggressive Unbind) ---
// Cleans all keys involved in movement and the toggle mechanism
unbind w
unbind a
unbind s
unbind d
unbind MOUSE2
unbind SHIFT
unbind X


// --- ACTION BINDS (Automatic Sprint) ---
// Movement keys always include the +sprint command
bind w "+forward; +sprint"
bind a "+moveleft; +sprint"
bind s "+back; +sprint"
bind d "+moveright; +sprint"

// Jump key (MOUSE2) maintains +sprint for max distance jump
bind MOUSE2 "+moveup; +sprint" 

// --- TOGGLE / RESET BINDS ---
// SHIFT is the IMMEDIATE RESET/EXIT button (returns to Manual)
bind SHIFT "vstr transition_off; echo ^7[RESET] ^1Disabling from SHIFT..." 

// X is the TOGGLE button (set for the next transition, which is OFF)
bind X "vstr transition_off; echo ^7[TOGGLE] ^1Disabling from X..." 

// --- STABILITY ---
bind MOUSE1 "+attack"

echo "^1Sprint Toggle: ON (Automatic Active)"

 

2. 🔴 sprint_off.cfg (Stato OFF - Manuale)

 

Snippet di codice
 
// =========================================================
// SCRIPT: Sprint Toggle - OFF (Manual)
// Generated by LadyKaka77 with IA support
// =========================================================
echo "^2>>> EXECUTED: sprint_off.cfg (MANUAL SPRINT ON)"

// --- IMMEDIATE INTERRUPT ---
// Forcibly releases any continuous sprint signal and stops stamina drain
-sprint 

// --- ALIASES ---
// Cleans all movement directional commands and the sprint flag
set clean_all_movement "-forward; -back; -moveleft; -moveright; -sprint"

// Transition alias: Executes cleaning and calls the ON script
set transition_on "vstr clean_all_movement; exec sprint_on.cfg"


// --- BIND CLEANUP (Aggressive Unbind) ---
// Cleans all keys involved in movement and the toggle mechanism
unbind w
unbind a
unbind s
unbind d
unbind MOUSE2
unbind SHIFT
unbind X


// --- ACTION BINDS (Normal Movement) ---
// Movement keys are restored to normal movement only (W/A/S/D)
bind w "+forward"
bind a "+moveleft"
bind s "+back"
bind d "+moveright"

// Jump key (MOUSE2) is restored to normal jump (+moveup only)
bind MOUSE2 "+moveup" 

// --- TOGGLE / RESET BINDS ---
// SHIFT is restored to the normal MANUAL SPRINT function (Hold to sprint)
bind SHIFT "+sprint"  

// X is restored as the TOGGLE key (set for the next transition, which is ON)
bind X "vstr transition_on; echo ^7[TOGGLE] ^3Activating from X..." 

// --- STABILITY ---
// (Optional: add MOUSE1 bind if needed for consistency)

echo "^1Sprint Toggle: OFF (Manual Active)"

sprint_off.cfg sprint_on.cfg

Edited by Lorenzo Battistutta

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.