r/Tf2Scripts • • Aug 23 '17

Script TF Birthday Noisemaker Spam Script

5 Upvotes

I got bored and didn't want to do the billion things I actually need to, so to commemorate Team Fortress 2 turning 10 years old here's a script that gives the most reverent of gifts to the game: spamming the birthday noisemaker until everyone's eardrums burst.

To install this script, you'll need to create the file path \Steam\steamapps\common\Team Fortress 2\tf\custom\<name this whatever you want>\cfg\, create a .txt file inside that folder, and name it autoexec.cfg. Then open it up and paste this code into it:

// Spam Spam Spam Spam Spam Spam Spammity Spaaaaaaaam
// by ABadHaiku (BTPOS)
// Replace <key> with the key you wish to bind the script to. (List of key names on https://wiki.teamfortress.com/wiki/Scripting#List_of_key_names)
bind <key> tf2birthday

waitTester
alias waitTester "alias waitTest waitPositive; wait; waitTest"
alias wait "alias waitTest waitNegative"
alias waitPositive "echo Wait is enabled, you're good to go!; alias tf2birthday tf2birthdayenabled"
alias waitNegative "echo Wait command disabled on this server, script disabled.; alias tf2birthday tf2birthdaydisabled"
alias tf2birthdayenabled "+use_action_slot_item; wait 5; -use_action_slot_item; wait 5; tf2birthdayloop"
alias tf2birthdayloop "tf2birthdayenabled"
alias tf2birthdaydisabled "echo sad doot"

Replace <key> with the button you want to use to activate it, and you're done! All that's left to do is pop onto a server, hit the key you assigned it to, and party like there's been 10 years of tomorrows!
Happy birthday, Team Fortress!


r/Tf2Scripts • • Aug 22 '17

Satisfied [Request] Very simple engineer request.

1 Upvotes

I'm looking for an Engie script that replaces the sound of 'erecting' a building into a cheers (C 3)

It shouldn't be too hard I suppose, thanks!


r/Tf2Scripts • • Aug 20 '17

Script My Scout Script

1 Upvotes

Hello! This was my first script, I hope it is useful, it certainly has been for me, and I had a lot of fun coding it. Let me know if you'd like it tweaking or if you have any extra ideas or tweaks for it! Enjoy your scouting!

EDIT: Sorry, the orginal code had an issue with the crosshairs, I have fixed it now.

	////LOUDOUT: SCOUT////
	+reload
	
//WEAPONS
	cl_crosshair_file default
	cl_crosshair_red "255"; cl_crosshair_green "255"; cl_crosshair_blue "00"
	cl_crosshair_scale "35"
	//CROSSHAIRS and MODELS
		alias	xhairP	"cl_crosshair_red "255";	cl_crosshair_green "255";	cl_crosshair_blue "00";	cl_crosshair_file default"
		alias	xhairS	"cl_crosshair_red "0";	cl_crosshair_green "255";	cl_crosshair_blue "255";	cl_crosshair_file crosshair7"
		alias	xhairT	"cl_crosshair_red "255";	cl_crosshair_green "00";	cl_crosshair_blue "0";		cl_crosshair_file crosshair3"
		
		alias 	+primary	"slot1;tg_model_0;cl_crosshair_scale "35"		
		alias 	+secondary 	"slot2;tg_model_0;"		
		alias 	+tertiary 	"slot3;tg_model_1;cl_crosshair_scale "60"
		
		alias 	tg_model_1	"r_drawviewmodel 1;viewmodel_fov 65"
		alias 	tg_model_0	"r_drawviewmodel 0;viewmodel_fov 0"
	// PISTOL SWITCH
		alias	+pistol 	"+secondary;xhairS"
		alias	-pistol 	"+primary;xhairP"
	// pistol
		alias	+bat 		"+tertiary;xhairT"
		alias	-bat 		"+primary;xhairP"		
//OTHER
	//CROUCHJUMP
		alias 	+cj 		"+jump;+duck;spec_mode"
		alias 	-cj 		"-jump;-duck"
	//EXTRA ZOOM
		alias 	+zoom 		"fov_desired 60"
		alias 	-zoom 		"fov_desired 90"
			//BINDINGS
			bind 	mouse2 	"+pistol"
			bind 	SHIFT 	"+bat"
			bind	ALT		"+zoom"
			bind	SPACE	"+cj"
			bind	r 		"voicemenu 1 1" //pressing 'r' calls out 'spy'.
			bind	t 		"voicemenu 0 1" //pressing 't' says "thank you"
			bind	p 		"explode"		//pressing 'p' is mildly amusing
	
	//DESCRIPTION
		//This script I find really helpful for the fast paced gameplay of the scout. 
		//Hold down right click to draw your pistol(release to return to shotgun), hold down shift to get out your bat and get to thwacking.
		//NOTE: This cript automatically defaults to the scattergun. Left click is always attack.
		//Auto reloading and crouchjumping are on, which I cannot highly recommend enough, especially as the scout.
		//Holding down 'ALT' will give you a little bit of zoom to help you with your pistol sniping.
		//I also run this with a null-cancelling movement script, which if you're not already using you should definitely get one!

r/Tf2Scripts • • Aug 19 '17

Question Really cool scripts?

4 Upvotes

Does anyone know any really cool bind scripts. The only one I know of is to make the heavy taunt say "Pootis pow" instead of the traditional "Pow." Btw I just started scripting yesterday so I'm new to this.


r/Tf2Scripts • • Aug 13 '17

Request Viewmodel hide script

1 Upvotes

I need help with a script to auto-hide my primary weapon on sniper only. any help? Thank you


r/Tf2Scripts • • Aug 12 '17

Script TF2 Custom Contract script V2! Bonus part of the contract, more options, better customizability and more! +Demonstration

1 Upvotes

I made a reddit post yesterday.

I showed off a custom contract script made by me. It had a few bugs, and was unfinished. Today I present you a new custom contract script, that has much more stuff and is much better! Hope you like it ;p

Video demonstration of the scripts https://youtu.be/nM1ylv_pT-U

Script download https://drive.google.com/file/d/0Bzf66qVMuNTFd1JuY09jNGU3a00/view

Please tell me if you find ANY glitches or bugs! Feedback is important for me!


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 • • Aug 11 '17

Request Any way to store and retrieve variables outside of the game?

1 Upvotes

I've made myself a loadout switch script that works pretty well. It includes a last loadout button that, when pressed, loads the current loadout (I use this for faster resupplying).

The issue is, the current loadout alias doesn't get stored, and resets upon game restart. So it goes something like this:

Game starts
Autoexec sets alias lastloadout to load_itempreset 0
I change loadouts, alias lastloadout is set to load_itempreset 1
I restart the game. lastloadout is set to load_itempreset 0,
but I want it to remain load_itempreset 1.

If I do not set lastloadout in autoexec, then it just doesn't exist by default, which isn't good either.

Ideas?


r/Tf2Scripts • • Aug 06 '17

Video settings in autoexec instead of launch options?

1 Upvotes

Like many I use a graphics config so I use various video settings in my launch options. I was wondering

  1. if using these settings through my autoexec instead would be ok
  2. what the actual scripting command equivalent for the launch options are.

The launch options in question: -dxlevel 98 -full -w 1920 -h 1080 Would also like to know the command for regular windowed mode if it exists.

The reason I'm asking is because I'd like to be able to use 2 different autoexec.cfg's. One for my normal settings and one for testing/messing around that loads in a smaller windowed resolution already in a server and doesnt bother with my preloading commands in my normal autoexec etc. (no SSD and the game takes a really long time to launch for me)

Changing both launch options and my autoexec.cfg is kinda tedious at the moment so I'd prefer to be able to just change cfgs. I also have -console -novid -high in my launch options but I plan to leave those in regardless so its doesnt really matter to me if there isnt an equivalent scripting command.


r/Tf2Scripts • • Aug 04 '17

Script Bringing scripts to mainstream: TF2-EasyScript

14 Upvotes

I come here to share with you a stupidly complex script API to address all your scripting needs:
GitHub link
GitLab link

If you ever wrote script, you know that they require a lot of ground work. Well, I've done it for you, all of it, I mean it. Everything you ever wanted is just a few lines of code. Weapon specific FOV, quickbuild, trahstalking? Anything has become easier with TF2-EasyScriptTM (former ultimate framework).

I will stop fanfares here since i already did that in readme. My idea behind this script is to provides lots of utlities for scrpting like stable frontend and short-hand aliases for every in-game function. This means sharing your scripts is also easier, since very little modification should be ever required.

PS. Even if you don't really need or understand it, just please appreciate that a dude on the internet spent moths on creating a programming language and a compiler to create 94kb script to make writing other scripts easier for a videogame. I need some validation.


r/Tf2Scripts • • Aug 04 '17

Request Viewmodel Script can't find it

3 Upvotes

So I had been using the same viewmodel script for a year, which toggles between have all viewmodels on and only melee on. It was a simple script that used vm_tog and I bound the switch to r with mwheelup and mwheeldown for slot 1 and 2 respectively. Had mouse5 for melee. I lost it when my idiot cousin went on my admittedly shit computer and deleted tf2 so all my configs went down the drain. So if anyone can find that script I will love you forever. I took about 3 months to find it the first time around and I'm not willing to go through that again.