Guest User

3 slot quickswitch, vm toggle, http://redd.it/2n7434

a guest
Nov 24th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This script allows settings to switch with the active weapon.
  2. // Only the first 3 slots will be tracked by the scroll wheel and q, specifically this excludes the disguise kit (Spy) and the PDAs (Engineer).
  3. // Medic, Spy, Engineer, and permanent non-active weapon versions are also available, contact the author below.
  4.  
  5. // The script will only work correctly when switching with keys in the BIND section.
  6. // The script cannot know if a weapon switched for any other reason than player input using the keys in the BIND section.
  7. // The script cannot know if a weapon switched successfully, and will always assume it has. Examples that prevent/impede switching:
  8. // - Permanent or temporary non-active weapon like gunboats or a melted spy-cicle
  9. // - Minigun spinup/spindown
  10.  
  11.  
  12. // Written by /u/genemilder (http://steamcommunity.com/id/Seventy_one)
  13.  
  14.  
  15. // ========== INSTRUCTIONS ==========
  16.  
  17. // Edit r_drawviewmodel in the SETTINGS section for whether viewmodels are initially turned on (1) or off (0)
  18.  
  19. // To add additional settings on weapon switch, append them to the eq_ aliases.
  20.  
  21. // To change which keys can switch weapons, change or add lines in the BINDS section, binding keys only to the aliases already in the binds section
  22. // Multiple keys can be bound to the same alias and the script will still work correctly
  23.  
  24. // See the following for information on how to install scripts and how to make them class-specific:
  25. // http://www.reddit.com/r/tf2scripthelp/wiki/introduction
  26.  
  27. // 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)
  28.  
  29.  
  30. // ========== BINDS ==========
  31.  
  32. bind 1 eq_slot1
  33. bind 2 eq_slot2
  34. bind 3 eq_slot3
  35. bind mwheelup eq_invprev
  36. bind mwheeldown eq_invnext
  37. bind q eq_lastinv
  38. bind k vm_10_20_31
  39. bind l vm_10_21_31
  40. bind j vm_11_21_31
  41.  
  42.  
  43. // ========== SETTINGS ==========
  44.  
  45. cl_crosshair_scale 26
  46. cl_crosshair_red 200
  47. cl_crosshair_blue 0
  48. cl_crosshair_green 0
  49.  
  50. alias eq_slot1 "slot1; set_slot1; vm_slot1; exec crosshair_default; alias state vm_slot1"
  51. alias eq_slot2 "slot2; set_slot2; vm_slot2; cl_crosshair_file crosshair1; alias state vm_slot2"
  52. alias eq_slot3 "slot3; set_slot3; vm_slot3; exec crosshair_default; alias state vm_slot3"
  53.  
  54.  
  55. // ========== LOGIC ==========
  56.  
  57. alias vm_10_20_31 "alias vm_slot1 r_drawviewmodel 0; alias vm_slot2 r_drawviewmodel 0; alias vm_slot3 r_drawviewmodel 1; state"
  58. alias vm_10_21_31 "alias vm_slot1 r_drawviewmodel 0; alias vm_slot2 r_drawviewmodel 1; alias vm_slot3 r_drawviewmodel 1; state"
  59. alias vm_11_21_31 "alias vm_slot1 r_drawviewmodel 1; alias vm_slot2 r_drawviewmodel 1; alias vm_slot3 r_drawviewmodel 1; state"
  60. vm_11_21_31
  61.  
  62. alias qs_slot1 "alias eq_invnext eq_slot2; alias eq_invprev eq_slot3; set_lastinv; alias set_lastinv alias eq_lastinv eq_slot1; alias set_slot1 ; alias set_slot2 qs_slot2; alias set_slot3 qs_slot3"
  63. alias qs_slot2 "alias eq_invnext eq_slot3; alias eq_invprev eq_slot1; set_lastinv; alias set_lastinv alias eq_lastinv eq_slot2; alias set_slot1 qs_slot1; alias set_slot2 ; alias set_slot3 qs_slot3"
  64. alias qs_slot3 "alias eq_invnext eq_slot1; alias eq_invprev eq_slot2; set_lastinv; alias set_lastinv alias eq_lastinv eq_slot3; alias set_slot1 qs_slot1; alias set_slot2 qs_slot2; alias set_slot3 "
  65.  
  66. qs_slot2
  67. eq_slot1
  68.  
  69.  
  70. // ========== SCRIPT OVERWRITE ==========
  71.  
  72. //cl_crosshair_file ""
  73. //cl_crosshair_scale 32
  74. //cl_crosshair_red 200
  75. //cl_crosshair_blue 200
  76. //cl_crosshair_green 200
  77. //r_drawviewmodel 1
  78. //bind 1 slot1
  79. //bind 2 slot2
  80. //bind 3 slot3
  81. //bind mwheelup invprev
  82. //bind mwheeldown invnext
  83. //bind q lastinv
  84. //unbind k
  85. //unbind l
  86. //unbind j
Add Comment
Please, Sign In to add comment