PDA

View Full Version : Useful TF2 Scripts


TrashedDT
January 9th, 2008, 03:01 PM
In this thread I'd like to start discuss about useful TF2 scripts players have come upon. Note the "bind" commands to know how to initiate the scripts from in-game. If you don't know how to use these scripts check out this how-to (http://community.phlorph.com/showthread.php?t=51).

Here are some good scripts I've found useful:

Soldier Uber Rocket Jump
//Rocket Jump
alias +rocketjump "+jump; +duck; wait; +attack"
alias -rocketjump "-jump; -attack; wait; wait; wait; -duck"
bind "f" "+rocketjump"

Toggle the Net Graph that shows ping and fps
//toggle netgraph
alias ngrfon4 "net_graph 2; net_graphwidth 192; net_graphheight 64; bind KP_INS ngrffps"
alias ngrffps "net_graph 0; cl_showfps 1; bind KP_INS ngrfoff"
alias ngrfoff "cl_showfps 0; bind KP_INS ngrfon4"
bind KP_INS "ngrffps"

Turn the Numpad into Class Selector
Note: for this to work you must have a coordinating cfg file for each class in your cfg (http://community.phlorph.com/showthread.php?t=51) folder. The filenames needed are shown in bold in the code.
//Class Config Switcher with Config Loader
alias scout "play vo\scout_battlecry01; join_class scout;exec scout.cfg; developer 1; echo ::Scout Config Loaded::; wait 200; developer 0"
alias soldier "play vo\soldier_battlecry01; join_class soldier; exec soldier.cfg; developer 1; echo ::Soldier Config Loaded::; wait 200; developer 0"
alias pyro "play vo\pyro_battlecry01; join_class pyro; exec pyro.cfg; developer 1; echo ::Pyro Config Loaded::; wait 200; developer 0"
alias demo "play vo\demoman_battlecry01; join_class demoman; exec demo.cfg; developer 1; echo :Demoman Config Loaded::; wait 200; developer 0"
alias heavy "play vo\heavy_battlecry01; join_class heavyweapons; exec heavy.cfg; developer 1; echo ::Heavy Config Loaded::; wait 200; developer 0"
alias engineer "play vo\engineer_battlecry01; join_class engineer; exec engineer.cfg; developer 1; echo ::Engineer Config Loaded::; wait 200; developer 0"
alias medic "play vo\medic_battlecry01; join_class medic; exec medic.cfg; developer 1; echo ::Medic Config Loaded::; wait 200; developer 0"
alias sniper "play vo\sniper_battlecry01; join_class sniper; exec sniper.cfg; developer 1; echo ::Sniper Config Loaded::; wait 200; developer 0"
alias spy "play vo\spy_battlecry01; join_class spy; exec spy.cfg; developer 1; echo ::Spy Config Loaded::; wait 200; developer 0"

bind KP_END "scout"
bind KP_DOWNARROW "soldier"
bind KP_PGDN "pyro"
bind KP_LEFTARROW "demo"
bind KP_5 "heavy"
bind KP_RIGHTARROW "engineer"
bind KP_HOME "medic"
bind KP_UPARROW "sniper"
bind KP_PGUP "spy"

Duck Jump
// Classic Jump-Duck aka Big Jump to replace normal jump entirely
// To Rocketjump, just Big Jump while looking down and fire rocket
// To Bombjump, just Big Jump while running over a stickybomb then detonate it(right click)
// Simplifies double jumps made by a scout as well.

alias "+jumpduck" "+jump; +duck"
alias "-jumpduck" "-jump; -duck"
bind SPACE +jumpduck

Engineer Insta-Build and Destroy
//BUILD MENU Instabuild mode
alias buildsentry "build 3; wait 50; +attack; wait 50; -attack; wait; slot1"
alias builddispenser "build 0; wait 50; +attack; wait 50; -attack; wait; slot1"
alias buildentry "build 1; wait 50; +attack; wait 50; -attack; wait; slot1"
alias buildexit "build 2; wait 50; +attack; wait 50; -attack; wait; slot1"
bind "F1" "buildsentry"
bind "F2" "builddispenser"
bind "F3" "buildentry"
bind "F4" "buildexit"

//Destroy Menu
alias destroysentry "destroy 3; wait 50; slot1"
alias destroydispenser "destroy 0; wait 50; slot1"
alias destroyentry "destroy 1; wait 50; slot1"
alias destroyexit "destroy 2; wait 50; slot1"
bind "F5" "destroysentry"
bind "F6" "destroydispenser"
bind "F7" "destroyentry"
bind "F8" "destroyexit"

Right Click Swing Melee
Good for engineer and scout scripts
//HOLD DOWN MOUSE2 TO SWING MELEE THEN LETTING GO SWITCHES BACK TO LAST WEAPON
alias +upgrade1 "slot3; +attack; wait 5; -attack; wait 5; +attack"
alias -upgrade1 "-attack; wait; lastinv"
bind "mouse2" "+upgrade1"

Minigun Auto-spin
//Minigun auto-spin********************************************** *********
alias +togglespinning "+spin"
alias -togglespinning "-spin"

alias toggle "stop"
alias start "alias toggle stop; alias -togglespinning -spin"
alias stop "alias toggle start; alias -togglespinning -nspin"

alias +spin "use tf_weapon_minigun"
alias -spin "+attack2;toggle"
alias -nspin "-attack2;toggle"

bind "f" "+togglespinning"
//************************************************** ************************

Toggle Medic Healing
//Medic Heal toggle script
alias toggle_medic "toggle_medic1"
alias toggle_medic1 "wait;+attack;alias toggle_medic toggle_medic2"
alias toggle_medic2 "-attack; alias toggle_medic toggle_medic1"
bind "f" toggle_medic

Spy Quick Disguise
// Spy Quick Disguise
// ==================
alias spy_cycle_r2 "disguise 3 0; alias spy_cycleup spy_cycle_r3; alias spy_cycledn spy_cycle_r8; alias spy_colorswap spy_cycle_b2; spy_red"
alias spy_cycle_r3 "disguise 7 0; alias spy_cycleup spy_cycle_r4; alias spy_cycledn spy_cycle_r2; alias spy_colorswap spy_cycle_b3; spy_red"
alias spy_cycle_r4 "disguise 4 0; alias spy_cycleup spy_cycle_r5; alias spy_cycledn spy_cycle_r3; alias spy_colorswap spy_cycle_b4; spy_red"
alias spy_cycle_r5 "disguise 6 0; alias spy_cycleup spy_cycle_r6; alias spy_cycledn spy_cycle_r4; alias spy_colorswap spy_cycle_b5; spy_red"
alias spy_cycle_r6 "disguise 9 0; alias spy_cycleup spy_cycle_r7; alias spy_cycledn spy_cycle_r5; alias spy_colorswap spy_cycle_b6; spy_red"
alias spy_cycle_r7 "disguise 5 0; alias spy_cycleup spy_cycle_r8; alias spy_cycledn spy_cycle_r6; alias spy_colorswap spy_cycle_b7; spy_red"
alias spy_cycle_r8 "disguise 2 0; alias spy_cycleup spy_cycle_r2; alias spy_cycledn spy_cycle_r7; alias spy_colorswap spy_cycle_b8; spy_red"

alias spy_cycle_b2 "disguise 3 1; alias spy_cycleup spy_cycle_b3; alias spy_cycledn spy_cycle_b8; alias spy_colorswap spy_cycle_r2; spy_blu"
alias spy_cycle_b3 "disguise 7 1; alias spy_cycleup spy_cycle_b4; alias spy_cycledn spy_cycle_b2; alias spy_colorswap spy_cycle_r3; spy_blu"
alias spy_cycle_b4 "disguise 4 1; alias spy_cycleup spy_cycle_b5; alias spy_cycledn spy_cycle_b3; alias spy_colorswap spy_cycle_r4; spy_blu"
alias spy_cycle_b5 "disguise 6 1; alias spy_cycleup spy_cycle_b6; alias spy_cycledn spy_cycle_b4; alias spy_colorswap spy_cycle_r5; spy_blu"
alias spy_cycle_b6 "disguise 9 1; alias spy_cycleup spy_cycle_b7; alias spy_cycledn spy_cycle_b5; alias spy_colorswap spy_cycle_r6; spy_blu"
alias spy_cycle_b7 "disguise 5 1; alias spy_cycleup spy_cycle_b8; alias spy_cycledn spy_cycle_b6; alias spy_colorswap spy_cycle_r7; spy_blu"
alias spy_cycle_b8 "disguise 2 1; alias spy_cycleup spy_cycle_b2; alias spy_cycledn spy_cycle_b7; alias spy_colorswap spy_cycle_r8; spy_blu"

alias spy_red "alias spy2 spy_cycle_r2;alias spy3 spy_cycle_r3;alias spy4 spy_cycle_r4;alias spy5 spy_cycle_r5;alias spy6 spy_cycle_r6;alias spy7 spy_cycle_r7;alias spy8 spy_cycle_r8"
alias spy_blu "alias spy2 spy_cycle_b2;alias spy3 spy_cycle_b3;alias spy4 spy_cycle_b4;alias spy5 spy_cycle_b5;alias spy6 spy_cycle_b6;alias spy7 spy_cycle_b7;alias spy8 spy_cycle_b8"

spy_cycle_b6 // Initialize script and disguise as a Blue Sniper. Alter to taste.

bind "F1" "spy_colorswap" // Swaps to the other team color and starts a disguise of the last class you selected.
bind "F2" "spy2" // Disguise as Current Color Soldier
bind "F3" "spy3" // Disguise as Current Color Pyro
bind "F4" "spy4" // Disguise as Current Color Demoman
bind "F5" "spy5" // Disguise as Current Color Heavy
bind "F6" "spy6" // Disguise as Current Color Engineer
bind "F7" "spy7" // Disguise as Current Color Medic
bind "F8" "spy8" // Disguise as Current Color Sniper
bind "F9" "disguise 8 0" // Swap to opposite color.

[IV]Paladyne
September 3rd, 2008, 01:05 AM
I'm betting most of these were from TFC - I think the engy one was to select from the old-style build menus. :)

anyhow, here's one that some of our pyros might enjoy (provided they're not too laggy, anyway)...

// ************************************************** *********
alias +flameon "slot1; wait; +attack"
alias -flameon "-attack; wait; lastinv"
bind "f" "+flameon"
// ************************************************** *********

This script swaps to the flamethrower and burns as long as F is held down, then reverts to the previously held weapon when released. Change "F" to whatever makes the most sense to you.

This means you can run around with the shotgun or flare gun (or axestinguisher if you're one of those badass pyros! ;) ) and when you bump into somebody rounding a corner or close to flamethrower range, let it rip till you're done. You'll automatically swap back to whatever you were holding beforehand, letting you finish them at range or get in some critical axe hits.

There's a slight delay between when you pull out the flamethrower and when it starts firing; if you have a particularly low ping, you can probably remove the "wait;"s and you'll be fine.



// ************************************************** *********
bind "pause" "-attack; wait; -attack2; wait; -jump; wait; -duck; wait; -forward"
// ************************************************** *********

This one is just a little insurance; anytime you use a script, particularly the more complicated ones like the Minigun Auto Spin script above, there's a chance it'll get interrupted in the middle and prevent you from attacking because it thinks you're still holding down the right mouse button (+attack2), or you'll keep jumping, or whatever. It doesn't happen often but is annoying when it does. For that reason, I keep a reset button handy to erase any obnoxious effects so I can get on with my life. ;) Again, change "pause" to a button of your choice.