Clank’s script shop – Useful-ish
Come one come all. Stock up on scripts! Can’t have an autopistol without scripts!
So in the desire for content and my laziness to make some pics for the 10 or so other articles I’ve had ready to publish for months, I’m gonna do something completely different. One that doesn’t require me to fire up GMod or go through my screenshots or draw something. I’m going to dump some of my scripts upon the hapless readerbase of UC!
So let’s get started.
First up, if you don’t or haven’t used scripts before, they’re in team fortress 2\tf\cfg. If you don’t know where this is, I recommend you get a job, pr a PC.
And how it works is basically every time you switch classes, the command lines in that file get executed from top to bottom. I’ll try to accommodate anyone who’s never used any, but I won’t go into fine details either if it’s deep.
Before adding anything else, you’ll want to add defaulters so that whatever you change for a specific class gets reset, thrown. Common to mine are:
-attack; bind mouse1 +attack; bind mouse2 +attack2; bind 1 slot1; bind 2 slot2; bind 3 slot3; unbind CAPSLOCK; unbind semicolon; unbind '; unbind [; unbind ];
, but if you use more you may like to change those around, depending on what you have. If one of your binds for a class is different, you can either replace it (for example, replace bind 1 slot1 with bind 1 "slot1; +reload"), or just dump what you actually want below the lines that defaults things (it’ll overwrite them).
Now, on to the real deal.
Demoman
Targe bending script
Okay well, I was going to include this but Valve has gone and fixed that so I guess it’s moot.
Targe does seem much less effective now that it’s gone though, even with the buff.
(I was also going to include a Bonk! slowdown nullifier, but Valve has gone and made Bonk! Atomic Punch good, so go on. Use it.)
The Autofire Swapper 9000
//Demoman sticky autofire------------------------------------------
//Beta 1.0 - Code:
//Code taken from TF2wiki.net scout autopistol
alias "autofire" "bind mouse1 +demofire; bind 1 _primary; bind 2 _secondary; bind 3 _melee"
alias "regular" "bind mouse1 +attack; bind 1 slot1; bind 2 slot2; bind 3 slot3"
alias "autoDet" "bind mouse2 +demofire; bind 1 _primary2; bind 2 _secondary2; bind 3 _melee2"
alias "regularDet" "bind mouse2 +attack2; bind 1 slot1; bind 2 slot2; bind 3 slot3"
bind "semicolon" "regular"
bind ' "autofire"
bind "[" "regularDet"
bind "]" "autoDet"
// AutoFire
alias +autoshoot "alias repeat_function +repeat; +repeat"
alias -autoshoot "alias repeat_function stoprepeating"
alias repeat_function "+repeat"
alias +repeat "+attack; wait 6; -repeat"
alias -repeat "-attack; wait 6; repeat_function"
alias stoprepeating ""
alias +adet "alias repeat_function2 +repeat2; +repeat2"
alias -adet "alias repeat_function2 stoprepeating"
alias repeat_function2 "+repeat2"
alias +repeat2 "+attack2; wait 6; -repeat2"
alias -repeat2 "-attack2; wait 6; repeat_function2"
alias stoprepeating ""
alias _primary "slot1; alias +demofire +attack; alias -demofire -attack; -apistol"
alias _secondary "slot2; alias +demofire +apistol; alias -demofire -apistol"
alias _melee "slot3; alias +demofire +attack; alias -demofire -attack; -apistol"
alias _primary2 "slot1; alias +demofire +attack; alias -demofire -attack; -apistol; alias +demofire2 +attack2; alias -demofire2 -attack2; -adet"
alias _secondary2 "slot2; alias +demofire +apistol; alias -demofire -apistol; alias +demofire2 +adet; alias -demofire2 -adet"
alias _melee2 "slot3; alias +demofire +attack; alias -demofire -attack; -apistol; alias +demofire2 +attack2; alias -demofire2 -attack2; -adet"
//End of code------------------------------------------------------
Basically, press semicolon for regular stickies that can be charged and ‘ to autofire stickies, which will shoot them as fast as possible. I enjoy using the latter with assault Scottish Resistance demoman.
Press [ for regular detonation (cannot hold mouse2 in tandem with autofire), or press ] for automatic detonation. So press and hold mouse1, then press and hold mouse2, and you’ll spam stickies as fast as possible.
Don’t forget to press 2/slot2 to activate them once you’ve changed though.
WARNING: this script utilizes the “wait” command, which by default is not allowed on servers (and banned in competitive matches), and crashes your game. The UC servers allow the wait command, though, so drop on by.
Engineer
Destroyer script
bind "SEMICOLON" "destroy 3"
bind "'" "destroy 0"
bind "[" "destroy 1"
bind "]" "destroy 2"
What this does is allow you to remotely destroy buildings; sentries with semicolon, dispensers with ‘, entrances with [, and exits with ]. Well okay, not exactly useful per se, but I find it easier to destroy everything with this. Plus if you’re dead, you can deny someone a point.
Medic
Autoheal
For all you medics out there.
First, turn on “remember last active weapon” in multiplayer>advanced, and turn off the Valve autoheal. Now add this to your medic configs.
alias +reverse "-attack"
alias -reverse "+attack"
bind 1 "slot1; -attack; bind mouse1 +attack"
bind 2 "slot2; +attack; bind mouse1 +reverse"
bind 3 "slot3; -attack; bind mouse1 +attack"
bind "SEMICOLON" "bind mouse1 +attack; bind 1 slot1; bind 2 slot2; bind 3 slot3"
Now, when equipping your medigun, you’ll automatically latch on to anyone in front of you immediately.
“But Clank!” you yell. “Why can’t I just use the Valve autoheal noob?”
Well because the advantages of this script go way beyond Valve’s implemented autoheal.
1) You can heal without holding down the mouse, and hence getting tired
2) You heal faster than the Valve autoheal, which has a delay. Very bad.
3) You’ll automatically latch on to anyone. So you could, say, at setup, go get a cup of tea and not have to worry about whether you’re building uber or not (so long as your crosshair points a decent way)
“But but what if this causes me to accidentally heal spies?”
Well, firstly, the advantages are significant enough that your constant healing and uber building far surpasses any heals you might accidentally give Spies. Secondly, if you’re checking for everyone, that’s taking a lot of time out of potential uber building, which also means your team is horrible at firing a single shot. Lastly:
That is all.
Sniper
Hax script for aiming. Just wait for it to line up and hit the button.
VAC Warning: use of game altering cheat codes is strictly forbidden. Your attempt to distribute such has now resulted in your account being banned.
Spy
Well, I have just one for you.
bind ] "disguise 8 -2; slot3; wait 25; +attack2; wait 15; -attack2; taunt; wait 3; +attack2; wait 2; -attack2; wait 400; lastdisguise;"
This lets you repeatedly tap ] till you get an invisible taunt as the spy, useful for invisible taunting. However, due to the inherently unreliable nature of the wait command, you HAVE to tap ] until it actually executes. Sometimes I find it easier to just do it yourself.
WARNING: this script utilizes the “wait” command, which by default is not allowed on servers, and crashes your game. The UC servers allow the wait command, though.
Wrap-up
Well, that takes care of that. Feel free to add any comments, and perhaps suggestions for any scripts that could be useful. If you don’t have it and it’s just an idea, go ahead and post that too, and I’ll possibly work something out. Next issue if I continue to do this will either be more generic autoreload and viewmodels, or “fun” scripts.
I’ll be around on the forums (button on the top right hand corner), and if enough people are interested will start a thread. Clank out.
Secret Agent Clank! on June 10th 2010 in team fortress 2





























