Advertisement
Guest User

for Warm_Dry_Blanket

a guest
Nov 19th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 KB | None | 0 0
  1. exec crosshairswitcher/disable; spy
  2. // This script allows crosshair and viewmodel settings to switch with the active weapon and with quickswitch
  3. // The first 4 slots will be tracked by the scroll wheel and quickswitch, so only use this script with the spy
  4. // 3 and 5 slot versions also available
  5.  
  6. // Written, adapted, and modified by /u/genemilder (http://steamcommunity.com/id/seventy_one)
  7.  
  8. // Further customized for /u/Warm_Dry_Blanket by /u/CAPSLOCK_USERNAME
  9.  
  10. cl_autoreload 0
  11.  
  12.  
  13. //[ ========== VIEWMODELS & DISGUISING WHEN ATTACKING ==========
  14. // Can edit r_drawviewmodel below for whether viewmodels are turned on or off when the current weapon is fired
  15. // Can add or remove disg_tog on the -vm_ aliases to determine ability to redisguise after attacking (activate toggle_disg to turn on or off)
  16.  
  17.  
  18. alias +vm_primary "+attack; r_drawviewmodel 1; spec_next"
  19. alias -vm_primary "-attack; r_drawviewmodel 1; disg_tog"
  20. alias +vm_secondary "-attack; r_drawviewmodel 1; spec_next" //Reversed from normal. Will constantly sap unless holding M1
  21. alias -vm_secondary "+attack; r_drawviewmodel 1"
  22. alias +vm_melee "+attack; r_drawviewmodel 1; spec_next"
  23. alias -vm_melee "-attack; r_drawviewmodel 1; disg_tog"
  24. alias +vm_slot4 "+attack; r_drawviewmodel 1; spec_next"
  25. alias -vm_slot4 "-attack; r_drawviewmodel 1"
  26. alias +vm_watch "+attack2; r_drawviewmodel 1; spec_prev"
  27. alias -vm_watch "-attack2; r_drawviewmodel 1"
  28.  
  29. alias primary_vm "alias +vm_attack +vm_primary; alias -vm_attack -vm_primary; viewmodel_fov 110"
  30. alias secondary_vm "alias +vm_attack +vm_secondary; alias -vm_attack -vm_secondary; viewmodel_fov 110"
  31. alias melee_vm "alias +vm_attack +vm_melee; alias -vm_attack -vm_melee; viewmodel_fov 90"
  32. alias slot4_vm "alias +vm_attack +vm_slot4; alias -vm_attack -vm_slot4"
  33.  
  34. alias "toggle_disg" "disg_on"
  35. alias "disg_on" "alias disg_tog lastdisguise; alias toggle_disg disg_off; say_team Auto-disguise ON"
  36. alias "disg_off" "alias disg_tog ; alias toggle_disg disg_on; say_team Auto-disguise OFF"
  37.  
  38. //]
  39.  
  40.  
  41. //[ ========== CROSSHAIRS AND VIEWMODELS WHEN SWITCHING ==========
  42. // Can edit _file for crosshair type and _scale for size
  43. // Can edit r_drawviewmodel for weapon visibility on weapon switch
  44. // Comment/uncomment relevant section if you want crosshairs to switch with active weapon
  45.  
  46.  
  47. alias xhair_primary "cl_crosshair_file crosshair7; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  48. alias xhair_secondary "cl_crosshair_file crosshair3; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  49. alias xhair_melee "cl_crosshair_file crosshair5; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  50. alias xhair_slot4 "cl_crosshair_file crosshair5; cl_crosshair_scale 14; cl_crosshair_blue 0; cl_crosshair_green 255; cl_crosshair_red 0"
  51.  
  52. // Choice 1 ----- (crosshair switching enabled) -----
  53. //alias equip_primary "slot1; r_drawviewmodel 1; primary_vm; qs_primary; xhair_primary"
  54. //alias equip_secondary "slot2; r_drawviewmodel 1; secondary_vm; qs_secondary; xhair_secondary; +attack"
  55. //alias equip_melee "slot3; r_drawviewmodel 1; melee_vm; qs_melee; xhair_melee"
  56. //alias equip_slot4 "slot4; r_drawviewmodel 1; slot4_vm; qs_slot4; xhair_slot4"
  57.  
  58. // Choice 2 ----- (crosshair switching disabled) -----
  59. alias equip_primary "slot1; r_drawviewmodel 1; primary_vm; qs_primary"
  60. alias equip_secondary "slot2; r_drawviewmodel 1; secondary_vm; qs_secondary; +attack"
  61. alias equip_melee "slot3; r_drawviewmodel 1; melee_vm; qs_melee"
  62. alias equip_slot4 "slot4; r_drawviewmodel 1; slot4_vm; qs_slot4"
  63.  
  64. //]
  65.  
  66.  
  67. //[ ========== QUICKSWITCH ==========
  68. // Quickswitch works correctly when choosing weapons using only the keys detailed in binds section
  69.  
  70.  
  71. alias qs_primary "alias next equip_secondary; alias prev equip_slot4; switch_set; alias switch_set alias switch equip_primary; alias 13switch equip_melee"
  72. alias qs_secondary "alias next equip_melee; alias prev equip_primary; switch_set; alias switch_set alias switch equip_secondary; alias 13switch equip_primary"
  73. alias qs_melee "alias next equip_slot4; alias prev equip_secondary; switch_set; alias switch_set alias switch equip_melee; alias 13switch equip_primary"
  74. alias qs_slot4 "alias next equip_primary; alias prev equip_melee; switch_set; alias switch_set alias switch equip_slot4; alias 13switch equip_primary"
  75.  
  76. //]
  77.  
  78.  
  79. //[ ========== MULTI-BUTTON WEAPON SWAP
  80.  
  81. alias wep0 "alias +swap1 +wep1;alias +swap2 +wep2;alias -swap1 -wep1;alias -swap2 -wep2; equip_primary"
  82. alias +wep1 "equip_primary;alias +swap2 +wep3"
  83. alias -wep1 "alias +swap2 +wep2"
  84. alias +wep2 "equip_melee;alias +swap1 +wep3"
  85. alias -wep2 "alias +swap1 +wep1"
  86. alias +wep3 "equip_secondary;+attack;alias +swap1 donothing;alias +swap2 donothing;alias -swap1 -wep3_1;alias -swap2 -wep3_2"
  87. alias -wep3_1 "alias -swap2 wep0;alias +swap1 +wep3"
  88. alias -wep3_2 "alias -swap1 wep0;alias +swap2 +wep3"
  89. alias donothing ""
  90. wep0
  91.  
  92. //]
  93.  
  94.  
  95. //[ ========== BINDS ==========
  96. // If a slot is unavailable, anything bound to prev/next will not account for the unavailability (click twice to get to the available slot)
  97.  
  98.  
  99. //bind "mwheelup" "prev"
  100. //bind "mwheeldown" "next"
  101. //bind "1" "primary"
  102. //bind "2" "secondary"
  103. //bind "3" "melee"
  104. //bind "4" "wslot4"
  105. //bind "q" "switch"
  106. bind "q" "13switch" // Swap between slot1 and slot3, goes to slot10 by default
  107. bind "rshift" "toggle_disg"
  108. bind "mouse1" "+vm_attack"
  109. bind "mouse2" "+vm_watch"
  110.  
  111. alias +autosap equip_secondary //bind something to +autosap if you want a separate key for it...
  112. alias -autosap switch
  113.  
  114. bind mouse5 +swap1 //mouse5 for primary, mouse4 for secondary, or hold both for autosap
  115. bind mouse4 +swap2
  116.  
  117. bind "KP_END" "disguise 1 -1"
  118. bind "KP_DOWNARROW" "disguise 3 -1"
  119. bind "KP_PGDN" "disguise 7 -1"
  120. bind "KP_LEFTARROW" "disguise 4 -1"
  121. bind "KP_5" "disguise 6 -1"
  122. bind "KP_RIGHTARROW" "disguise 9 -1"
  123. bind "KP_HOME" "disguise 5 -1"
  124. bind "KP_UPARROW" "disguise 2 -1"
  125. bind "KP_PGUP" "disguise 8 -1"
  126.  
  127. //]
  128.  
  129.  
  130. //[ ========== Initialize aliases and report success in console ==========
  131.  
  132.  
  133. r_drawviewmodel 1
  134. equip_primary
  135. alias switch equip_secondary
  136. disg_off
  137.  
  138. developer 1
  139. echo "Success: Visual settings switch with weapon"
  140. developer 0
  141.  
  142. //]
  143.  
  144.  
  145. //[ ========== SCRIPT OVERWRITES ==========
  146. // To undo changes from the above script
  147.  
  148.  
  149. //r_drawviewmodel 1
  150. //bind "1" "slot1"
  151. //bind "2" "slot2"
  152. //bind "3" "slot3"
  153. //bind "4" "slot4"
  154. //bind "MWHEELUP" "invprev"
  155. //bind "MWHEELDOWN" "invnext"
  156. //bind "q" "lastinv"
  157. //unbind "RSHIFT"
  158. //bind "MOUSE1" "+attack"
  159. //bind "MOUSE2" "+attack2"
  160.  
  161. //]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement