SHOW:
|
|
- or go back to the newest paste.
1 | exec reset | |
2 | ||
3 | - | // This script for the spy allows settings to switch with the active weapon. |
3 | + | |
4 | - | // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one) |
4 | + | |
5 | bind w +fwd | |
6 | - | // The script will only work correctly when switching with keys in the BIND section. |
6 | + | |
7 | - | // The script cannot know if a weapon switched for any other reason than player input using the keys in the BIND section. |
7 | + | |
8 | - | // The script cannot know if a weapon switched successfully, and will always assume it has. Examples that prevent/impede switching: |
8 | + | |
9 | - | // - Permanent or temporary non-active weapon like running out of revolver ammo or a melted spy-cicle |
9 | + | |
10 | bind f "drand; dreset" | |
11 | - | // The mousewheel and q switch between your primary and melee weapons. |
11 | + | |
12 | - | // Holding mouse4 switches to your secondary weapon and auto-attacks, releasing the key switches to your melee and stops attacking. |
12 | + | |
13 | - | // Any additional function of mouse1 other than attacking is dependent on the active weapon |
13 | + | |
14 | - | // Pressing mouse2 always enables viewmodels in addition to normal function. |
14 | + | |
15 | bind 4 d4 | |
16 | - | // One press of 1-9 disguises as the corresponding enemy class and gives a sound alert, two presses disguises as the ally version. |
16 | + | |
17 | - | // Pressing wasd resets the counter for ally disguising. |
17 | + | |
18 | - | // Pressing f disguises you as either an enemy scout, pyro, demoman, sniper, or spy |
18 | + | |
19 | - | // Each press of 1-9 or wasd cycles through which of those 5 potential disguises that pressing f will deploy |
19 | + | |
20 | bind 9 d9 | |
21 | - | // The movement keys are set up for 'null movement' in addition to their disguise functionality |
21 | + | |
22 | bind mwheelup eq_1_3 | |
23 | - | // Holding shift 'zooms' your FOV to 75, releasing sets it to 90 |
23 | + | |
24 | - | |
24 | + | |
25 | - | |
25 | + | |
26 | - | // ========== INSTRUCTIONS ========== |
26 | + | |
27 | - | |
27 | + | |
28 | - | // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are turned on (1) or off (0) |
28 | + | |
29 | - | // r_drawviewmodel in the prs_ aliases is activated when pressing the attack key with the weapon equipped |
29 | + | |
30 | - | // r_drawviewmodel in the rls_ aliases is activated when releasing the attack key with the weapon equipped |
30 | + | |
31 | - | // r_drawviewmodel in the set_ aliases is activated when switching to that weapon |
31 | + | |
32 | - | |
32 | + | |
33 | - | // To add additional settings on weapon switch, append them to the set_ aliases. |
33 | + | |
34 | - | // To add additional settings on attack/release, append them to the prs_/rls_ aliases. |
34 | + | |
35 | - | |
35 | + | |
36 | - | // 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 |
36 | + | |
37 | - | // Multiple keys can be bound to the same alias and the script will still work correctly |
37 | + | |
38 | - | |
38 | + | |
39 | - | // See the following for information on how to install scripts and how to make them class-specific: |
39 | + | |
40 | - | // http://www.reddit.com/r/tf2scripthelp/wiki/introduction |
40 | + | |
41 | - | |
41 | + | |
42 | - | // 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) |
42 | + | |
43 | ||
44 | // ========== LOGIC ========== | |
45 | ||
46 | //Weapon switching & attacking | |
47 | alias +eq_attack "+attack; at_press; spec_next" | |
48 | alias -eq_attack "-attack; at_release" | |
49 | ||
50 | alias +eq_attack2 "+attack2; r_drawviewmodel 1; spec_prev" | |
51 | alias -eq_attack2 "-attack2; r_drawviewmodel 1" | |
52 | ||
53 | alias +at_2_3 "eq_slot2; +attack; say_team Sapping!" | |
54 | alias -at_2_3 "-attack; eq_slot3" | |
55 | ||
56 | alias eq_slot1 "slot1; set_slot1; alias at_press prs_slot1; alias at_release rls_slot1; alias eq_1_3 eq_slot3" | |
57 | alias eq_slot2 "slot2; set_slot2; alias at_press ; alias at_release " | |
58 | alias eq_slot3 "slot3; set_slot3; alias at_press prs_slot3; alias at_release rls_slot3; alias eq_1_3 eq_slot1" | |
59 | ||
60 | eq_slot1 | |
61 | ||
62 | //Zoom | |
63 | alias +zoom "fov_desired 75" | |
64 | alias -zoom "fov_desired 90" | |
65 | ||
66 | //Null movement & disguises | |
67 | alias +fwd "-back; +forward; alias cfwd +forward; mrand; dreset" | |
68 | alias -fwd "-forward; cbck; alias cfwd " | |
69 | alias +bck "-forward; +back; alias cbck +back; mrand; dreset" | |
70 | alias -bck "-back; cfwd; alias cbck " | |
71 | alias +lft "-moveright; +moveleft; alias clft +moveleft; mrand; dreset" | |
72 | alias -lft "-moveleft; crgt; alias clft " | |
73 | alias +rgt "-moveleft; +moveright; alias crgt +moveright; mrand; dreset" | |
74 | alias -rgt "-moveright; clft; alias crgt " | |
75 | ||
76 | alias cfwd "" | |
77 | alias cbck "" | |
78 | alias clft "" | |
79 | alias crgt "" | |
80 | ||
81 | alias esco "disguise 1 -1; play vo/scout_yes01; alias d1 fsco; mrand" | |
82 | alias esol "disguise 3 -1; play vo/soldier_yes04; alias d2 fsol; mrand" | |
83 | alias epyr "disguise 7 -1; play vo/pyro_moveup01; alias d3 fpyr; mrand" | |
84 | alias edem "disguise 4 -1; play vo/demoman_yes01; alias d4 fdem; mrand" | |
85 | alias ehea "disguise 6 -1; play vo/heavy_yes03; alias d5 fhea; mrand" | |
86 | alias eeng "disguise 9 -1; play vo/engineer_yes03; alias d6 feng; mrand" | |
87 | alias emed "disguise 5 -1; play vo/medic_yes03; alias d7 fmed; mrand" | |
88 | alias esni "disguise 2 -1; play vo/sniper_yes03; alias d8 fsni; mrand" | |
89 | alias espy "disguise 8 -1; play vo/spy_yes02; alias d9 fspy; mrand" | |
90 | ||
91 | alias fsco "disguise 1 -2; play vo/scout_no02; alias d1 esco" | |
92 | alias fsol "disguise 3 -2; play vo/soldier_no02; alias d2 esol" | |
93 | alias fpyr "disguise 7 -2; play vo/pyro_no01; alias d3 epyr" | |
94 | alias fdem "disguise 4 -2; play vo/demoman_no03; alias d4 edem" | |
95 | alias fhea "disguise 6 -2; play vo/heavy_no03; alias d5 ehea" | |
96 | alias feng "disguise 9 -2; play vo/engineer_no01; alias d6 eeng" | |
97 | alias fmed "disguise 5 -2; play vo/medic_no01; alias d7 emed" | |
98 | alias fsni "disguise 2 -2; play vo/sniper_no01; alias d8 esni" | |
99 | alias fspy "disguise 8 -2; play vo/spy_no03; alias d9 espy" | |
100 | ||
101 | 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" | |
102 | ||
103 | dreset | |
104 | ||
105 | alias mrand1 "alias drand esco; alias mrand mrand2" | |
106 | alias mrand2 "alias drand epyr; alias mrand mrand3" | |
107 | alias mrand3 "alias drand edem; alias mrand mrand4" | |
108 | alias mrand4 "alias drand esni; alias mrand mrand5" | |
109 | alias mrand5 "alias drand espy; alias mrand mrand1" | |
110 | ||
111 | mrand1 |