The Game Modding Community - Since 2001

Sharky's Quickscope Script

A Config Script for Team Fortress 2

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

  • 2y
    Zurkov avatar
    Zurkov Joined 10y ago
    Offline
    3,416 points Ranked 1466th
    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
  • 2y
    Sharky! avatar
    Sharky! Joined 2y ago
    Offline
    194 points Ranked 19748th
    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
  • 2y
    Zurkov avatar
    Zurkov Joined 10y ago
    Offline
    3,416 points Ranked 1466th
    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

Embed

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

Credits

Key Authors
Sharky!
Sharky! Joined 2y ago
Offline
194 points Ranked 19748th
Put together the script
TF2 Wiki
Provided the wait tester

Submitter

Sharky! avatar
Sharky! Joined 2y ago
Offline
194 points Ranked 19748th

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

Category

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+

Stats

  • 3,657 Views
  • 3 Posts
  • 2y Submitted
  • 2y Modified

Scores

  • Not yet rated
Sign up to access this!

Hey, you! Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Stop Lurking! Sign up now!

Already a Bananite? Login

bcp.crwdcntrl.net tracking pixel