Sharky's Quickscope Script

A Config Script for Team Fortress 2

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Sharky! points.
  • Post: Give Sharky! your thoughts on this Script.
  • Vote: Help Sharky! win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Stop Lurking!

Sign up

Already a Bananite? Login

21 lines | 941 bytes | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Sharky's "Quickscope" Script

//First we need a little something that doesn't let this script work if the server you're playing on doesn't have the wait command enabled.
alias waitTester "alias waitTest waitPositive; wait; waitTest"
alias wait "alias waitTest waitNegative"
alias waitPositive "bind mouse5 s_quickscope_switch"
alias waitNegative "bind mouse5 none"
//Wait tester was taken from the TF2 Wiki
//Check it out here: http://wiki.teamfortress.com/wiki/Scripting#Wait-testing

//Now on to my part
alias none ""
alias s_quickscope "+attack2; wait 50; +attack; -attack2; wait 11; -attack"
//Toggle
alias s_quickscope_on "bind mouse2 s_quickscope; cl_autorezoom 0; alias s_quickscope_switch s_quickscope_off"
alias s_quickscope_off "bind mouse2 +attack2; cl_autorezoom 1; alias s_quickscope_switch s_quickscope_on"
alias s_quickscope_switch none
//Binds
bind mouse5 s_quickscope_switch
s_quickscope_off
waitTester
Copy and paste the script into your "sniper.cfg".
If you don't have a sniper.cfg, just create one.

This script allows you to toggle quickscope mode on and off (starts at off).

"Quickscope mode" makes pressing mouse2 do a quickzoom-shot. Basically what you would think it would do.
You can change the button that toggles quickscope mode by just replacing "mouse5" with your desired button.

Posts

  • 11mo
    Zurkov avatar
    Zurkov Offline
    Member Joined 9y
    3,416 points Ranked 1372nd
    12 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    Posted by Sharky!
    Posted by Zurkov
    There's a delay before headshots crit, so if it shoots early it won't work.
    Yea, it works. I've tested it again and again to make sure it does.
    Keep in mind that the wait command works by waiting the specified number of frames before continuing, so people whose computers get better FPS will have shorter "waits" than others.

    I would also like to mention that it's improper to rebind keys in the middle of a script. It makes it much harder to find all instances of a bound key in order to change it. I strongly recommend that you just bind an alias to each key and then redefine those aliases instead of rebinding every time a key needs to do something different.
    Ideally, every bind command will be together at the top or bottom of a script to make them easier to bind to different keys.

    You can also streamline things a little by directly defining an alias as "", like you do with your "none" alias, instead of defining an extra alias and using that. If the problem is trying to define it that way in the middle of a line, you can still do it without quotation marks by just leaving the rest blank (e.g.: commands; alias null ; commands).
     avatar
    Mantra
  • 11mo
    Sharky! avatar
    Sharky! Offline
    Member Joined 1y
    194 points Ranked 18351st
    Posted by Zurkov

    Does this actually work? There's a very short delay whenever you scope in where headshots do not crit, so if it shoots too soon after scoping it won't work as intended.

    Also, it still warms my heart to see people use wait-testing.

    Yea, it works. I've tested it again and again to make sure it does.
    I code when I'm bored
  • 11mo
    Zurkov avatar
    Zurkov Offline
    Member Joined 9y
    3,416 points Ranked 1372nd
    12 medals 1 rare
    • 6 years a member Medal icon
    • Reached 1,000 Points Medal icon
    • 1 post awarded Exemplary Feedback Medal icon
    • 5 posts awarded Exemplary Feedback Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    Does this actually work? There's a very short delay whenever you scope in where headshots do not crit, so if it shoots too soon after scoping it won't work as intended.

    Also, it still warms my heart to see people use wait-testing.
     avatar
    Mantra

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Key Authors
Sharky!
Sharky! Offline
Member Joined 1y
194 points Ranked 18351st
Put together the script
TF2 Wiki
Provided the wait tester

Submitter

Sharky! avatar
Sharky! Offline
Member Joined 1y
194 points Ranked 18351st

Sharky!
Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Stats

Posts
3
Views
2,885
Date Added
11mo
Date Modified
11mo
bcp.crwdcntrl.net tracking pixel