Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exec reset
- // This script for the spy allows settings to switch with the active weapon.
- // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one)
- // The script will only work correctly when switching with keys in the BIND section.
- // The script cannot know if a weapon switched for any other reason than player input using the keys in the BIND section.
- // The script cannot know if a weapon switched successfully, and will always assume it has. Examples that prevent/impede switching:
- // - Permanent or temporary non-active weapon like running out of revolver ammo or a melted spy-cicle
- // The mousewheel and q switch between your primary and melee weapons.
- // Holding mouse4 switches to your secondary weapon and auto-attacks, releasing the key switches to your melee and stops attacking.
- // Any additional function of mouse1 other than attacking is dependent on the active weapon
- // Pressing mouse2 always enables viewmodels in addition to normal function.
- // One press of 1-9 disguises as the corresponding enemy class and gives a sound alert, two presses disguises as the ally version.
- // Pressing wasd resets the counter for ally disguising.
- // Pressing f disguises you as either an enemy scout, pyro, demoman, sniper, or spy
- // Each press of 1-9 or wasd cycles through which of those 5 potential disguises that pressing f will deploy
- // The movement keys are set up for 'null movement' in addition to their disguise functionality
- // Holding shift 'zooms' your FOV to 75, releasing sets it to 90
- // ========== INSTRUCTIONS ==========
- // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are turned on (1) or off (0)
- // r_drawviewmodel in the prs_ aliases is activated when pressing the attack key with the weapon equipped
- // r_drawviewmodel in the rls_ aliases is activated when releasing the attack key with the weapon equipped
- // r_drawviewmodel in the set_ aliases is activated when switching to that weapon
- // To add additional settings on weapon switch, append them to the set_ aliases.
- // To add additional settings on attack/release, append them to the prs_/rls_ aliases.
- // To change which keys can have the functions described here, change or add lines in the BINDS section, binding keys only to the aliases already in the binds section
- // Multiple keys can be bound to the same alias and the script will still work correctly
- // See the following for information on how to install scripts and how to make them class-specific:
- // http://www.reddit.com/r/tf2scripthelp/wiki/introduction
- // To "undo" the script and changes made, remove the script from your relevant cfg files and execute the lines in the SCRIPT OVERWRITE section (remove the comment marks first)
- // ========== BINDS ==========
- bind w +fwd
- bind s +bck
- bind a +lft
- bind d +rgt
- bind f "drand; dreset"
- bind 1 d1
- bind 2 d2
- bind 3 d3
- bind 4 d4
- bind 5 d5
- bind 6 d6
- bind 7 d7
- bind 8 d8
- bind 9 d9
- bind mwheelup eq_1_3
- bind mwheeldown eq_1_3
- bind q eq_1_3
- bind mouse1 +eq_attack
- bind mouse2 +eq_attack2
- bind mouse4 +at_2_3
- bind shift +zoom
- // ========== SETTINGS ==========
- alias prs_slot1 "r_drawviewmodel 0; cl_crosshair_file crosshair2; cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 50"
- alias rls_slot1 "r_drawviewmodel 0; cl_crosshair_file crosshair5; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- alias prs_slot3 "r_drawviewmodel 1"
- alias rls_slot3 "r_drawviewmodel 1"
- alias set_slot1 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
- alias set_slot2 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 255; cl_crosshair_green 50; cl_crosshair_red 255"
- alias set_slot3 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 50"
- // ========== LOGIC ==========
- //Weapon switching & attacking
- alias +eq_attack "+attack; at_press; spec_next"
- alias -eq_attack "-attack; at_release"
- alias +eq_attack2 "+attack2; r_drawviewmodel 1; spec_prev"
- alias -eq_attack2 "-attack2; r_drawviewmodel 1"
- alias +at_2_3 "eq_slot2; +attack; say_team Sapping!"
- alias -at_2_3 "-attack; eq_slot3"
- alias eq_slot1 "slot1; set_slot1; alias at_press prs_slot1; alias at_release rls_slot1; alias eq_1_3 eq_slot3"
- alias eq_slot2 "slot2; set_slot2; alias at_press ; alias at_release "
- alias eq_slot3 "slot3; set_slot3; alias at_press prs_slot3; alias at_release rls_slot3; alias eq_1_3 eq_slot1"
- eq_slot1
- //Zoom
- alias +zoom "fov_desired 75"
- alias -zoom "fov_desired 90"
- //Null movement & disguises
- alias +fwd "-back; +forward; alias cfwd +forward; mrand; dreset"
- alias -fwd "-forward; cbck; alias cfwd "
- alias +bck "-forward; +back; alias cbck +back; mrand; dreset"
- alias -bck "-back; cfwd; alias cbck "
- alias +lft "-moveright; +moveleft; alias clft +moveleft; mrand; dreset"
- alias -lft "-moveleft; crgt; alias clft "
- alias +rgt "-moveleft; +moveright; alias crgt +moveright; mrand; dreset"
- alias -rgt "-moveright; clft; alias crgt "
- alias cfwd ""
- alias cbck ""
- alias clft ""
- alias crgt ""
- alias esco "disguise 1 -1; play vo/scout_yes01; alias d1 fsco; mrand"
- alias esol "disguise 3 -1; play vo/soldier_yes04; alias d2 fsol; mrand"
- alias epyr "disguise 7 -1; play vo/pyro_moveup01; alias d3 fpyr; mrand"
- alias edem "disguise 4 -1; play vo/demoman_yes01; alias d4 fdem; mrand"
- alias ehea "disguise 6 -1; play vo/heavy_yes03; alias d5 fhea; mrand"
- alias eeng "disguise 9 -1; play vo/engineer_yes03; alias d6 feng; mrand"
- alias emed "disguise 5 -1; play vo/medic_yes03; alias d7 fmed; mrand"
- alias esni "disguise 2 -1; play vo/sniper_yes03; alias d8 fsni; mrand"
- alias espy "disguise 8 -1; play vo/spy_yes02; alias d9 fspy; mrand"
- alias fsco "disguise 1 -2; play vo/scout_no02; alias d1 esco"
- alias fsol "disguise 3 -2; play vo/soldier_no02; alias d2 esol"
- alias fpyr "disguise 7 -2; play vo/pyro_no01; alias d3 epyr"
- alias fdem "disguise 4 -2; play vo/demoman_no03; alias d4 edem"
- alias fhea "disguise 6 -2; play vo/heavy_no03; alias d5 ehea"
- alias feng "disguise 9 -2; play vo/engineer_no01; alias d6 eeng"
- alias fmed "disguise 5 -2; play vo/medic_no01; alias d7 emed"
- alias fsni "disguise 2 -2; play vo/sniper_no01; alias d8 esni"
- alias fspy "disguise 8 -2; play vo/spy_no03; alias d9 espy"
- alias dreset "alias d1 esco; alias d2 esol; alias d3 epyr; alias d4 edem; alias d5 ehea; alias d6 eeng; alias d7 emed; alias d8 esni; alias d9 espy"
- dreset
- alias mrand1 "alias drand esco; alias mrand mrand2"
- alias mrand2 "alias drand epyr; alias mrand mrand3"
- alias mrand3 "alias drand edem; alias mrand mrand4"
- alias mrand4 "alias drand esni; alias mrand mrand5"
- alias mrand5 "alias drand espy; alias mrand mrand1"
- mrand1
- // ========== SCRIPT OVERWRITE ==========
- //r_drawviewmodel 1
- //fov_desired 90
- //cl_crosshair_file ""
- //cl_crosshair_scale 32
- //cl_crosshair_blue 200
- //cl_crosshair_green 200
- //cl_crosshair_red 200
- //bind w +forward
- //bind s +back
- //bind a +moveleft
- //bind d +moveright
- //bind f inspect
- //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 mwheelup invprev
- //bind mwheeldown invnext
- //bind q lastinv
- //bind mouse1 +attack
- //bind mouse2 +attack2
- //unbind mouse4
Add Comment
Please, Sign In to add comment