User:Lord Manship/scripts
Client Scripts
I use this script quite often, and thought I would share with everyone. The original script "Join Class" was made by someone else, but I modified it to suit my needs.
To install, open <Steam Folder>\steamapps\common\team fortress 2\tf\cfg\autoexec.cfg
in your favourite text editor, and then copy the below code and paste into the text editor. Then save it, and launch TF2.
You can of course change the bindings to suit you more, but this is how I've setup my bindings.
alias +JOINCLASS "bind 1 scout; bind 2 sol; bind 3 pyro; bind 4 demoman; bind 5 heavy; bind 6 engi; bind 7 medic; bind 8 sniper; bind 9 spy; bind e voicemenu16; bind r +reload;bind q voicemenu17"
alias -JOINCLASS "bind 1 slot1; bind 2 slot2; bind 3 slot3; bind 4 slot4; bind 5 slot5; bind 6 slot6; bind 7 slot7; bind 8 slot8; bind 9 slot9; bind e voicemenu00; bind r voicemenu11; bind q voicemenu10"
alias scout "join_class scout"
alias sol "join_class soldier"
alias pyro "join_class pyro"
alias demoman "join_class demoman"
alias heavy "join_class heavyweapons"
alias engi "join_class engineer"
alias medic "join_class medic"
alias sniper "join_class sniper"
alias spy "join_class spy"
alias "voicemenu00" "voicemenu 0 0"
// MEDIC!
alias "voicemenu10" "voicemenu 1 0"
// Incoming!
alias "voicemenu11" "voicemenu 1 1"
// SPY!
alias "voicemenu16" "voicemenu 1 6"
// Activate Charge!
alias "voicemenu17" "voicemenu 1 7"
// UBER Ready!
bind shift "+joinclass"
Server Scripts
I use the on my server when using a new map, just saves a few seconds of typing. (WARNING: Requires sv_cheats be set to 1, it'll do the automatically, but if your not the server admin it won't work.) When you run this command it will set sv_cheats to 1, run nav_generate, add 23 TF bots, and then turn off sv_cheats. The server will lag a bit while calculating walking spaces and other things for the bots to actually be useful instead of just standing around in the spawn.
alias "tf_bot_setup" "echonav; echonav2; sv_cheats 1; nav_generate; wait 100; tf_bot_add 23; sv_cheats 0"
alias "echonav" "echo Setting up the map for bots..."
alias "echonav2" "echo Map will restart once the game has generated walking spaces for the bots..."