Difference between revisions of "User:Lord Manship/scripts"
Lord Manship (talk | contribs) m (Forgot to add a + to the reload in the join class script) |
Lord Manship (talk | contribs) m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{User:Lord_Manship/header}} | {{User:Lord_Manship/header}} | ||
== Client Scripts == | == Client Scripts == | ||
+ | |||
+ | === Shift Switch script === | ||
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. | 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. | ||
Line 6: | Line 8: | ||
You can of course change the bindings to suit you more, but this is how I've setup my bindings. | You can of course change the bindings to suit you more, but this is how I've setup my bindings. | ||
− | <code> | + | <code><br/> |
+ | <br/> | ||
+ | <br/> | ||
+ | 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;bind v dbs;<br/> bind y voicemenu22; bind u voicemenu23;bind f voicemenu12;bind i voicemenu27;bind c voicemenu20;bind z voicemenu02"<br/> | ||
+ | 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; bind v +inspect;bind y voicemenu06;bind u voicemenu07; bind f +use_action_slot_item; bind i voicemenu01; bind c voice_menu_3; bind z voice_menu_1"<br/> | ||
+ | alias scout "join_class scout; wait 50; voicemenu21"<br/> | ||
+ | alias sol "join_class soldier; wait 50; voicemenu21"<br/> | ||
+ | alias pyro "join_class pyro; wait 50; voicemenu21"<br/> | ||
+ | alias demoman "join_class demoman; wait 50; voicemenu21"<br/> | ||
+ | alias heavy "join_class heavyweapons; wait 50; voicemenu21"<br/> | ||
+ | alias engi "join_class engineer; wait 50; voicemenu21;build 1 0"<br/> | ||
+ | // When you switch to Engineer, you automatically get out your teleporter.<br/> | ||
+ | alias medic "join_class medic; wait 50; voicemenu21"<br/> | ||
+ | alias sniper "join_class sniper; wait 50; voicemenu21"<br/> | ||
+ | alias spy "join_class spy; disguiseRandom; wait 100; voicemenu21"<br/> | ||
+ | // When you switch to Spy, you automatically disguise to a random class of the enemy.<br/> | ||
+ | alias dbs "destroy 2 0; wait 20; build 2 0; wait 20; +attack; wait 30; -attack; slot2; wait 20; slot1"<br/> | ||
+ | // Destroy, then Build Sentry (DBS)<br/> | ||
+ | // Switches back to your Shotgun, if you have no ammo, switches to your pistol.<br/> | ||
+ | // If you don't have ammo for either, you keep your wrench out.<br/> | ||
+ | alias "voicemenu00" "voicemenu 0 0"<br/> | ||
+ | // MEDIC!<br/> | ||
+ | alias "voicemenu10" "voicemenu 1 0"<br/> | ||
+ | // Incoming!<br/> | ||
+ | alias "voicemenu11" "voicemenu 1 1"<br/> | ||
+ | // SPY!<br/> | ||
+ | alias "voicemenu16" "voicemenu 1 6"<br/> | ||
+ | // Activate Charge!<br/> | ||
+ | alias "voicemenu17" "voicemenu 1 7"<br/> | ||
+ | // UBER Ready!<br/> | ||
+ | alias "voicemenu12" "voicemenu 1 2"<br/> | ||
+ | // Sentry Ahead!<br/> | ||
+ | alias "voicemenu06" "voicemenu 0 6"<br/> | ||
+ | // Yes.<br/> | ||
+ | alias "voicemenu07" "voicemenu 0 7"<br/> | ||
+ | // No.<br/> | ||
+ | alias "voicemenu22" "voicemenu 2 2"<br/> | ||
+ | // Cheers<br/> | ||
+ | alias "voicemenu23" "voicemenu 2 3"<br/> | ||
+ | // Jeers<br/> | ||
+ | alias "voicemenu27" "voicemenu 2 7"<br/> | ||
+ | // Good Job.<br/> | ||
+ | alias "voicemenu01" "voicemenu 0 1"<br/> | ||
+ | // Thanks!<br/> | ||
+ | alias "voicemenu20" "voicemenu 2 0"<br/> | ||
+ | // Help!<br/> | ||
+ | alias "voicemenu02" "voicemenu 0 2"<br/> | ||
+ | // Go Go Go!<br/> | ||
+ | alias "voicemenu21" "voicemenu 2 1"<br/> | ||
+ | // Battle Cry.<br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | // Spy Disguise Randomiser<br/> | ||
+ | // Defining disguises...<br/> | ||
+ | alias disScout "disguise 1 -1"<br/> | ||
+ | alias disSoldier "disguise 3 -1"<br/> | ||
+ | alias disPyro "disguise 7 -1"<br/> | ||
+ | alias disDemo "disguise 4 -1"<br/> | ||
+ | alias disHeavy "disguise 6 -1"<br/> | ||
+ | alias disEngi "disguise 9 -1"<br/> | ||
+ | alias disMedic "disguise 5 -1"<br/> | ||
+ | alias disSniper "disguise 2 -1"<br/> | ||
+ | alias disSpy "disguise 8 -1"<br/> | ||
+ | <br/> | ||
+ | alias disguiseRandom "disScout"<br/> | ||
+ | <br/> | ||
+ | alias disSTART ""<br/> | ||
+ | alias dis2 ""<br/> | ||
+ | alias dis3 ""<br/> | ||
+ | alias dis4 ""<br/> | ||
+ | alias dis5 ""<br/> | ||
+ | alias dis6 ""<br/> | ||
+ | alias dis7 ""<br/> | ||
+ | alias dis8 ""<br/> | ||
+ | alias dis9 ""<br/> | ||
+ | alias disSTART "wait 10; disSTART_ALIAS; dis2"<br/> | ||
+ | alias disSTART_ALIAS alias disguiseRandom "disSoldier"<br/> | ||
+ | alias dis2 "wait 10; dis2_ALIAS; dis3"<br/> | ||
+ | alias dis2_ALIAS alias disguiseRandom "disPyro"<br/> | ||
+ | alias dis3 "wait 10; dis3_ALIAS; dis4"<br/> | ||
+ | alias dis3_ALIAS alias disguiseRandom "disDemo"<br/> | ||
+ | alias dis4 "wait 10; dis4_ALIAS; dis5"<br/> | ||
+ | alias dis4_ALIAS alias disguiseRandom "disHeavy"<br/> | ||
+ | alias dis5 "wait 10; dis5_ALIAS; dis6"<br/> | ||
+ | alias dis5_ALIAS alias disguiseRandom "disEngi"<br/> | ||
+ | alias dis6 "wait 10; dis6_ALIAS; dis7"<br/> | ||
+ | alias dis6_ALIAS alias disguiseRandom "disMedic"<br/> | ||
+ | alias dis7 "wait 10; dis7_ALIAS; dis8"<br/> | ||
+ | alias dis7_ALIAS alias disguiseRandom "disSniper"<br/> | ||
+ | alias dis8 "wait 10; dis8_ALIAS; dis9"<br/> | ||
+ | alias dis8_ALIAS alias disguiseRandom "disSpy"<br/> | ||
+ | alias dis9 "wait 10; dis9_ALIAS; disSTART"<br/> | ||
+ | alias dis9_ALIAS alias disguiseRandom "disScout"<br/> | ||
+ | disSTART<br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | <br/> | ||
+ | </code> | ||
+ | |||
+ | |||
+ | === Voice Toggle/Hold Script === | ||
+ | I created a script that allows me to either hold a key to voice chat, or tap it to keep it on. | ||
− | + | <code><br/> | |
− | + | // Voice Toggle/Hold Script by Lord_Manship<br/> | |
− | + | // This script allows you to either tap the voice key to keep it on, or hold it until you are done using it. Tap it again to turn it off.<br/> | |
− | + | <br/> | |
− | + | <br/> | |
− | + | alias recordON "+voicerecord; bind CHANGEME!!! recordOFF; recordHOLD_RESET; wait 50; recordHOLD_ONCE"<br/> | |
− | alias | + | alias recordOFF "-voicerecord; bind CHANGEME!!! recordON; recordHOLD_STOP"<br/> |
− | alias | + | alias +recordHOLD "+voicerecord" // Probably not needed since +voicerecord is already on, but kept incase something goes wrong.<br/> |
− | alias | + | alias -recordHOLD "recordOFF"<br/> |
− | alias | + | alias recordHOLD_ONCE "bind CHANGEME!!! +recordHOLD"<br/> |
− | alias | + | alias recordHOLD_RESET "alias recordHOLD_ONCE recordHOLD_DATA"<br/> |
− | <br /> | + | alias recordHOLD_DATA "bind CHANGEME!!! +recordHOLD"<br/> |
− | alias " | + | alias recordHOLD_STOP alias recordHOLD_ONCE ""<br/> |
− | + | <br/> | |
− | alias " | + | bind CHANGEME!!! "recordON"<br/> |
− | + | // Change all CHANGEME!!!s to a key of your choosing. EX: kp_plus (Keypad +)<br/> | |
− | alias " | ||
− | |||
− | |||
− | // | ||
− | |||
− | |||
− | |||
− | |||
</code> | </code> | ||
+ | |||
+ | |||
== Server Scripts == | == Server Scripts == | ||
− | I use | + | I use these 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 | + | 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 spawn. |
<code> | <code> |
Latest revision as of 12:20, 6 October 2015
Client Scripts
Shift Switch script
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;bind v dbs;
bind y voicemenu22; bind u voicemenu23;bind f voicemenu12;bind i voicemenu27;bind c voicemenu20;bind z voicemenu02"
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; bind v +inspect;bind y voicemenu06;bind u voicemenu07; bind f +use_action_slot_item; bind i voicemenu01; bind c voice_menu_3; bind z voice_menu_1"
alias scout "join_class scout; wait 50; voicemenu21"
alias sol "join_class soldier; wait 50; voicemenu21"
alias pyro "join_class pyro; wait 50; voicemenu21"
alias demoman "join_class demoman; wait 50; voicemenu21"
alias heavy "join_class heavyweapons; wait 50; voicemenu21"
alias engi "join_class engineer; wait 50; voicemenu21;build 1 0"
// When you switch to Engineer, you automatically get out your teleporter.
alias medic "join_class medic; wait 50; voicemenu21"
alias sniper "join_class sniper; wait 50; voicemenu21"
alias spy "join_class spy; disguiseRandom; wait 100; voicemenu21"
// When you switch to Spy, you automatically disguise to a random class of the enemy.
alias dbs "destroy 2 0; wait 20; build 2 0; wait 20; +attack; wait 30; -attack; slot2; wait 20; slot1"
// Destroy, then Build Sentry (DBS)
// Switches back to your Shotgun, if you have no ammo, switches to your pistol.
// If you don't have ammo for either, you keep your wrench out.
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!
alias "voicemenu12" "voicemenu 1 2"
// Sentry Ahead!
alias "voicemenu06" "voicemenu 0 6"
// Yes.
alias "voicemenu07" "voicemenu 0 7"
// No.
alias "voicemenu22" "voicemenu 2 2"
// Cheers
alias "voicemenu23" "voicemenu 2 3"
// Jeers
alias "voicemenu27" "voicemenu 2 7"
// Good Job.
alias "voicemenu01" "voicemenu 0 1"
// Thanks!
alias "voicemenu20" "voicemenu 2 0"
// Help!
alias "voicemenu02" "voicemenu 0 2"
// Go Go Go!
alias "voicemenu21" "voicemenu 2 1"
// Battle Cry.
// Spy Disguise Randomiser
// Defining disguises...
alias disScout "disguise 1 -1"
alias disSoldier "disguise 3 -1"
alias disPyro "disguise 7 -1"
alias disDemo "disguise 4 -1"
alias disHeavy "disguise 6 -1"
alias disEngi "disguise 9 -1"
alias disMedic "disguise 5 -1"
alias disSniper "disguise 2 -1"
alias disSpy "disguise 8 -1"
alias disguiseRandom "disScout"
alias disSTART ""
alias dis2 ""
alias dis3 ""
alias dis4 ""
alias dis5 ""
alias dis6 ""
alias dis7 ""
alias dis8 ""
alias dis9 ""
alias disSTART "wait 10; disSTART_ALIAS; dis2"
alias disSTART_ALIAS alias disguiseRandom "disSoldier"
alias dis2 "wait 10; dis2_ALIAS; dis3"
alias dis2_ALIAS alias disguiseRandom "disPyro"
alias dis3 "wait 10; dis3_ALIAS; dis4"
alias dis3_ALIAS alias disguiseRandom "disDemo"
alias dis4 "wait 10; dis4_ALIAS; dis5"
alias dis4_ALIAS alias disguiseRandom "disHeavy"
alias dis5 "wait 10; dis5_ALIAS; dis6"
alias dis5_ALIAS alias disguiseRandom "disEngi"
alias dis6 "wait 10; dis6_ALIAS; dis7"
alias dis6_ALIAS alias disguiseRandom "disMedic"
alias dis7 "wait 10; dis7_ALIAS; dis8"
alias dis7_ALIAS alias disguiseRandom "disSniper"
alias dis8 "wait 10; dis8_ALIAS; dis9"
alias dis8_ALIAS alias disguiseRandom "disSpy"
alias dis9 "wait 10; dis9_ALIAS; disSTART"
alias dis9_ALIAS alias disguiseRandom "disScout"
disSTART
Voice Toggle/Hold Script
I created a script that allows me to either hold a key to voice chat, or tap it to keep it on.
// Voice Toggle/Hold Script by Lord_Manship
// This script allows you to either tap the voice key to keep it on, or hold it until you are done using it. Tap it again to turn it off.
alias recordON "+voicerecord; bind CHANGEME!!! recordOFF; recordHOLD_RESET; wait 50; recordHOLD_ONCE"
alias recordOFF "-voicerecord; bind CHANGEME!!! recordON; recordHOLD_STOP"
alias +recordHOLD "+voicerecord" // Probably not needed since +voicerecord is already on, but kept incase something goes wrong.
alias -recordHOLD "recordOFF"
alias recordHOLD_ONCE "bind CHANGEME!!! +recordHOLD"
alias recordHOLD_RESET "alias recordHOLD_ONCE recordHOLD_DATA"
alias recordHOLD_DATA "bind CHANGEME!!! +recordHOLD"
alias recordHOLD_STOP alias recordHOLD_ONCE ""
bind CHANGEME!!! "recordON"
// Change all CHANGEME!!!s to a key of your choosing. EX: kp_plus (Keypad +)
Server Scripts
I use these 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 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..."