Soldier scripts

From TF2 Wiki

Share/Save/Bookmark
Jump to: navigation, search
Community script navigation
General scripts
Weapon scripts
General class scripts
Collection scripts
Class scripts
Scout scripts
Soldier scripts
Pyro scripts
Engineer scripts
Heavy scripts
Demoman scripts
Medic scripts
Sniper scripts
Spy scripts



Contents

Beginner scripts

By Multioakers
Here you will find scripts that are easy to get used to and are not too complex for people who are starting to use scripts.

Mouse 2 = Panic shotgun, shoots 3 times then goes back to manual shots
Mouse 3 = Normal rocket jump
Mouse wheel rolled up = Switches to the rocket launcher
Mouse wheel scrolled down = Switches to the equalizer or MG

//Panic Shotgun
alias "NoAmmo" "slot2; +attack; wait 250; -attack"
Bind "Mouse2" "NoAmmo"

//Switch to primary
alias "RL" "Slot1"
bind "mwheelup" "RL"

//Switch to melee
alias "RUN" "Slot3"
bind "mwheeldown" "RUN"

//Easy Rocket Jump
alias +rocketjump "+duck;+attack;+jump"
alias -rocketjump "-duck;-attack;-jump"
bind "Mouse3" "+rocketjump"

To disable on other classes put this: alias "UNLOADERSOLDIERSCFG" "bind "mouse1" "+attack";bind "mouse2" "+attack2";bind "mwheelup" "invprev";bind "mwheeldown" "invnext" "unbind" "Mouse3"

Randomdog's competitive Soldier script and full interface redesign

By Randomdog

// Randomdog's Soldier CFG

// Notes
// Auto-reload is recommended
// Requires a mouse with at least 4 buttons (unless you feel like rebinding)
// Feel free to change the binds (down at the bottom) but don't mess with the rest unless you know what you're doing
// Designed for competitive play so doesn't use any wait commands and has a hotkey for 'medic down'
// Designed for using the equalizer, there is no autoswitch back after hit from the melee because most of the time you will want to run away when you get the equalizer out. Use scrollwheel up and down to switch if you have to.

// Binds

// Mouse 1 - Rocket Launcher

// Mouse 2 - Shotgun or Activate Buff Banner (will have no effect when gunboats equipped)

// Mouse 3 - Equalizer/Shovel - will stay out if you let go of the button so that you can run away with equalizer. Clicking M3 makes you attack with it.

// Mouse 4 - Instant rocket jump - YOU MUST HAVE THE ROCKET LAUNCHER OUT

// Mouse Wheel up - Switch to rocket launcher

// Mouse Wheel down - Switch to shotgun

// F - 'Medic Down' in team chat and shout the 'go go go' voice command



// SCRIPT BEGINS HERE!



// Rocket Launcher
alias "+rockets" "slot1;+attack;"
alias "-rockets" "-attack;+reload"


// Shotgun
alias "+shotty" "slot2;+attack"
alias "-shotty" "-attack;+reload"


// Equalizer
alias "+pick" "slot3;+attack"
alias "-pick" "-attack"


// Rocket Jump
alias +rocketjump "+duck;+attack;+jump"
alias -rocketjump "-duck;-attack;-jump"


// Medic Down
alias "killmed" "say_team "***ENEMY MEDIC DOWN!***";voicemenu 0 2"

// Mouse wheel switch
alias "wheelrockets" "slot1"
alias "wheelshotty" "slot2"


// The Binds - Yes this is the bit you can edit
bind "f" "killmed"
bind "mouse1" "+rockets"
bind "mouse2" "+shotty"
bind "mouse3" "+pick"
bind "mouse4" "+rocketjump"
bind "mwheelup" "wheelrockets"
bind "mwheeldown" "wheelshotty"

// Notification in console
echo "*** SOLDIER CFG LOADED***


// SCRIPT ENDS HERE


// Put the following in all your other cfgs, this will make sure the default binds for the other classes are in place. If you change the binds here change this line of text too.
// If you use custom cfgs for the other classes put this at the TOP.

alias "unloadcfg" "bind "mouse1" "+attack";bind "mouse2" "+attack2";bind "mwheelup" "invprev";bind "mwheeldown" "invnext";unbind "mouse3";unbind "mouse4";unbind "f";echo "*** CONFIG UNLOADED ***""

unloadcfg

//Made by Randomdog - Version 1.2

Autoreload

By Matheus28
// soldier.cfg
alias aur1 "+reload;wait;-reload;aur2;";
alias aur2 "aur1";
aur1;

// clear.cfg
alias aur2


Quick Banner

By caa4444
in solder.cfg
//Quick Banner
alias ban "use tf_weapon_buff_item; +attack; wait 50; -attack"
bind mouse4 ban

in clear.cfg
unbind mouse4

Quick Banner (Improved)

By ajburges

Small improvement over previous quick banner script that prevents having attack locked on if you release the button early.

in solder.cfg
//Quick Banner
alias "noop" "";
alias "qBanner_next_action" "noop";
alias "+qBanner" "alias qBanner_next_action +attack; use tf_weapon_buff_item; wait 20; qBanner_next_action"; //adjust wait as needed.
alias "-qBanner" "alias qBanner_next_action noop; -attack; lastinv";

bind x +qBanner //use your choice on button

Rocket Jump

There is some discussion about this script.
Posted by Icehawk
//Rocket Jump
alias +rocketjump "+jump;+duck;wait;+attack"
alias -rocketjump "-jump;-attack;wait;wait;wait;-duck"
bind mouse2 "+rocketjump"

Duck-Tap Rocket Jump (Super Rocket Jump)

This rocketjump script uses the duck-tap method which gives you a little bit of extra height.
It is highly recommended to NOT use this as your main RJ script, due to the nature of the duck-tap method.
NOTE: For best results, do the jump while standing still.
alias +superjump "+duck;wait 8;-duck;wait 4;+jump;+attack;wait 20;-attack;+duck;wait 2;-superjump"
alias -superjump "-jump;-duck"
bind mouse3 +superjump
P.S. the actual RJ will be performed after 12 frames, so keep looking at the ground a little bit after pressing the button

yet another rocket jump

should help to overcame limitations some servers put on wait command

//usage: push a button to fast aim under your feet than release it and quickly tip (push and release) it again to stop repatative fire
alias +.rocketjump "+.rj+"
alias -.rocketjump "-.rj+"
alias +.rj+ "m_customaccel 1;wait;m_customaccel_scale 0.05;wait;alias +.rocketjump +.rj-"
//                   ^-----------------^--turning ingame mouse accselaration on for quick under feet aiming
alias -.rj+ "+jump;wait;+duck;wait;+moveup;wait;m_customaccel 0;wait;m_customaccel_scale 0;wait;+attack;wait;alias -.rocketjump -.rj-"
alias +.rj- "-attack;wait;alias +.rocketjump +.rj+"
alias -.rj- "-jump;wait;-duck;wait;-moveup;wait;alias -.rocketjump -.rj+"

//unbind and bind part that is under better done in soldier.cfg configuration file 

unbind mouse2
bind mouse2 +.rocketjump

//in all others config files like spy.cfg bind right mouse button to alternative attack
//in spy.cfg
//unbind mouse2
//bind mouse2 attack2

Total Weapon Interface Redesign

This is a total redesign of the weapons interface.
Features:
1: Mouse2 pulls melee and then re-binds to swing it (for fast reaction shovels)
2: Mouse1 pulls last weapon if on melee and re-binds to fire it
3: 'Q' Swaps the current Mouse1 weapon between shotty and rocket launcher
This script could use some more management modifications as it's still not as clean as I would like it to be and I think some of it could be scripted a little cleaner/better. However the interface itself works and I am of the impression that this is the single most efficient way to play the soldier class. It saves both time and effort when playing and is a very natural weapons interface.
  • Note: I also am making use of an outside .cfg to clear key input it is defined below
// clear.cfg
// for remapping binds and cleaning things up
// you can exec autoexec as well but I like to keep things simple
bind "MOUSE5" ""
bind "MOUSE3" ""
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind "q" "lastinv"
// Soldier.cfg remap -> Provided by Mordentral / M72 The LAW-BOOM BOOM

// Remap defaults
exec clear.cfg

alias +swap1 "slot3; +attack; alias +m1bind +swap2; alias -m1bind -swap2; alias +m2bind +attack; alias -m2bind -attack"
alias -swap1 "-attack"

alias "+m2bind" "+swap1"
alias "-m2bind" "-swap1"
bind "MOUSE2" "+m2bind"

alias +swap2 "slot1; +attack; alias +sht1 +swap3; alias -sht1 -swap3; alias +m1bind +normaatkkreload; alias -m1bind -normaatkkreload; alias +m2bind +swap1; alias -m2bind -swap1"
alias -swap2 "-attack"
alias +normaatkkreload "+attack"
alias -normaatkkreload "-attack"

alias "+m1bind" "+swap2"
alias "-m1bind" "-swap2"
bind "MOUSE1" "+m1bind"

alias +swap3 "slot2; +attack; alias +m1bind +attack; alias -m1bind -attack; alias +sht1 +swap2; alias -sht1 -swap2; alias +m2bind +swap1; alias -m2bind -swap1"
alias -swap3 "-attack"

alias "+sht1" "+swap3"
alias "-sht1" "-swap3"

bind "q" "+sht1;"
Posted by mordentral


//Soldier Controls Redesign

//mouse 1: fire
//mouse 2: hold to switch to shotgun, release to switch to rocket launcher
//mouse 3: switch to equalizer, release to switch to rocket launcher
//mouse 5: spy alert
//q key: sentry ahead
//e key: medic call
//r key: go!go!go! call, then battle cry
//f key: incoming, then help call


alias +shoot "-reload;+attack;"
alias -shoot "-attack;+reload;"


alias switch_rocket  "slot1;alias FTRS_I "FTRS_R_I";alias FTRS_D "FTRS_R_D""
alias switch_shotgun "slot2;alias FTRS_I "FTRS_S_I";alias FTRS_D "FTRS_S_D""
alias switch_melee   "slot3"


alias +secondary switch_shotgun
alias -secondary switch_rocket

alias +melee switch_melee
alias -melee switch_rocket

alias alert_spy      "voicemenu 1 1"
alias alert_sentry   "voicemenu 1 2"
alias alert_help     "voicemenu 0 0;wait 100;voicemenu 2 0"
alias alert_charge   "voicemenu 0 2;wait 100;voicemenu 2 1"
alias alert_incoming "voicemenu 1 0;wait 100;voicemenu 2 0"
alias alert_left     "voicemenu 0 4"
alias alert_right    "voicemenu 0 5"
alias alert_forward  "voicemenu 0 3"

bind "MOUSE1" +shoot

bind "MOUSE2" +secondary

bind "MOUSE3" +melee

bind "MOUSEWHEEL_FORWARD" 

bind "MOUSE5" alert_spy

bind "q" alert_sentry
bind "e" alert_help
bind "r" alert_charge
bind "f" alert_incoming
bind "1" alert_left
bind "2" alert_forward
bind "3" alert_right

//please post bugs/etc to user page.
Posted by bloodmage2


Personal tools