r/Tf2Scripts • • Sep 25 '20

Script I just wrote a config thingy for class-ordered demo recordings. (Repost after r/truetf2 told me this subreddit exists)

13 Upvotes

I don't know if this has been done before, but I haven't found anything anywhere, so I'll just post this here so that if this is new and can help some poeple, it is here.

Because I am currently trying to gather clips from certain classes and I don't have enough storage to videorecord everything, I have to rely on demorecordings.

These however only record entire matches and you have to skim through them to see which classes you played.

I wrote a bit into my autoexec and classexecs to enable demos that start recording when choosing a class and end when changing class, and sort the demo into the right folder, for really easy access to class-ordered demo recordings.

Put in autoexec (or user/autoexec when using mastercomfig):

ds_enable 0  
ds_log 1  
alias	cr		"cr1" 
alias	cr1		"ds_stop; demodir; ds_record; alias cr cr2" 
alias	cr2		"alias cr cr1" 

Put in every classexec (or user/**classexec** when using mastercomfig):

alias	demodir	        "ds_dir demos/**insert class**" 
cr 

e.g. in scout.cfg it would be

alias	demodir	           "ds_dir demos/1scout" 
cr 

(Tip here is to add the 1 before scout so that inside the demofolder everything is listed correctly.)

Why is this so complicated?

  1. Starting a demo executes the classexec of the class you are playing, meaning if you just put "ds_stop; ds_dir demos/class; ds_record" into your classconfig, which I did first, then you'd exec classexec, record a demo, triggering the classexec, repeat, resulting in lag and no demo recorded.

  2. This could be done easier with just a simple wait line, but I play mainly on servers with wait disabled, but this works without the wait command.

  3. I'm quite new to cfg stuff.

This then looks like this

- demos
    - 1scout 
        - 2020-09-25_09-36-34.dem
        - 2020-09-25_09-36-34.jsn 
    - 2soldier 
    - 3pyro  
   ..... 

Then, e.g. if you want to make a video of an epic scout killstreak, you can just go into the events.txt of the scout demo folder, look for the highest killstreak, and then open the demo.

I hope this helps you, and if it helps noone, it helps at least me.

Happy fragging, my dudes.


r/Tf2Scripts • • Jun 16 '20

Question Can you hold SpaceBar to constantley jump by having a script or binding space bar to do this constant jump (And if this is something that might get you banned so that i dont do something stupid).

13 Upvotes

Hi im trying to see if there is this lazier way on bhopping apart from the binding mouse wheel to +jump**/or** just pressing space every time.

Is there any way in binding( my prefer way into seeing this can work woth script too) this.

If soo please help me out here


r/Tf2Scripts • • Jul 29 '15

Request How do I rebind voting keys OR just disable voting altogether?

13 Upvotes

Hi guys!  

I would like to rebind F1 and F2 to other actions, but I don't want to be stuck with the voting popup for the entire duration of the vote. It blocks my screen and is very distracting for a new player like me.  

If I want to bind F1-F4 to building as an engineer, how do I do one of the following:

  1. change voting yes/no to other keys

  2. disable the voting popup altogether

  3. press a key to make the voting popup go away  

Appreciate the help!


 

Edit: Hey guys! I submitted another thread here with a request for a script that would make the F1-F4 problem moot for Engineer. However, I would still be interested in binding F1-F4 to voice commands, disguises, etc.  


Edit: I don't know why it took me this long, but I figured out (1).

bind + "vote option1; v_yes"
bind - "vote option2; v_no"  


r/Tf2Scripts • • Oct 24 '12

Script Hey spies. Made a really simple script for faking multiple reloads. (x-post from /r/TrueTF2)

13 Upvotes

Couldn't find a script for this elsewhere, so I took a stab at it myself. Not an experienced scripter at all, so please feel free to let me know how this fails/what this breaks.

//Fake Reloader

bind "MOUSE3" +fakeswitch

alias +fakeswitch "slot1;+reload"

alias -fakeswitch "-reload;slot3"

HOW TO USE:

Start off by having a revolver that actually needs to be reloaded. The best way to find one of these is to trade with another spy who has already fired their gun that round.

Disguise yourself.

Hold MOUSE3 (or whatever key you bind) to switch to revolver and begin reloading. Hold it until you hear the first click of the revolver's reload. Don't hold too long or you'll complete the animation (which will obviously fill your revolver clip).

Releasing MOUSE3 switches to your knife, cancelling the reload. Rinse and repeat to help your illusions of retreating soldiers, scouts, engies, <anyone who has to reload one projectile at a time>.

NOTES: I doubt it looks incredibly smooth, and I doubt it would be useful at all in higher-level play; but I bet it will fool at least ONE person if you pub all night. They will probably say something like, "haha nice reloading soljer u put all the rockits in ur gun!" And when you see that, I hope you nod in satisfaction as you harmlessly butterknife him in the face and get blown to bits.

The extent of my testing was going onto a trade server and getting someone on the other team to tell me if it looked legit or not, so if it doesn't work at all, don't be too shocked.


r/Tf2Scripts • • Sep 27 '12

Answered A question: At what point do scripts cross the line?

13 Upvotes

I've seen a lot of scripts in my short time as a creator of them, and there are some I just won't touch: sentry jumping, auto-detonation of stickies, and the like. I know a lot of people have varying opinions on what scripts should do and how far you should go with them - so I ask you, Redditors, where do scripts stop being "innocent" things such as chat binds and start becoming cheating? Do they hit that line at all?


r/Tf2Scripts • • Jun 18 '12

Answered [Poll] Do we need tutorials?

13 Upvotes

Hello everyone. With everyone I mean beginners, intermediates and experts in TF2 scripting.

A week ago I've had a conversation with the other mods regarding tutorials. These tutorials would have the purpose of giving basics to beginners, thus filtering out all the useless threads containing very simple questions.

And that's not all! More expert scripters would be able to post in a thread dedicated to [code snippets](http://en.wikipedia.org/wiki/Snippet_(programming) that would work as an archive of useful resources.

And here comes the point of this thread: since I don't like to take important decisions quickly, especially if they are aimed to change how this subreddit works, I want to ask you if what I said is actually needed or not. If enough persons will vote to add the tutorials, the second part of this post will be implemented.


Requesting a tutorial: We don't want to flood this subreddit with tutorials, and we don't want people to create "[TUTORIAL]" posts. If you want to write a tutorial, first send a PM to the mods stating the subject and a brief description of what you'd like to write. If we'll find it okay you'll have the green light to write your tutorial. When it's done, all you'll have to do is reply to the previously sent PM to inform us.

Writing a tutorial: Tutorials will be aimed to beginners, as I stated. This means they have to be clear and simple to understand. Here's some rules:

  • Correct grammar. Don't use abbreviations, use a proper punctuation and read the tutorial again when you're finished.

  • Simplicity. Beginners won't probably understand scripting-related terms. Try to avoid them using more simple words.

  • Summarization. Try to fully explain while keeping the post light.

  • Examples. Pratice is always better than theory, or at least in most cases. So add simple examples to your tutorial, to let people check if their code is right. Use the code formatting: four (they should be four, but use around 5-7 because otherwise it won't work) spaces at the beginning of a line will treat the text like code. Example:

       Hello world!

This is all I've got to say. If you vote, please give a quick explaination of why you did it and if you have any, post your suggestion(s).


r/Tf2Scripts • • Jun 01 '21

Question Can aliases be put in a separate .cfg file from their binds?

12 Upvotes

Hello, I'm currently writing a personal config for myself and I was planning to alias most of the basic commands for easier use and I can't seem to find any answer anywhere to whether or not I can put them in different files because I didn't want to clutter one file with all the aliases and binds.


r/Tf2Scripts • • Mar 27 '21

Script Ultimate Keypads disguise script! (includes friendly disguises)

12 Upvotes

First post here,

I made a script for spy that allows you to disguise as any class, on both teams, using only the keypads. I utilised key combinations to include the friendly disguises aswell.

You can use keypad 1 to 9 for disguising, and hold keypad 0 for friendly disguises.

Example:

Holding kp 0 en pressing kp 9 will disguise you as a friendly pyro, if you don't hold kp 0 and press kp 6 you will disguise as an enemy engineer.

// Selection script, use keypads to disguise, hold kp_ins to disguise as friendly
// made by http://steamcommunity.com/profiles/76561198415391988
bind kp_ins +toggleState
-toggleState

alias +toggleState "alias key7 fScout; alias key8 fSoldier; alias key9 fPyro; alias key4 fDemo; alias key5 fHeavy; alias key6 fEngineer; alias key1 fMedic; alias key2 fSniper; alias key3 fSpy"

alias -toggleState "alias key7 eScout; alias key8 eSoldier; alias key9 ePyro; alias key4 eDemo; alias key5 eHeavy; alias key6 eEngineer; alias key1 eMedic; alias key2 eSniper; alias key3 eSpy"

alias fScout "disguise 1 -2"
alias eScout "disguise 1 -1"
alias fSoldier "disguise 3 -2"
alias eSoldier "disguise 3 -1"
alias fPyro "disguise 7 -2"
alias ePyro "disguise 7 -1"
alias fDemo "disguise 4 -2"
alias eDemo "disguise 4 -1"
alias fHeavy "disguise 6 -2"
alias eHeavy "disguise 6 -1"
alias fEngineer "disguise 9 -2"
alias eEngineer "disguise 9 -1"
alias fMedic "disguise 5 -2"
alias eMedic "disguise 5 -1"
alias fSniper "disguise 2 -2"
alias eSniper "disguise 2 -1"
alias fSpy "disguise 8 -2"
alias eSpy "disguise 8 -1"

bind KP_HOME "key7"
bind KP_UPARROW "key8"
bind KP_PGUP "key9"
bind KP_LEFTARROW "key4"
bind KP_5 "key5"
bind KP_RIGHTARROW "key6"
bind KP_END "key1"
bind KP_DOWNARROW "key2"
bind KP_PGDN "key3"

pastebin: https://pastebin.com/raw/721XaMBN

Hope this is helpful to you!


r/Tf2Scripts • • Dec 28 '20

Resolved [2020 Leak] What's the point of -usegh?

12 Upvotes

While I was documenting launch options from the 2020 TF2 leak, I stumbled across -usegh. It's a launch option that loads the ghostinj.dll.

The comments state that this launch option loads support for 3rd party DLLs, which is located in dedicated/sys_common.cpp @ line 44.

(EDITED 12/27/2020) However, the following comment located in dedicated/sys_common.cpp @ line 49-50 states:

// Only do this if the server operator wants the support.
// ( In case of malicious code, too )

This implies that the server operator using -usegh could load malicious DLLs.

My main question is what's the point of this launch option, and why does it exist?


r/Tf2Scripts • • Nov 22 '20

Script I made a script that allows you to use the Phlog and the Powerjack with the stock loadout

12 Upvotes

This does have some issues:

-There is no "Mmmph" meter, but you can use the Gas Passer as one

-The melee will make you faster, take minicrits and you don't get any health on kill

Scritp:

sv_cheats 1

bind mouse2 "taunt; addcond 52; wait 270; bind 3 AA; bind 1 BA; addcond 38; removecond 52; wait 760; bind 3 AB; bind 1 BB; removecond 38"

bind g "+taunt; addcond 52; wait 270; bind 3 AA; bind 1 BA; addcond 38; removecond 52; wait 760; bind 3 AB; bind 1 BB; removecond 38"

bind 3 "slot3; addcond 32; addcond 30"

bind 2 "slot2; removecond 32; removecond 30"

bind 1 "slot1; removecond 32; removecond 30"

alias AA "slot3; addcond 32; removecond 38; addcond 30"

alias BA "slot1; removecond 32; addcond 38; removecond 30"

alias AB "slot3; addcond 32; addcond 30"

alias BB "slot1; removecond 32; removecond 30"


r/Tf2Scripts • • Oct 29 '20

Question So I want to test the tf2 weapon specific xhairs but...

12 Upvotes

I can't see what I'm doing like i have a some questions:

  1. Should I put cl_crosshair_file "" in autoexec.cfg?

  2. Is there a pictures of how it looks every explosion effect? And yeah that is all thx for reading and maybe responding (sorry for my broken english)


r/Tf2Scripts • • Jul 28 '20

Wrong Section I had my tf2 dedicated server when it had an update so i updated it like you do. then now it just hsows me this when i try to load the scrds pleasse help ive looked all over the internet

Thumbnail
gallery
12 Upvotes

r/Tf2Scripts • • Mar 04 '19

Script This script counts the number of times you jump, crouch, or attack, all the way to 1,000! [Fun]

12 Upvotes

I made some scripts that count the amount of times you jump, duck, or attack, individually. Once you reach certain milestones, it will display the message to everyone in the server, though this can be changed to just your team or just your party (which will usually consist of only yourself).

It counts all the way up to 1,000, but I've compacted it to just 40 or so lines per counter type. I did this using a 10-digit system, with each alias-definition of "(Jump/Duck/Attack)Count/Second/Third" being a digit from 0 through 9.

"JumpCount" is the digit in the 1's place

"JumpCountSecond" is the digit in 10's place

"JumpCountThird" is the digit in the 100's place

Example:

If JumpCount is defined as JumpCount3, JumpCountSecond is defined as JumpCountSecond2, and JumpCountThird is defined as JumpCountThird4, then that means you jumped 423 times.

Non-binded custom console commands:

You can type the commands, "ResetJumpCounter", "ResetDuckCounter", and "ResetAttackCounter", in the console to reset their respective counters to 0.

You can type the commands, "StopJumpCounter", "StopDuckCounter", and "StopAttackCounter", in the console to stop achievement progress until the respective counter is reset. Use this in case it's bothering mods.

You can use the pause and unpause commands to pause and unpause achievement progress.

Use "ResetAllCounters" to reset all counters.Use "StopAllCounters" to stop all counters.Use "PauseAllCounters" to pause all counters.Use "UnpauseAllCounters" to unpause all counters.

Copy and paste this into a CFG file:

//Binds
bind space "+SpacePress"
alias +SpacePress "+jump;JumpCounter"
alias -SpacePress "-jump"

bind ctrl "+CtrlPress"
alias +CtrlPress "+duck;DuckCounter"
alias -Ctrlpress "-duck"

bind mouse1 "+MousePress"
alias +MousePress "+attack;AttackCounter"
alias -MousePress "-attack"

//"All" Aliases
alias ResetAllCounters "ResetJumpCounter;ResetDuckCounter;ResetAttackCounter"
alias StopAllCounters "StopJumpCounter;StopDuckCounter;StopAttackCounter
alias PauseAllCounters "PauseJumpCounter;PauseDuckCounter;PauseAttackCounter
alias UnpauseAllCounters "UnpauseJumpCounter;UnpauseDuckCounter;UnpauseAttackCounter"

//Jump Counter<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
alias ResetJumpCounter "alias JumpCounter JumpCount0"
alias StopJumpCounter "alias JumpCounter none"
alias PauseJumpCounter "bind space +Jump"
alias UnpauseJumpCounter "bind space +SpacePress"

alias JumpCounter "JumpCount0"

//Digit in the 1's place:
alias JumpCount0 "alias JumpCounter JumpCount1"
alias JumpCount1 "alias JumpCounter JumpCount2"
alias JumpCount2 "alias JumpCounter JumpCount3"
alias JumpCount3 "alias JumpCounter JumpCount4"
alias JumpCount4 "alias JumpCounter JumpCount5"
alias JumpCount5 "alias JumpCounter JumpCount6"
alias JumpCount6 "alias JumpCounter JumpCount7"
alias JumpCount7 "alias JumpCounter JumpCount8"
alias JumpCount8 "alias JumpCounter JumpCount9"
alias JumpCount9 "JumpCounterSecond;alias JumpCounter JumpCount0"

alias JumpCounterSecond "JumpCountSecond0"

//Digit in the 10's place:
alias JumpCountSecond0 "alias JumpCounterSecond JumpCountSecond1"
alias JumpCountSecond1 "alias JumpCounterSecond JumpCountSecond2"
alias JumpCountSecond2 "alias JumpCounterSecond JumpCountSecond3"
alias JumpCountSecond3 "alias JumpCounterSecond JumpCountSecond4"
alias JumpCountSecond4 "alias JumpCounterSecond JumpCountSecond5"
alias JumpCountSecond5 "alias JumpCounterSecond JumpCountSecond6"
alias JumpCountSecond6 "alias JumpCounterSecond JumpCountSecond7"
alias JumpCountSecond7 "alias JumpCounterSecond JumpCountSecond8"
alias JumpCountSecond8 "alias JumpCounterSecond JumpCountSecond9"
alias JumpCountSecond9 "JumpCounterThird;alias JumpCounterSecond JumpCountSecond0"

alias JumpCounterThird "JumpCountThird0"

//Digit in the 100's place:
alias JumpCountThird0 "alias JumpCounterThird JumpCountThird1"
alias JumpCountThird1 "say This user has jumped 200 times since logging into TF2!;alias JumpCounterThird JumpCountThird2"
alias JumpCountThird2 "alias JumpCounterThird JumpCountThird3"
alias JumpCountThird3 "say This user has jumped 400 times since logging into TF2!;alias JumpCounterThird JumpCountThird4"
alias JumpCountThird4 "alias JumpCounterThird JumpCountThird5"
alias JumpCountThird5 "say This user has jumped 600 times since logging into TF2!;alias JumpCounterThird JumpCountThird6"
alias JumpCountThird6 "alias JumpCounterThird JumpCountThird7"
alias JumpCountThird7 "say This user has jumped 800 times since logging into TF2!;alias JumpCounterThird JumpCountThird8"
alias JumpCountThird8 "alias JumpCounterThird JumpCountThird9"
alias JumpCountThird9 "say This user has jumped 1000 times since logging into TF2!;alias JumpCounterThird none"

//Duck Counter<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
alias ResetDuckCounter "alias DuckCounter DuckCount0"
alias StopDuckCounter "alias DuckCounter none"
alias PauseDuckCounter "bind ctrl +Duck"
alias UnpauseDuckCounter "bind ctrl +CtrlPress"

alias DuckCounter "DuckCount0"

//Digit in the 1's place:
alias DuckCount0 "alias DuckCounter DuckCount1"
alias DuckCount1 "alias DuckCounter DuckCount2"
alias DuckCount2 "alias DuckCounter DuckCount3"
alias DuckCount3 "alias DuckCounter DuckCount4"
alias DuckCount4 "alias DuckCounter DuckCount5"
alias DuckCount5 "alias DuckCounter DuckCount6"
alias DuckCount6 "alias DuckCounter DuckCount7"
alias DuckCount7 "alias DuckCounter DuckCount8"
alias DuckCount8 "alias DuckCounter DuckCount9"
alias DuckCount9 "DuckCounterSecond;alias DuckCounter DuckCount0"

alias DuckCounterSecond "DuckCountSecond0"

//Digit in the 10's place:
alias DuckCountSecond0 "alias DuckCounterSecond DuckCountSecond1"
alias DuckCountSecond1 "alias DuckCounterSecond DuckCountSecond2"
alias DuckCountSecond2 "alias DuckCounterSecond DuckCountSecond3"
alias DuckCountSecond3 "alias DuckCounterSecond DuckCountSecond4"
alias DuckCountSecond4 "alias DuckCounterSecond DuckCountSecond5"
alias DuckCountSecond5 "alias DuckCounterSecond DuckCountSecond6"
alias DuckCountSecond6 "alias DuckCounterSecond DuckCountSecond7"
alias DuckCountSecond7 "alias DuckCounterSecond DuckCountSecond8"
alias DuckCountSecond8 "alias DuckCounterSecond DuckCountSecond9"
alias DuckCountSecond9 "DuckCounterThird;alias DuckCounterSecond DuckCountSecond0"

alias DuckCounterThird "DuckCountThird0"

//Digit in the 100's place:
alias DuckCountThird0 "say This user has crouched 100 times since logging into TF2!;alias DuckCounterThird DuckCountThird1"
alias DuckCountThird1 "say This user has crouched 200 times since logging into TF2!;alias DuckCounterThird DuckCountThird2"
alias DuckCountThird2 "say This user has crouched 300 times since logging into TF2!;alias DuckCounterThird DuckCountThird3"
alias DuckCountThird3 "say This user has crouched 400 times since logging into TF2!;alias DuckCounterThird DuckCountThird4
alias DuckCountThird4 "say This user has crouched 500 times since logging into TF2!;alias DuckCounterThird DuckCountThird5
alias DuckCountThird5 "say This user has crouched 600 times since logging into TF2!;alias DuckCounterThird DuckCountThird6
alias DuckCountThird6 "say This user has crouched 700 times since logging into TF2!;alias DuckCounterThird DuckCountThird7
alias DuckCountThird7 "say This user has crouched 800 times since logging into TF2!;alias DuckCounterThird DuckCountThird8
alias DuckCountThird8 "say This user has crouched 900 times since logging into TF2!;alias DuckCounterThird DuckCountThird9
alias DuckCountThird9 "say This user has crouched 1000 times since logging into TF2!;alias DuckCounter none"

//Attack Counter<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
alias ResetAttackCounter "alias AttackCounter AttackCount0"
alias StopAttackCounter "alias AttackCounter none"
alias PauseAttackCounter "bind mouse1 +attack"
alias UnpauseAttackCounter "bind mouse1 +MousePress"

alias AttackCounter "AttackCount0"

//Digit in the 1's place:
alias AttackCount0 "alias AttackCounter AttackCount1"
alias AttackCount1 "alias AttackCounter AttackCount2"
alias AttackCount2 "alias AttackCounter AttackCount3"
alias AttackCount3 "alias AttackCounter AttackCount4"
alias AttackCount4 "alias AttackCounter AttackCount5"
alias AttackCount5 "alias AttackCounter AttackCount6"
alias AttackCount6 "alias AttackCounter AttackCount7"
alias AttackCount7 "alias AttackCounter AttackCount8"
alias AttackCount8 "alias AttackCounter AttackCount9"
alias AttackCount9 "AttackCounterSecond;alias AttackCounter AttackCount0"

alias AttackCounterSecond "AttackCountSecond0"

//Digit in the 10's place:
alias AttackCountSecond0 "alias AttackCounterSecond AttackCountSecond1"
alias AttackCountSecond1 "alias AttackCounterSecond AttackCountSecond2"
alias AttackCountSecond2 "alias AttackCounterSecond AttackCountSecond3"
alias AttackCountSecond3 "alias AttackCounterSecond AttackCountSecond4"
alias AttackCountSecond4 "alias AttackCounterSecond AttackCountSecond5"
alias AttackCountSecond5 "alias AttackCounterSecond AttackCountSecond6"
alias AttackCountSecond6 "alias AttackCounterSecond AttackCountSecond7"
alias AttackCountSecond7 "alias AttackCounterSecond AttackCountSecond8"
alias AttackCountSecond8 "alias AttackCounterSecond AttackCountSecond9"
alias AttackCountSecond9 "AttackCounterThird;alias AttackCounterSecond AttackCountSecond0"

alias AttackCounterThird "AttackCountThird0"

//Digit in the 100's place:
alias AttackCountThird0 "alias AttackCounterThird AttackCountThird1"
alias AttackCountThird1 "say This user has attacked 200 times since logging into TF2!;alias AttackCounterThird AttackCountThird2"
alias AttackCountThird2 "alias AttackCounterThird AttackCountThird3"
alias AttackCountThird3 "say This user has attacked 400 times since logging into TF2!;alias AttackCounterThird AttackCountThird4"
alias AttackCountThird4 "alias AttackCounterThird AttackCountThird5"
alias AttackCountThird5 "say This user has attacked 600 times since logging into TF2!;alias AttackCounterThird AttackCountThird6"
alias AttackCountThird6 "alias AttackCounterThird AttackCountThird7"
alias AttackCountThird7 "say This user has attacked 800 times since logging into TF2!;alias AttackCounterThird AttackCountThird8"
alias AttackCountThird8 "alias AttackCounterThird AttackCountThird9"
alias AttackCountThird9 "say This user has attacked 1000 times since logging into TF2!;alias AttackCounterThird none"

Of course, if you can see the trick being used to make these, then you can extend the digit in the 100's place to well beyond 1000 (and maybe even add a fourth digit), and you can change the milestones to any numbers evenly divisible by 100.


r/Tf2Scripts • • Jan 22 '19

Resource PSA - Null Vote Glitch Workaround

Thumbnail
self.tf2
12 Upvotes

r/Tf2Scripts • • Feb 24 '18

Script New script for the engineer?

Thumbnail
youtube.com
12 Upvotes

r/Tf2Scripts • • Aug 11 '17

Script The first ever working contract script for TF2! Contract status visible on screen! With sounds!

12 Upvotes

Hi. Yesterday I was really bored, and I wanted to make a script for myself for TF2 that would allow me to create custom contracts (Like from gun mettle and tough break) for myself, so that I can challenge myself in TF2.

I decided to release this to public today, so here you go.

SCRIPTS DOWNLOAD / https://drive.google.com/open?id=0Bzf66qVMuNTFS3I0TGwza1VkV1U

Enjoy! All instructions on how to use are in this zip file and in the contract.cfg file.

Tell me what do you think of it and tell me if you find any errors!


r/Tf2Scripts • • Jul 23 '12

Answered How do I bind whole loadouts to keys?

12 Upvotes

I'm sure it's been answered before, but I couldn't find anything with the search function.

I'd like to bind my loadouts (A-D) to the first 4 keys of the numpad (1-4). How do?

Thanks!


r/Tf2Scripts • • Mar 05 '12

Script [Medic][Script] ambrose's full-blown medic.cfg for the casual gentleman

12 Upvotes

Get it here.

This config is not as serious as Chris's medic.cfg or whatever, but it's good enough to make your pub play more enjoyable and good for the occasional lobby.

Included in the config:

  • Crosshairs, no viewmodels except melee.

  • Auto-heal fix.

  • Classic medic radar.

  • Fixed spawn-move script, which moves your spawn up without losing any ubercharge, and doesn't make you change to a random class so it can be used in highlander.

  • Faking uber, uber masking, uber alert, the goods.

Feel free to bug me if you find any problems.

edit 8 MONTHS LATER

my current medic setup is way way different from this now, but this by itself should work quite fine.

One thing to note is that you NEED to put this in all other class.cfg, which I failed to note originally, because I'm an idiot

unbind 1
unbind 2
unbind 3

bind 1 slot1
bind 2 slot2
bind 3 slot3

unbind mouse1
unbind mouse2

unbind F1
unbind i
unbind f

bind mouse1 +attack
bind mouse2 +attack2

r_drawviewmodel 1

that'll reset all of the things this script binds.


r/Tf2Scripts • • Mar 04 '26

Script Script that prints the output of the console to the hud. Useful for displaying the output of a bind.

11 Upvotes

developer 1; clear; echo [text here]; wait 800; developer 0

This set of commands will

  • Enable developer mode which prints the output of the console to your hud in the top left corner.

  • Clears the console so nothing unintended is displayed (kinda sucks this is required)

  • Echos the text you want so it appears on your hud

  • Waits for 800 frames so you have time to see it

  • disables developer mode to remove the text from the hud.

This script is handy if you want to print to your screen the state of cvar in your bind. Or print a confirmation that a bind was ran.

If you know of any better way of doing this let me know. This method has quite a few limitations like clearing the console and sometimes showing irrelevant text from other commands/game events which happened in that 800 frame window.

Here's a (horrible) example script utilizing it:

//cl_pred_doresetlatch toggle for switching between hitscan/projectiles (may help with hitbox desync)

bind - doresetlatch_switch //Sets the key "-" to toggling between cl_pred_doresetlatch states

alias doresetlatch_switch doresetlatch_toggle_1

//Disable
alias doresetlatch_print_output_0 "developer 1; clear; echo cl_pred_doresetlatch 0; echo it is disabled!; wait 800; developer 0" //Sets an alias for command set needed to print the text.

alias doresetlatch_toggle_0 "cl_pred_doresetlatch 0; doresetlatch_print_output_0; alias doresetlatch_switch doresetlatch_toggle_1" //Sets an alias for the toggle off, sets cl_pred_doresetlatch to 0, then runs the doresetlatch_print_output_0 to print the status off text, finally sets the doresetlatch_switch alias to doresetlatch_toggle_1 to complete the toggle.

//Enable
alias doresetlatch_print_output_1 "developer 1; clear; echo cl_pred_doresetlatch 1; echo it is enbled!; wait 800; developer 0" //Sets an alias for command set needed to print the text.

alias doresetlatch_toggle_1 "cl_pred_doresetlatch 1; doresetlatch_print_output_1 ; alias doresetlatch_switch doresetlatch_toggle_0" //Sets an alias for the toggle on, sets cl_pred_doresetlatch to 0, then runs the doresetlatch_print_output_1 to print the status on text, finally sets the doresetlatch_switch alias to doresetlatch_toggle_0 to complete the toggle.

r/Tf2Scripts • • Jul 25 '21

Question When I try to load certain demos, this is the screen that appears and my game then proceeds to crash 5 secs after. Anyone knows wtf is going on?

Post image
11 Upvotes

r/Tf2Scripts • • Apr 19 '21

Question disable demo recording by command?

11 Upvotes

is there a way i can set demo recordings to manual using a console command? i want to put it in an autoexec file, cause everytime i close tf2 some advanced settings reset.


r/Tf2Scripts • • Feb 04 '21

Answered Help pls im dumb

11 Upvotes

hey i was wondering if anyone can help me with creating a toggle that allows me to change what my mouse wheel does so it changes from regular quick switch to this

  • Mousewheel Up: Primary Weapon

  • Mousewheel Down: Melee Weapon

  • Mousewheel Click: Secondary Weapon


r/Tf2Scripts • • Sep 03 '20

Resource Useless Fact: Adding spaces will make the alias work only if in quotes.

11 Upvotes

So while I was seeing if I could try my hand at making custom cvars execute commands (you can't), I found out that you can add white-space in alias names. What this does however, is that now it requires quotes to execute, and can only be executed with quotes directly or in a cfg file exactly like "testcmd "; it cannot be passed as a parameter.

Example cfg:

alias "testcmd " "echo Woked. Wait, I MEANT WORKED!"
alias testcmd2 "testcmd "
bind i "testcmd "

So if I were to execute in console "testcmd ", it will execute. Same for if I put that exact command in a cfg file. As a result, no you cannot make terminal only commands, which is why I called this oddity useless. Just something I wanted to share since I haven't seen anyone else talk about it.


r/Tf2Scripts • • Jun 19 '20

Script Some Quality of Life Improvement Scripts for Engineer

11 Upvotes

//These aliases should be fairly contextually sound. Kills an existing building of the appropriate type to make a new one. Saves time on inputs.

alias "moregun" "destroy 2; build 2"

alias "vending" "destroy 0; build 0"

alias "entreda" "destroy 1 0; build 1 0"

alias "exitaco" "destroy 1 1; build 1 1"

//If this works, then when I'm using the wrangler I can switch to that mode at the literal press of a button while my weapons are not interfered with.

alias "wranglerModeOn" "echo We have the wrangler.; slot1; alias goingUp slot1; alias goingDown slot3; bind 5 wranglerModeOff"

alias "wranglerModeOff" "echo We have the pistol.; slot1; alias goingUp slotDos; alias goingDown slotTres; bind 5 wranglerModeOn"

alias "wranglerTime" "slot2"

bind 1 moregun

bind 2 vending

bind 3 entreda

bind 4 exitaco

bind 5 "wranglerModeOn"

bind shift +attack2

bind c "wranglerTime"

Idea is to be able to drop buildings quickly. I'm not usually hauling buildings long distances anyways, so being able to pop them on a moment's notice is useful for me specifically.

Additionally, here's my weapon switch binds:

// The following keeps you from switching to Disguise Kit or Constructor PDA when rotating weapons. For classes using these tools, personalize the number keys to make use of their pdas.

alias "slotUno" "slot1; alias goingUp slotDos; alias goingDown slotTres"

alias "slotDos" "slot2; alias goingUp slotUno; alias goingDown slotTres"

alias "slotTres" "slot3; alias goingUp slotUno; alias goingDown slotDos"

alias "goingUp" "slotDos"

alias "goingDown" "slotTres"

alias "viewModelOn" "r_drawviewmodel 0; alias viewModelToggle viewModelOff"

alias "viewModelOff" "r_drawviewmodel 1; alias viewModelToggle viewModelOn"

alias "viewModelToggle" "viewModelOff"

bind mwheelup goingUp

bind mwheeldown goingDown

bind mouse2 "viewModelToggle"

Hoping this helps other people like it helps me, wouldn't mind any fine-tuning you guys can recommend, tho I suspect I'm as good as I'm getting with this setup.