PDA

View Full Version : Helpful Spy Scripts


Pages : [1] 2 3 4 5 6 7

stabby stabby
11-16-2010, 03:05 PM
Hello stabbers and pistol poppers.

I've received a number of requests for a few scripts I use, so I figured I'd post them here for the lot of you.

You may view my config in action here:
http://www.youtube.com/watch?v=vqWEYPV1Hlo


And now the scripts themselves!


Crosshair color flasher/type toggler
Flashes the crosshair's color and/or type with any action you'd like; includes an example script for setting each movement key to flash between two colors upon press and release. Helpful for visibility if you use a small crosshair (which I recommend trying). The "type" toggler is very useful for keeping the Ambassador crosshair from expanding too much upon firing.

// first you set up the colors and shapes/sizes you want the xhair to toggle through (cl_crosshair_file = type cl_crosshair_scale = size). Keep in mind that the base size of the crosshair varies depending on the weapon: //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //

//xhair TYPE toggle--switches crosshair type when shooting; good for preventing Amby xhair from expanding too large (uses my settings as an example). NOTE: Must be manually integrated with viewmodel scripts to work in conjunction.
//================================================== =======
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair5;cl_crosshair_scale 14;alias dotxhairtype dotxhairtyper" // tweak crosshair_scale values to your liking
alias dotxhairtyper "cl_crosshair_file crosshair2;cl_crosshair_scale 22;alias dotxhairtype dotxhairtypeb"

bind mouse1 +crosshairfire
alias +crosshairfire "+attack;dotxhairtype;spec_next"
alias -crosshairfire "-attack;dotxhairtype"
//================================================== =======

// xhair COLOR toggle
//================================================== =======
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"
//================================================== =======

// // // // // // // // // // // // // // // // //
// movement color toggle/flashing xhair example //
// // // // // // // // // // // // // // // // //

bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"

bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"

bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"

bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"
//================================================== =======

// // // // // // // // // // //
// Other color cycle examples //
// // // // // // // // // // //

//Black/White xhair color toggle
//================================================== =======
alias dotxhaircolorbw "dotxhaircolorbwb"
alias dotxhaircolorblack "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhaircolorbw dotxhaircolorwhite"
alias dotxhaircolorwhite "cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 255;alias dotxhaircolorbw dotxhaircolorblack"
//================================================== =======

//xhair team color toggle
//================================================== =======
alias dotxhairteamcolor "dotxhairteamcolorred"
alias dotxhairteamcolorred "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhairteamcolor dotxhairteamcolorblu"
alias dotxhairteamcolorblu "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhairteamcolor dotxhairteamcolorred"

// Set "dotxhairteamcolor" to appropriate team
bind [key1] dotxhairteamcolor dotxhaircolorblu
bind [key2] dotxhairteamcolor dotxhaircolored

// Make "lastdisguise" show your disguise's current team color
bind [last disguise key] "lastdisguise;dotxhaircolor"

Crosshair Flasher + Null Movement Script
Same as the crosshair flasher script, but adds null movement--when you hit "a" while "d" is still pressed down, you will not stop moving, but immediately switch directions instead. Helpful for dodging and hard-to-hit movement.


// color toggler
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"

// Null-cancelling movement script
// (prevents you from pressing two opposing directions, which causes you to stop moving)

bind w +mfwd
bind s +mback
bind a +mleft
bind d +mright

alias +mfwd "-back;+forward;alias checkfwd +forward;dotxhaircolor"
alias +mback "-forward;+back;alias checkback +back;dotxhaircolor"
alias +mleft "-moveright;+moveleft;alias checkleft +moveleft;dotxhaircolor"
alias +mright "-moveleft;+moveright;alias checkright +moveright;dotxhaircolor"
alias -mfwd "-forward;checkback;alias checkfwd none;dotxhaircolor"
alias -mback "-back;checkfwd;alias checkback none;dotxhaircolor"
alias -mleft "-moveleft;checkright;alias checkleft none;dotxhaircolor"
alias -mright "-moveright;checkleft;alias checkright none;dotxhaircolor"
alias checkfwd none
alias checkback none
alias checkleft none
alias checkright none
alias none ""


Viewmodel Script *
Hides viewmodels when firing the gun. Gets that darn reload animation out of your face--autoreload ftw! Viewmodels reappear when using the watch or knife.

edit: Special thanks to alarossi for rooting out the typos that were causing bugs--give the man some rep!

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels<< on when shooting amby, off when knife or watch out//
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1
knife_vm_mode


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" "+watch;spec_prev" // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1;spec_next" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0;spec_next" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1;spec_next" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console



Virus' Viewmodel Adaptation with Quickswitch SupportEffectively same as the above, but with support for quickswitch. Courtesy Virus (http://forums.steampowered.com/forums/member.php?u=697160)--give rep!

bind "q" "switcher"
bind "mouse2" "+watch;spec_prev"


alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias sap_vm_mode "bind mouse1 +viewmodel_sap"

alias +viewmodel_knife "+attack;r_drawviewmodel 1;spec_next"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0;spec_next"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +viewmodel_sap "+attack;r_drawviewmodel 1;spec_next"
alias -viewmodel_sap "-attack;r_drawviewmodel 1"


alias equip_knife "slot3;r_drawviewmodel 1;knife_vm_mode"

alias equip_knife2amby "equip_knife;alias switcher equip_amby2knife;bind 2 equip_sap2knife;bind 3 equip_knife;bind 1 equip_amby2knife"
alias equip_knife2sap "equip_knife;alias switcher equip_sap2knife;bind 2 equip_sap2knife;bind 3 equip_knife;bind 1 equip_amby2knife"

alias equip_amby "slot1;r_drawviewmodel 1;amby_vm_mode"

alias equip_amby2sap "equip_amby;alias switcher equip_sap2amby;bind 2 equip_sap2amby;bind 3 equip_knife2amby;bind 1 equip_amby"
alias equip_amby2knife "equip_amby;alias switcher equip_knife2amby;bind 2 equip_sap2amby;bind 3 equip_knife2amby;bind 1 equip_amby"

alias equip_sap "slot2;r_drawviewmodel 1;sap_vm_mode"

alias equip_sap2knife "equip_sap;alias switcher equip_knife2sap;bind 2 equip_sap;bind 3 equip_knife2sap;bind 1 equip_amby2sap"
alias equip_sap2amby "equip_sap;alias switcher equip_amby2sap;bind 2 equip_sap;bind 3 equip_knife2sap;bind 1 equip_amby2sap"

alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"

equip_knife2amby

2C3C's Viewmodel Script Adaptation (http://forums.steampowered.com/forums/showpost.php?p=30138830&postcount=677)

The main thing I did was separate the variable, customizable functions of the script from the equip command and put them into their own thing (the _mode commands). This doesn't do anything functionally different, but it should let people who aren't terribly experienced with scripting modify it to their liking with wading through the swamp of code.



Weapon-Specific Viewmodel, Sensitivity, FOV, & Crosshair Script*

Pressing "1", will bring out the Revolver(/Amby/Enforcer), hide the gun, turn your FOV to 75, and set the sensitivity to 1. Press "3" for the Knife; sets the FOV back to 90, sensitivity to 3. Press "2" for the sapper; attacking with the sapper will say "Sapping" to your team in the chat. Attacking with any weapon flashes to a smaller crosshair type.

Tweak to your liking.

* This script replaces the viewmodel script posted above. Do not use the two together.



bind mouse1 vmon
fov_desired 90

//sapper
alias vmsap "bind mouse1 +sap"
alias +sap "+attack;dotxhaircolor;dotxhairtype;r_drawviewmodel 1;sapalert"
alias -sap "-attack;dotxhaircolor;dotxhairtype"
alias sapalert "say_team sapping"

alias +sapper "slot2;dotxhairtype;dotxhaircolor;sensitivity 3;r_drawviewmodel 1;vmon;fov_desired 90;viewmodel_fov 99"
alias -sapper "dotxhairtype;dotxhaircolor"
bind "2" "+sapper;vmsap" //rebind to liking


//knife
alias vmon "bind mouse1 +viewmodelon"
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1;spec_next"
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1"

alias +equip3 ";vmon;slot3;sensitivity 3;dotxhairtype;dotxhaircolor;cl_autoreload 1;m_yaw .0220000000;viewmodel_fov 99;r_drawviewmodel 1;alias wpn slot3"
alias -equip3 "dotxhaircolor;dotxhairtype;fov_desired 90;r_drawviewmodel 1"
bind "3" +equip3 //rebind to liking


//gun
alias vmoff "bind mouse1 +viewmodeloff"
alias +viewmodeloff "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 0;spec_next"
alias -viewmodeloff "-attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 0"

alias +equip1 ";slot1;dotxhairtype;dotxhaircolor;r_drawviewmodel 1;sensitivity 1;viewmodel_fov 99"
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;r_drawviewmodel 0;vmoff"
bind "1" +equip1 //rebind to liking



//watch
bind "mouse2" "+spycustomattack2"
alias +spycustomattack2 ";+attack2;dotxhaircolor;dotxhairtype;r_drawviewmod el 1;spec_prev"
alias -spycustomattack2 "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1"




// Crosshair Flashers

// xhair color toggle
//================================================== =======
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorr"
alias dotxhaircolorr "cl_crosshair_blue 64; cl_crosshair_green 255; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolorb"
//================================================== =======


// xhair type toggle
//================================================== =======
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair5;cl_crosshair_scale 14;alias dotxhairtype dotxhairtyper"
alias dotxhairtyper "cl_crosshair_file crosshair2;cl_crosshair_scale 32;alias dotxhairtype dotxhairtypeb"
//================================================== =======



Weapon Disguise Script
Changes the weapon your disguised character is holding with the press of a key and maintains your (actual) currently equipped weapon.

//disguise slot1
bind "[KEY]" +slot1_disguiser
alias +slot1_disguiser "slot1;lastdisguise"
alias -slot1_disguiser "lastinv"

//disguise slot2
bind "[KEY]" +slot2_disguiser
alias +slot2_disguiser "slot2;lastdisguise"
alias -slot2_disguiser "lastinv"

//disguise slot3
bind "[KEY]" +slot3_disguiser
alias +slot3_disguiser "slot3;lastdisguise"
alias -slot3_disguiser "lastinv"

Disguise Script
Binds the "F#" keys to corresponding class disguises to allow you to bypass the disguise kit entirely. The "t" key toggles disguise team (friendly/enemy). Plays class voice lines to confirm the selected class and color ("Yes" for enemy, "No" for friendly).
Thanks to 2C3C, AlanStatham, and Alarossi for their edits and improvements.
alias e_scout "disguise 1 -1; play vo\scout_yes01"
alias e_sniper "disguise 2 -1; play vo\sniper_yes03"
alias e_soldier "disguise 3 -1; play vo\soldier_yes04"
alias e_demoman "disguise 4 -1; play vo\demoman_yes01"
alias e_medic "disguise 5 -1; play vo\medic_yes03"
alias e_hwguy "disguise 6 -1; play vo\heavy_yes03"
alias e_pyro "disguise 7 -1; play vo\pyro_moveup01"
alias e_spy "disguise 8 -1; play vo\spy_yes02"
alias e_engineer "disguise 9 -1; play vo\engineer_yes03"

alias a_scout "disguise 1 -2; play vo\scout_no02"
alias a_sniper "disguise 2 -2; play vo\sniper_no01"
alias a_soldier "disguise 3 -2; play vo\soldier_no02"
alias a_demoman "disguise 4 -2; play vo\demoman_no03"
alias a_medic "disguise 5 -2; play vo\medic_no01"
alias a_hwguy "disguise 6 -2; play vo\heavy_no03"
alias a_pyro "disguise 7 -2; play vo\pyro_no01"
alias a_spy "disguise 8 -2; play vo\spy_no03"
alias a_engineer "disguise 9 -2; play vo\engineer_no01"

bind f1 e_scout
bind f2 e_soldier
bind f3 e_pyro
bind f4 e_demoman
bind f5 e_hwguy
bind f6 e_engineer
bind f7 e_medic
bind f8 e_sniper
bind f9 e_spy
bind f10 drop_disg
alias drop_disg "disguise 8 -2" // instantly removes disguise



alias +f_disg "bind f1 a_scout; bind f2 a_soldier; bind f3 a_pyro; bind f4 a_demoman; bind f5 a_hwguy; bind f6 a_engineer; bind f7 a_medic; bind f8 a_sniper; bind f9 a_spy"
alias -f_disg "bind f1 e_scout; bind f2 e_soldier; bind f3 e_pyro; bind f4 e_demoman; bind f5 e_hwguy; bind f6 e_engineer; bind f7 e_medic; bind f8 e_sniper; bind f9 e_spy"

bind t +f_disg



Notes:

To install the scripts, simply paste them into your spy.cfg.

You must rebind all keys in your other class .cfg's or the script will carry over to all classes.


Put the following in your autoexec and/or any class .cfg's for which you don't want the script to transfer over. If you have changed any binds from the default, change them here as well:


developer 1
echo "default settings loaded"
developer 0

// viewmodel/combination script binds
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "q" "lastinv"

bind "mouse1" "+attack"
bind "mouse2" "+attack2"


// crosshair script binds
bind "a" "+moveleft"
bind "d" "+moveright"
bind "s" "+back"
bind "w" "+forward"
bind "SPACE" "+jump"
bind "ctrl" "+duck"

sensitivity // [#] Your default sens
r_drawviewmodel // [0/1] set to "1" for viewmodels on, "0" for off


The class cfg's may be found in your program files[x86]\steam\steamapps\common\team fortress 2\tf\custom\my_custom_stuff\cfg folder.

Put the scripts you want to function for spy in your spy.cfg; you may put the crosshair script or any others you'd like to function for all classes in your autoexec.cfg, if you'd like. You will have to create this file with Notepad if you do not already have one--save it as "All Files" or it will save as "autoexec.cfg.txt".

You may also create a "default.cfg" file and put the above in that. Enter "exec default" in your class cfg's instead of copy and pasting the whole thing.


All binds (i.e. "bind x +command") may be have the "x" value replaced to whatever key you like. What I have included are only examples, typically using the default bind.


The "Combination" script does not currently support the item quickswitch feature.



Enjoy!! Do let me know if you have any questions/difficulties or find any bugs.


Use the mousewheel? Check out this thread:
http://forums.steampowered.com/forums/showthread.php?t=3067485

And the HUD and mods that I use here:
http://steamcommunity.com/groups/stabbyvideo/discussions/0/846963165458399532/

Alfabetica
11-16-2010, 03:21 PM
Been a fan of your videos for a while now, good to see you posting here! Keep up the great work.

Merc
11-16-2010, 03:46 PM
Thank you very much for sharing these, maybe now I can use the ambassador a bit more effectively. :D

eyeone
11-16-2010, 03:49 PM
What happened to the old SPUF account? At any rate, thanks for sharing these and you deserve loads more views on your vids btw.

stabby stabby
11-19-2010, 12:56 PM
Thanks guys, glad the time I spent isolating those scripts was worth it :)

Maybe next time I'll post the whole monster cfg just to scare some children.

And very flattered by the vid compliments; appreciate it!

Flechette
11-19-2010, 11:06 PM
Exceptional scripts however I don't use the DR and I use sensitivity 3 at all times, hasn't failed me yet. I can see many people should they take the effort to configure the scripts, find great use in these.

IMarwanI
11-20-2010, 01:55 AM
Nice video but I don't actually use scripts :P

but you are also using the same iRinger mod like me :P

EDIT: On second though I'll try out your scripts :)

Gilch
11-20-2010, 04:05 AM
Thanks, been trying lower sensitivities and it's really difficult to make quick turns for backstabbing. This is just the fix I was looking for!

TheSentryIsaSpy
11-20-2010, 03:21 PM
My Ambassador Zoom Script was inspired by yours, only you didn't need to give me the source code.


//Ambassador Zoom Script
alias "+sens" "fov_desired 75; viewmodel_fov 54; viewmodel_fov_demo 54; sensitivity 2.0"
alias "-sens" "fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70; sensitivity 2.7"
bind "shift" "+sens"

Now this script assumes you play at an fov of 90 degrees, if you don't, you probably won't be able to gain much benefit from this. I found out the sens command from a friend, I originally wanted a script that lowered the sensitivity, but I decided to go a bit further.

Prime42
11-21-2010, 04:38 PM
I'm having some problems with these scripts, I'm not exactly the best at scripting, so would it be possible to get some help? my main problem is that the scripts seem to be interfering with each other. Not quite sure how to explain it.

stabby stabby
11-21-2010, 05:43 PM
Oh man, I forgot a very important note:

Since the viewmodel scripts has binds inside of aliases, it's very important to rebind the keys back to your desired default actions in each of your class cfg's.

Create a new cfg in notepad and rebind everything there ("bind mouse1 +attack" for instance). call it "default.cfg" or whatever, then add "exec default.cfg" to all of your class cfg's.


If you could be more specific regarding the issue, I'm sure we can figure it out. Feel free to PM me, too.

Sorry for the trouble, Prime.

LaughingDemon
11-21-2010, 08:27 PM
Excellent scripts (even though I think I'll stay Vanilla), and nice video.

Gilch
11-21-2010, 10:09 PM
Stabby have you always used 1 2 3 for your main attack keys or have you ever tried using your mouse to switch weapons?

stabby stabby
11-21-2010, 10:56 PM
I actually just used 1/2/3 as examples because they're the defaults. Having to lift my finger from a movement key to swap weapons is no good for me.

I use mouse4 and mouse5 (side buttons on my G9x) for the knife and revolver, 'alt' for sapper, and shift for my secondary Amby sensitivity :)

crazyhorse13
11-21-2010, 11:29 PM
You seem to be missing an underscore on line 48 of your viewmodel script.

stabby stabby
11-22-2010, 03:19 PM
You seem to be missing an underscore on line 48 of your viewmodel script.

Thanks! Important mistake.

+rep :)

TheSentryIsaSpy
02-21-2011, 08:52 AM
Bumping this to ask a quick question


I noticed in one of your videos (http://www.youtube.com/watch?v=tZH7V5EONuo) you're using the same crosshair that's defaulted for Pistols, Shotguns, and the Syringe Gun.

I want to try that out for the Ambassador, just to see if it makes anything particularly easier for me.

zoee
02-21-2011, 09:14 AM
So.. what does exactly the crosshair color flasher do?

stabby stabby
02-21-2011, 10:19 AM
Bumping this to ask a quick question


I noticed in one of your videos (http://www.youtube.com/watch?v=tZH7V5EONuo) you're using the same crosshair that's defaulted for Pistols, Shotguns, and the Syringe Gun.

I want to try that out for the Ambassador, just to see if it makes anything particularly easier for me.

Oh, I love that crosshair. I don't know why they're not all available in the stock custom crosshair list.

I could explain how to extract the vtf and vtm crosshair files with gcfscape, or upload a copy for you (easier). Is it ok to post dl links in spuf?

Hatred Keez
02-21-2011, 10:25 AM
Oh, I love that crosshair. I don't know why they're not all available in the stock custom crosshair list.

I could explain how to extract the vtf and vtm crosshair files with gcfscape, or upload a copy for you (easier). Is it ok to post dl links in spuf?

If it isn't okay, could you PM me that link? Would love the default crosshair. :D

TheSentryIsaSpy
02-21-2011, 10:25 AM
Oh, I love that crosshair. I don't know why they're not all available in the stock custom crosshair list.

I could explain how to extract the vtf and vtm crosshair files with gcfscape, or upload a copy for you (easier). Is it ok to post dl links in spuf?

Just message it to me, I'll probably be including it in my vid anyhow if it's as good as I think it will be.

ParanoidDrone
02-21-2011, 08:03 PM
Bumping this to ask a quick question


I noticed in one of your videos (http://www.youtube.com/watch?v=tZH7V5EONuo) you're using the same crosshair that's defaulted for Pistols, Shotguns, and the Syringe Gun.

I want to try that out for the Ambassador, just to see if it makes anything particularly easier for me.

In particular, I'm intrigued by how it seems to change type/color just as the cooldown ends. Perhaps I'm imagining it though, since I don't know if that's even possible with scripting.

stabby stabby
02-22-2011, 11:57 PM
Put the crosshair up on megaupload. If anyone else wants it, just drop me a PM for the url.

In particular, I'm intrigued by how it seems to change type/color just as the cooldown ends. Perhaps I'm imagining it though, since I don't know if that's even possible with scripting.

The script just makes it so that when I click mouse1 down, the crosshair changes, then when I release mouse1 it changes back. So the timing's a function of my clicking...which I do try to time to the cooldown :P

It's not really possible to have the crosshair change with the cooldown with precision, even if you could use the "wait" command (not allowed with sv_pure). You could, however, set it up with mouse driver macros and scripts together...but yuck, complicated.

stabby stabby
05-30-2011, 10:08 AM
Added another script and posted the others here in addition to the Pastebin links, which weren't working for some people (sorry for the long delay guys).

PubstarRunner
05-30-2011, 10:49 AM
I knew it :D

You used a script that allowed for higher sensitivity on knifing than amby shooting. I remember from one of your videos you ran out from the spawn (dustbowl?) and you sniped like 10 guys and a sentry gun with great precision.

I was inspired, to say the least. Most people are like ,"Hurr durr, dunt snipe with the amby. Play snipah instead herp." If you're good at regular sniping, then ambassador spy should be almost easier because you can get to better vantage points and whatnot. The revolver is great and all, but the amby offers so much more to me now.

edit: It was the video 102. There was another part in there where you took down a soldier and his medic with the ambassador, which was pretty awesome.

Pink_Matter
05-30-2011, 11:18 AM
love you even more now! :D

stabby stabby
05-30-2011, 05:59 PM
Most people are like ,"Hurr durr, dunt snipe with the amby. Play snipah instead herp." If you're good at regular sniping, then ambassador spy should be almost easier because you can get to better vantage points and whatnot. The revolver is great and all, but the amby offers so much more to me now.

Agreed! The better vantage points is such a big deal, and the people who say "durr play sniper" never consider that.

alarossi
05-30-2011, 06:21 PM
bind 1 "revolverswitch"

alias revolverswitch "revolverprimary"
alias revolverprimary "slot1; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolversecondary"
alias revolversecondary "slot2; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolvermelee"
alias revolvermelee "slot3; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolverprimary"

bind 2 "sapperswitch"

alias sapperswitch "sapperprimary"
alias sapperprimary "slot1; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sappersecondary"
alias sappersecondary "slot2; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sappermelee"
alias sappermelee "slot3; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sapperprimary"

bind 3 "knifeswitch"

alias knifeswitch "knifeprimary"
alias knifeprimary "slot1; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifesecondary"
alias knifesecondary "slot2; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifemelee"
alias knifemelee "slot3; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifeprimary"



Is there a way to make the script above to work without the "wait" command?
It's pretty useful, you can change your weapon disguise without having to change your weapon, it's similar to the third one you have posted here, but imho it's a little better

sinez
05-30-2011, 06:40 PM
I actualy use scripts, but only for my personal weapon binds. The amby reload never bothers me really, and I find that I get MORE headshots with a non-intrusive sensativity of 3, so these scripts fall null for me personaly.

Also, I main YER, and the DR never worked for me. We are different spies entirly.

stabby stabby
05-31-2011, 09:10 AM
bind 1 "revolverswitch"

alias revolverswitch "revolverprimary"
alias revolverprimary "slot1; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolversecondary"
alias revolversecondary "slot2; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolvermelee"
alias revolvermelee "slot3; lastdisguise; wait 10; slot1; wait 2; alias revolverswitch revolverprimary"

bind 2 "sapperswitch"

alias sapperswitch "sapperprimary"
alias sapperprimary "slot1; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sappersecondary"
alias sappersecondary "slot2; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sappermelee"
alias sappermelee "slot3; lastdisguise; wait 10; slot2; wait 2; alias sapperswitch sapperprimary"

bind 3 "knifeswitch"

alias knifeswitch "knifeprimary"
alias knifeprimary "slot1; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifesecondary"
alias knifesecondary "slot2; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifemelee"
alias knifemelee "slot3; lastdisguise; wait 10; slot3; wait 2; alias knifeswitch knifeprimary"



Is there a way to make the script above to work without the "wait" command?
It's pretty useful, you can change your weapon disguise without having to change your weapon, it's similar to the third one you have posted here, but imho it's a little better



No, that sort of script can only work with the 'wait' command :(

TheSentryIsaSpy
05-31-2011, 01:39 PM
I tried to use a script to give me a different crosshair for each weapon a long time ago, but it didn't account for me using the last weapon used command. So I'd switch to my knife, use lastweapon, and would have the same crosshair.

smudge
06-01-2011, 03:56 PM
Thank you for these. I shall investigate them shortly :).

linkzero2
06-01-2011, 04:21 PM
this explains a lot

Kid123
06-01-2011, 09:19 PM
bump :D

Virus.
06-01-2011, 11:02 PM
I tried to use a script to give me a different crosshair for each weapon a long time ago, but it didn't account for me using the last weapon used command. So I'd switch to my knife, use lastweapon, and would have the same crosshair.

I had that problem when I wanted different sensitivities. I simmple did some heavy scripting so that q always led to the previous weapon, even though the weapons had separate binds.

Nizes
06-03-2011, 07:31 AM
I tried using the one where it hides the Ambassador viewmodel when firing.
I added underline in the line 48.
i Replaced [KEY] thing whit my keybinds for wahtc/sapper/ambassador/knife.

But still doesn't work btw can you use the same one for the revolver?

Brewskii187
06-03-2011, 09:07 AM
thanks!

+rep

stabby stabby
06-03-2011, 10:19 AM
I tried using the one where it hides the Ambassador viewmodel when firing.
I added underline in the line 48.
i Replaced [KEY] thing whit my keybinds for wahtc/sapper/ambassador/knife.

But still doesn't work btw can you use the same one for the revolver?

weird.. I'll look at it again.

stabby stabby
06-03-2011, 10:48 AM
I can't see anything wrong :(

Is anything happening at all?

And yes, this script works with any weapons.

Nizes
06-03-2011, 11:47 AM
When i tyoe in console exec autoexec(.cfg) This comes up in console
exec autoexec.cfg
"[2]" isn't a valid key
"[3]" isn't a valid key
"[1]" isn't a valid key
"[mouse2]" isn't a valid key
Viewmodel script loaded
Unknown command: Viewmodels
Unknown command: r_drawviewmodels

Heres the script if anybody could help me?
http://pastie.org/2014731

Tried it whit "[1]" too.

Pink_Matter
06-03-2011, 11:49 AM
console says that the command knife_vm_mode isn't valid and that r_drawviewmodels isn't valid either. It actually doesn't do anything.

PubstarRunner
06-03-2011, 01:09 PM
console says that the command knife_vm_mode isn't valid and that r_drawviewmodels isn't valid either. It actually doesn't do anything.

Maybe you have different names for your knife viewmodels.

Pink_Matter
06-03-2011, 01:27 PM
When i tyoe in console exec autoexec(.cfg) This comes up in console
exec autoexec.cfg
"[2]" isn't a valid key
"[3]" isn't a valid key
"[1]" isn't a valid key
"[mouse2]" isn't a valid key
Viewmodel script loaded
Unknown command: Viewmodels
Unknown command: r_drawviewmodels

Heres the script if anybody could help me?
http://pastie.org/2014731

Tried it whit "[1]" too.

Same thing happens for me.

stabby stabby
06-03-2011, 01:31 PM
When i tyoe in console exec autoexec(.cfg) This comes up in console
exec autoexec.cfg
"[2]" isn't a valid key
"[3]" isn't a valid key
"[1]" isn't a valid key
"[mouse2]" isn't a valid key
Viewmodel script loaded
Unknown command: Viewmodels
Unknown command: r_drawviewmodels

Heres the script if anybody could help me?
http://pastie.org/2014731

Tried it whit "[1]" too.

Thanks, that's very helpful. I made a couple key typos, and I'll fix them when I get to my computer.

For the binds, replace the bracketed stuff with your own keybind or sensitivity preferences.

If you want to use a sensitivity of 3, for instance, replace
sensitivity "[3]" with sensitivity "3"

przn4lif3
06-04-2011, 02:29 PM
I'm having a difficult time figuring this out. Can someone help me?

For example, how do i specify which crosshair I want to use when the amby is cooled?

Also, when I copy and paste the scripts I can't shoot my weapon.

kalel87
06-05-2011, 11:51 AM
Ok i just pasted your Viewmodel Script into my spy config and rebound the keys for amby, sapper, knife and watch but it isnt working. Am i missing something? This is whats in my spy config.cl_interp 0.033
cl_updaterate 101
cl_cmdrate 101
cl_interp_ratio 1
Rate 60000

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
Viewmodels on when shooting amby, off when knife or watch out
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodels 1
knife_vm_mode


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equipamby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console



Edit: when i load the cfg in the console i get these errors.

Viewmodel script loaded
Unknown command: Viewmodels
Unknown command: r_drawviewmodels
Unknown command: knife_vm_mode
Unknown command: -equip_amby

alarossi
06-05-2011, 12:53 PM
Ok i just pasted your Viewmodel Script into my spy config and rebound the keys for amby, sapper, knife and watch but it isnt working. Am i missing something? This is whats in my spy config.cl_interp 0.033
cl_updaterate 101
cl_cmdrate 101
cl_interp_ratio 1
Rate 60000

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels on when shooting amby, off when knife or watch out
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console



Edit: when i load the cfg in the console i get these errors.

Viewmodel script loaded
Unknown command: Viewmodels
Unknown command: r_drawviewmodels
Unknown command: knife_vm_mode
Unknown command: -equip_amby

I think now it will work

kalel87
06-05-2011, 01:00 PM
I think now it will work

Now it hides all weapons at all times.

alarossi
06-05-2011, 01:02 PM
are you really sure?
it is supposed to hide only the ambassador(or revolver) and the sapper

kalel87
06-05-2011, 01:03 PM
are you really sure?
it is supposed to hide only the ambassador(or revolver) and the sapper

I'm positive i just tested it.

alarossi
06-05-2011, 01:07 PM
try this:

cl_interp 0.033
cl_updaterate 101
cl_cmdrate 101
cl_interp_ratio 1
Rate 60000

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels on when shooting amby, off when knife or watch out
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind "mouse1" "+viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind "mouse1" "+viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind "mouse1" "+viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 1" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console

stabby stabby
06-05-2011, 01:08 PM
I think now it will work

What did you change? I couldn't find any errors looking over the script.

There was no "r_drawviewmodels" which would be a typo for "r_drawviewmodel", and the aliases returning errors in the console were properly defined.

If you could tell me, I'll edit the OP with your corrections. Thanks!

alarossi
06-05-2011, 01:13 PM
it is a pleasure to help you, mr stabby :D

cl_interp 0.033
cl_updaterate 101
cl_cmdrate 101
cl_interp_ratio 1
Rate 60000

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
>>Viewmodels<< on when shooting amby, off when knife or watch out
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
>>r_drawviewmodels<< 1
>>knife_vm_mode<<


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias >>-equipamby<< "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console

oh, and another thing, in the third script, there is another error, dunno if its only here, but the viewmodeloff and viewmodelon dont work properly

stabby stabby
06-05-2011, 01:18 PM
Very odd, I could swear I fixed those very errors!

Editing OP now, many thanks man.

kalel87
06-05-2011, 01:19 PM
Ok heres the problem when i paste in alarossi script it would only hide the weapon when i press 1 then fire. When the weapon is hidden and i press Q or use the mouse wheel the change my weapon they would all be hidden and vise versa if i have the view model showing and use the mouse wheel or Q to change to my amby. Am i use being to picky or is there a way to fix this?

alarossi
06-05-2011, 01:21 PM
Ok heres the problem when i paste in alarossi script it would only hide the weapon when i press 1 then fire. When the weapon is hidden and i press Q or use the mouse wheel the change my weapon they would all be hidden and vise versa if i have the view model showing and use the mouse wheel or Q to change to my amby. Am i use being to picky or is there a way to fix this?

the viewmodel will only change if you press 1, 2 or 3.. so, you have to switch weapons that way or you will have this issue

------------------------------------------------------------------------------------


hey stabby, the problems in the third script:
// // // // // // // // // // // // // // // // // // //
// Equips gun; sets firing gun to hide the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;dotxhairtype;sensitivity 1;m_yaw 0.044;alias wpn slot1" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;m_yaw 0.022;fov_desired 80;vmoff" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1
// ================================================== ===


// // // // // // // // // // // // // // // // // // // // // // // // // // //
// Hides viewmodel and flashes crosshair type and color when shooting the gun //
// // // // // // // // // // // // // // // // // // // // // // // // // // //

alias +viewmodeloff "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 0;m_yaw .022;sensitivity 1" // attacks, hides viewmodel, sets sensitivity and mouse yaw for gun, flashes crosshair type/color #1
alias -viewmodeloff "-attack;dotxhairtype;dotxhaircolor" // flashes back to previous crosshair type and color

bind mouse1 +viewmodeloff // sets attack button to do the above
// ================================================== ===

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90;vmon" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for knife

// Attack for knife
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1;m_yaw 0.022;sensitivity 3" // attacks, turns viewmodels on, sets sensitivity and mouse yaw, flashes crosshair type/color #2
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1" // flashes back to previous crosshair type and color, turns viewmodels on again as safeguard

bind mouse1 +viewmodelon // sets attack button to do the above
// ================================================== ===

// // // //
// Watch //
// // // //

alias +watch "+attack2;dotxhaircolor;dotxhairtype;r_drawviewmode l 1" // brings up watch, turns on viewmodel, flashes xhair type/color
alias -watch "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1" // reverts xhair type/color

bind "mouse2" +watch // bind button for the watch

stabby stabby
06-05-2011, 01:27 PM
the viewmodel will only change if you press 1, 2 or 3.. so, you have to switch weapons that way or you will have this issue

Correct. You can change the binds to be whatever, though.

I don't use quickswitch, so I don't have a script ready that incorporates it, but one could be written.

Anyone interested in the job? I could do it, but I'm sorta notorious for taking forever on these things: see this thread.

alarossi
06-05-2011, 01:34 PM
I dont know that much about scripts, but if your desire is only to show the weapon via quickswitch, you could try this:

alias "lr" "lastinv; r_drawviewmodel 1"
bind "Q" "lr"

remember, it wont change the sensitivity or anything, it will only switch your weapon like before and show it

for mousewheel:


alias ia "r_drawviewmodel 1; +equip_amby"
bind "mwheelup" "ia"
alias ik "r_drawviewmodel 1; +equip_knife"
bind "mwheeldown" "ik"

this will only switch between the revolver and knife, mouse wheel up for ambassador and down for the knife, to use the sapper I suggest you to still use 2

wealthyelf
06-06-2011, 07:12 AM
Deleted because I missed a post and my question is already answered.

Yackemflam
06-07-2011, 11:51 PM
I'm a pretty derpy with all this, do i just copy and paste the code from the links into my spy.cfg, and save it? Because i tried and it didn't work.

stabby stabby
06-08-2011, 10:51 AM
That should work.

Try copy & pasting the code posted in the thread; I'd meant to remove the Pastebin links.

alarossi
06-08-2011, 05:57 PM
hey stabby, can you fix the third script?

stabby stabby
06-13-2011, 06:48 PM
I can and will, but I've been quite busy lately.

Essentially, the script is the same as the viewmodel one, only with extra aliases added, so a basic understanding of scripting and relevant cvars should sufffice for customization.

Regardless, expect an update within the next few days :>

thejib
06-15-2011, 07:42 PM
although
alias ia "r_drawviewmodel 1; +equip_amby"
bind "mwheelup" "ia"
alias ik "r_drawviewmodel 1; +equip_knife"
bind "mwheeldown" "ik"

seems like it'd work.. but it doesn't. It switched the weapons but doesn't hide the model.

Virus.
06-15-2011, 11:20 PM
Don't you want the value to be "0" to hide the model?

thejib
06-16-2011, 08:13 AM
well on the first shot you see the gun is all that means.. Sometimes you forget which weapon you have out if you can't see it. But after the first shot its like it doesn't execute the script.

Virus.
06-18-2011, 09:48 PM
What? You're going to have to outline what you are trying to do with it. I have no clue what you want. All I see is a script that sets viewmodels on for both weapons when using the mousewheel.

eyeone
06-21-2011, 04:38 PM
Bump to top.

Once again, thanks stabby. I used to play every class with viewmodels off 'sides spy, and the lack of autoreload just annoyed me into frustration. This was a godsend.

Hyroglyphixs
07-10-2011, 03:23 PM
Free bump.. I wish I had the technical sense to implement this to my TF2.

Unless someone could coach me..? :D

ton de mo nai
07-10-2011, 03:41 PM
Free bump.. I wish I had the technical sense to implement this to my TF2.

Unless someone could coach me..? :D

What do you need help with?

Sublime2k
07-10-2011, 05:14 PM
Can someone explain the point of crosshair changing colors as you change direction?

Hyroglyphixs
07-10-2011, 05:17 PM
What do you need help with?

Edit: I got it working!

But the scripts only work by pressing 1 2 and 3 to change weapons right?
Quick switch doesn't work?

And thanks for posting these stabby!

stabby stabby
07-10-2011, 06:46 PM
Can someone explain the point of crosshair changing colors as you change direction?

It's to make the crosshair more visible for people who use the smallest size.

You can assign the color toggle alias to other keys and commands, too.


But the scripts only work by pressing 1 2 and 3 to change weapons right?
Quick switch doesn't work?
!
Yeah, sorry, no quickswitch :)

Onlyashadow
07-10-2011, 07:08 PM
This seems like cheating to me.

Sublime2k
07-10-2011, 07:26 PM
This seems like cheating to me.
It's not. If it were cheating, Valve wouldn't allow it. Scripts are at everyone's disposal, your fault if you don't use it to your advantage.

ChaoSynergy
07-10-2011, 07:39 PM
Are you guys trying to come up with a script that determines viewmodel and such with each individual weapon? I've got something like that, don't know if it works without quickswitch enabled though.


Alias wsl12 "slot1; wait; bind q wsl21; wait; bind mwheelup wsl31; wait; bind mwheeldown wsl21; wait; bind 1 wsl12; wait; bind 2 wsl21; wait; bind 3 wsl31; wait; sensitivity 2.387; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 25;"
alias wsl13 "slot1; wait; bind q wsl31; wait; bind mwheelup wsl31; wait; bind mwheeldown wsl21; wait; bind 1 wsl13; wait; bind 2 wsl21; wait; bind 3 wsl31; wait; sensitivity 2.387; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 25;"
alias wsl21 "slot2; wait; bind q wsl12; wait; bind mwheelup wsl12; wait; bind mwheeldown wsl32; wait; bind 1 wsl12; wait; bind 2 wsl21; wait; bind 3 wsl32; wait; sensitivity 3.6; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 0;"
alias wsl23 "slot2; wait; bind q wsl32; wait; bind mwheelup wsl12; wait; bind mwheeldown wsl32; wait; bind 1 wsl12; wait; bind 2 wsl23; wait; bind 3 wsl32; wait; sensitivity 3.6; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 0;"
alias wsl31 "slot3; wait; bind q wsl13; wait; bind mwheelup wsl23; wait; bind mwheeldown wsl13; wait; bind 1 wsl13; wait; bind 2 wsl23; wait; bind 3 wsl31; wait; sensitivity 2.387; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 0;"
alias wsl32 "slot3; wait; bind q wsl23; wait; bind mwheelup wsl23; wait; bind mwheeldown wsl13; wait; bind 1 wsl13; wait; bind 2 wsl23; wait; bind 3 wsl32; wait; sensitivity 2.387; r_drawviewmodel 1; cl_crosshair_file crosshair17; cl_crosshair_scale 0;"
wsl12


It lets you do a lot of stuff. Sensitivity for each individual weapon, viewmodel, crosshair, crosshair scale...tweak it however you'd like. Works with any class.

xXW0lfD3m0nXx
07-10-2011, 08:12 PM
I use this one

echo Spy Numberpad Disguise Selector Active
echo Usage: Numpad keys 1-9 select your class
echo Numpad 0 selects RED and Numpad . (del) selects BLU
echo Numpad Enter key toggles between red and blu
echo Numpad + will disguise you randomly, while Numpad * will display which disguise you've last selected
echo (note: num * does not work with num +)

//alias commands for red binds
alias d_red_scout "disguise 1 2; d_rsc"
alias d_red_soldier "disguise 3 2; d_rso"
alias d_red_pyro "disguise 7 2; d_rpy"
alias d_red_demo "disguise 4 2; d_rdm"
alias d_red_heavy "disguise 6 2; d_rhv"
alias d_red_engi "disguise 9 2; d_ren"
alias d_red_medic "disguise 5 2; d_rmd"
alias d_red_sniper "disguise 2 2; d_rsn"
alias d_red_spy "disguise 8 2; d_rsp"

//alias commands for blu binds
alias d_blu_scout "disguise 1 1; d_bsc"
alias d_blu_soldier "disguise 3 1; d_bso"
alias d_blu_pyro "disguise 7 1; d_bpy"
alias d_blu_demo "disguise 4 1; d_bdm"
alias d_blu_heavy "disguise 6 1; d_bhv"
alias d_blu_engi "disguise 9 1; d_ben"
alias d_blu_medic "disguise 5 1; d_bmd"
alias d_blu_sniper "disguise 2 1; d_bsn"
alias d_blu_spy "disguise 8 1; d_bsp"

//create the team swapping aliases
alias select_red "s_rsc; s_rso; s_rpy; s_rdm; s_rhv; s_ren; s_rmd; s_rsn; s_rsp"
alias select_blu "s_bsc; s_bso; s_bpy; s_bdm; s_bhv; s_ben; s_bmd; s_bsn; s_bsp"

//define the class binding aliases
alias s_rsc "bind KP_END d_red_scout"
alias s_rso "bind KP_DOWNARROW d_red_soldier"
alias s_rpy "bind KP_PGDN d_red_pyro"
alias s_rdm "bind KP_LEFTARROW d_red_demo"
alias s_rhv "bind KP_5 d_red_heavy"
alias s_ren "bind KP_RIGHTARROW d_red_engi"
alias s_rmd "bind KP_HOME d_red_medic"
alias s_rsn "bind KP_UPARROW d_red_sniper"
alias s_rsp "bind KP_PGUP d_red_spy"

alias s_bsc "bind KP_END d_blu_scout"
alias s_bso "bind KP_DOWNARROW d_blu_soldier"
alias s_bpy "bind KP_PGDN d_blu_pyro"
alias s_bdm "bind KP_LEFTARROW d_blu_demo"
alias s_bhv "bind KP_5 d_blu_heavy"
alias s_ben "bind KP_RIGHTARROW d_blu_engi"
alias s_bmd "bind KP_HOME d_blu_medic"
alias s_bsn "bind KP_UPARROW d_blu_sniper"
alias s_bsp "bind KP_PGUP d_blu_spy"

//define the switches to bypass the quote limit :/ wish valve would fix it
alias d_rsc "alias disguise_what w_rsc"
alias d_rso "alias disguise_what w_rso"
alias d_rpy "alias disguise_what w_rpy"
alias d_rdm "alias disguise_what w_rdm"
alias d_rhv "alias disguise_what w_rhv"
alias d_ren "alias disguise_what w_ren"
alias d_rmd "alias disguise_what w_rmd"
alias d_rsn "alias disguise_what w_rsn"
alias d_rsp "alias disguise_what w_rsp"

alias d_bsc "alias disguise_what w_bsc"
alias d_bso "alias disguise_what w_bso"
alias d_bpy "alias disguise_what w_bpy"
alias d_bdm "alias disguise_what w_bdm"
alias d_bhv "alias disguise_what w_bhv"
alias d_ben "alias disguise_what w_ben"
alias d_bmd "alias disguise_what w_bmd"
alias d_bsn "alias disguise_what w_bsn"
alias d_bsp "alias disguise_what w_bsp"

//define the disguise list for disguise identifier
alias w_rsc "echo Last disguised as: Red Scout"
alias w_rso "echo Last disguised as: Red Soldier"
alias w_rpy "echo Last disguised as: Red Pyro"
alias w_rdm "echo Last disguised as: Red Demo"
alias w_rhv "echo Last disguised as: Red Heavy"
alias w_ren "echo Last disguised as: Red Engineer"
alias w_rmd "echo Last disguised as: Red Medic"
alias w_rsn "echo Last disguised as: Red Sniper"
alias w_rsp "echo Last disguised as: Red Spy"

alias w_bsc "echo Last disguised as: Blu Scout"
alias w_bso "echo Last disguised as: Blu Soldier"
alias w_bpy "echo Last disguised as: Blu Pyro"
alias w_bdm "echo Last disguised as: Blu Demoman"
alias w_bhv "echo Last disguised as: Blu Heavy"
alias w_ben "echo Last disguised as: Blu Engineer"
alias w_bmd "echo Last disguised as: Blu Medic"
alias w_bsn "echo Last disguised as: Blu Sniper"
alias w_bsp "echo Last disguised as: Blu Spy"

//.wav file integration
alias play_red "play selectred.wav"
alias play_blu "play selectblu.wav"

//loop toggle command for enter key
alias toggle toggle1
alias toggle1 "select_red; play_red; alias toggle toggle2"
alias toggle2 "select_blu; play_blu; alias toggle toggle1"

bind KP_INS toggle1
bind KP_DEL toggle2
bind KP_ENTER toggle
bind KP_PLUS "lastdisguise random"
bind KP_MULTIPLY "disguise_what"

toggle1

Hyroglyphixs
07-10-2011, 08:14 PM
Hmm, it seems now this script is also working for the other classes, any tips on how to fix this?

xXW0lfD3m0nXx
07-10-2011, 11:02 PM
Hmm, it seems now this script is also working for the other classes, any tips on how to fix this?

did you put it into the spy config or into the main file?

Virus.
07-10-2011, 11:11 PM
It's easy to work quickswitch into your your script.

Hyroglyphixs
07-11-2011, 12:15 AM
did you put it into the spy config or into the main file?

I'm sure I put it in the spy file..

stabby stabby
07-11-2011, 02:21 AM
You need to rebind the keys to their default commands in the other classes' cfg's. "bind 1 slot1" "bind mouse1 +attack" etc.

An easy way to do this is to make a new cfg file called "default.cfg", rebind all the keys in that, and add "exec default" to all your other class cfg's.

Hyroglyphixs
07-11-2011, 10:20 AM
You need to rebind the keys to their default commands in the other classes' cfg's. "bind 1 slot1" "bind mouse1 +attack" etc.

An easy way to do this is to make a new cfg file called "default.cfg", rebind all the keys in that, and add "exec default" to all your other class cfg's.

Thanks!

EDIT: One more question.. why does my TF2 character sometimes get stuck on the "w" key, meaning it goes forward even though I'm not pressing forward?

stabby stabby
07-12-2011, 08:24 AM
Did you assign any aliases to the "w" key?

Hyroglyphixs
07-12-2011, 03:23 PM
Nope.. I only have your scripts in the spy.cfg file and I have a whole list of default scripts in the default.cfg file.

It seems to happen when I hold the "w" key down when I change classes. (since it lags because of a huge list of default scripts).

Again, thanks for the help :) I'm so derpy at this..

EDIT: I seem to have found a solution to this. I took out a bunch of useless default scripts that were on default settings anyways and because of the lower amount of scripts the lag when switching classes is less.

stabby stabby
07-13-2011, 12:44 PM
It's easy to work quickswitch into your your script.

I'm too short on time, but if anyone wants to do this I'll add it to the OP with some thanks and +rep :)

Type A
07-13-2011, 12:59 PM
Just wanted to pop in and say that the video very much amused me. You play spy beautifully. It's flashy and fun to watch as opposed to my jump-stab-less sheer-practicality approach.

Yackemflam
07-17-2011, 02:07 AM
Bump.

YuMaD
07-17-2011, 02:28 AM
hmm teach me how to jump stab :O

stabby stabby
07-17-2011, 12:48 PM
Just wanted to pop in and say that the video very much amused me. You play spy beautifully. It's flashy and fun to watch as opposed to my jump-stab-less sheer-practicality approach.

Thanks for the kind words, that's really nice to hear.

hmm teach me how to jump stab :O

Maybe I'll post that script next ;)

Annephrank
07-17-2011, 09:49 PM
Hey man thanks for the scripts, but I have an issue. Can you tell me why the use enemies weapons with a disquise 1 2 3 changer breaks my engi quick build script?

//ENGI QUICK BUILD

//second level aliases to make the toggle magic happen
alias "quick_sentry" "qb1"
alias "quick_dispenser" "qb2"
alias "quick_entrance" "qb3"
alias "quick_exit" "qb4"

//aliases for building, set 2nd level to destroy after called
alias "qb1" "build 2 0; alias quick_sentry qd1"
alias "qb2" "build 0 0; alias quick_dispenser qd2"
alias "qb3" "build 1 0; alias quick_entrance qd3"
alias "qb4" "build 1 1; alias quick_exit qd4"

//aliases for destroying, set 2nd level to build after called
alias "qd1" "destroy 2 0; alias quick_sentry qb1"
alias "qd2" "destroy 0 0; alias quick_dispenser qb2"
alias "qd3" "destroy 1 0; alias quick_entrance qb3"
alias "qd4" "destroy 1 1; alias quick_exit qb4"

//binds that are actually used, change keys here if you wish
bind 1 "quick_sentry" //Sentry
bind 2 "quick_dispenser" //Dispenser
bind 3 "quick_entrance" //Teleporter Entrance
bind 4 "quick_exit" //Teleporter Exit

I know it has to do with 1 2 3 being used, but I don't understand how to place what where in each cfg. I have them all in my autoexec.cfg. Any help is appreciated, the different cfgs give me a headache and I wish they implemented a better way to load them besides putting opposite ♥♥♥♥ in each class cfg.

stabby stabby
07-26-2011, 03:54 PM
Updated the notes and script descriptions.

I took a look at the combination script, and I can't find anything wrong. You have to include the "dotxhair" aliases from the crosshair script, and it replaces the straight viewmodel script, so don't use those two together. Added that to the notes...sorry for any confusion.

Hey man thanks for the scripts, but I have an issue. Can you tell me why the use enemies weapons with a disquise 1 2 3 changer breaks my engi quick build script?

I know it has to do with 1 2 3 being used, but I don't understand how to place what where in each cfg. I have them all in my autoexec.cfg. Any help is appreciated, the different cfgs give me a headache and I wish they implemented a better way to load them besides putting opposite ♥♥♥♥ in each class cfg.

You have to put class-specific scripts in their respective class cfg's; they'll conflict and overwrite each-other if both are put in the autoexec. It's a pain, I know :/

Obeliskos
09-02-2011, 06:37 PM
snip, figured it out

Nokom
09-02-2011, 07:19 PM
snip, figured it out

Btw, try using a crosshair slightly larger than the size you'd like to use for the amby, as the amby crosshair is slightly smaller.

Thomas W
09-03-2011, 07:06 AM
Hello, i'm having some trouble getting the scripts to work, namely just the combination script + the colour changer script. I have only these scripts installed, and i have modified it a bit to my taste (just adding a wait command to changing the cross-hair back - now when the x-hair turns back, the ambassador cooled down, instead of when you let go of the mouse)

Everything works, changes color when i walk and shoot, it zooms in when i select the ambassador, and back out when i use the knife. However, it doesn't seem to get rid of the viewmodels.

I know why it's not working, it's a conflict between the segment for the knife and the segment for the ambassador, both set mouse1 to differing things, and the one for the knife comes last so... the viewmodels stay visible.

I was thinking of moving the binds of mouse1 into the bind 1/3 part of the scripts, which i think would fix it, but i am just wondering how to get the script to work without moving anything.






// first you set up the colors and shapes/sizes you want the xhair to toggle through (cl_crosshair_file = type cl_crosshair_scale = size). Keep in mind

that the base size of the crosshair varies depending on the weapon: //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //

// // // // // // // // // // // // // // // // // // // // // // //

//xhair TYPE toggle (with xhair my settings as an example)
//================================================== =======
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair1;cl_crosshair_scale 30;alias dotxhairtype dotxhairtyper"
alias dotxhairtyper "wait 135; cl_crosshair_file crosshair5;cl_crosshair_scale 15;alias dotxhairtype dotxhairtypeb"
//================================================== =======

// xhair COLOR toggle
//================================================== =======
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"
//================================================== =======

// // // // // // // // // // // // // // // // //
// movement color toggle/flashing xhair example //
// // // // // // // // // // // // // // // // //

bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"

bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"

bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"

bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"
//================================================== =======

// // // // // // // // // // // // // // // // // // //
// Equips gun; sets firing gun to hide the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;dotxhairtype;sensitivity 1;m_yaw 0.044;alias wpn slot1" // equips gun, sets sensitivity, temporarily increases mouse yaw while key

held down
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;m_yaw 0.022;fov_desired 80;vmoff" // sets firing to hide viewmodel, sets FOV to "zoomed-

in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1
// ================================================== ===


// // // // // // // // // // // // // // // // // // // // // // // // // // //
// Hides viewmodel and flashes crosshair type and color when shooting the gun //
// // // // // // // // // // // // // // // // // // // // // // // // // // //

alias +viewmodeloff "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 0;m_yaw .022;sensitivity 1" // attacks, hides viewmodel, sets sensitivity and

mouse yaw for gun, flashes crosshair type/color #1
alias -viewmodeloff "-attack;dotxhairtype;dotxhaircolor" // flashes back to previous crosshair type and color

bind mouse1 +viewmodeloff // sets attack button to do the above
// ================================================== ===

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity

and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90;vmon" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair

type/color

bind "3" +equiprev3 // bind button for knife

// Attack for knife
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1;m_yaw 0.022;sensitivity 3" // attacks, turns viewmodels on, sets sensitivity

and mouse yaw, flashes crosshair type/color #2
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1" // flashes back to previous crosshair type and color, turns viewmodels on again

as safeguard

bind mouse1 +viewmodelon // sets attack button to do the above
// ================================================== ===

// // // //
// Watch //
// // // //

alias +watch "+attack2;dotxhaircolor;dotxhairtype;r_drawviewmode l 1" // brings up watch, turns on viewmodel, flashes xhair type/color
alias -watch "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1" // reverts xhair type/color

bind "mouse2" +watch // bind button for the watch

Pink_Matter
09-03-2011, 09:26 AM
Stabby, could you please post your disguise scripts? I've never seen the disguise kit in any of your videos and I would love to have it.

Virus.
09-03-2011, 09:33 AM
I'll drop down mine if you like.

alias "e1" "disguise 1 -1"
alias "e2" "disguise 3 -1"
alias "e3" "disguise 7 -1"
alias "e4" "disguise 4 -1"
alias "e5" "disguise 6 -1"
alias "e6" "disguise 9 -1"
alias "e7" "disguise 5 -1"
alias "e8" "disguise 2 -1"
alias "e9" "disguise 8 -1"
alias "a1" "disguise 1 -2"
alias "a2" "disguise 3 -2"
alias "a3" "disguise 7 -2"
alias "a4" "disguise 4 -2"
alias "a5" "disguise 6 -2"
alias "a6" "disguise 9 -2"
alias "a7" "disguise 5 -2"
alias "a8" "disguise 2 -2"
alias "a9" "disguise 8 -2"
alias "disscout" "e1"
alias "dissoldier" "e2"
alias "dispyro" "e3"
alias "disdemoman" "e4"
alias "disheavy" "e5"
alias "disengineer" "e6"
alias "dismedic" "e7"
alias "dissniper" "e8"
alias "disspy" "e9"
alias "undisg" "a9"
alias "discolor" "disallied"
alias "disallied" "alias disscout a1; alias dissoldier a2; alias dispyro a3; alias disdemoman a4; alias disheavy a5; alias disengineer a6; alias dismedic a7; alias dissniper a8; alias disspy a9; alias undisg a9; alias discolor disenemy; developer 1; echo You Will Now Disguise As An Ally; wait 300; developer 0"
alias "disenemy" "alias disscout e1; alias dissoldier e2; alias dispyro e3; alias disdemoman e4; alias disheavy e5; alias disengineer e6; alias dismedic e7; alias dissniper e8; alias disspy e9; alias discolor disallied; developer 1; echo You Will Now Disguise As An Enemy; wait 300; developer 0"
alias "+disguise" "bind q discolor;bind mouse1 disdemoman;bind mouse2 disengineer;bind mouse3 disspy; bind mouse4 dissniper;bind mouse5 dispyro;bind alt "a3""
alias "-disguise" "bind q revolver;bind mouse1 +attack;bind mouse2 +attack2; unbind mouse3 ;bind mouse4 +fakeprimary; bind mouse5 +sapper;bind 1 revolver;bind 3 fakemed;bind 2 undisg;unbind alt"

bind shift "+disguise"


Mine uses five mouse buttons and gives you the five primary disguises with it. holding shift and q changes the team you will disguise as.

EDIT: Oh ♥♥♥♥, I forgot to mention, the later binds change back to my original binds for weapons.

stabby stabby
09-03-2011, 02:31 PM
Sorry about that, I thought I had it fixed. I'll take a look at it when I've got some time to set aside.

I'll post the disguise script, too, while I'm at it, Pink.

PubstarRunner
09-03-2011, 08:23 PM
I'm just learning how to program. What kind of scripting language is it that you can use in TF2? I would like to know so that I can program a counter script for all my other classes and edit stabby's viewmodel hiding script so it doesn't hide my sapper, it activates with the "q" button, and it only hides the model when it's reloading. That would be sweet.

¿Problem?
09-03-2011, 09:15 PM
Admin: please sticky this.

doomsniper
09-05-2011, 08:05 PM
I attempted to fix what stabby stabby's script was meant to do. It may or may not be his original intention, so until he releases it, this is my script.

Press 1, will bring out the Revolver(/Amby/Enforcer), hides the gun, turns your FOV to 75 and sets the sensitivity to 1. If you hold 1, your mouse movement is increased.

Press 3, for Knife. Sets the FOV back to 90, sensitivity to 3.

Attacking now only flashes the crosshairs.

// // // // // // // // // // // // // // // // // // //
// Equips gun; and hides the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;dotxhairtype;sensitivity 1;m_yaw 0.044;r_drawviewmodel 0" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;m_yaw 0.022;fov_desired 75;r_drawviewmodel 0" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1 // bind button for gun
// ================================================== ===

// ================================================== ===

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for knife
// ================================================== ===

// // // //
// Watch //
// // // //

alias +watch "+attack2;dotxhaircolor;dotxhairtype;r_drawviewmode l 1" // brings up watch, turns on viewmodel, flashes xhair type/color
alias -watch "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1" // reverts xhair type/color

bind "mouse2" +watch // bind button for the watch


// Attack
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor" // attacks, flashes crosshair type/color #2
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor" // flashback

bind mouse1 +viewmodelon // sets attack button

Virus.
09-05-2011, 10:02 PM
Admin: please sticky this.

A better thread could be used. At the moment this is just a rag-tag grouping of scripts. A concise library for Spy scripters would be better.

stabby stabby
09-05-2011, 11:33 PM
I attempted to fix what stabby stabby's script was meant to do. It may or may not be his original intention, so until he releases it, this is my script.

Press 1, will bring out the Revolver(/Amby/Enforcer), hides the gun, turns your FOV to 75 and sets the sensitivity to 1. If you hold 1, your mouse movement is increased.

Press 3, for Knife. Sets the FOV back to 90, sensitivity to 3.

Attacking now only flashes the crosshairs.

// // // // // // // // // // // // // // // // // // //
// Equips gun; and hides the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;dotxhairtype;sensitivity 1;m_yaw 0.044;r_drawviewmodel 0" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;m_yaw 0.022;fov_desired 75;r_drawviewmodel 0" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1 // bind button for gun
// ================================================== ===

// ================================================== ===

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for knife
// ================================================== ===

// // // //
// Watch //
// // // //

alias +watch "+attack2;dotxhaircolor;dotxhairtype;r_drawviewmode l 1" // brings up watch, turns on viewmodel, flashes xhair type/color
alias -watch "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1" // reverts xhair type/color

bind "mouse2" +watch // bind button for the watch


// Attack
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor" // attacks, flashes crosshair type/color #2
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor" // flashback

bind mouse1 +viewmodelon // sets attack button



Thanks so much. I've been quite busy, so I really appreciate this. Will give it a once-over and add it to the OP if you don't mind.

ramborambo
09-06-2011, 05:20 AM
Weapon-Specific Viewmodel + Crosshair Script*
A combination script. Includes: weapon-specific viewmodels, sensitivities, FOV's, and crosshair settings (including the crosshair flash upon shooting seen in the video). Helpful for keeping the expanding Amby xhair in-check, improves visibility for small crosshairs like the dot, uses zoomed FOV for the gun and wide FOV for the knife, and allows high sensitivity for the knife/low sensitivity for precision with the gun. Tweak to your liking.

* This script replaces the viewmodel script posted above. Do not use the two together.

* Use in conjunction with the crosshair script for color/type flashing upon movement and/or firing (optional).

// // // // // // // // // // // // // // // // // // //
// Equips gun; sets firing gun to hide the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;dotxhairtype;sensitivity 1;m_yaw 0.044;alias wpn slot1" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 1;m_yaw 0.022;fov_desired 80;vmoff" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1
// ================================================== ===


// // // // // // // // // // // // // // // // // // // // // // // // // // //
// Hides viewmodel and flashes crosshair type and color when shooting the gun //
// // // // // // // // // // // // // // // // // // // // // // // // // // //

alias +viewmodeloff "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 0;m_yaw .022;sensitivity 1" // attacks, hides viewmodel, sets sensitivity and mouse yaw for gun, flashes crosshair type/color #1
alias -viewmodeloff "-attack;dotxhairtype;dotxhaircolor" // flashes back to previous crosshair type and color

bind mouse1 +viewmodeloff // sets attack button to do the above
// ================================================== ===

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90;vmon" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for knife

// Attack for knife
alias +viewmodelon "+attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1;m_yaw 0.022;sensitivity 3" // attacks, turns viewmodels on, sets sensitivity and mouse yaw, flashes crosshair type/color #2
alias -viewmodelon "-attack;dotxhairtype;dotxhaircolor;r_drawviewmodel 1" // flashes back to previous crosshair type and color, turns viewmodels on again as safeguard

bind mouse1 +viewmodelon // sets attack button to do the above
// ================================================== ===

// // // //
// Watch //
// // // //

alias +watch "+attack2;dotxhaircolor;dotxhairtype;r_drawviewmode l 1" // brings up watch, turns on viewmodel, flashes xhair type/color
alias -watch "-attack2;dotxhaircolor;dotxhairtype;r_drawviewmodel 1" // reverts xhair type/color

bind "mouse2" +watch // bind button for the watch


Cool i like this one, anyway there is a mode to get only the part of the script that change the sensibility of mouse without all the other scripts?

doomsniper
09-06-2011, 08:45 AM
Thanks so much. I've been quite busy, so I really appreciate this. Will give it a once-over and add it to the OP if you don't mind.

Feel free to do so.

Cool i like this one, anyway there is a mode to get only the part of the script that change the sensibility of mouse without all the other scripts?

// // // // // // // // // // // // // // // // // // //
// Equips gun; and hides the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;sensitivity 1;m_yaw 0.044" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "sensitivity 1;m_yaw 0.022;" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1 // bind button for gun

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;m_yaw 0.022;" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color

bind "3" +equiprev3 // bind button for knife


See if this fits the bill.

Wakatteru
09-06-2011, 09:30 AM
Hey, I really like the scripts you wrote, I've downloaded the one where it hides your Amby whenever you fire, and I've got to say it helps alot. I'm a total newb when it comes to scripting and stuff, but on the color-changing cursor script, when the cursor goes from green to pink what does it exactly signify? Thanks in advance.

stabby stabby
09-06-2011, 11:37 AM
Added my disguise script and the edited combination script.

Thanks again, doomsniper.

stabby stabby
09-06-2011, 11:38 AM
Hey, I really like the scripts you wrote, I've downloaded the one where it hides your Amby whenever you fire, and I've got to say it helps alot. I'm a total newb when it comes to scripting and stuff, but on the color-changing cursor script, when the cursor goes from green to pink what does it exactly signify? Thanks in advance.

The color toggling is intended to help visibility. It just toggles from green to pink whenever any key is hit to create a "flashing" effect.

The crosshair type toggling upon firing is intended to mitigate the ambassador crosshair expanding out of control--I chose type 2 and 5 because the dot in "2" is smaller than the dot used for "5", so you get a nice non-disruptive effect.

ramborambo
09-06-2011, 01:12 PM
Feel free to do so.



// // // // // // // // // // // // // // // // // // //
// Equips gun; and hides the viewmodel //
// // // // // // // // // // // // // // // // // // //

alias +equip1 "slot1;sensitivity 1;m_yaw 0.044" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equip1 "sensitivity 1;m_yaw 0.022;" // sets firing to hide viewmodel, sets FOV to "zoomed-in" mode, sets sensitivity again (just in case), reverts mouse yaw to default

bind "1" +equip1 // bind button for gun

// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;m_yaw 0.022;" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color

bind "3" +equiprev3 // bind button for knife


See if this fits the bill.

thanks i appreciate your help but it doesen't do anything lol
(i have already loaded the viewmodel script if thats may be the cause) any way i would have the 5.00 sensitivy with gun and 6.00 with knife.
this script could do that right? how i could set in a mode like this? ><

doomsniper
09-06-2011, 01:57 PM
thanks i appreciate your help but it doesen't do anything lol
(i have already loaded the viewmodel script if thats may be the cause) any way i would have the 5.00 sensitivy with gun and 6.00 with knife.
this script could do that right? how i could set in a mode like this? ><

Can't you just use the Weapon-Specific Viewmodel + Crosshair Script?

I think it does exactly what you want. Except change the sensitivity to what you want.

ramborambo
09-06-2011, 02:23 PM
i already use the weapon viewmodel script, my only problem is that i have a slow sensibility for ambassador aiming that i don't feel good with knife for fast backstab, what i am actually looking for is something that have a slower sensibility with amby and faster with knife, also a thing that i love would be like: i press the "q" button and the sensibility became slower, after i press again "q" and sensibility became faster than before, but i think i am fantasizing

stabby stabby
09-06-2011, 05:20 PM
The combination script should allow for custom sensitivities...I'll take a look at it tonight.

ramborambo
09-06-2011, 06:30 PM
thank you and sorry for the disturb :)

stabby stabby
09-06-2011, 07:38 PM
Ah, it seems part of the script got left out...argh. I'll fix it.

PubstarRunner
09-07-2011, 12:24 PM
I guess I'll ask my question once more.

What kind of scripting language do you use in the config files of TF2?

Is there a way to have the reduced sensitivity for only the spy's revolver and not for the primary weapon of every other class? I play soldier a lot, too, and having low sensitivity screws me for rocket jumping.

edit: I do know that you have to create a counter config script for every other class, but I don't know how to go about it. Should I just copy/paste the sensitivity script into every other class and set it for my default sensitivity?

stabby stabby
09-07-2011, 01:24 PM
I guess I'll ask my question once more.

What kind of scripting language do you use in the config files of TF2?

Is there a way to have the reduced sensitivity for only the spy's revolver and not for the primary weapon of every other class? I play soldier a lot, too, and having low sensitivity screws me for rocket jumping.

edit: I do know that you have to create a counter config script for every other class, but I don't know how to go about it. Should I just copy/paste the sensitivity script into every other class and set it for my default sensitivity?
Doh, I missed your question.

The language is really simple. Just lines, commands, and aliases. I taught myself real quick. Check this out: http://tf2wiki.net/wiki/Scripting

You can definitely have a reduced sens for the revolver only--the combination script (should) do this. You simply put the script into your spy.cfg, then open your other class .cfg's (with notepad) and rebind the keys to their defaults in there.

PubstarRunner
09-07-2011, 01:33 PM
Doh, I missed your question.

The language is really simple. Just lines, commands, and aliases. I taught myself real quick. Check this out: http://tf2wiki.net/wiki/Scripting

You can definitely have a reduced sens for the revolver only--the combination script (should) do this. You simply put the script into your spy.cfg, then open your other class .cfg's (with notepad) and rebind the keys to their defaults in there.

Thanks :D

I'll see if I can't crank out a nice script that implements an amby timer and a couple other cool things.

At the moment, I'm using SentryisaSpy's zoom in script for lowered sensitivity sniping. It works well, but what I really don't like about it is that I can't jump and use SHIFT at the same time. I'll see what I can do.

stabby stabby
09-07-2011, 01:51 PM
Thanks :D

I'll see if I can't crank out a nice script that implements an amby timer and a couple other cool things.

At the moment, I'm using SentryisaSpy's zoom in script for lowered sensitivity sniping. It works well, but what I really don't like about it is that I can't jump and use SHIFT at the same time. I'll see what I can do.

The combination script should let you do that :)

Mete
09-07-2011, 04:51 PM
Would it be possible to have the DR play a sound when it's ready? Like the one that plays when a demo has full charge. I sometimes have a hard time telling when it's ready from behind the net graph. :p

doomsniper
09-07-2011, 10:55 PM
Would it be possible to have the DR play a sound when it's ready? Like the one that plays when a demo has full charge. I sometimes have a hard time telling when it's ready from behind the net graph. :p

Can't you just move the netgraph?

Mete
09-08-2011, 08:36 AM
No, I like using it, plus even if I didn't use it, it'd still be nice to know when the DR is ready without having to check the meter, every other item with a charge does it so it's kinda silly that the DR doesn't.

smudge
09-08-2011, 11:53 AM
Hi, I use the viewmodel script but my knife keeps disappearing for some reason. This occurs even when I press 3 to select the knife, so it probably isn't a quick switch issue.

ramborambo
09-08-2011, 07:55 PM
Hi, I use the viewmodel script but my knife keeps disappearing for some reason. This occurs even when I press 3 to select the knife, so it probably isn't a quick switch issue.
i have a little edited the viewmodel script and mine works fine, but this only hide gun model, not sapper or whatever: // Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels<< on when shooting amby, off when knife or watch out//
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1
knife_vm_mode


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 1" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console
note that i am a newbie about script so i dunno if i made some error, but as i said it work like that


anyway i use an autocrouch script that is a lot useful, my only problem is that also if i put this on the spy file every class start to auto-crouch when jumping, and this is annoyng with the soldier, how i should do?
here the script that i use:
//Highjump
alias "+jumpeh" "+jump; +duck"
alias "-jumpeh" "-duck; -jump"
bind "space" "+jumpeh"

PubstarRunner
09-08-2011, 11:09 PM
Well, I got the combination viewmodel and crosshair script to work. I'm having a hell of a time trying to figure out how to make a counter script for the rest of my classes, though. Maybe I just need to get some sleep.

On the plus side, I got 6 amby headshots in one life with the new script :D

Thomas W
09-09-2011, 06:20 AM
Well, I got the combination viewmodel and crosshair script to work. I'm having a hell of a time trying to figure out how to make a counter script for the rest of my classes, though. Maybe I just need to get some sleep.

On the plus side, I got 6 amby headshots in one life with the new script :D

Just in all of your other .cfg's just put

bind mouse1 +attack
bind mouse2 +attack2
bind w +forward
bind a +moveleft
bind s +back
bind d +moveright

Should counteract everything in these scripts.

ramborambo
09-09-2011, 12:14 PM
Just in all of your other .cfg's just put



Should counteract everything in these scripts.

how should i bind the space bar in a mode like the script you said?
bind space +jump
?

PubstarRunner
09-09-2011, 01:39 PM
how should i bind the space bar in a mode like the script you said?
bind space +jump
?

It's probably like

bind SPACE +jump

then copy/paste it into your config files to rebind the spacebar to jump.

Kaouse
09-09-2011, 10:01 PM
Hi, I'm new.

I was wondering, how does one use scripts, and can a F2P player use them, or is it only for those who paid?

PubstarRunner
09-09-2011, 11:24 PM
Hi, I'm new.

I was wondering, how does one use scripts, and can a F2P player use them, or is it only for those who paid?

Go into my computer, program files, steam folder, steamapps, your username, team fortress 2, tf, then the cfg folder. Go into your cfg folder and copy/paste whatever script you want for whichever class. Anyone can use them and they aren't considered cheating because anyone can do it. Be warned, though, a script you put in your spy's config file (or any config file) will apply to each and every class unless you put in a script that counters it in your other config files or it resets everything to default before you run other classes.

Tokidoki Kirby
09-11-2011, 03:55 PM
I dunno if it's possible, but can it be set to work with quickswitch just between knife and amby, and have 1/mwheelup and 3/mwheeldown to activate their respective scripts.

oh and since i have them set to mousewheels right now, for some reason on only pyro the flamethrower viewmodel goes away if i scroll down then up, even if i have mousewheels to invprev/invnext in there to prevent that.

thanks :)

smudge
09-11-2011, 05:48 PM
Hey I got this to work quite nicely and boy have I improved. Played an arena round today, my entire team were dead and they had no casualties (8v8). I killed every last one of them, mostly with headshots...felt good. Before the script I wouldn't have been able to do that, thanks!

PubstarRunner
09-11-2011, 06:49 PM
Agreed. My headshotting ability has improved exponentially. I use the ambassador now over every other revolver because of my consistent headshotting.

Sob_
09-12-2011, 10:43 AM
I dunno if it's possible, but can it be set to work with quickswitch just between knife and amby, and have 1/mwheelup and 3/mwheeldown to activate their respective scripts.
Not really sure if that's it, but don't you mean sth like this?

bind "Q" "dot; slot3; r_drawviewmodel 1"
bind "MWHEELUP" "dot; slot2; r_drawviewmodel 1"
bind "MWHEELDOWN" "aim; slot1; r_drawviewmodel 0"

panzer1b
09-12-2011, 12:42 PM
id any1 mention the stab-n-sap script:

i personally stopped using it with wait disabled everywhere as well as since i have become so good at sentry owneage that i don;t need any scripting to be useful....

but if any1 wants the code:

alias "+stabnsap" "+attack; wait 10; -attack; wait 30; slot2; +attack; wait 120; -attack; slot1"
alias "-stabnsap" "none"
alias none ""
bind "r" "+stabnsap"

for me it was bound to r, feel free to change this (if u donlt know how learn how to script before complainin to me)

stabby stabby
09-12-2011, 04:33 PM
The "wait" command doesn't work on sv_pure servers. Here's a neat little sap script:

bind alt +sap
alias +sap "slot2;+attack"
alias -sap "lastinv;-attack"

equips the sapper, saps, then goes back to your last weapon when you release the key. I don't use it just because I'm too used to doing it manually, but it could be convenient if you're willing to adjust.

I could give you a sap and stab script that doesn't have the wait command, too, but I think it'd be a bad idea to use, so no dice :P

PubstarRunner
09-12-2011, 04:38 PM
Just in all of your other .cfg's just put



Should counteract everything in these scripts.

Thanks. I needed a bit more to counteract everything else, but you helped me set up a decent framework to build off of. I'm pretty clueless about scripting, but I'm getting better at it.

+repped

stabby stabby
09-12-2011, 04:46 PM
Thanks. I needed a bit more to counteract everything else, but you helped me set up a decent framework to build off of. I'm pretty clueless about scripting, but I'm getting better at it.

+repped

I should add that to the OP, really. I'll do so when I'm on a computer (fat thumbs + iPhone = pita).

PubstarRunner
09-12-2011, 05:13 PM
I should add that to the OP, really. I'll do so when I'm on a computer (fat thumbs + iPhone = pita).

This is what I put in there


exec user.cfg

bind mouse1 +attack
bind mouse2 +attack2
bind space +jump

//////////
//Primary//
/////////

////This allows you to set a custom sensitivity and whether or not you want a viewmodel, as well as a custom field of vision.

alias +equip1 "slot1;dotxhairtype;sensitivity 3.0;r_drawviewmodel 1"


alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 3.0fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1"

//binds the number 1 to the primary weapon
bind "1" +equip1



// // // //
// secondary //
// // // //

// Equip secondary

alias +equiprev2 "slot2;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips secondary, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev2 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "2" +equiprev2 // bind button for knife




// // // //
// Melee //
// // // //

// Equip melee
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for melee





In my user config file, I put the crosshair flashing script (which I named reticle.cfg) because I wanted all classes to have it. I also put in some other nice additions, including the minimum cl_interp to ensure the most minimum delay between clicking the mouse and attacking on screen. I also added a "ding" noise pitch so that I know how hard I'm hitting my targets around corners. There's some other stuff that I'm not sure what it's for, but I saw it on a reddit page about the ultimate TF2 configuration.

My user config file :


exec reticle.cfg

cl_interp .0152

cl_interp_ratio 1

cl_updaterate 100

cl_cmdrate 100

rate 60000

tf_dingalingaling "1"

tf_dingaling_pitchmaxdmg "50"

tf_dingaling_pitchmindmg "150"

alias +ading "+attack;



Then this is the reticle file. This is simply copy/pasted from your own scripts, but I figured I might as well put it in this post to avoid confusion.

The reticle config:



///CrosshairFlasher


// first you set up the colors and shapes/sizes you want the xhair to toggle through (cl_crosshair_file = type cl_crosshair_scale = size). Keep in mind that the base size of the crosshair varies depending on the weapon: //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //

//xhair TYPE toggle (with xhair my settings as an example)
//================================================== =======
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair1;cl_crosshair_scale 30;alias dotxhairtype dotxhairtyper"
alias dotxhairtyper "cl_crosshair_file crosshair5;cl_crosshair_scale 15;alias dotxhairtype dotxhairtypeb"
//================================================== =======

// xhair COLOR toggle
//================================================== =======
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"
//================================================== =======

// // // // // // // // // // // // // // // // //
// movement color toggle/flashing xhair example //
// // // // // // // // // // // // // // // // //

bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"

bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"

bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"

bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"
//================================================== =======

// // // // // // // // // // //
// Other color cycle examples //
// // // // // // // // // // //

//Black/White xhair color toggle
//================================================== =======
alias dotxhaircolorbw "dotxhaircolorbwb"
alias dotxhaircolorblack "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhaircolorbw dotxhaircolorwhite"
alias dotxhaircolorwhite "cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 255;alias dotxhaircolorbw dotxhaircolorblack"
//================================================== =======

//xhair team color toggle
//================================================== =======
alias dotxhairteamcolor "dotxhairteamcolorred"
alias dotxhairteamcolorred "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhairteamcolor dotxhairteamcolorblu"
alias dotxhairteamcolorblu "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhairteamcolor dotxhairteamcolorred"

// Set "dotxhairteamcolor" to appropriate team
bind [key1] dotxhairteamcolor dotxhaircolorblu
bind [key2] dotxhairteamcolor dotxhaircolored

// Make "lastdisguise" show your disguise's current team color
bind [last disguise key] "lastdisguise;dotxhaircolor"




Basically, the different configs counteract the Weapon-Specific Viewmodel + Crosshair Script* and it adds some nice little touches for the other classes. It works for me and the only bug I've had with it so far is that if I hold down the mouse button when I play spy and then I switch to another class, it will fire continuously until I switch back to spy and open the disguise menu.

stabby stabby
09-13-2011, 01:05 PM
Looks good.

You might be able to fix the continuous attack bug by adding "-attack" to the "ading" alias.

ArgentGuy
09-15-2011, 07:44 PM
I skimmed through the thread to see if anyone else had a problem, but I can't seem to get the spy disguise script to work. I copy/pasted it directly to the spy.cfg and even went ahead and put exec reset.cfg ahead of it and on all the other classes in case I ever for some reason bound F Keys to anything else. I made an autoexec.cfg for an FPS script and...that's it. As far as I know, nothing ends in .txt, either. Yet, the script doesn't work. =S

stabby stabby
09-16-2011, 09:57 AM
Hmm that's odd, I copied that one directly from my spy.cfg. Maybe try changing the binds?

Has anyone else tried it?

Cyberman128
09-16-2011, 10:31 AM
Is there a way to make a script which toggles viewmodels on a press of a button?

Or is that command one of those that Valve restricted to sv_cheats 1 or something?

smudge
09-16-2011, 10:55 AM
r_drawviewmodel 1 turns viewmodels on.
r_drawviewmodel 0 turns viewmodels off.

I guess you could just bind one button to turn it on and another to turn it off.

Cyberman128
09-16-2011, 12:54 PM
r_drawviewmodel 1 turns viewmodels on.
r_drawviewmodel 0 turns viewmodels off.

I guess you could just bind one button to turn it on and another to turn it off.

Thanks.

I just prefer to have full control over everything but reloading instead of having the game do it for me.

stabby stabby
09-16-2011, 01:54 PM
Is there a way to make a script which toggles viewmodels on a press of a button?

Or is that command one of those that Valve restricted to sv_cheats 1 or something?

Here you go:

alias viewmodeltoggle "viewmodeltoggleb"
alias viewmodeltoggleb "r_drawviewmodel 0;alias viewmodeltoggleb viewmodeltogglea"
alias viewmodeltogglea "r_drawviewmodel 1;alias viewmodeltoggleb viewmodeltoggleb"

Will work on all servers.

Cyberman128
09-16-2011, 01:59 PM
Here you go:

alias viewmodeltoggle "viewmodeltoggleb"
alias viewmodeltoggleb "r_drawviewmodel 0;alias viewmodeltoggleb viewmodeltogglea"
alias viewmodeltogglea "r_drawviewmodel 1;alias viewmodeltoggleb viewmodeltoggleb"

Will work on all servers.

Yup, managed to do it before you posted, but thanks anyway.

Have some rep or something.

SGNL606
09-16-2011, 02:49 PM
Thanks for providing these scripts and thanks to everyone who has contributed to this thread!

wurlds
09-17-2011, 02:10 AM
thanks for the scripts but I'm having trouble trying to counter the custom cross-hair settings. Could anyone provide me with a script for that thanks.

ramborambo
09-17-2011, 08:24 AM
This is what I put in there


exec user.cfg

bind mouse1 +attack
bind mouse2 +attack2
bind space +jump

//////////
//Primary//
/////////

////This allows you to set a custom sensitivity and whether or not you want a viewmodel, as well as a custom field of vision.

alias +equip1 "slot1;dotxhairtype;sensitivity 3.0;r_drawviewmodel 1"


alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 3.0fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1"

//binds the number 1 to the primary weapon
bind "1" +equip1



// // // //
// secondary //
// // // //

// Equip secondary

alias +equiprev2 "slot2;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips secondary, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev2 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "2" +equiprev2 // bind button for knife




// // // //
// Melee //
// // // //

// Equip melee
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for melee




this script doesen't work.. i think, its probabilly because of some error that i am doing, but this script doesen't change my actual sensibility (2.45) what i am doing wrong?
That's my actual spy cfg file, dunno if something could counterscript the script over here:
bind space +jump

// Stabby's Viewmodel Script for Spy //

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels<< on when shooting amby, off when knife or watch out//
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1
knife_vm_mode


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "2" +equip_sap // Key/button for sapper
bind "3" +equip_knife // Key/button for knife
bind "1" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 1" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1" // viewmodels on again as safeguard


// // // // // // // // // // // //


echo "Viewmodel script loaded" // confirms script loaded in the console
Also extra question, where i have to put the user config code you posted?
steam>steamapps>userid>team fortress 2 >tf>cfg>config ?

thanks for the patience :rolleyes:

Spec-Op
09-17-2011, 08:31 AM
Do I have to be the guy that asks "what song is that in the video?"....

stabby stabby
09-17-2011, 10:57 AM
thanks for the scripts but I'm having trouble trying to counter the custom cross-hair settings. Could anyone provide me with a script for that thanks.

What do you mean by "counter"?

Do I have to be the guy that asks "what song is that in the video?"....

Daft Punk - Make Love :)

wurlds
09-18-2011, 05:39 AM
oh sorry, I meant counter as in that I only want the cross-hair and color for my spy only and no other class, I'm just having trouble doing that.

Sob_
09-18-2011, 06:56 AM
oh sorry, I meant counter as in that I only want the cross-hair and color for my spy only and no other class, I'm just having trouble doing that.

bind mouse1 +attack
bind mouse2 +attack2
bind w +forward
bind a +moveleft
bind s +back
bind d +moveright

In other classes configs

Th0s4M
09-18-2011, 03:44 PM
Hi, excuse if I sound dumb but how exactly do you rebind all the keys for the other classes.

Thomas W
09-18-2011, 04:28 PM
bind mouse1 +attack
bind mouse2 +attack2
bind w +forward
bind a +moveleft
bind s +back
bind d +moveright

In other classes configs

Hi, excuse if I sound dumb but how exactly do you rebind all the keys for the other classes.

The post directly above yours tells you how to do it.

Rawriwon
09-18-2011, 06:05 PM
If it's not too hard, could you tell me a script that makes your Ambassador invisible while active for someone whose Slot 1 is on mouse wheel up?

PubstarRunner
09-18-2011, 08:19 PM
oh sorry, I meant counter as in that I only want the cross-hair and color for my spy only and no other class, I'm just having trouble doing that.

Put the "reticle.cfg" in your spy config and only your spy config. Then rebind your direction keys in all the other class config scripts. I just posted how I put in my spy config and countered the spy config in all my other classes to my specifications.

this script doesen't work.. i think, its probabilly because of some error that i am doing, but this script doesen't change my actual sensibility (2.45) what i am doing wrong?
That's my actual spy cfg file, dunno if something could counterscript the script over here:


///bunch of code/////


Also extra question, where i have to put the user config code you posted?
steam>steamapps>userid>team fortress 2 >tf>cfg>config ?

thanks for the patience :rolleyes:

I would say that you're not pressing "1" "2" and "3" to switch weapons, which would not apply your custom sensitivity, but I'll have a closer look. If you just press "q" to switch from gun to knife, you'll still see the viewmodel and your sensitivity will be default.

After looking through your code, it looks like you don't have anything that adjusts sensitivity. Save your text and try out the config that I posted, it should work for you.

I'd just copy/paste the code I have in the post and adjust the line that says "sensitivity 3.0" to "sensitivity 2.45" where is says "equip1" and whatever sensitivity you want else for your sapper and knife.

Put the code I have into the steam/steamapps/username/team fortress 2/ tf/ cfg folder. For some of the code, you have to make a new .cfg file and paste it in there. So for my code, I have my class configs and these ones added in there

reticle.cfg
user.cfg


In the reticle.cfg, I pasted this code





///CrosshairFlasher


// first you set up the colors and shapes/sizes you want the xhair to toggle through (cl_crosshair_file = type cl_crosshair_scale = size). Keep in mind that the base size of the crosshair varies depending on the weapon: //
// // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // //

//xhair TYPE toggle (with xhair my settings as an example)
//================================================== =======
alias dotxhairtype "dotxhairtypeb"
alias dotxhairtypeb "cl_crosshair_file crosshair1;cl_crosshair_scale 30;alias dotxhairtype dotxhairtyper"
alias dotxhairtyper "cl_crosshair_file crosshair5;cl_crosshair_scale 15;alias dotxhairtype dotxhairtypeb"
//================================================== =======

// xhair COLOR toggle
//================================================== =======
alias dotxhaircolor "dotxhaircolorb"
alias dotxhaircolorb "cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorc"
alias dotxhaircolorc "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhaircolor dotxhaircolord"
alias dotxhaircolord "cl_crosshair_blue 240; cl_crosshair_green 255; cl_crosshair_red 0;alias dotxhaircolor dotxhaircolorb"
//================================================== =======

// // // // // // // // // // // // // // // // //
// movement color toggle/flashing xhair example //
// // // // // // // // // // // // // // // // //

bind "w" +fw
alias +fw "+forward;dotxhaircolor"
alias -fw "-forward;dotxhaircolor"

bind "s" +bw
alias +bw "+back;dotxhaircolor"
alias -bw "-back;dotxhaircolor"

bind "d" +mr
alias +mr "+moveright;dotxhaircolor"
alias -mr "-moveright;dotxhaircolor"

bind "a" +ml
alias +ml "+moveleft;dotxhaircolor"
alias -ml "-moveleft;dotxhaircolor"
//================================================== =======

// // // // // // // // // // //
// Other color cycle examples //
// // // // // // // // // // //

//Black/White xhair color toggle
//================================================== =======
alias dotxhaircolorbw "dotxhaircolorbwb"
alias dotxhaircolorblack "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhaircolorbw dotxhaircolorwhite"
alias dotxhaircolorwhite "cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 255;alias dotxhaircolorbw dotxhaircolorblack"
//================================================== =======

//xhair team color toggle
//================================================== =======
alias dotxhairteamcolor "dotxhairteamcolorred"
alias dotxhairteamcolorred "cl_crosshair_blue 0; cl_crosshair_green 0; cl_crosshair_red 255;alias dotxhairteamcolor dotxhairteamcolorblu"
alias dotxhairteamcolorblu "cl_crosshair_blue 255; cl_crosshair_green 0; cl_crosshair_red 0;alias dotxhairteamcolor dotxhairteamcolorred"

// Set "dotxhairteamcolor" to appropriate team
bind [key1] dotxhairteamcolor dotxhaircolorblu
bind [key2] dotxhairteamcolor dotxhaircolored

// Make "lastdisguise" show your disguise's current team color
bind [last disguise key] "lastdisguise;dotxhaircolor"



It's straight from stabby's front page, but I wanted it for all classes.

In my user.cfg, I have

[/CODE]

exec reticle.cfg

cl_interp .0152

cl_interp_ratio 1

cl_updaterate 100

cl_cmdrate 100

rate 60000


tf_dingalingaling "1"

tf_dingaling_pitchmaxdmg "50"

tf_dingaling_pitchmindmg "150"



//bypass pure servers


alias +ading "+attack;
[/CODE]

It executes the reticle config so that I have the custom crosshair flasher for all of my classes and it adds pitch to the dingaling sounds so that I know how hard I hit an enemy when I can't see him (like when I play demoman and I spam stickies around corners). There's also a cl_interp thing in there, that reduces the delay between clicking the mouse and an attack onscreen to the minimum it can possibly be.

Let me know if you have any more trouble. I don't know a whole lot, but I did get this figured out for the most part, so I can help. There's probably some redundant ♥♥♥♥ in there, but it still works for me.

Shippou
09-19-2011, 10:22 PM
Is there a script that does it so that any primary weapon fired and reloaded puts r_drawviewmodel to 0? I tend to use le't as well for defence in payload

I don't mind mapping every primary weapon I have from every class, its just that cutting a key(Weapon show on and off) saves lots of troubles.

stabby stabby
09-20-2011, 01:26 AM
The viewmodel script does that, if I understand you correctly.

Shippou
09-20-2011, 01:36 AM
It affects ALL of the primary weapons for all classes? Only when firing and reloading?

Also it contains some stuff I am not interested in like spawn with knife so I want these stuff filtered out =/

Edit: Played around with the script and it works but it rebinds my keys. I can't make it so mouse 3 is watch because mouse 2 becomes watch. I tried switching mouse 2 to mouse 3 but it just disables the whole script. Game also says it doesn't recognize +mouse or -mouse so changing +attack 2 and -attack 2 is a problem

Edit 2: Now it makes the gun appear when shooting its even worst X_X

My final codes look like this

bind "3" +equip_knife
bind "1" +equip_amby
bind "Mouse3" +watch
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +equip_knife "slot3;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"
alias +watch "Mouse3;r_drawviewmodel 1"
alias -watch "Mouse3;r_drawviewmodel 1"


For the spy and it keeps giving me an error no matter what I put in the +watch and -watch places

bind "2" +equip_knife
bind "1" +equip_amby
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +equip_knife "slot2;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"


For the scout. I use mad milk so slot 2 should be milk instead of knife and 1 should be the usual primary but it doesn't do anything

Tokidoki Kirby
09-20-2011, 04:51 AM
Not really sure if that's it, but don't you mean sth like this?

bind "Q" "dot; slot3; r_drawviewmodel 1"
bind "MWHEELUP" "dot; slot2; r_drawviewmodel 1"
bind "MWHEELDOWN" "aim; slot1; r_drawviewmodel 0"

well this just had to do with the viewmodel script. I want mwheelup and 1 set to the ambassador viewmodel script, mwheeldown and 3 for the knife, and q to switch between the two.

stabby stabby
09-20-2011, 03:05 PM
It affects ALL of the primary weapons for all classes? Only when firing and reloading?

Also it contains some stuff I am not interested in like spawn with knife so I want these stuff filtered out =/

Edit: Played around with the script and it works but it rebinds my keys. I can't make it so mouse 3 is watch because mouse 2 becomes watch. I tried switching mouse 2 to mouse 3 but it just disables the whole script. Game also says it doesn't recognize +mouse or -mouse so changing +attack 2 and -attack 2 is a problem

Edit 2: Now it makes the gun appear when shooting its even worst X_X

My final codes look like this



For the spy and it keeps giving me an error no matter what I put in the +watch and -watch places



For the scout. I use mad milk so slot 2 should be milk instead of knife and 1 should be the usual primary but it doesn't do anything Can you turn on developer mode with "developer 1" and tell me what comes up in the console when you try to use the script?

Shippou
09-20-2011, 03:59 PM
Can you turn on developer mode with "developer 1" and tell me what comes up in the console when you try to use the script?
No idea how to do that.
It always says unknown command on "+mouse3" for alias +watch "Mouse3;r_drawviewmodel 1".

I tried changing it to mouse3, mouse 3 or anything and nothing works

Thomas W
09-20-2011, 04:09 PM
No idea how to do that.
It always says unknown command on "+mouse3" for alias +watch "Mouse3;r_drawviewmodel 1".

I tried changing it to mouse3, mouse 3 or anything and nothing works

bind "3" +equip_knife
bind "1" +equip_amby
bind "Mouse3" +watch
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +equip_knife "slot3;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"
alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"

That should do it. You had +watch going to a bind instead of an alias, naturally that would end up generating an error, i assumed that you wanted Mouse3 to bring up the watch, so i just replaced it with attack2, which is the command for it.

There's probably a better way to do it (removing + and - watch and then just have mouse3 go directly to attack2), but that should work for now.

Shippou
09-20-2011, 04:15 PM
bind "3" +equip_knife
bind "1" +equip_amby
bind "Mouse3" +watch
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +equip_knife "slot3;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"
alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"

That should do it. You had +watch going to a bind instead of an alias, naturally that would end up generating an error, i assumed that you wanted Mouse3 to bring up the watch, so i just replaced it with attack2, which is the command for it.

There's probably a better way to do it (removing + and - watch and then just have mouse3 go directly to attack2), but that should work for now.
Oh wow how did I not notice this. Can you fix my scout script too? :U

Edit: Oh the spy gun still doesn't disappear when shoothing. Help ;-;

Besically I want a script that does this:
Primary weapon=on when equip, off when shooting/reloading
Rest of the weapons=on all the time, if possible even the disguise kit

What script do I need to do this?

Thomas W
09-20-2011, 04:44 PM
Sorry, I'm currently trying to figure out how to do that on my script. It involves re-binding mouse1 via alias, which is stubbornly avoiding me at this time. It just wont work...

As for the fixing your scout script, which script would that be? I can't find anything tio do with the scout in the last few pages.

stabby stabby
09-20-2011, 05:03 PM
No idea how to do that.
It always says unknown command on "+mouse3" for alias +watch "Mouse3;r_drawviewmodel 1".

I tried changing it to mouse3, mouse 3 or anything and nothing works

You can open the console by going into keyboard settings>advanced and ticking the box. Then you just type "developer 1" in the window that comes up.

There shouldn't be an alias "+mouse3", since that's a bind.

Shippou
09-20-2011, 05:36 PM
You can open the console by going into keyboard settings>advanced and ticking the box. Then you just type "developer 1" in the window that comes up.

There shouldn't be an alias "+mouse3", since that's a bind.
Yeah someone helped me with this a page ago, my mistake :P

But I want a script that does this:
Primary weapon=on when equip, off when shooting/reloading
Rest of the weapons=on all the time, if possible even the disguise kit

What script do I need to do this? I want one for Spy and one for Scout if possible :U If not then just Spy

Edit: Started using this script


bind "2" +equip_sap
bind "3" +equip_knife
bind "1" +equip_amby
bind "mouse3" +watch
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias sap_vm_mode "bind mouse1 +viewmodel_sap"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +viewmodel_sap "+attack;r_drawviewmodel 1"
alias -viewmodel_sap "-attack;r_drawviewmodel 1"
alias +equip_knife "slot3;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"
alias +equip_sap "slot2;r_drawviewmodel 1"
alias -equip_sap "sap_vm_mode"
alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"


Instead of making the gun disappear it makes it appear if it is on r_drawviewmodel 0. Why does it do the opposite?

stabby stabby
09-21-2011, 03:28 PM
Sorry, I missed your post.

r_drawviewmodel 0 = gun not visible, so I'm not sure what you're saying. Do you want the gun to be visible or hidden?

Shippou
09-21-2011, 05:18 PM
Sorry, I missed your post.

r_drawviewmodel 0 = gun not visible, so I'm not sure what you're saying. Do you want the gun to be visible or hidden?
1) I want the gun to be hidden when shooting/reloading but instead it appears when I shoot/reload. The game seems to do the opposite of what the script tells him to do or something is wrong with the script itself. I only want the gun visible when drawn(pressing Q or 1)
2) I want weapons in slot 2-4(including disguise) to be on whenever they are drawn(pressing Q, 2, 3 or 4)

stabby stabby
09-21-2011, 07:37 PM
Hmmm that's odd. It shouldn't be doing that, from what you posted. You didn't change anything, did you?

Shippou
09-21-2011, 07:45 PM
bind "2" +equip_sap
bind "3" +equip_knife
bind "1" +equip_amby
bind "mouse3" +watch
alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias sap_vm_mode "bind mouse1 +viewmodel_sap"
alias +viewmodel_knife "+attack;r_drawviewmodel 1"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 0"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"
alias +viewmodel_sap "+attack;r_drawviewmodel 1"
alias -viewmodel_sap "-attack;r_drawviewmodel 1"
alias +equip_knife "slot3;r_drawviewmodel 1"
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"
alias +equip_amby "slot1"
alias -equip_amby "amby_vm_mode"
alias +equip_sap "slot2;r_drawviewmodel 1"
alias -equip_sap "sap_vm_mode"
alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"


When I shoot, gun appears if it was hidden. Knife and sapper work as intended.

I still can't make the disguise kit appear when I draw it

Edit: I tried clicking 1 to pick gun and shoot. The script works! The gun disappears but I can't use Q which is my main way of switching weapons.

stabby stabby
09-22-2011, 12:47 PM
When I shoot, gun appears if it was hidden. Knife and sapper work as intended.

I still can't make the disguise kit appear when I draw it

Edit: I tried clicking 1 to pick gun and shoot. The script works! The gun disappears but I can't use Q which is my main way of switching weapons.

Change

"bind 3 +equip_knife" to "bind q +equip_knife"

You can change any of the binds to your preference :)

edit: if "q" is quickswitch, it won't work without additional scripting.

Shippou
09-22-2011, 02:13 PM
Change

"bind 3 +equip_knife" to "bind q +equip_knife"

You can change any of the binds to your preference :)

edit: if "q" is quickswitch, it won't work without additional scripting.
It had no effect on me whatsoever. The gun still stays visible when shooting. Please don't try to go around the bush with "you need more scripting" or "change any of the binds" because I have no idea what to do in that case :/ Not all of us are script expects like you that know "oh I need additional scripting so I will add this, this and this" in my case its "what?".

Mind if I add you because I am trying to make this script work for 3 days already and nothing works :(

My ID is Shippou5, I don't know yours

Again what I want is:
1) Use Q to switch to amby, when I shoot with it the gun should be hidden
2) When I press 4 as spy, I want drawviewmodel to be 1
3) When I press 3 as scout, I want drawviewmodel to be 1

How do I do that?

stabby stabby
09-22-2011, 05:37 PM
It had no effect on me whatsoever. The gun still stays visible when shooting. Please don't try to go around the bush with "you need more scripting" or "change any of the binds" because I have no idea what to do in that case :/ Not all of us are script expects like you that know "oh I need additional scripting so I will add this, this and this" in my case its "what?".

Mind if I add you because I am trying to make this script work for 3 days already and nothing works :(

My ID is Shippou5, I don't know yours

Again what I want is:
1) Use Q to switch to amby, when I shoot with it the gun should be hidden
2) When I press 4 as spy, I want drawviewmodel to be 1
3) When I press 3 as scout, I want drawviewmodel to be 1

How do I do that?

Sorry, my friendslist is full--and it could be useful to work it out here for anyone else who might have a problem.

You need to go into the script and change the "bind" commands for the "equip" aliases to those corresponding keys. I don't have the time to type out code right now, but I'll try to get back to you when I can.

Shippou
09-22-2011, 09:25 PM
Thanks! I just have no idea how to do that

wurlds
09-23-2011, 04:14 PM
shippou, you could just private message stabby.

Shippou
09-23-2011, 05:22 PM
Or I could just use his thread

Kappa360
09-23-2011, 05:37 PM
Stabby how do i rebind to make these scripts work just for spy? And have Vanilla for the rest of the classes.

Jjunior130
09-25-2011, 02:18 PM
Stabby how do i rebind to make these scripts work just for spy? And have Vanilla for the rest of the classes.

YES! that is exactly wat i want to find out too, sounds like a lot of work to rebind ALL the other classes just cuz u modified one class

PubstarRunner
09-25-2011, 02:22 PM
Post this in all of your other configs





echo "Starting new class..."
bind "0" "slot10"
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 "a" "+moveleft"
bind "d" "+moveright"
bind "s" "+back"
bind "g" "taunt"
bind "r" "+reload"
bind "w" "+forward"
bind "y" "say"
bind "u" "say_team"
bind "t" "impulse 201"
bind "q" "lastinv"
bind "`" "toggleconsole"
bind "," "changeclass"
bind "." "changeteam"
unbind mouse1
unbind mouse2
bind "mouse1" "+attack"
bind "mouse2" "+attack2"
bind "mouse3" ""
bind "mouse4" ""
bind "mouse5" ""
bind "MWHEELUP" "invprev"
bind "MWHEELDOWN" "invnext"
bind "SPACE" "+jump"
bind "TAB" "+showscores"
bind "ESCAPE" "cancelselect"
bind "PAUSE" "pause"
bind "shift" ""
bind "ctrl" "+duck"
bind "pgup" ""
bind "pgdn" ""
bind "home" ""
bind "end" ""
bind "ins" ""
bind "del" ""
bind "alt" ""
bind "p" ""
bind "n" ""
bind "m" ""
bind "v" ""
-attack
-attack2
-duck
-jump



alias +equip1 "slot1;dotxhairtype;sensitivity 3.0;r_drawviewmodel 1"


alias -equip1 "dotxhaircolor;dotxhairtype;sensitivity 3.0fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1"


bind "1" +equip1



// // // //
// secondary //
// // // //

// Equip secondary
alias +equiprev2 "slot2;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev2 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "2" +equiprev2 // bind button for knife




// // // //
// Knife //
// // // //

// Equip knife
alias +equiprev3 "slot3;sensitivity 3;dotxhairtype;dotxhaircolor;m_yaw 0.022;r_drawviewmodel 1" // Equips knife, turns viewmodels on, sets sensitivity and yaw to knife preference, flashes xhair type/color
alias -equiprev3 "dotxhaircolor;dotxhairtype;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 1" // sets attacking to turn on viewmodels, sets FOV to 90 degrees, reverts xhair type/color

bind "3" +equiprev3 // bind button for knife



You'll want to change the sensitivity in the script if you don't use a 3.0 sensitivity.

stabby stabby
09-26-2011, 01:45 PM
Added instructions for keeping the script from transferring over.

Jjunior130
09-26-2011, 03:34 PM
thank you

ILikeSkRillex
09-27-2011, 03:21 PM
hey guys, I love these scripts and all, but what I would really like is to not have the annoying drawviewmodel_0 from when i use quickswitch, is that possible?
also, I have been trying to find decent scripters who can make this work:
//Amby Zoom
alias "+zoom" "zoomin"
alias "-zoom" "zoomout"
alias "zoomin" "r_drawviewmodel 0; fov_desired 75" alias "zoomout"
alias "zoomout" "r_drawviewmodel 1; fov_desired 90" alias "zoomin"
bind "SHIFT" "+zoom"
bind "CAPSLOCK" "-zoom"
I want it to zoom in and stay in until I press shift again, I've been experimenting but I'm a little nooby at aliases and such and I was wondering if anyone could help me?
by the way stabby your'e a genius! I love the cross-hair script! Thanks!!
I also you the alt sap if anyone needs it its here: //USEFUL ALT SAP
bind alt +sap
alias +sap "slot2;+attack"
alias -sap "lastinv;-attack"
Thanks again! :)

stabby stabby
09-28-2011, 11:57 AM
Added Virus' quickswitch support adaptation for the viewmodel script. Thanks so much, Virus.

Give him some rep (http://forums.steampowered.com/forums/reputation.php?p=25354084)!

Jigsaw27
09-28-2011, 11:59 AM
So Stabby I finally started to try scripts(after not playing with them for a while) and I absolutely love the viewmodel script. I'm getting way more headshot kills then previous. Awesome stuff.

stabby stabby
09-28-2011, 12:02 PM
hey guys, I love these scripts and all, but what I would really like is to not have the annoying drawviewmodel_0 from when i use quickswitch, is that possible?
also, I have been trying to find decent scripters who can make this work:
//Amby Zoom
alias "+zoom" "zoomin"
alias "-zoom" "zoomout"
alias "zoomin" "r_drawviewmodel 0; fov_desired 75" alias "zoomout"
alias "zoomout" "r_drawviewmodel 1; fov_desired 90" alias "zoomin"
bind "SHIFT" "+zoom"
bind "CAPSLOCK" "-zoom"
I want it to zoom in and stay in until I press shift again, I've been experimenting but I'm a little nooby at aliases and such and I was wondering if anyone could help me?

Try

bind capslock "zoomtoggle"
alias zoomtoggle "zoomtoggleb"
alias zoomtoggleb "r_drawviewmodel 0; fov_desired 75;alias zoomtoggle zoomtoggler"
alias zoomtoggler "r_drawviewmodel 1; fov_desired 9;alias zoomtoggle zoomtoggleb"

I'll probably add some FOV and sensitivity scripts as an alternative the full combination script package.

ILikeSkRillex
09-28-2011, 12:14 PM
Try

bind capslock "zoomtoggle"
alias zoomtoggle "zoomtoggleb"
alias zoomtoggleb "r_drawviewmodel 0; fov_desired 75;alias zoomtoggle zoomtoggler"
alias zoomtoggler "r_drawviewmodel 1; fov_desired 9;alias zoomtoggle zoomtoggleb"

I'll probably add some FOV and sensitivity scripts as an alternative the full combination script package.

Thanks dude, I <3 you:)

idkwhat
09-30-2011, 08:17 AM
Hey,

I've beesn having some issue's with using Virus' viewmodel script adaption in conjunction with this last disguise on attack script

alias +spy_attackdisguise "+attack"
alias -spy_attackdisguise "-attack; lastdisguise"

bind "MOUSE1" +spy_attackdisguise

This one won't work when I use them together. The viewmodel script works just fine however. Did I do something wrong when installing these? Or do you need to rewrite the scripts so that they can be used together?

Thanks:)

stabby stabby
09-30-2011, 11:19 AM
Yeah, you need to tweak the script instead of adding a new one.

Just add ";lastdisguise" to the aliases that have "-attack" in them--they're all bound to mouse1.


Careful about using that script though...you'll have a smoke trail following you after you cloak sometimes.

Darrell
10-02-2011, 04:21 AM
Tried using the Spy scripts, but can't get the viewmodel thing to work. The biggest problem is, since I'm starting out, I'd rather use the default revolver than the ambassador and the scripts seem tailored to the ambassador in particular. But, even when I switch to the ambassador it doesn't consistently stay toggled off.

I say consistently because the scripts seem to randomly decide when they are going to work and when they are not (Mostly, they choose not to). Sometimes my sensitivity doesn't change between gun and knife, sometimes it does. Sometimes the ambassador disappears, sometimes it doesn't. I am having a strange stuttering issue now, also, which I wasn't having before; I'm just randomly skipping all over the screen. Isn't a FPS or a latency issue; FPS was steadily running at about 80 and latency was about 45. I was trying out Badwater at the time, but it's doing it on a few other maps as well (Except walkway, hasn't happened there yet).

I only used the FoV Change/Hide viewmodel script and the crosshair color changer, since it specifically says in the OP not to mix the second viewmodel hide script with the previous one. Then I deleted it and replaced it with the first one, but still can't get it to work correctly. I can't imagine I have managed to screw this up so badly, since it's just a matter of copy/paste into Notepad and save over the previous cfg.

Anyone have any idea about what I've done so horribly wrong?

stabby stabby
10-02-2011, 11:31 AM
I think the combination script fix someone posted was missing an alias. I'll just remake that one this weekend--it's essentially the viewmodel script with some extra stuff added in.

The viewmodel script should work fine though, and no script of any kind should cause stuttering.

Do you have any other scripts installed?

TR_Ozone
10-05-2011, 08:20 AM
The crosshair script doesn't work for me at all and the spawn with knife part of the viewmodel script stops working when I respawn. Help anyone?

stabby stabby
10-05-2011, 12:12 PM
Could you look in the console and tell me if it says anything when you hit the binds, please?

Also, are you running any other scripts at all?

TR_Ozone
10-06-2011, 07:52 AM
Could you look in the console and tell me if it says anything when you hit the binds, please?

Also, are you running any other scripts at all?

It said unknown command knife_vm_mode and unknown command dotxhaircolorb and I'm not using any other script.

stabby stabby
10-06-2011, 12:26 PM
Ok that's helpful. For some reason you don't have aliases bound to a key. Try copying and pasting the scripts in again in case you missed part of them.

Does anyone else have an idea of what could be going wrong for this guy? I'm confused.

¿Problem?
10-06-2011, 07:22 PM
//Highjump
alias "+jumpeh" "+jump; +duck"
alias "-jumpeh" "-duck; -jump"
bind "space" "+jumpeh" //Holding down space makes you crouch jump the entire length of the jump. Enjoy easier stairstabbing.



// Stabby's Viewmodel Script for Spy + Problem?'s Sensitivity Binds//

// // // // // // // // // // // // // // // // // // // // // // // //
//Viewmodels<< on when shooting amby, off when knife or watch out//
// // // // // // // // // // // // // // // // // // // // // // // //


// spawn with knife out and viewmodel mode set to "on"

slot3
r_drawviewmodel 1
knife_vm_mode


// replace [KEY] with the your Keybinds for the sapper/knife/ambassador/watch

bind "f" +equip_sap // Key/button for sapper
bind "e" +equip_knife // Key/button for knife
bind "q" +equip_amby // Key/button for ambassador
bind "mouse2" +watch // Key for watch (mouse2 default)


//re-bind mouse1

alias knife_vm_mode "bind mouse1 +viewmodel_knife" // binds mouse1 to turn viewmodel on when attacking (for knife knife)
alias amby_vm_mode "bind mouse1 +viewmodel_amby" // binds mouse1 to turn viewmodel off when attacking (for amby)
alias sap_vm_mode "bind mouse1 +viewmodel_sap" // binds mouse 1 to turn viewmodel on when attacking and off when not (for sapper)


// causes viewmodel to go off or on when you shoot

alias +viewmodel_knife "+attack;r_drawviewmodel 1" // attacks, turns viewmodel on
alias -viewmodel_knife "-attack;r_drawviewmodel 1" // finishes atack, turns viewmodel on again as safeguard

alias +viewmodel_amby "+attack;r_drawviewmodel 0" // attacks, turns viewmodel off
alias -viewmodel_amby "-attack;r_drawviewmodel 0" // finishes attack, turns viewmodel off again as a safeguard

alias +viewmodel_sap "+attack;r_drawviewmodel 1" // shows sapper when sapping
alias -viewmodel_sap "-attack;r_drawviewmodel 0" // hides sapper when mouse1 released


// Equip item, turn vm on/off, set vm toggle for attack

alias +equip_knife "slot3;r_drawviewmodel 1; sensitivity 4; m_yaw 0.022" // Equips knife, turns viewmodels on
alias -equip_knife "knife_vm_mode;r_drawviewmodel 1" // Sets viewmodels to turn ON when stabbing (makes sure it stays on)

alias +equip_amby "slot1; sensitivity 1; m_yaw 0.055" // Equips amby
alias -equip_amby "amby_vm_mode" // Sets viewmodels to turn OFF when shooting

alias +equip_sap "slot2;r_drawviewmodel 1; sensitivity 4; m_yaw 0.022" // Equips sapper, turns viewmodels on
alias -equip_sap "sap_vm_mode" // Sets viewmodels to turn on while firing, and off when not

alias +watch "+attack2;r_drawviewmodel 1;" // watch up/cloak on/secondary attack + viewmodels on
alias -watch "-attack2;r_drawviewmodel 1;" // viewmodels on again as safeguard


Basically I'm not a fan of Stabby's combination script, activating the dead ringer with the knife, then switching to the amby hides the viewmodel, causing you to failshoot while the DR is equipped (IE: you forget that DR is out, and keep clicking to no avail. So I added sensitivities to the amby (very low) and knife/sapper (quite high). Adjust sensitivites and mouse yaw at your leisure. To be honest, it's not much of a change from Stabby's hideviewmodel script, but it incorporates the simplicity of it, with the sensitivities of the combination script. You can also add the FOV change when equipping amby/knife (which I'm not a fan of). Place: "; fov_desired 75" and "; fov_desired 90" after the m_yaw cvar with the knife and amby binds.

TR_Ozone
10-07-2011, 10:36 AM
Ok that's helpful. For some reason you don't have aliases bound to a key. Try copying and pasting the scripts in again in case you missed part of them.

Does anyone else have an idea of what could be going wrong for this guy? I'm confused.

I re-pasted the scripts and the crosshair changes color but it doesn't change type and it still says unknown command knife_vm_mode. I also looked through it to see if I missed anything after re-pasting but I haven't missed anything.

BlackLiteAttack
10-08-2011, 09:18 AM
Stabby, (sorry to add to the bombardment of questions you're getting) earlier in the thread you said your crosshairs with the Amby don't return to the small circle in timing with the headshot cooldown, rather you just manually hold in the mouse button to time it yourself. I used similar scripts, only for changing the crosshair when pressing the mouse button:


bind "mouse1" +att
alias +att "+attack;cl_crosshair_file crosshair1;cl_crosshair_blue 0;cl_crosshair_green 0;cl_crosshair_red 255"
alias -att "-attack;cl_crosshair_file crosshair3;cl_crosshair_blue 0;cl_crosshair_green 255;cl_crosshair_red 0"

But when I hold the mouse button down, the gun fires continually, like it's automatic (although still confined by the firing speed of the weapon). Do you have another script that disables automatic fire, or something like that? I thought there was an option for it somewhere in the settings but I can't seem to find it.

Jigsaw27
10-08-2011, 12:31 PM
Stabby, I noticed in your Viewmodel Script that when I try to scroll through teammates when I'm dead, I can't. Right and left click do nothing. Is this normal? The script works fine however.

Pink_Matter
10-08-2011, 01:48 PM
I'll try to help out..

I re-pasted the scripts and the crosshair changes color but it doesn't change type and it still says unknown command knife_vm_mode. I also looked through it to see if I missed anything after re-pasting but I haven't missed anything.

First off, the command knife_vm_mode is not a real bind or alias. Same thing occurs with my scripting process, so that's not what the source of your problems are.

The only way your scripts won't work is if you aren't binding the aliases to the corresponding keys (i.e. bind "3" "equip_knife", or whatever key you like to press to bring out your knife. Secondly, make sure that in your spy.cfg the binds shown in this thread aren't one big cluster♥♥♥♥. You have to make it reasonably neat, as in you can't just copy and paste the entire thing.

It should look like it does in the original post; in lines. i.e.:

bind "1" "equip_amby"
bind "2" "equip_sap"
bind "3" "equip_knife"

If it looks like a very messed paragraph with no spacing in between commands and alias it may not work.

Also, I had trouble with the crosshair switching..so I made my own alias and binds. They're pretty simple, and are below:
alias "aim" "cl_crosshair_file crosshair2; cl_crosshair_scale 36"
alias "dot" "cl_crosshair_file crosshair5; cl_crosshair_scale 24"

bind "dot" to your movement keys with the crosshair flasher.

bind "w" +fw
alias +fw "+forward;dotxhaircolor;dot"
alias -fw "-forward;dotxhaircolor"

then bind "aim" to your attack key.

alias +viewmodel_amby "+attack;r_drawviewmodel 0;aim"
alias -viewmodel_amby "-attack;r_drawviewmodel 0"

If you have done everything correctly in terms of binding and making sure the script is somewhat neat, it shall work.

Pink_Matter
10-08-2011, 01:49 PM
Stabby, I noticed in your Viewmodel Script that when I try to scroll through teammates when I'm dead, I can't. Right and left click do nothing. Is this normal? The script works fine however.

Yes. Same thing happens with me. I created an exec called spectate that unbinds everything then rebinds mouse1 for attack and mouse2 for attack2. This allows you to recycle through teammates.

Pink_Matter
10-08-2011, 01:51 PM
Stabby, (sorry to add to the bombardment of questions you're getting) earlier in the thread you said your crosshairs with the Amby don't return to the small circle in timing with the headshot cooldown, rather you just manually hold in the mouse button to time it yourself. I used similar scripts, only for changing the crosshair when pressing the mouse button:



But when I hold the mouse button down, the gun fires continually, like it's automatic (although still confined by the firing speed of the weapon). Do you have another script that disables automatic fire, or something like that? I thought there was an option for it somewhere in the settings but I can't seem to find it.

Your script is doing what it is supposed to be doing. You have the +att bound for +attack. You said that if you hold the mouse button down, it fires continually. That is supposed to occur. As far as I know there is no command to only attack once with the press of a button without the use of the "wait" command, which is banned in sv_pure servers.

stabby stabby
10-08-2011, 03:44 PM
Yes. Same thing happens with me. I created an exec called spectate that unbinds everything then rebinds mouse1 for attack and mouse2 for attack2. This allows you to recycle through teammates.

This happens because mouse1 and mouse2 have been rebinded.

I could add "spec_next" and "spec_prev" to the aliases (later) or in the meantime you can bind those commands to different keys and use those to cycle through spectator.

Virus.
10-09-2011, 03:10 AM
Or just bind an unused key to +attack.

Roman Bellic
10-09-2011, 12:53 PM
C'mon Spies, try using no scripts, it's like Spy on hardmode.

RNGgod
10-12-2011, 08:30 PM
Okay, my turn to mess with these!

So, the script to put in the cfgs of the other eight classes...It works, but effectively removes the spy script. If I change classes at any point (anything other than spy), the spy script will not be in effect until I restart tf2.

Is there a way to fix this?

Virus.
10-13-2011, 12:38 AM
Uhhhh, what? That's why you put it in there, so it doesn't effect your other classes. It wouldn't work properly with other classes. If you want it with your other classes then why put it in those cfgs in the first place?

RNGgod
10-13-2011, 06:17 PM
Uhhhh, what? That's why you put it in there, so it doesn't effect your other classes. It wouldn't work properly with other classes. If you want it with your other classes then why put it in those cfgs in the first place?

Sorry, I may have phrased that poorly.

When I go anything other than spy, the reversion-script removes the spy script. Good. As planned. But from that point on, the spy script will not activate (even if I go spy) until I restart the game.

PubstarRunner
10-13-2011, 06:55 PM
For all those spies who like using the ambassador for long distance but get screwed over by having low sensitivity, I slightly edited this main script for the solution.

I still get my auto reload and my weapon models removed, but I get the full benefit of regular sensitivity and FOV for my close quarters revolver battles.




/ // // // // // // // // // // // // // // // // // //
// Switches to revolver with q, no sensitivity reduction or zoom //
// // // // // // // // // // // // // // // // // // //

alias +equipq "slot1;dotxhairtype;sensitivity 3;m_yaw 0.044;r_drawviewmodel 0" // equips gun, sets sensitivity, temporarily increases mouse yaw while key held down
alias -equipq "dotxhaircolor;dotxhairtype;sensitivity 3;m_yaw 0.022;fov_desired 90; viewmodel_fov 70; viewmodel_fov_demo 70;r_drawviewmodel 0" // sets firing to hide viewmodel,

bind "q" +equipq // bind button for gun


Pressing "q" and "m1" quickly afterwards switches to the revolver no matter which other weapon you're using. It's a good panic button for close quarters and I'm doing a much better job fighting against faster classes at close range with it.


//Highjump
alias "+jumpeh" "+jump; +duck"
alias "-jumpeh" "-duck; -jump"
bind "space" "+jumpeh" //Holding down space makes you crouch jump the entire length of the jump. Enjoy easier stairstabbing.



I really liked this script when I found it a while back. Mostly because I never regularly jump when I play spy, there's no real reason to. Good to see someone else dug through these pages and found it :P

Friendly Spy
10-14-2011, 01:43 AM
I honestly can't say how you are using sensetivity 3, 7 feels a bit slow for me. I can sometimes Amby snipe people, but I don't regularly try. Did anyone ever try sniping the Engie in his nest?

Oh, and these are my scripts. Am I missing something?
alias amby "slot1; r_drawviewmodel 0; Sensitivity 7; fov_desired 75"
alias sap "slot2; r_drawviewmodel 1; Sensitivity 15; fov_desired 90"
alias stab "slot3; r_drawviewmodel 1; Sensitivity 15; fov_desired 90"
alias dropdisguise "disguise 8 -2"

bind 1 amby
bind 2 sap
bind 3 stab
bind f dropdisguise
bind q lastdisguise

Virus.
10-14-2011, 01:50 AM
I honestly can't say how you are using sensetivity 3, 7 feels a bit slow for me. I can sometimes Amby snipe people, but I don't regularly try. Did anyone ever try sniping the Engie in his nest?

Oh, and these are my scripts. Am I missing something?

Bad question, you actually have to point out a problem, but yes if you don't use quickswitch. Leave fov_desired on 90, use a key to zoom.

1. Sensitivities are not the same on different computers based on mouse drivers, acceleration and windows settings. Make sure you have mouse acceleration off and your windows sensitivity settings are on the centre point.

2: Yes of course Engies have been sniped from their nest.

turtlejoe
10-14-2011, 02:19 AM
Hooooley carps.

I installed the scripts and for a while it was fine, and when I switched classes to both Sniper and Soldier, the viewmodel simply wasn't there as well. I did the thing for the class.cfg's, but the problem still persisted. Deleted all the scripts, everything is missing, including the spy knife. I don't mind the flashing dot, but without the viewmodel it's just tough :\

Is there any way to go around this? O:

I tried re-installing the scripts complete with re-binding all keys for the other classes, but to no avail. :\

On great, even when I'm spectating others and is on first-person view, it doesn't show the viewmodels too. :\

Virus.
10-14-2011, 02:48 AM
r_drawviewmodel 1

In all class files but Spy. If you are done with scripts just put it in console.

turtlejoe
10-14-2011, 02:55 AM
r_drawviewmodel 1

In all class files but Spy. If you are done with scripts just put it in console.

HOLY ♥♥♥♥ thanks!

It was terrible without the viewmodels. You're a lifesaver.

Virus.
10-15-2011, 01:42 AM
(accepts payent in rep)

Sorry, I may have phrased that poorly.

When I go anything other than spy, the reversion-script removes the spy script. Good. As planned. But from that point on, the spy script will not activate (even if I go spy) until I restart the game.

Not sure. Put "echo "ACTIVATE SPY"" in your Spy folder. Does it come up in console when you change to Spy?

Chrisjd10
10-15-2011, 03:30 AM
IS there a way I can miss out the disguise case when scrolling but could still access it by pressing 4
Also I don't want it to affect the engineer

Ty in advance

Thomas W
10-15-2011, 03:42 AM
IS there a way I can miss out the disguise case when scrolling but could still access it by pressing 4
Also I don't want it to affect the engineer

Ty in advance

alias missoutondisguise "1"
alias 1 "weapon_slot 2; alias missoutondisguise "2""
alias 2 "weapon_slot 3; alias missoutondisguise "3""
alias 3 "weapon_slot 1; alias missoutondisguise "1""
bind scroll_down missoutondisguise

This is pseudocode. It won't work in-game, but it proves the concept. A simple modification of this should also allow it to work the other way

Chrisjd10
10-15-2011, 03:46 AM
alias missoutondisguise "1"
alias 1 "weapon_slot 2; alias missoutondisguise "2""
alias 2 "weapon_slot 3; alias missoutondisguise "3""
alias 3 "weapon_slot 1; alias missoutondisguise "1""
bind scroll_down missoutondisguise

This is pseudocode. It won't work in-game, but it proves the concept. A simple modification of this should also allow it to work the other way

Could it have scroll up binded as well as Down?
And what do you meanly doesn't work in game but provides concept?

Thomas W
10-15-2011, 04:44 AM
Could it have scroll up binded as well as Down?
And what do you meanly doesn't work in game but provides concept?

Well, the coding would work, but all the functions/commands are not named correctly (due to me not being near my computer when i wrote that, i couldn't get the correct code)

And yea, you could have it bound to scroll up as well as down, but i'll leave that for you to figure out. It's a simple modification to it, but what's the point in me giving something to you if you don't try and learn it.

Anyway, this should work. (non-pseudo code)

alias weaponswitch "1"
alias 1 "slot 2; alias weaponswitch "2""
alias 2 "slot 3; alias weaponswitch "3""
alias 3 "slot 1; alias weaponswitch "1""
bind scroll_down weaponswitch

Note that it doesn't take into account what you actually have out, only what the "next" weapon in line is. Like getting a computer to count to 20, even if you change the number to 10 when it is at 3, the next number will still be 4, even though you changed it. You can't get around this, as taking into account your current weapon is something that scripts can not do.

Chrisjd10
10-15-2011, 05:32 AM
Ok ty for the script, il try it out later.
But can it be binding with both up and down scroll at same time, or does it have to be one or the other?

RNGgod
10-15-2011, 07:36 AM
(accepts payent in rep)



Not sure. Put "echo "ACTIVATE SPY"" in your Spy folder. Does it come up in console when you change to Spy?

Ah, no, I figured it out; I had the "return to default" script in every class's config except spy, but I only had the spy script in autocfg, not in the spy config.

Thomas W
10-15-2011, 02:31 PM
Ok ty for the script, il try it out later.
But can it be binding with both up and down scroll at same time, or does it have to be one or the other?

It can be both,

alias weaponswitch "1"
alias 1 "slot 2; alias weaponswitch "2"; alias weaponswitchup "2up""
alias 2 "slot 3; alias weaponswitch "3"; alias weaponswitchup "3up""
alias 3 "slot 1; alias weaponswitch "1"; alias weaponswitchup "1up""
bind MWHEELDOWN weaponswitch

alias weaponswitchup "1"
alias 1up "slot 2; alias weaponswitchup "2up"; alias weaponswitch "2""
alias 2up "slot 1; alias weaponswitchup "3up"; alias weaponswitch "3""
alias 3up "slot 3; alias weaponswitchup "1up"; alias weaponswitch "1""
bind MWHEELUP weaponswitchup

That should work.

However, with this script, pressing 1 to 4 breaks it (due to the aforementioned shortcomings in the scripting language). You could fix it by rebinding your 1-4 keys, but i'll leave that for you to figure out.

EDIT: Oh, i was wrong with the other script working, i forgot to replace scroll_down with MWHEELDOWN, so just replace the scroll_down for MWHEELDOWN in that script and it should work.

Chrisjd10
10-15-2011, 03:44 PM
alias weaponswitch "1"
alias 1 "slot 2; alias weaponswitch "2"; alias weaponswitchup "2up""
alias 2 "slot 3; alias weaponswitch "3"; alias weaponswitchup "3up""
alias 3 "slot 1; alias weaponswitch "1"; alias weaponswitchup "1up""
bind MWHEELDOWN weaponswitch

alias weaponswitchup "1"
alias 1up "slot 2; alias weaponswitchup "2up"; alias weaponswitch "2""
alias 2up "slot 1; alias weaponswitchup "3up"; alias weaponswitch "3""
alias 3up "slot 3; alias weaponswitchup "1up"; alias weaponswitch "1""
bind MWHEELUP weaponswitchup


i tried that and i couldnt use the scroll wheel at all, for any class, but still i gave you rep :)

Thomas W
10-15-2011, 04:27 PM
i tried that and i couldnt use the scroll wheel at all, for any class, but still i gave you rep :)

When you open the console while scrolling up or down, does it show any errors (such as unknown command X or similar)

Chrisjd10
10-18-2011, 09:39 AM
When you open the console while scrolling up or down, does it show any errors (such as unknown command X or similar)

it says that slot if an unknown command

pinkrabbit
10-18-2011, 02:05 PM
Stabby stabby, you are such a beautiful spy

~Pink

Thomas W
10-18-2011, 02:40 PM
it says that slot if an unknown command

alias weaponswitch "1"
alias 1 "slot2; alias weaponswitch "2"; alias weaponswitchup "2up""
alias 2 "slot3; alias weaponswitch "3"; alias weaponswitchup "3up""
alias 3 "slot1; alias weaponswitch "1"; alias weaponswitchup "1up""
bind MWHEELDOWN weaponswitch

alias weaponswitchup "1"
alias 1up "slot2; alias weaponswitchup "2up"; alias weaponswitch "2""
alias 2up "slot1; alias weaponswitchup "3up"; alias weaponswitch "3""
alias 3up "slot3; alias weaponswitchup "1up"; alias weaponswitch "1""
bind MWHEELUP weaponswitchup

Right... Slot works differently to 90% of other console commands. Should work now.

alarossi
10-18-2011, 02:53 PM
alias weaponswitch "1"
alias 1 "slow2; alias weaponswitch "2"; alias weaponswitchup "2up""
alias 2 "slot3; alias weaponswitch "3"; alias weaponswitchup "3up""
alias 3 "slot1; alias weaponswitch "1"; alias weaponswitchup "1up""
bind MWHEELDOWN weaponswitch

alias weaponswitchup "1"
alias 1up "slot2; alias weaponswitchup "2up"; alias weaponswitch "2""
alias 2up "slot1; alias weaponswitchup "3up"; alias weaponswitch "3""
alias 3up "slot3; alias weaponswitchup "1up"; alias weaponswitch "1""
bind MWHEELUP weaponswitchup

Right... Slot works differently to 90% of other console commands. Should work now.

I think you typed it wrong..

Thomas W
10-18-2011, 03:00 PM
I think you typed it wrong..

No i didn't... (quick! Edit it away!)

Chrisjd10
10-19-2011, 09:50 AM
alias weaponswitch "1"
alias 1 "slot2; alias weaponswitch "2"; alias weaponswitchup "2up""
alias 2 "slot3; alias weaponswitch "3"; alias weaponswitchup "3up""
alias 3 "slot1; alias weaponswitch "1"; alias weaponswitchup "1up""
bind MWHEELDOWN weaponswitch

alias weaponswitchup "1"
alias 1up "slot2; alias weaponswitchup "2up"; alias weaponswitch "2""
alias 2up "slot1; alias weaponswitchup "3up"; alias weaponswitch "3""
alias 3up "slot3; alias weaponswitchup "1up"; alias weaponswitch "1""
bind MWHEELUP weaponswitchup


Great, works now. Thanks

Sunzibar
10-20-2011, 06:19 AM
I personally don't like script, where is the skill in that ?#


One of them makes the eternal reward pointless.

bobthemuffinman
10-20-2011, 08:41 AM
Stabby, the amby viewmodel script isnt working It says there was some error with the draw viewmodel. Do I have to press 1? Because im mousewheeling to get to it.

alarossi
10-20-2011, 09:08 AM
Stabby, the amby viewmodel script isnt working It says there was some error with the draw viewmodel. Do I have to press 1? Because im mousewheeling to get to it.

yes, you have to press 1, 2 and 3
the script doesnt support the mousewheel function

slpngsun
10-24-2011, 09:19 AM
how can i remove this? please help me

Pkm
10-24-2011, 10:14 AM
How do i make a script that just changes ambys sens to low?

dmbr
10-24-2011, 01:20 PM
how can i remove this? please help me
Just delete it from your spy cfg and reset the binds.
How do i make a script that just changes ambys sens to low?

Bind 1 "slot1;sensitivity 1"

Pkm
10-24-2011, 07:29 PM
Hmm doesnt that then make all slot 1s have low sens?

Virus.
10-24-2011, 08:38 PM
The script is already there, Pkm. I will modify it for you:

bind "q" "switcher"
bind "mouse2" +watch


alias knife_vm_mode "bind mouse1 +viewmodel_knife"
alias amby_vm_mode "bind mouse1 +viewmodel_amby"
alias sap_vm_mode "bind mouse1 +viewmodel_sap"

alias +viewmodel_knife "+attack;r_drawviewmodel 1;sensitivity #"
alias -viewmodel_knife "-attack;r_drawviewmodel 1"
alias +viewmodel_amby "+attack;r_drawviewmodel 1;sensitivity 1"
alias -viewmodel_amby "-attack;r_drawviewmodel 1"
alias +viewmodel_sap "+attack;r_drawviewmodel 1;sensitivity #"
alias -viewmodel_sap "-attack;r_drawviewmodel 1"


alias equip_knife "slot3;r_drawviewmodel 1;knife_vm_mode"

alias equip_knife2amby "equip_knife;alias switcher equip_amby2knife;bind 2 equip_sap2knife;bind 3 equip_knife;bind 1 equip_amby2knife"
alias equip_knife2sap "equip_knife;alias switcher equip_sap2knife;bind 2 equip_sap2knife;bind 3 equip_knife;bind 1 equip_amby2knife"

alias equip_amby "slot1;r_drawviewmodel 1;amby_vm_mode"

alias equip_amby2sap "equip_amby;alias switcher equip_sap2amby;bind 2 equip_sap2amby;bind 3 equip_knife2amby;bind 1 equip_amby"
alias equip_amby2knife "equip_amby;alias switcher equip_knife2amby;bind 2 equip_sap2amby;bind 3 equip_knife2amby;bind 1 equip_amby"

alias equip_sap "slot2;r_drawviewmodel 1;sap_vm_mode"

alias equip_sap2knife "equip_sap;alias switcher equip_knife2sap;bind 2 equip_sap;bind 3 equip_knife2sap;bind 1 equip_amby2sap"
alias equip_sap2amby "equip_sap;alias switcher equip_amby2sap;bind 2 equip_sap;bind 3 equip_knife2sap;bind 1 equip_amby2sap"

alias +watch "+attack2;r_drawviewmodel 1"
alias -watch "-attack2;r_drawviewmodel 1"

equip_knife2amby


Replace the #s with your original sensitivity.

Virus.
10-24-2011, 08:44 PM
To prevent this applying to ALL classes, you will need an unbinding script.


Firstly, take any cfg, for example, the scout, and copy and paste it into the same folder. Now you should have "scout (1)".

Rename this, to "clear". If you can see on your files ".cfg" on the end, then make sure to leave this on it, so it will instead be be "clear.cfg".

Open this new cfg up on notepad. Here you will set your defaults. In this case, you will only need to paste this in, but you must add more rebinds in later if you get more scripts:

r_drawviewmodel 1
bind q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind mouse1 +attack1
bind mouse2 +attack2

Now save and close this. Open up all 9 class cfgs. Type the following in:

exec clear.cfg

Always have this at the top.

slpngsun
10-24-2011, 09:47 PM
can u be more specific i already reinstall tf2 and still script

slpngsun
10-24-2011, 10:14 PM
i delete everything but my "config.cfg"
unbindall
bind "0" "slot10"
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 "a" "+moveleft"
bind "b" "lastdisguise"
bind "c" "voice_menu_3"
bind "d" "+moveright"
bind "e" "voicemenu 0 0"
bind "f" "inspect"
bind "g" "+taunt"
bind "h" "+use_action_slot_item"
bind "i" "showmapinfo"
bind "j" "cl_trigger_first_notification"
bind "k" "cl_decline_first_notification"
bind "l" "dropitem"
bind "m" "open_charinfo_direct"
bind "n" "open_charinfo_backpack"
bind "q" "lastinv"
bind "r" "+reload"
bind "s" "+back"
bind "t" "impulse 201"
bind "u" "say_team"
bind "v" "+voicerecord"
bind "w" "+forward"
bind "x" "voice_menu_2"
bind "y" "say"
bind "z" "voice_menu_1"
bind "'" "+moveup"
bind "`" "toggleconsole"
bind "," "changeclass"
bind "." "changeteam"
bind "/" "+movedown"
bind "-" "disguiseteam"
bind "SPACE" "+jump"
bind "TAB" "+showscores"
bind "ESCAPE" "cancelselect"
bind "INS" "+klook"
bind "END" "centerview"
bind "PGUP" "+lookup"
bind "PGDN" "+lookdown"
bind "PAUSE" "pause"
bind "ALT" "+strafe"
bind "CTRL" "+duck"
bind "F1" "+showroundinfo"
bind "F3" "askconnect_accept"
bind "F5" "screenshot"
bind "F6" "save_replay"
bind "F7" "abuse_report_queue"
bind "F10" "quit prompt"
bind "F12" "replay_togglereplaytips"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind "MWHEELUP" "invprev"
bind "MWHEELDOWN" "invnext"
cl_flipviewmodels "0"
cl_rumblescale "1.0"
cl_debugrumble "0"
cl_thirdperson "0"
cl_team "default"
cl_class "default"
hud_takesshots "0"
hud_freezecamhide "0"
glow_outline_effect_enable "1"
cl_showhelp "1"
hud_draw_fixed_reticle "0"
hud_achievement_description "1"
hud_achievement_count "8"
cl_chatfilters "63"
cl_chatfilter_version "1"
cc_linger_time "1.0"
cc_predisplay_time "0.25"
cc_subtitles "1"
cc_lang ""
crosshair "1"
cl_observercrosshair "1"
cl_hudhint_sound "1"
g15_update_msec "250"
cam_snapto "0"
cam_ideallag "4.0"
cam_idealdelta "4.0"
cam_idealyaw "0"
cam_idealpitch "0"
cam_idealdist "150"
cam_idealdistright "0"
cam_idealdistup "0"
cam_collision "1"
c_maxpitch "90"
c_minpitch "0"
c_maxyaw "135"
c_minyaw "-135"
c_maxdistance "200"
c_mindistance "30"
c_orthowidth "100"
c_orthoheight "100"
joy_name "joystick"
joy_advanced "0"
joy_advaxisx "0"
joy_advaxisy "0"
joy_advaxisz "0"
joy_advaxisr "0"
joy_advaxisu "0"
joy_advaxisv "0"
joy_forwardthreshold "0.15"
joy_sidethreshold "0.15"
joy_pitchthreshold "0.15"
joy_yawthreshold "0.15"
joy_forwardsensitivity "-1"
joy_sidesensitivity "1"
joy_pitchsensitivity "1"
joy_yawsensitivity "-1"
joy_response_move "1"
joy_response_look "0"
joy_lowend "1"
joy_lowmap "1"
joy_accelscale "0.6"
joy_accelmax "1.0"
joy_autoaimdampenrange "0"
joy_autoaimdampen "0"
joy_diagonalpov "0"
joy_display_input "0"
joy_wingmanwarrior_turnhack "0"
joy_inverty "0"
joy_movement_stick "0"
joy_xcontroller_cfg_loaded "0"
lookspring "0"
lookstrafe "0"
joystick "0"
m_pitch "0.022"
m_filter "0"
sensitivity "3"
m_side "0.8"
m_yaw "0.022"
m_forward "1"
m_customaccel "0"
m_customaccel_scale "0.04"
m_customaccel_max "0"
m_customaccel_exponent "1"
m_mousespeed "1"
m_mouseaccel1 "0"
m_mouseaccel2 "0"
m_rawinput "0"
cl_mouselook "1"
cl_idealpitchscale "0.8"
net_scale "5"
net_graphpos "1"
net_graphsolid "1"
net_graphtext "1"
net_graphmsecs "400"
net_graphshowlatency "1"
net_graphshowinterp "1"
net_graph "0"
net_graphheight "64"
net_graphproportionalfont "1"
viewmodel_fov "54.000000"
mat_software_aa_strength "0.000000"
mat_software_aa_quality "0"
mat_software_aa_edge_threshold "1.0"
mat_software_aa_blur_one_pixel_lines "0.5"
mat_software_aa_tap_offset "1.0"
mat_software_aa_strength_vgui "1.000000"
r_drawviewmodel "0"
voice_modenable "1"
hud_fastswitch "1"
sixense_weapon_select_sensitivity "1.65"
sixense_crouch_sensitivity "1.5"
sixense_jump_sensitivity "1.2"
sixense_reload_sensitivity "1.5"
sixense_left_handed "0"
sixense_sensitivity_level "2"
sixense_controller_angle_mode "0.0f"
sixense_roll_correct_blend "0.965f"
sixense_exit_one_to_one_dot "0.85"
sixense_exit_metroid_blend "0.95f"
sixense_max_charge_spin "3.0f"
sixense_zoom_momentary_time "500"
sixense_base_offset_x "0.0"
sixense_base_offset_y "0.0"
sixense_base_offset_z "-20.0"
sixense_trigger_threshold "0.05"
sixense_tilt_gesture_angle_threshold "35.0"
sixense_point_gesture_angle_threshold "15.0"
sixense_mouse_enabled "1.0"
sixense_mouse_sensitivity "1.0"
sixense_spring_view_enabled "1.0f"
sixense_spring_view_min_spring "0.025f"
sixense_spring_view_max_spring "0.9999f"
sixense_spring_view_min_angle "1.0f"
sixense_spring_view_max_angle "45.0f"
sixense_aim_freeaim_heading_multiplier "1.750000"
sixense_aim_freeaim_pitch_multiplier "1.750000"
sixense_aim_freeaim_dead_zone_radius "0.000000"
sixense_aim_freeaim_accel_band_size "15"
sixense_aim_freeaim_max_speed "12.000000"
sixense_aim_freeaim_auto_level_rate "1.0"
sixense_aim_freeaim_accel_band_exponent "1.0"
sixense_aim_freeaim_switch_blend_time_exit "0.25"
sixense_aim_1to1_ratchet_vertical "1.0"
sixense_aim_1to1_heading_multiplier "3.0"
sixense_aim_1to1_pitch_multiplier "3.000000"
sixense_feet_angles_offset_stick_spin_horiz_multip lier "7.500000"
sixense_feet_angles_offset_stick_spin_vert_multipl ier "4.500000"
sixense_feet_angles_offset_stick_spin_invert_pitch "1.0"
sixense_feet_angles_offset_stick_spin_exponent "1.0"
sixense_aim_scope_heading_multiplier "0.5"
sixense_aim_scope_pitch_multiplier "0.5"
sixense_melee_pitch_blend_val "0.99"
sixense_crosshair_horiz_multiplier "1.0"
sixense_crosshair_vert_multiplier "1.0"
sixense_always_draw_crosshair "1"
sixense_walking_dead_zone_percent "10.0"
sixense_walking_exponent "1.0"
sixense_enabled "0"
sixense_filter_level "0.5"
sixense_mode "0"
cl_playerspraydisable "0"
muzzleflash_light "1"
hud_classautokill "1"
overview_health "1"
overview_names "1"
overview_tracks "1"
overview_locked "1"
overview_alpha "1.0"
spec_scoreboard "0"
cl_spec_mode "6"
cl_disablehtmlmotd "0"
store_version "1"
cl_showbackpackrarities "0"
tf_explanations_backpackpanel "1"
cl_notifications_show_ingame "1"
cl_notifications_max_num_visible "3"
cl_notifications_move_time "0.5"
tf_explanations_tradingpanel "1"
cl_trading_show_requests_from "3"
tf_explanations_discardpanel "1"
tf_explanations_store "1"
tf_chargedfriends ""
cl_autorezoom "1"
tf_remember_activeweapon "0"
tf_remember_lastswitched "0"
cl_autoreload "1"
tf_respawn_on_loadoutchanges "1"
sb_dontshow_maxplayer_warning "0"
sb_close_browser_on_connect "1"
tf_medieval_thirdperson "0"
fov_desired "75"
tf_highfive_hintcount "3"
cl_steamscreenshots "1"
cl_hud_minmode "0"
viewmodel_fov_demo "54"
cl_ask_favorite_opt_out "1"
cl_ask_blacklist_opt_out "0"
tf_coach_request_nevershowagain "1"
tf_particles_disable_weather "0"
hud_combattext "1"
hud_combattext_healing "1"
tf_dingalingaling "1"
tf_dingaling_volume "0.75"
tf_dingaling_pitchmindmg "100"
tf_dingaling_pitchmaxdmg "100"
hud_achievement_count_engineer "3"
tf_hud_num_building_alert_beeps "2"
cl_crosshair_red "142.369995"
cl_crosshair_green "114.449997"
cl_crosshair_blue "121.119995"
cl_crosshair_file "crosshair5"
cl_crosshair_scale "32.549999"
tf_recent_achievements "1903,1424,1420,136,1418,1411"
tf_training_has_prompted_for_training "2"
tf_training_has_prompted_for_offline_practice "1"
tf_training_has_prompted_for_forums "1"
tf_training_has_prompted_for_options "1"
tf_training_has_prompted_for_loadout "1"
tf_build_menu_controller_mode "0"
tf_simple_disguise_menu "1"
tf_disguise_menu_controller_mode "0"
tf_spectator_target_location "0"
tf_weapon_select_demo_start_delay "1.0"
tf_weapon_select_demo_time "0.5"
tf_quickplay_lastviewedmode "4"
tf_colorblindassist "1"
tf_medigun_autoheal "1"
hud_medicautocallers "1"
hud_medicautocallersthreshold "75.000000"
hud_medichealtargetmarker "1"
tf_sniper_fullcharge_bell "1"
cl_crosshaircolor "0"
cl_dynamiccrosshair "1"
cl_scalecrosshair "1"
cl_crosshairalpha "200"
publish_file_last_dir ""
tf_explanations_charinfo_armory_panel "0"
tf_explanations_charinfopanel "1"
tf_show_preset_explanation_in_class_loadout "0"
tf_explanations_craftingpanel "0"
tf_testitem_recent ""
replay_replaywelcomedlgcount "2"
cl_spec_carrieditems "1"
cl_use_tournament_specgui "0"
cl_training_completed_with_classes "0"
ifm_steadycam_rotaterate "60"
ifm_steadycam_zoomspeed "1.0"
ifm_steadycam_zoomdamp "0.95"
ifm_steadycam_armspeed "0.5"
ifm_steadycam_rotatedamp "0.95"
ifm_steadycam_mousefactor "1.0"
ifm_steadycam_mousepower "1.0"
ifm_steadycam_2dspringconstant "33.0"
ifm_steadycam_2ddragconstant "11.0"
ifm_steadycam_noise "0.0"
ifm_steadycam_sensitivity "1.0"
replay_editor_camera_length "15"
youtube_http_proxy ""
replay_movie_reveal_warning "1"
replay_movie_export_last_dir ""
replay_renderqueue_first_add "1"
replay_rendersetting_exportraw "0"
replay_rendersetting_renderglow "0"
replay_quitmsg_dontaskagain "1"
replay_editor_fov_mousewheel_multiplier "5"
replay_editor_fov_mousewheel_invert "0"
replay_replayeditor_rewindmsgcounter "1"
replay_enablerenderpreview "0"
youtube_username ""
r_eyegloss "1"
vgui_message_dialog_modal "1"
commentary_firstrun "0"
scene_showfaceto "0"
ai_report_task_timings_on_limit "0"
ai_think_limit_label "0"
npc_height_adjust "1"
sv_pvsskipanimation "1"
scene_showlook "0"
scene_showmoveto "0"
scene_showunlock "0"
commentary "1"
xbox_throttlebias "100"
xbox_throttlespoof "200"
xbox_autothrottle "1"
func_break_max_pieces "15"
suitvolume "0.25"
option_duck_method "1"
sk_autoaim_mode "1"
sv_noclipaccelerate "5"
sv_noclipspeed "5"
sv_specaccelerate "5"
sv_specspeed "3"
sv_specnoclip "1"
sv_backspeed "0.6"
sv_skyname "sky_upward"
tf_server_identity_token ""
tf_server_identity_account_id "0"
tf_server_identity_disable_quickplay "0"
replay_enableeventbasedscreenshots "0"
replay_dodiskcleanup "1"
replay_voice_during_playback "0"
replay_flushinterval "15"
bugreporter_uploadasync "0"
cl_cmdrate "30"
cl_updaterate "20"
closecaption "1"
skill "1"
net_maxroutable "1260"
cl_allowupload "1"
mat_powersavingsmode "0"
name "slpngsUn"
password ""
cl_clanid "0"
sv_unlockedchapters "99"
tv_nochat "0"
cl_showpluginmessages "1"
cl_timeout "30"
cl_logofile "materials/vgui/logos/spray.vtf"
cl_soundfile "sound/player/jingle.wav"
cl_forcepreload "0"
cl_allowdownload "1"
cl_downloadfilter "all"
con_enable "1"
r_eyemove "1"
r_eyeshift_x "0"
r_eyeshift_y "0"
r_eyeshift_z "0"
r_eyesize "0"
r_ambientboost "1"
r_ambientmin "0.3"
r_ambientfactor "5"
r_drawmodelstatsoverlaymin "0.1"
r_drawmodelstatsoverlaymax "1.5"
mp_decals "200.000000"
mat_color_projection "0"
sv_logsdir "logs"
sv_logfile "1"
sv_logflush "0"
sv_logecho "1"
sv_log_onefile "0"
sv_logbans "0"
sv_voiceenable "1"
sv_forcepreload "0"
windows_speaker_config "4"
snd_mute_losefocus "1"
snd_legacy_surround "0"
snd_pitchquality "1"
volume "1.000000"
snd_musicvolume "0.180000"
snd_mixahead "0.1"
adsp_debug "0"
snd_ducktovolume "0.55"
snd_duckerattacktime "0.5"
snd_duckerreleasetime "2.5"
snd_duckerthreshold "0.15"
dsp_slow_cpu "0"
dsp_volume "1.0"
dsp_enhance_stereo "0"
voice_scale "1"
voice_enable "1"
voice_forcemicrecord "1"
budget_bargraph_background_alpha "128"
budget_peaks_window "30"
budget_averages_window "30"
budget_show_peaks "1"
budget_show_averages "0"
budget_show_history "1"
budget_history_numsamplesvisible "100"
budget_history_range_ms "66.666666667"
budget_panel_bottom_of_history_fraction ".25"
budget_bargraph_range_ms "16.6666666667"
budget_background_alpha "128"
budget_panel_x "0"
budget_panel_y "50"
budget_panel_width "512"
budget_panel_height "384"
texture_budget_panel_x "0"
texture_budget_panel_y "450"
texture_budget_panel_width "512"
texture_budget_panel_height "284"
texture_budget_panel_bottom_of_history_fraction ".25"
texture_budget_background_alpha "128"
vprof_graphwidth "512"
vprof_graphheight "256"
vprof_verbose "1"
vprof_unaccounted_limit "0.3"
vprof_warningmsec "10"
video_quicktime_encode_gamma "3"
video_quicktime_decode_gamma "0"
r_rootlod "0"
mat_monitorgamma_tv_enabled "0"
r_waterforceexpensive "1"
mat_queue_mode "-1"
mat_texture_list_content_path ""
joy_wingmanwarrior_centerhack "0"
joy_axisbutton_threshold "0.3"
mat_hdr_level "2"

can u guys help me out?

Virus.
10-25-2011, 09:39 PM
I have no clue what you are doing now. Go through my post bit by bit.

Ace42
10-26-2011, 04:55 AM
Is there a call for a "fake reload" that separates it out from the "previous disguise" button so I can add it to the weapon-switch binds without forcing my model to update to currently equipped weapon?

Or do I just do
//disguise slot1
bind "[KEY]" +slot1_disguiser
alias +slot1_disguiser "slot1;lastdisguise;lastdisguise"
alias -slot1_disguiser "lastinv"
And suck up the automated reload animation when I hit it?

EDIT:
NM, gonna test out
// ========================
// START disguise slot1 Tap
// ========================
alias "s1key" "s1ap"
alias "s1ap" "s1pri; alias s1key s1ap2; wait 100; alias s1key s1ap"
alias "s1ap2" "s1sec; alias s1key s1ap"
//
// -------------------------------------------------------------
// |Instructions: Change the X's below.
// | s1pri is your Primary keytap
// | s1sec is your Secondary keytap
// | (EX: alias "s1pri" "slot1")
// |
// -------------------------------------------------------------
//
alias "s1pri" "slot1;lastdisguise"
alias "s1sec" "lastdisguise"
bind "[KEY]" "s1key"
// ======================
// END disguise slot1 Tap
// ======================

MidnightOne
10-26-2011, 12:26 PM
Bad, they've removed the "wait" command, now most scripts just go rubbish.

PubstarRunner
10-26-2011, 12:36 PM
Bad, they've removed the "wait" command, now most scripts just go rubbish.

The wait command hasn't been usable on most servers for quite some time now. Did Valve just straight up remove it?

Pkm
10-26-2011, 12:40 PM
To prevent this applying to ALL classes, you will need an unbinding script.


Firstly, take any cfg, for example, the scout, and copy and paste it into the same folder. Now you should have "scout (1)".

Rename this, to "clear". If you can see on your files ".cfg" on the end, then make sure to leave this on it, so it will instead be be "clear.cfg".

Open this new cfg up on notepad. Here you will set your defaults. In this case, you will only need to paste this in, but you must add more rebinds in later if you get more scripts:

r_drawviewmodel 1
bind q lastinv
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind mouse1 +attack1
bind mouse2 +attack2

Now save and close this. Open up all 9 class cfgs. Type the following in:

exec clear.cfg

Always have this at the top.

Dear god thats alot of work. Thanks though,lol.

ClockworkCrux
11-16-2011, 02:51 AM
Does anyone know how the .wav integration for the Disguise Script is done? I've extracted the .wav files I want to use into tf/sound and filled in the script with the file names. It does not, however, seem to work in-game. I'm not sure if this is significant in any way, but it seems to work just fine when I create my own server. Help would be appreciated.

alarossi
11-19-2011, 09:51 AM
hey stabby, there is a way to make the sound script work in sv_pure 2, just use the following command: "play vo\" , for example: "play vo\sniper_no01"
but you need the exact song name..
this way you dont need any external program..
all the vo sounds: http://nsr.site.nfoservers.com/tf2/sound/vo/

ramborambo
12-03-2011, 04:47 AM
not sure if its the right topic but this topic has transormed into "the topic for spy tools" so i will try to ask here, there is any mode to remove the spy silouhette that comes into your screen when you disguise/lose disguise with a scriptor removing some file in steam folders?