Guest User

http://redd.it/2cxyod

a guest
Aug 9th, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.08 KB | None | 0 0
  1. exec reset
  2.  
  3. // This script for the spy allows settings to switch with the active weapon.
  4. // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one)
  5.  
  6. // The script will only work correctly when switching with keys in the BIND section.
  7. // The script cannot know if a weapon switched for any other reason than player input using the keys in the BIND section.
  8. // The script cannot know if a weapon switched successfully, and will always assume it has. Examples that prevent/impede switching:
  9. // - Permanent or temporary non-active weapon like running out of revolver ammo or a melted spy-cicle
  10.  
  11. // The mousewheel and q switch between your primary and melee weapons.
  12. // Holding mouse4 switches to your secondary weapon and auto-attacks, releasing the key switches to your melee and stops attacking.
  13. // Any additional function of mouse1 other than attacking is dependent on the active weapon
  14. // Pressing mouse2 always enables viewmodels in addition to normal function.
  15.  
  16. // One press of 1-9 disguises as the corresponding enemy class and gives a sound alert, two presses disguises as the ally version.
  17. // Pressing wasd resets the counter for ally disguising.
  18. // Pressing f disguises you as either an enemy scout, pyro, demoman, sniper, or spy
  19. // Each press of 1-9 or wasd cycles through which of those 5 potential disguises that pressing f will deploy
  20.  
  21. // The movement keys are set up for 'null movement' in addition to their disguise functionality
  22.  
  23. // Holding shift 'zooms' your FOV to 75, releasing sets it to 90
  24.  
  25.  
  26. // ========== INSTRUCTIONS ==========
  27.  
  28. // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are turned on (1) or off (0)
  29. // r_drawviewmodel in the prs_ aliases is activated when pressing the attack key with the weapon equipped
  30. // r_drawviewmodel in the rls_ aliases is activated when releasing the attack key with the weapon equipped
  31. // r_drawviewmodel in the set_ aliases is activated when switching to that weapon
  32.  
  33. // To add additional settings on weapon switch, append them to the set_ aliases.
  34. // To add additional settings on attack/release, append them to the prs_/rls_ aliases.
  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
  37. // Multiple keys can be bound to the same alias and the script will still work correctly
  38.  
  39. // See the following for information on how to install scripts and how to make them class-specific:
  40. // http://www.reddit.com/r/tf2scripthelp/wiki/introduction
  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)
  43.  
  44.  
  45. // ========== BINDS ==========
  46.  
  47. bind w +fwd
  48. bind s +bck
  49. bind a +lft
  50. bind d +rgt
  51.  
  52. bind f "drand; dreset"
  53.  
  54. bind 1 d1
  55. bind 2 d2
  56. bind 3 d3
  57. bind 4 d4
  58. bind 5 d5
  59. bind 6 d6
  60. bind 7 d7
  61. bind 8 d8
  62. bind 9 d9
  63.  
  64. bind mwheelup eq_1_3
  65. bind mwheeldown eq_1_3
  66. bind q eq_1_3
  67. bind mouse1 +eq_attack
  68. bind mouse2 +eq_attack2
  69. bind mouse4 +at_2_3
  70.  
  71. bind shift +zoom
  72.  
  73.  
  74. // ========== SETTINGS ==========
  75.  
  76. alias prs_slot1 "r_drawviewmodel 0; cl_crosshair_file crosshair2; cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 50"
  77. alias rls_slot1 "r_drawviewmodel 0; cl_crosshair_file crosshair5; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  78. alias prs_slot3 "r_drawviewmodel 1"
  79. alias rls_slot3 "r_drawviewmodel 1"
  80.  
  81. alias set_slot1 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  82. alias set_slot2 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 255; cl_crosshair_green 50; cl_crosshair_red 255"
  83. alias set_slot3 "r_drawviewmodel 1; cl_crosshair_file crosshair5; cl_crosshair_blue 255; cl_crosshair_green 255; cl_crosshair_red 50"
  84.  
  85.  
  86. // ========== LOGIC ==========
  87.  
  88. //Weapon switching & attacking
  89. alias +eq_attack "+attack; at_press; spec_next"
  90. alias -eq_attack "-attack; at_release"
  91.  
  92. alias +eq_attack2 "+attack2; r_drawviewmodel 1; spec_prev"
  93. alias -eq_attack2 "-attack2; r_drawviewmodel 1"
  94.  
  95. alias +at_2_3 "eq_slot2; +attack; say_team Sapping!"
  96. alias -at_2_3 "-attack; eq_slot3"
  97.  
  98. alias eq_slot1 "slot1; set_slot1; alias at_press prs_slot1; alias at_release rls_slot1; alias eq_1_3 eq_slot3"
  99. alias eq_slot2 "slot2; set_slot2; alias at_press ; alias at_release "
  100. alias eq_slot3 "slot3; set_slot3; alias at_press prs_slot3; alias at_release rls_slot3; alias eq_1_3 eq_slot1"
  101.  
  102. eq_slot1
  103.  
  104. //Zoom
  105. alias +zoom "fov_desired 75"
  106. alias -zoom "fov_desired 90"
  107.  
  108. //Null movement & disguises
  109. alias +fwd "-back; +forward; alias cfwd +forward; mrand; dreset"
  110. alias -fwd "-forward; cbck; alias cfwd "
  111. alias +bck "-forward; +back; alias cbck +back; mrand; dreset"
  112. alias -bck "-back; cfwd; alias cbck "
  113. alias +lft "-moveright; +moveleft; alias clft +moveleft; mrand; dreset"
  114. alias -lft "-moveleft; crgt; alias clft "
  115. alias +rgt "-moveleft; +moveright; alias crgt +moveright; mrand; dreset"
  116. alias -rgt "-moveright; clft; alias crgt "
  117.  
  118. alias cfwd ""
  119. alias cbck ""
  120. alias clft ""
  121. alias crgt ""
  122.  
  123. alias esco "disguise 1 -1; play vo/scout_yes01; alias d1 fsco; mrand"
  124. alias esol "disguise 3 -1; play vo/soldier_yes04; alias d2 fsol; mrand"
  125. alias epyr "disguise 7 -1; play vo/pyro_moveup01; alias d3 fpyr; mrand"
  126. alias edem "disguise 4 -1; play vo/demoman_yes01; alias d4 fdem; mrand"
  127. alias ehea "disguise 6 -1; play vo/heavy_yes03; alias d5 fhea; mrand"
  128. alias eeng "disguise 9 -1; play vo/engineer_yes03; alias d6 feng; mrand"
  129. alias emed "disguise 5 -1; play vo/medic_yes03; alias d7 fmed; mrand"
  130. alias esni "disguise 2 -1; play vo/sniper_yes03; alias d8 fsni; mrand"
  131. alias espy "disguise 8 -1; play vo/spy_yes02; alias d9 fspy; mrand"
  132.  
  133. alias fsco "disguise 1 -2; play vo/scout_no02; alias d1 esco"
  134. alias fsol "disguise 3 -2; play vo/soldier_no02; alias d2 esol"
  135. alias fpyr "disguise 7 -2; play vo/pyro_no01; alias d3 epyr"
  136. alias fdem "disguise 4 -2; play vo/demoman_no03; alias d4 edem"
  137. alias fhea "disguise 6 -2; play vo/heavy_no03; alias d5 ehea"
  138. alias feng "disguise 9 -2; play vo/engineer_no01; alias d6 eeng"
  139. alias fmed "disguise 5 -2; play vo/medic_no01; alias d7 emed"
  140. alias fsni "disguise 2 -2; play vo/sniper_no01; alias d8 esni"
  141. alias fspy "disguise 8 -2; play vo/spy_no03; alias d9 espy"
  142.  
  143. 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"
  144.  
  145. dreset
  146.  
  147. alias mrand1 "alias drand esco; alias mrand mrand2"
  148. alias mrand2 "alias drand epyr; alias mrand mrand3"
  149. alias mrand3 "alias drand edem; alias mrand mrand4"
  150. alias mrand4 "alias drand esni; alias mrand mrand5"
  151. alias mrand5 "alias drand espy; alias mrand mrand1"
  152.  
  153. mrand1
  154.  
  155.  
  156. // ========== SCRIPT OVERWRITE ==========
  157.  
  158. //r_drawviewmodel 1
  159. //fov_desired 90
  160. //cl_crosshair_file ""
  161. //cl_crosshair_scale 32
  162. //cl_crosshair_blue 200
  163. //cl_crosshair_green 200
  164. //cl_crosshair_red 200
  165. //bind w +forward
  166. //bind s +back
  167. //bind a +moveleft
  168. //bind d +moveright
  169. //bind f inspect
  170. //bind 1 slot1
  171. //bind 2 slot2
  172. //bind 3 slot3
  173. //bind 4 slot4
  174. //bind 5 slot5
  175. //bind 6 slot6
  176. //bind 7 slot7
  177. //bind 8 slot8
  178. //bind 9 slot9
  179. //bind mwheelup invprev
  180. //bind mwheeldown invnext
  181. //bind q lastinv
  182. //bind mouse1 +attack
  183. //bind mouse2 +attack2
  184. //unbind mouse4
Add Comment
Please, Sign In to add comment