r/Tf2Scripts • • Jun 21 '14

Script Silly 360 No-Scope Script

7 Upvotes

For use with The Classic, this script is a little complicated. It comes in 3 flavors; one with the wait command and one without, and one easy-mode without the wait command. To install, just put in sniper.cfg. To initiate both scripts, you have to hold shift and hold the Left Mouse Button: Letting go of the LMB while still holding shift will fire The Classic (this does not apply to Flavor 3).


With the Wait Command


//--360 No-Scope Hold down Left Mouse Click whie SHIFT to 360 and let go to No Scope

alias +360shoot "cl_yawspeed 564; +right; wait 54.7; -right; -attack"  
alias -360shoot "cl_yawspeed 60; -right; +attack"

alias +enable "bind MOUSE1 +360shoot"
alias -enable "bind MOUSE1 +attack; -attack; -right"  

bind SHIFT +enable  

Basically, this variant first tries to mimic a quick 360 as accurately as possible. (Of course the wait command depends on a certain framerate by both the Server and Client as far as I'm aware, so this is not perfect for every time, nor for every setup. This 360 degree turn is based off of a client of 60 fps with a fairly good connection [not LAN, not poor connection]^)

After the almost-360 degree turn is complete, the player stops turning and then you are free to aim. When you re-lock onto your initial target, let go of the mouse to fire and do the sick noscope.


[Recommended] Without the wait command


//--360 No-Scope Hold down Left Mouse Click whie SHIFT to turn and let go to No Scope

alias +360shoot "cl_yawspeed 600; +right"  
alias -360shoot "cl_yawspeed 60; -right; +attack"

alias +enable "bind MOUSE1 +360shoot"
alias -enable "bind MOUSE1 +attack; -attack; -right"  

bind SHIFT +enable

Most servers disable the wait command, so I recommend using this one instead albeit being more difficult.

When you hold shift and then hold the LMB, your character will start turning. Upon letting go of LMB, your character will immediately stop and then start firing. It will not stop firing until you let go of shift. This is significantly harder because you have to have perfect timing, but it more accurately imitates the CoD style 360.

And finally...


Easy Mode 360 Turn without Wait command


//--360 No-Scope Hold down shift to start 360, and let go when the time is right

alias +360turn "cl_yawspeed 600; +right"  
alias -360turn "cl_yawspeed 60; -right"

bind SHIFT +360turn  

Holding down shift starts turning your character quickly, and letting go stops the character. Upon that time you can re-lock on to the target and fire. This is easier than Variant 2, but requires more timing than Variant 1.


r/Tf2Scripts • • Dec 08 '13

Script Advanced engineer script

7 Upvotes

Hey Folks,

I have created an advanced version of the common auto build script for engineers. The reason why I did this was that I do not have a button assigned to '+attack' so I was unable to place any buildings.

How it works:

  • Pressing 'F1' through 'F4' will bring up blueprints for sentry, dispenser, etc. and destroy eventual buildings already built.

  • Pressing the same button again will place the building.

  • Pressing a different button will bring up a different blueprint.

  • After placing a building you will hold your wrench.

The double tapping method works best for me so I decided to share my script.

The actual script (goes to your engineer.cfg):

//Instant Buildings
alias sentry            "destroy 2 0; build 2 0; alias +sentry-bind +building-build;"
alias dispenser         "destroy 0 0; build 0 0; alias +dispenser-bind +building-build;"
alias tp_enter          "destroy 1 0; build 1 0; alias +enter-bind +building-build;"
alias tp_exit           "destroy 1 1; build 1 0; alias +exit-bind +building-build;"

alias sentry-select     "alias +dispenser-bind dispenser-select; alias +enter-bind enter-select; alias +exit-bind exit-select; sentry;"
alias dispenser-select  "alias +sentry-bind sentry-select; alias +enter-bind enter-select; alias +exit-bind exit-select; dispenser;"
alias enter-select      "alias +sentry-bind sentry-select; alias +dispenser-bind dispenser-select; alias +exit-bind exit-select; tp_enter;"
alias exit-select       "alias +sentry-bind sentry-select; alias +dispenser-bind dispenser-select; alias +enter-bind enter-select; tp_exit;"

alias +building-build   "+attack;"
alias -building-build   "alias +sentry-bind sentry-select; alias +disbenser-bind dispenser-select; alias +enter-bind enter-select; alias +exit-bind exit-select;"

alias +sentry-bind      "sentry-select;"
alias +dispenser-bind   "dispenser-select;"
alias +enter-bind       "enter-select;"
alias +exit-bind        "exit-select;"
alias -sentry-bind      "-attack; "
alias -dispenser-bind   "-attack; "
alias -enter-bind       "-attack; "
alias -exit-bind        "-attack; "

// Binds
bind "F1"               "+sentry-bind"      // Build sentry gun
bind "F2"               "+dispenser-bind"   // Build dispenser
bind "F3"               "+enter-bind"       // Build teleporter entrance
bind "F4"               "+exit-bind"        // Build teleporter exit

Of course you can change the binds to any key you wish.

You can modify, redistribute, sell this script if you want, I do not claim any credit. Any bug reports, errors, complains, suggestions are welcome.

Have a nice evening!


r/Tf2Scripts • • Oct 22 '13

Meta New moderator presence

7 Upvotes

It became apparent that the current moderators were not equipped well enough to be able to keep the subreddit operating at 100% efficiency. As such, we have been appointed to assist in its maintenance. Gone are the days of being stuck in the spam filter.

Be prepared to see some major usability improvements over the next few days. The agenda:

  • Replace the current title tag system with flair

    • Flair can be changed, titles cannot. This gives you a much better idea about a post from a quick glance at the flair

    • Flair can be styled for extra visibility. Currently, this is in the form of a strip of colour down the side of a post.

    • Posts can also be filtered by flair - this one's a killer. You can look at anything that hasn't been answered, only answered posts, scripts people posted on their own merits, or some combination of.

  • Retroactively apply flair to every post in this subreddit (this one will take a while)

  • Still on the subject of flair, we're considering giving some users flair for their contributions to the subreddit.

  • Set up user pages on the wiki for a persistent place to store your scripts publicly under your name. Yes, you can get link karma if you really want to.

  • Connect more with other related subreddits.

    • Some of the posts here are less to do with scripting than they should be (HUDs), and other subreddits already exist that specialise in those fields. New submission buttons are being added for convenience.

  • Add some style to the subreddit. Throw some ideas out there, I know people have different taste in design.


If there are any other long-awaited changes, feel free to post them in the comments and we'll consider them.


r/Tf2Scripts • • Jul 13 '13

Script [Script] My Config

7 Upvotes

Hey there, /r/tf2scripts. I've decided to share my TF2 configuration files with you fellas. Let's jump on in...

Aaand here we go!


General

E: Move forward

S: Move left

D: Move backwards

F: Move right

Space: Jump

Left Control: Crouch

Tab: Show scoreboard and netgraph

[: Drop Intelligence/Australium/etc

Attacking

Mouse 1 (Left-Click): Primary Attack

Mouse 2 (Right-Click): Secondary Attack

Mouse 5 (Thumb Button): Teritary Attack

N: Reload

Weapon Switching

In general (For everyone except for Spy):

Scroll up: Slot 1

Scroll down: Slot 2

Mouse 3 (Middle-Click): Melee

When you melee, you don't just switch to your third slot. You will attack with your melee weapon until you release middle-click, and then you will simply hold your weapon out.

2: Slot 1

3: Slot 2

4: Slot 3

5: Slot 4

6: Slot 5

...and so on.


Communication

X, C, and V switch to the primary, secondary, and teritary voice menus respectively.

Voice commands

G: "Spy!"

R: "MEDIC!"

H: "Help!"

Y: "Thanks!"

Down Arrow: "Incoming"

Up Arrow: "Go! Go! Go!"

Left Arrow: "Go Left"

Right Arrow: "Go Right"

Pressing B will toggle your microphone on/off.

Functionality things

W is a soft viewmodel toggle - your stuff in "weaponcontrol.cfg" will still impact it. Best to use once per weapon.

Q is a hard viewmodel toggle - your viewmodels will be off for that class until you hit Q again or change classes.

A toggles auto-reload.

M opens your loadout. Shift+M opens your backpack. Alt+M opens the crafting screen.

Right Control opens the quickswitch menu.

Minus turns your volume down by 10%, + turns it up by 10%.

Page down: Set your crosshairs to be default in-game ones, in case the server blocks .vtf crosshairs

Page up: Reload your class' config, just in case anything breaks. Alternatively, type "class_reload" without the quotes in to the console.


Silly things

H taunts. Shift+H uses your action slot item until you release it. Press Alt+H to use your action slot item - press H again to stop using it.

] sprays. Home: Save a replay

Delete: Bookmark in P-REC

End: Suicide

Shift+End: Explode


Chat binds

Pressing 1 through 9 on the numpad will say, in team chat, "Spy [class].", where [class] equates to the number - 1 is Scout, 2 is Soldier, and so on until 9 for Spy.

Pressing 1 through 9 while holding Shift will say, in team chat, "DR Spy [class]."

Pressing 1 through 9 while holding Alt will say, in team chat, "Spy [class]. YER."

E + Shift: "Sentry ahead" voice command, say "Sentry ahead!" in team chat

E + Alt: "Sentry ahead" voice command, say "Mini-Sentry ahead!" in team chat

S + Shift: "Go Left" voice command

S + Alt: Say "Teleporter down" in team chat

D + Shift: "Incoming" voice command

D + Alt: "Go! Go! Go!" voice command, say "Sentry down!" in team chat

F + Shift: "Go Right" voice command

F + Alt: "Go! Go! Go!" voice command, say "Engineer down!" in team chat

W + Shift: "Sentry ahead" voice command, say "Engineer nest ahead!"in team chat

R + Shift: "MEDIC!", say "Pyro, could you extinguish me, please?" in team chat

R + Alt: "MEDIC!", say "Heavy, could you throw me your Sandvich, please?" in team chat

X + Shift: Use the "Teleporter here" voice command, say "Could we get a Teleporter here, please?" in team chat

C + Shift: Use the "Sentry here" voice command, say "Could we get a Sentry here, please?" in team chat

V + Shift: Use the "Dispenser here" voice command, say "Could we get a Dispenser here, please?" in team chat


Pyro

Hold Shift + Mouse3 (Middle-Click) to activate Pyro Panic mode. This spins you around very fast and spews flame while you do it.

Use it when you know you're doing to die anyways, or when you want to make sure your Engineer buddy won't let any Spies in.

It chews up ammo very quickly though - watch out!


Heavy

Shift + Mouse1 (Left-Click) toggles attacking with your Minigun. Using Mouse2 (Right-Click) instead toggles spinup.

Shift + Mouse3 (Middle-Click) switches to your second slot, executes its secondary attack, and switches back to your Minigun, saying in team chat: "Take the Sandvich!"


Engineer

Pressing 2 and then 2 destroys your sentry and builds up the blueprints for a new one.

Pressing 2 and then 4 does the same with a Dispenser.

Pressing 4 and then 2 does the same with a Teleporter Enterance.

Pressing 4 and then 4 does the same with a Teleporter Exit.

Press 1, 3, or 5 to reset your binds to the first layer.


Medic

Healing is reversed: Hold mouse1 with your healcannon to stop healing.

Mouse2 (Right-Click) will switch to your Medigun of choice, drop intel if you're carrying it, activate your Ubercharge, and alert the team of that.

Mouse4 (Thumb button) will activate your teritary attack. While you are ubering with the Vaccinator, DO NOT PRESS THIS, as it will mess the chat alerts up.

Shift+T: "I am fully charged!" in team chat

Shift+A: Fake charge

Type medigun in the console if you're using the Medigun.

kritz if you're using the Kritzkrieg.

quick-fix if you're using the Quick-Fix.

vaccinator if you're using the Vaccinator.


Spy Binds

Disguising

The keys 2 through 4 act as a miniature disguise kit.

2,2 = Scout

2,3 = Soldier

2,4 = Pyro

3,2 = Demoman

3,3 = Heavy

3,4 = Engineer

4,2 = Medic

4,3 = Sniper

4,4 = Spy

Add Shift to your second keypress to disguise as a friendly.

Press 5 to reset the kit back to the first keypress.

Press 6 to drop your disguise - faster than dropping it via attacking.

Disguising temporarily sets your crosshair to a plus. The larger the class number, the larger the crosshair. Yellow = enemy. Green = ally.

Weapon control

Mouse wheel up switches to your primary weapon.

Mouse wheel down activates your last disguise or syncs your disguise's weapon with your own.

Press the mouse wheel:

  • While you're holding it, you will sap anything you get within reach of. Press mouse 1 or mouse 2 (Left/Right Click) to activate your last disguise (sync weapon with secondary, disguise as your previous disguise)

  • When you release it, you will switch to your teritary weapon - your Knife. Mouse 1 and Mouse 2 now do primary and secondary attacks.


Weapon Controlling

This is the real meat of the config - not the most important part, but the biggest and scariest part. I've designed it to be as easy to edit as possible, but thanks to the very nature of it that doesn't make it easy - just easier.

Look in the /Settings path for this stuff.

Within this file, you can control these variables:

  • Viewmodel drawing

  • Viewmodel FOV

  • Crosshair shape (in-game crosshairs work with all sv_pure settings, custom ones work on sv_pure 0 or 1 sometimes)

  • Crosshair size

  • Crosshair color

  • Dingaling (hitsound) volume

  • What the dingaling volume is while you're attacking

  • Dingaling minimum pitch damage

  • Dingaling maximum pitch damage

It should all be self-explainatory. All of the variables can be found in master_list.txt, which is in the Settings folder.


Other configs

Type "exec jump" to make auto-reload your clip and heal you - this makes jumping way easier to practice.

Type "exec training" to play a sound when the grenades fired from your Grenade Launcher are about to explode, as well as a sound as soon as the Sniper Rifle is able to headshot.

Map-Specific configs

tr_walkway_rc2

On the numpad:

Numlock: Teleport to the buttons

Slash: Cycle between third and first-person

Multiply: Buff yourself

Minus: Toggle crits on/off

Plus: Noclip

Enter: Teleport to the target you last shot

Zero: Teleport to the other set of buttons

Period: Teleport to your crosshair

cp_degrootkeep

On the numpad:

Enter: Toggle between third and first-person


Mad props to:

/u/clovervidia

/u/TimePath

/u/genemilder

/r/tf2scripts

/r/tf2scripthelp


There are, of course, a few undocumented features - but all the useful stuff has been covered.

Well, that's all I can think of. Got any questions? Comments? Presents? Tell me below!

Download it here. Put the cfg folder in the normal spot, put the crosshairs folder in tf/materials/vgui.

Edit: Fixed a formatting error


r/Tf2Scripts • • May 08 '13

Script Help me test me Pinion Bypasser script!

7 Upvotes

Hey there,

So basically I'm trying to make the simplest solution to bypassing Pinion, which currently involves reconnecting to the server using "connect <ip> matchmaking". Sadly, the best way to do this is copy/paste from console (a pain) and scripts are impossible.

Here's where this little external python script comes in handy! It auto grabs the IP for you and puts the connect string in your clipboard. I'd love it if people here could test this and see if it works ok. If so I'll whack it on /r/tf2 :)

Open the exe for windows, the .py for mac/linux. If something breaks let me know! Source is the .py if you're worried about foreign exes.

http://puush.tf2pi.net/PinionBlocker.zip


r/Tf2Scripts • • Apr 21 '13

Answered Dead Ringer Active. Is this part of a script?

Thumbnail
imgur.com
7 Upvotes

r/Tf2Scripts • • Feb 18 '13

Archived Is this possible?

7 Upvotes

edit: Sorry, forgot to put [HELP] in the title. If that's even what goes there, I'm not certain.

I have very, very frequent issues with players turning invisible. The only fix I have found for this is to record a demo. Even after recording one the glitch will often come back.

Since you can't record a new demo while recording a demo, if I'm recording a demo I can't fix this glitch without stopping the demo I'm recording. UGC's rules require demos of all matches, and even if they didn't, I'd want to record demos anyway.

I made a post about this a while ago in TrueTF2 and was told it would be okay to have multiple demos so long as no huge chunks of gameplay are missing. To make this period of missing game time smaller, and to increase convenience, I would like to be able to press O and have the following things happen:

  1. If a demo is not being recorded, record one named "demo1"

  2. When pressed again, end "demo1" and start "demo2"

  3. When pressed again, end "demo2" and start "demo3"

  4. And so on...

Is this possible? I apologize for asking for pretty much an entire script, but I have no idea how to do this.


r/Tf2Scripts • • Jan 01 '13

Satisfied Spy Script Request.

7 Upvotes

Can someone please make a script that both removes the sapper and disguise kit from the scroll wheel, and binds it so that when I hold Mouse5, it will bring out the sapper and sap everything around me, and for the disguise kit, it would just give me a random disguise (Spy, pyro, demo, engie) upon hitting Mouse4?

EDIT: typo


r/Tf2Scripts • • Dec 14 '12

Archived [HELP] Demoknight Script

7 Upvotes

Would like help making a demoknight script that changes sensitivity during charge controlled by another script that decides whether that script can turn on or not so it does not interfere with stickybombs.


r/Tf2Scripts • • Oct 16 '12

Satisfied [Help] Is there a script to make the hi-5 taunt toggle, not hold down?

7 Upvotes

Any help would be appreciated


r/Tf2Scripts • • Aug 13 '12

Script [Script][Spy]Concise Disguising with Voice responses on F1-F4

7 Upvotes

crowd frightening dazzling lush innocent dolls sloppy icky illegal correct

This post was mass deleted and anonymized with Redact


r/Tf2Scripts • • Jul 20 '12

Satisfied So i recently deleted my entire cfg, who wants to give me thier scripts to test out? Details/crudentials inside

7 Upvotes

My name is |eXtv| Havoc on steam. I work for eXtv, play comp tf2, and to lots of things. I recently DELETED my entire config, and with your guys's help and scripts, am willing to make a new one. I will then post it to the sidebar, seeing as how i am an /r/tf2scripts admin. So bring your favorite playing/comp scripts for me to try out!


r/Tf2Scripts • • Mar 15 '12

Archived Swapping m1 and m2 between weapons

7 Upvotes

I had this idea the other day to swap M1 and M2 on my Pyro so that I airblast with M1. My thinking was that after all my years of playing shooters, drawing, and picking my nose, my pointer finger has got to have much thicker 'cables' in my brain.

So I tried to make this script that would swap Mouse1 and Mouse2 on my flamethrower but then swap them back to normal when using my secondary or melee so I can use the detonator and axtinguisher like normal. The issue is that when I swap between them, because each weapon rebinds these buttons, it forces one of them to get stuck down if I swap while airblasting or flaming and I end up wasting my ammo a bit until I double click a few times.

The fix I came up with was to put a -attack, -attack2, on the weapons aswell so that I'm forced to stop firing between weapons but the issue with that is that if I hold down my weapon swap key a second too long I'm going to be preventing myself from firing which has been making me miss with my axtinguishing and shotgun much more because I can't start shooting the very second I swap.

Here's an example of the script that gets stuck:

Bind shift "+axe"

Alias +axe "slot3;bind mouse1 +attack; bind mouse2 +attack2"

Alias -axe "slot1;bind mouse1 +attack2; bind mouse2 +attack"

Here's an example of the script that doesn't get stuck but prevents me from firing

Bind shift "+axe"

Alias +axe "-attack;-attack2;slot3;bind mouse1 +attack; bind mouse2 +attack2"

Alias -axe "-attack;-attack2;slot1;bind mouse1 +attack2; bind mouse2 +attack"


r/Tf2Scripts • • Jul 10 '24

Script Auto-Sap Script - Adapted from Auto-Heal

6 Upvotes

Just porting over a script that some people found helpful for their Spying.

What it does:

It enables +attack when you switch to your sapper, so you basically don't have to do anything except pull it out. Then, when you're done, you can switch to any other weapon using 1, 3, 4, Q, or your mouse-wheel, and it will disable the script.

//Weapons (1-4)
alias revolver "slot1; disableall"
alias sapper "slot2; -sap; bind mouse1 +sap"
alias knife "slot3; disableall"
alias disguisekit "slot4; disableall"
bind 1 revolver
bind 2 sapper
bind 3 knife
bind 4 disguisekit
//Q Button
bind q "lastinv; disableall"
//Mousewheel
bind mwheelup "invprev; disableall"
bind mwheeldown "invnext; disableall"
alias disableall "+sap; bind mouse1 +attack"
//Auto-Sap for Sapper
alias +sap "-attack; spec_next"
alias -sap "+attack"

Feel free to give this a test in-game. It's pretty much the exact Auto-Heal config that most Medic mains have, just re-written to accommodate Spy's needs. Hope you enjoy!

Oh, and you will want to make sure to put this in your reset.cfg so the script doesn't carry over to your other classes.

//Weapon Binds
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 0 slot10
bind q lastinv
bind mwheelup invprev
bind mwheeldown invnext

r/Tf2Scripts • • Jan 28 '24

Question Heavy Scrips?

6 Upvotes

I've seen tons of scripts for engie/demo etc. But i wanted to ask you all if you know any good scripts for heavy?


r/Tf2Scripts • • Jun 28 '23

Answered Script to alter the viewmodel FOV and if minimized viewmodels are enabled depending on what class is selected

6 Upvotes

I've spent the last couple hours trying to tinker with cfg files, and it is extremely painful.

I'm trying to add cfg files but when I execute them in game the console responds with "____.cfg not present; not executing" and I'm very much confused.

Here's some of the stuff I put down for different classes:

Pyro (viewmodel_fov 90, tf_use_min_viewmodels 1)

Scout (viewmodel_fov 90, tf_use_min_viewmodels 1)

Soldier (viewmodel_fov 105, tf_use_min_viewmodels 1)

Spy (viewmodel_fov 105, tf_use_min_viewmodels 1)

Sniper (viewmodel_fov 105, tf_use_min_viewmodels 1)

Engineer (viewmodel_fov 105, tf_use_min_viewmodels 1)

Heavy (viewmodel_fov 105, tf_use_min_viewmodels 1)

Medic (viewmodel_fov 105, tf_use_min_viewmodels 1)

Demo (viewmodel_fov 70, tf_use_min_viewmodels 1)


r/Tf2Scripts • • Jan 28 '23

Question Script to change laodouts using ctrl+1,2,3,4

6 Upvotes
alias jc_scout  join_class scout
alias jc_solly  join_class soldier
alias jc_pyro   join_class pyro
alias jc_demo   join_class demoman
alias jc_heavy  join_class heavyweapons
alias jc_engi   join_class engineer
alias jc_med    join_class medic
alias jc_sniper join_class sniper
alias jc_spy    join_class spy

alias +joinclass_1 "bind 1 jc_scout; bind 2 jc_solly ; bind 3 jc_pyro"
alias +joinclass_2 "bind 4 jc_demo ; bind 5 jc_heavy ; bind 6 jc_engi"
alias +joinclass_3 "bind 7 jc_med  ; bind 8 jc_sniper; bind 9 jc_spy"

alias -joinclass_1 "bind 1 slot1; bind 2 slot2; bind 3 slot3"
alias -joinclass_2 "bind 4 slot4; bind 5 slot5; bind 6 slot6"
alias -joinclass_3 "bind 7 slot7; bind 8 slot8; bind 9 slot9"
alias +joinclass "+joinclass_1; +joinclass_2; +joinclass_3"
alias -joinclass "-joinclass_1; -joinclass_2; -joinclass_3"

bind shift +joinclass

I wanted to use this fastclass script as a template to make my laodout script but I don't understand what happens after first 9 aliases. If someone could please help undestand and make a desireable script I would be very thankful.
P.S. I use mastercomfig


r/Tf2Scripts • • Oct 30 '22

Script Vaccinator Quick-Uber script

6 Upvotes

I'm pretty new to code in general so there might be cleaner ways to implement this, but I've designed a script based on the macros I've seen from Theory-Y Studios. Instead of changing the resistance on button press, it changes resistance, pops an uber and changes back to default. It is rather unusual, but it removes the need to rebind anything and feels nice to use.

//Script designed in accordance to Theory-Y Studios macros settings
//MOUSE4 explosive uber and back. MOUSE5 fire uber and back. Circumvents need for rebinding
bind MOUSE4 +explosive;
bind MOUSE5 +fire;

//Cycle Script copied from https://www.reddit.com/r/tf2/comments/42hcbn/vaccinator_medics_ive_written_a_script_that_lets/
alias cycle_once "+reload; wait 5; -reload"
alias cycle_twice "+reload; wait 5; -reload; wait 5; +reload; wait 5; -reload"

//Bullet to explo, uber, explo to fire to bullet
alias +explosive "cycle_once; +attack2"
alias -explosive "cycle_twice; -attack2"

//bullet to explo to fire, uber, fire to bullet
alias +fire "cycle_twice; +attack2"
alias -fire "cycle_once; -attack2"

For anyone who is also new to scripts: This needs to be placed inside the medic.cfg file. Another file name seems to not work.
Feel free you give your opinions or improvement ideas.


r/Tf2Scripts • • Oct 26 '22

Request Request to tidy up my spy config

6 Upvotes
bind MOUSE5 "quick_disguise"
bind MOUSE4 "+quick_sap"
bind e "slot3"
bind q "slot1"
bind b "lastdisguise"

alias +quick_disguise "bind_activator"
alias -quick_disguise "exec binds.cfg;extrabinds"

alias "dis_bind1" "bind q disguise_scout"   //Scout:   "disguise 1 -1"
alias "dis_bind2" "bind c disguise_soldier" //Soldier: "disguise 3 -1"
alias "dis_bind4" "bind f disguise_pyro"    //Pyro:    "disguise 7 -1"
alias "dis_bind3" "bind r disguise_demo"    //Demoman: "disguise 4 -1"
alias "dis_bind5" "bind z disguise_heavy"   //Heavy:   "disguise 6 -1"
alias "dis_bind6" "bind x disguise_engineer"//Engineer:"disguise 9 -1"
alias "dis_bind7" "bind g disguise_medic"   //Medic:   "disguise 5 -1"
alias "dis_bind8" "bind v disguise_sniper"  //Sniper:  "disguise 2 -1"
alias "dis_bind9" "bind e disguise_spy"     //Spy:     "disguise 8 -1"
alias "disguise_scout"    "disguise 1 -1"
alias "disguise_soldier"  "disguise 3 -1"
alias "disguise_pyro"     "disguise 7 -1"
alias "disguise_demo"     "disguise 4 -1"
alias "disguise_heavy"    "disguise 6 -1"
alias "disguise_engineer" "disguise 9 -1"
alias "disguise_medic"    "disguise 5 -1"
alias "disguise_sniper"   "disguise 2 -1"
alias "disguise_spy"      "disguise 8 -1"
alias "bind_activator" "dis_bind1; dis_bind2; dis_bind3; dis_bind4; dis_bind5; dis_bind6; dis_bind7; dis_bind8; dis_bind9"

//here is where I kinda just threw shit at the wall until it worked
//since I ran binds.cfg, all my keys are bound to default so I need to bind them back properly
alias "extra_binds" "bind MOUSE5 +quick_disguise;bind MOUSE4 +quicksap;bind e slot3;bind q slot1"
//realized just now that this is irrelevant
alias "crosshair_backtodefault" "cl_crosshair_file crosshair6; cl_crosshair_scale 28"

//I just want this to look as good as the script itself

r/Tf2Scripts • • Sep 08 '22

Script Useful medic script.

6 Upvotes

alias "heal" "healon"
alias "healon" "alias heal healoff; +attack;bind MOUSE1 +off"
alias "healoff" "alias heal healon; -attack;bind MOUSE1 +attack"
alias +off "-attack"
alias -off "+attack" //this is needed because you cant just bind M1 to - attack

bind heal <key>

//this makes it so when you press your selected key, you attack constantly and stop attacking when holding down M1.


r/Tf2Scripts • • Jul 23 '22

Question looking for a script that'd make the game automatically search for a match as soon as I lunch it.

6 Upvotes

basically title, is it possible ? like running tf2 do something with firefox rq then alt-tab back into my game? thx in advance


r/Tf2Scripts • • Jul 07 '22

Script Confirmation for "say" command

6 Upvotes

So sometimes I see some random spy saying "UBERCHARGE READY" and it is just silly for anyone to use the wrong bind. I searched for a script that did some sort of "are you sure you want to say that" thing, and I didn't find any, so I did it myself.

// AYSYWTST Numpad

alias "quote" 
alias "quote1" say "[insert quote1 here]"
alias "quote2" say "[insert quote2 here]"
alias "quote3" say "[insert quote3 here]"
alias "quote4" say "[insert quote4 here]"
alias "quote5" say "[insert quote5 here]"
alias "quote6" say "[insert quote6 here]"
alias "quote7" say "[insert quote7 here]"
alias "quote8" say "[insert quote8 here]"
alias "quote9" say "[insert quote9 here]"

bind KP_END 		"say_party [insert quote1 here]; alias quote quote1"
bind KP_DOWNARROW	"say_party [insert quote2 here]; alias quote quote2"
bind KP_PGDN		"say_party [insert quote3 here]; alias quote quote3"
bind KP_LEFTARROW	"say_party [insert quote4 here]; alias quote quote4"
bind KP_5 		"say_party [insert quote5 here]; alias quote quote5"
bind KP_RIGHTARROW	"say_party [insert quote6 here]; alias quote quote6"
bind KP_HOME		"say_party [insert quote7 here]; alias quote quote7"
bind KP_UPARROW 	"say_party [insert quote8 here]; alias quote quote8"
bind KP_PGUP 		"say_party [insert quote9 here]; alias quote quote9"
bind KP_ENTER 		"quote"

// AYSYWTST Numpad end

This script says the first quote in party mode and if you press KP_ENTER it then says that to everyone (Note that you can change any of say to say_team to say to your team only)

I didn't find any better form of a confirmation than "say_party" so if someone knows a way to say something to only yourself I would be grateful!


r/Tf2Scripts • • May 25 '22

Request Holding down a key changes function of other keys.

6 Upvotes

I wanted to make a script where if I held down the shift key it would change the function of mouse4 and mouse5 from voicemenu 0 1 (mouse4), voicemenu 2 6 (mouse5) to voicemenu 1 1 (mouse4), voicemenu 1 6 (mouse5) but I couldn't really figure out how to do that. Thanks for reading.


r/Tf2Scripts • • May 07 '22

Issue Heavy breaks my extremely basic script, pls help.

6 Upvotes

For most classes like scout and soldier etc I have Q swaps between primary and secondary prioritising primary.

E swaps weapons too but prioritises secondary.

I have both 3 and mouse5 swap to meele

This works fine.

bind "q" "slot2;slot1"
bind "MOUSE5" "slot3"

bind "3" "slot3"

bind "e" "slot1;slot2"

For a few classes like spy medic etc I have it so Q swaps between meele and primary (prioritising meele) - leaving secondary weapon on mouse5 only

This is what spy looks like - also works great.

bind "q" "slot1;slot3"
bind "MOUSE5" "slot2"

bind "3" "slot3"

bind "e" "slot3;slot1"

Now this is what I have for heavy - I want Q to swap between primary and meele (prioritising primary - opposite to spy and med etc) and have mouse5 for sandvich

unbind "q"

unbind "e"

unbind "MOUSE5"

unbind "3"

bind "q" "slot3;slot1"
bind "MOUSE5" "slot2"

bind "3" "slot3"

bind "e" "slot1;slot3"

If I pick heavy or swap to heavy from med or spy then for some reason it prioritises meele when I press Q - which is really frustrating and E prioritises primary. This is the wrong way round but changing which button did which changed nothing. Mind bogglingly 3 does NOT switch to my meele weapon after switching from engineer (for engie 3 does something else).

If I change to heavy from scout or soldier or something then it works exactly how I would expect THOSE classes to operate with Q swapping between primary and secondary (prioritising primary), E prioritising secondary and 3 and mouse5 selecting meele.

I really don't understand why changing from one class to heavy specifically is breaking this script despite it being the same as ones that do work - It feels like my controls are different every time I play.

In my heavy script I even tried unbinding all my weapon switching buttons beforehand, as you can see, so I'm officially asking for your help because I'm out of ideas.

Thank you for taking your time to read all that.