Advertisement
Guest User

Dota 2 Smartcast

a guest
Nov 13th, 2012
16,572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //////////////////////////////////////////////////
  2. // Smartcast [ON]
  3. //////////////////////////////////////////////////
  4. // Verion: 2.0
  5. // Updated: April 20th, 2012
  6. /////
  7. // Script by: 8e8
  8. // Inspired by: SkyClad, denunciator
  9. //////////////////////////////////////////////////
  10. // Notes:
  11. //////////////////////////////////////////////////
  12. // This script is a user made solution to Smartcasting in Dota 2.
  13. // As such, it may have some unintended results. Use at your own discretion.
  14. // Be sure to back up your existing configs to revert any unwanted changes.
  15. // If your ability/item keys are bound through key modifiers this script will not work
  16. // (ex. Alt+Q for Ability 1, or Alt+1 for Item 1)
  17. //////////////////////////////////////////////////
  18.  
  19.  
  20. // Smartcast Key Binds
  21. /////
  22. // Replace these with your own keys, and be sure to unbind those keys from the settings menu
  23. // Comment out the line of the binds you don't want to use
  24. //////////////////////////////////////////////////
  25. bind "q" "+sCast_A1" // Ability 1
  26. bind "w" "+sCast_A2" // Ability 2
  27. bind "e" "+sCast_A3" // Ability 3
  28. bind "t" "+sCast_A4" // Ability 4
  29. bind "g" "+sCast_A5" // Ability 5
  30. bind "r" "+sCast_A6" // Ultimate
  31. bind "1" "+sCast_I1" // Item 1
  32. bind "2" "+sCast_I2" // Item 2
  33. bind "3" "+sCast_I3" // Item 3
  34. bind "4" "+sCast_I4" // Item 4
  35. bind "5" "+sCast_I5" // Item 5
  36. bind "6" "+sCast_I6" // Item 6
  37. bind "a" "+sCast_Atk" // Attack
  38. bind "d" "+sCast_Move" // Move
  39. // Uncomment the toggle bind you'd like to use. I'd suggest using only one (excluding sCast0)
  40. //bind "space" "+sCast" // Toggles Smartcast
  41. //bind "space" "+sCast1" // Toggles Smartcast when held down (ex. Press SPACE+Q to Smartcast Q)
  42. //bind "space" "+sCast2" // Toggles Smartcast on the key that is pressed in conjunction with this one (ex. Press SPACE+Q to enable Smartcasting on Q, and again to disable)
  43. //bind "space" "+sCast0" // Disables Smartcast when held. Useful when you need to self-cast.
  44.  
  45.  
  46. // Smartcast Abilities
  47. /////
  48. // Creates an alias for each Ability to toggle between Smartcasting
  49. //////////////////////////////////////////////////
  50. alias "sCast_A1" "dota_ability_execute 0"
  51. alias "sCast_A2" "dota_ability_execute 1"
  52. alias "sCast_A3" "dota_ability_execute 2"
  53. alias "sCast_A4" "dota_ability_execute 3"
  54. alias "sCast_A5" "dota_ability_execute 4"
  55. alias "sCast_A6" "dota_ability_execute 5"
  56. alias "sCast_A1_Clk" "clk"
  57. alias "sCast_A2_Clk" "clk"
  58. alias "sCast_A3_Clk" "clk"
  59. alias "sCast_A4_Clk" "clk"
  60. alias "sCast_A5_Clk" "clk"
  61. alias "sCast_A6_Clk" "clk"
  62. alias "+sCast_A1" "sCast_A1"
  63. alias "-sCast_A1" "sCast_A1_Clk"
  64. alias "+sCast_A2" "sCast_A2"
  65. alias "-sCast_A2" "sCast_A1_Clk"
  66. alias "+sCast_A3" "sCast_A3"
  67. alias "-sCast_A3" "sCast_A1_Clk"
  68. alias "+sCast_A4" "sCast_A4"
  69. alias "-sCast_A4" "sCast_A1_Clk"
  70. alias "+sCast_A5" "sCast_A5"
  71. alias "-sCast_A5" "sCast_A1_Clk"
  72. alias "+sCast_A6" "sCast_A6"
  73. alias "-sCast_A6" "sCast_A1_Clk"
  74. alias "sCast_A1_ON" "alias sCast_A1_Clk clk"
  75. alias "sCast_A1_OFF" "alias sCast_A1_Clk"
  76. alias "sCast_A2_ON" "alias sCast_A2_Clk clk"
  77. alias "sCast_A2_OFF" "alias sCast_A2_Clk"
  78. alias "sCast_A3_ON" "alias sCast_A3_Clk clk"
  79. alias "sCast_A3_OFF" "alias sCast_A3_Clk"
  80. alias "sCast_A4_ON" "alias sCast_A4_Clk clk"
  81. alias "sCast_A4_OFF" "alias sCast_A4_Clk"
  82. alias "sCast_A5_ON" "alias sCast_A5_Clk clk"
  83. alias "sCast_A5_OFF" "alias sCast_A5_Clk"
  84. alias "sCast_A6_ON" "alias sCast_A6_Clk clk"
  85. alias "sCast_A6_OFF" "alias sCast_A6_Clk"
  86.  
  87. // Smartcast Items
  88. /////
  89. // Creates an alias for each item to toggle between Smartcasting
  90. //////////////////////////////////////////////////
  91. alias "sCast_I1" "dota_item_execute 0"
  92. alias "sCast_I2" "dota_item_execute 1"
  93. alias "sCast_I3" "dota_item_execute 2"
  94. alias "sCast_I4" "dota_item_execute 3"
  95. alias "sCast_I5" "dota_item_execute 4"
  96. alias "sCast_I6" "dota_item_execute 5"
  97. alias "sCast_I1_Clk" "clk"
  98. alias "sCast_I2_Clk" "clk"
  99. alias "sCast_I3_Clk" "clk"
  100. alias "sCast_I4_Clk" "clk"
  101. alias "sCast_I5_Clk" "clk"
  102. alias "sCast_I6_Clk" "clk"
  103. alias "+sCast_I1" "sCast_I1"
  104. alias "-sCast_I1" "sCast_I1_Clk"
  105. alias "+sCast_I2" "sCast_I2"
  106. alias "-sCast_I2" "sCast_I2_Clk"
  107. alias "+sCast_I3" "sCast_I3"
  108. alias "-sCast_I3" "sCast_I3_Clk"
  109. alias "+sCast_I4" "sCast_I4"
  110. alias "-sCast_I4" "sCast_I4_Clk"
  111. alias "+sCast_I5" "sCast_I5"
  112. alias "-sCast_I5" "sCast_I5_Clk"
  113. alias "+sCast_I6" "sCast_I6"
  114. alias "-sCast_I6" "sCast_I6_Clk"
  115. alias "sCast_I1_ON" "alias sCast_I1_Clk clk"
  116. alias "sCast_I1_OFF" "alias sCast_I1_Clk"
  117. alias "sCast_I2_ON" "alias sCast_I2_Clk clk"
  118. alias "sCast_I2_OFF" "alias sCast_I2_Clk"
  119. alias "sCast_I3_ON" "alias sCast_I3_Clk clk"
  120. alias "sCast_I3_OFF" "alias sCast_I3_Clk"
  121. alias "sCast_I4_ON" "alias sCast_I4_Clk clk"
  122. alias "sCast_I4_OFF" "alias sCast_I4_Clk"
  123. alias "sCast_I5_ON" "alias sCast_I5_Clk clk"
  124. alias "sCast_I5_OFF" "alias sCast_I5_Clk"
  125. alias "sCast_I6_ON" "alias sCast_I6_Clk clk"
  126. alias "sCast_I6_OFF" "alias sCast_I6_Clk"
  127.  
  128. // Smartcast Actions
  129. /////
  130. // Creates an alias for the "Attack" and "Move" commands to toggle between Smartcasting
  131. //////////////////////////////////////////////////
  132. alias "sCast_Atk" "mc_attack"
  133. alias "sCast_Move" "mc_move"
  134. alias "sCast_Atk_Clk" "clk"
  135. alias "sCast_Move_Clk" "clk"
  136. alias "+sCast_Atk" "sCast_Atk"
  137. alias "-sCast_Atk" "sCast_Atk_Clk"
  138. alias "+sCast_Move" "sCast_Move"
  139. alias "-sCast_Move" "sCast_Move_Clk"
  140. alias "sCast_Atk_ON" "alias sCast_Atk_Clk clk"
  141. alias "sCast_Atk_OFF" "alias sCast_Atk_Clk"
  142. alias "sCast_Move_ON" "alias sCast_Move_Clk clk"
  143. alias "sCast_Move_OFF" "alias sCast_Move_Clk"
  144.  
  145.  
  146. // Smartcast Press-to-Toggle
  147. /////
  148. // Toggles the state of every key
  149. //////////////////////////////////////////////////
  150. alias "+sCast" "+sCast_OFF"
  151. alias "-sCast" "-sCast_OFF"
  152. alias "sCast_ON" "sCast_A1_ON; sCast_A2_ON; sCast_A3_ON; sCast_A4_ON; sCast_A5_ON; sCast_A6_ON; sCast_I1_ON; sCast_I2_ON; sCast_I3_ON; sCast_I4_ON; sCast_I5_ON; sCast_I6_ON; sCast_Atk_ON; sCast_Move_ON; alias +sCast +sCast_OFF; alias -sCast -sCast_OFF"
  153. alias "sCast_OFF" "sCast_A1_OFF; sCast_A2_OFF; sCast_A3_OFF; sCast_A4_OFF; sCast_A5_OFF; sCast_A6_OFF; sCast_I1_OFF; sCast_I2_OFF; sCast_I3_OFF; sCast_I4_OFF; sCast_I5_OFF; sCast_I6_OFF; sCast_Atk_OFF; sCast_Move_OFF; alias +sCast +sCast_ON; alias -sCast -sCast_ON"
  154. alias "+sCast_ON" "sCast_ON; dev_ON; echo !!!Smartcasting ON!!!"
  155. alias "-sCast_ON" "dev_OFF"
  156. alias "+sCast_OFF" "sCast_OFF; dev_ON; echo !!!Smartcasting OFF!!!"
  157. alias "-sCast_OFF" "dev_OFF"
  158.  
  159.  
  160. // Smartcast Hold-to-Toggle (All)
  161. /////
  162. // Toggles the state of every key when held
  163. //////////////////////////////////////////////////
  164. alias "+sCast1" "+sCast_ON"
  165. alias "-sCast1" "+sCast_OFF"
  166.  
  167.  
  168. // Smartcast Hold-to-Toggle (Individual)
  169. /////
  170. // Toggles the state of each key
  171. //////////////////////////////////////////////////
  172. alias "+sCast2" "sCast2_ON1; sCast2_ON2"
  173. alias "sCast2_ON1" "alias +sCast_A1 +sCast2_A1; alias +sCast_A2 +sCast2_A2; alias +sCast_A3 +sCast2_A3; alias +sCast_A4 +sCast2_A4; alias +sCast_A5 +sCast2_A5; alias +sCast_A6 +sCast2_A6; alias +sCast_I1 +sCast2_I1; alias +sCast_I2 +sCast2_I2; alias +sCast_I3 +sCast2_I3; alias +sCast_I4 +sCast2_I4; alias +sCast_I5 +sCast2_I5; alias +sCast_I6 +sCast2_I6; alias +sCast_Atk +sCast2_Atk; alias +sCast_Move +sCast2_Move;"
  174. alias "sCast2_ON2" "alias -sCast_A1 -sCast2_A1; alias -sCast_A2 -sCast2_A2; alias -sCast_A3 -sCast2_A3; alias -sCast_A4 -sCast2_A4; alias -sCast_A5 -sCast2_A5; alias -sCast_A6 -sCast2_A6; alias -sCast_I1 -sCast2_I1; alias -sCast_I2 -sCast2_I2; alias -sCast_I3 -sCast2_I3; alias -sCast_I4 -sCast2_I4; alias -sCast_I5 -sCast2_I5; alias -sCast_I6 -sCast2_I6; alias -sCast_Atk -sCast2_Atk; alias -sCast_Move -sCast2_Move"
  175. alias "-sCast2" "sCast2_OFF1; sCast2_OFF2"
  176. alias "sCast2_OFF1" "alias +sCast_A1 sCast_A1; alias +sCast_A2 sCast_A2; alias +sCast_A3 sCast_A3; alias +sCast_A4 sCast_A4; alias +sCast_A5 sCast_A5; alias +sCast_A6 sCast_A6; alias +sCast_I1 sCast_I1; alias +sCast_I2 sCast_I2; alias +sCast_I3 sCast_I3; alias +sCast_I4 sCast_I4; alias +sCast_I5 sCast_I5; alias +sCast_I6 sCast_I6; alias +sCast_Atk sCast_Atk; alias +sCast_Move sCast_Move"
  177. alias "sCast2_OFF2" "alias -sCast_A1 sCast_A1_Clk; alias -sCast_A2 sCast_A2_Clk; alias -sCast_A3 sCast_A3_Clk; alias -sCast_A4 sCast_A4_Clk; alias -sCast_A5 sCast_A5_Clk; alias -sCast_A6 sCast_A6_Clk; alias -sCast_I1 sCast_I1_Clk; alias -sCast_I2 sCast_I2_Clk; alias -sCast_I3 sCast_I3_Clk; alias -sCast_I4 sCast_I4_Clk; alias -sCast_I5 sCast_I5_Clk; alias -sCast_I6 sCast_I6_Clk; alias -sCast_Atk sCast_Atk_Clk; alias -sCast_Move sCast_Move_Clk""
  178. /////
  179. // Abilities
  180. /////
  181. alias "+sCast2_A1" "sCast2_A1_OFF"
  182. alias "-sCast2_A1" "dev_OFF"
  183. alias "+sCast2_A2" "sCast2_A2_OFF"
  184. alias "-sCast2_A2" "dev_OFF"
  185. alias "+sCast2_A3" "sCast2_A3_OFF"
  186. alias "-sCast2_A3" "dev_OFF"
  187. alias "+sCast2_A4" "sCast2_A4_OFF"
  188. alias "-sCast2_A4" "dev_OFF"
  189. alias "+sCast2_A5" "sCast2_A5_OFF"
  190. alias "-sCast2_A5" "dev_OFF"
  191. alias "+sCast2_A6" "sCast2_A6_OFF"
  192. alias "-sCast2_A6" "dev_OFF"
  193. alias "sCast2_A1_ON" "sCast_A1_ON; alias +sCast2_A1 sCast2_A1_OFF; dev_ON; echo "!!!Ability 1 Smartcasting ON!!!
  194. alias "sCast2_A1_OFF" "sCast_A1_OFF; alias +sCast2_A1 sCast2_A1_ON; dev_ON; echo "!!!Ability 1 Smartcasting OFF!!!"
  195. alias "sCast2_A2_ON" "sCast_A2_ON; alias +sCast2_A2 sCast2_A2_OFF; dev_ON; echo "!!!Ability 2 Smartcasting ON!!!"
  196. alias "sCast2_A2_OFF" "sCast_A2_OFF; alias +sCast2_A2 sCast2_A2_ON; dev_ON; echo "!!!Ability 2 Smartcasting OFF!!!"
  197. alias "sCast2_A3_ON" "sCast_A3_ON; alias +sCast2_A3 sCast2_A3_OFF; dev_ON; echo "!!!Ability 3 Smartcasting ON!!!"
  198. alias "sCast2_A3_OFF" "sCast_A3_OFF; alias +sCast2_A3 sCast2_A3_ON; dev_ON; echo "!!!Ability 3 Smartcasting OFF!!!"
  199. alias "sCast2_A4_ON" "sCast_A4_ON; alias +sCast2_A4 sCast2_A4_OFF; dev_ON; echo "!!!Ability 4 Smartcasting ON!!!"
  200. alias "sCast2_A4_OFF" "sCast_A4_OFF; alias +sCast2_A4 sCast2_A4_ON; dev_ON; echo "!!!Ability 4 Smartcasting OFF!!!"
  201. alias "sCast2_A5_ON" "sCast_A5_ON; alias +sCast2_A5 sCast2_A5_OFF; dev_ON; echo "!!!Ability 5 Smartcasting ON!!!"
  202. alias "sCast2_A5_OFF" "sCast_A5_OFF; alias +sCast2_A5 sCast2_A5_ON; dev_ON; echo "!!!Ability 5 Smartcasting OFF!!!"
  203. alias "sCast2_A6_ON" "sCast_A6_ON; alias +sCast2_A6 sCast2_A6_OFF; dev_ON; echo "!!!Ability 6 Smartcasting ON!!!"
  204. alias "sCast2_A6_OFF" "sCast_A6_OFF; alias +sCast2_A6 sCast2_A6_ON; dev_ON; echo "!!!Ability 6 Smartcasting OFF!!!"
  205. /////
  206. // Items
  207. /////
  208. alias "+sCast2_I1" "sCast2_I1_OFF"
  209. alias "-sCast2_I1" "dev_OFF"
  210. alias "+sCast2_I2" "sCast2_I2_OFF"
  211. alias "-sCast2_I2" "dev_OFF"
  212. alias "+sCast2_I3" "sCast2_I3_OFF"
  213. alias "-sCast2_I3" "dev_OFF"
  214. alias "+sCast2_I4" "sCast2_I4_OFF"
  215. alias "-sCast2_I4" "dev_OFF"
  216. alias "+sCast2_I5" "sCast2_I5_OFF"
  217. alias "-sCast2_I5" "dev_OFF"
  218. alias "+sCast2_I6" "sCast2_I6_OFF"
  219. alias "-sCast2_I6" "dev_OFF"
  220. alias "sCast2_I1_ON" "sCast_I1_ON; alias +sCast2_I1 sCast2_I1_OFF; dev_ON; echo "!!!Item 1 Smartcasting ON!!!"
  221. alias "sCast2_I1_OFF" "sCast_I1_OFF; alias +sCast2_I1 sCast2_I1_ON; dev_ON; echo "!!!Item 1 Smartcasting OFF!!!"
  222. alias "sCast2_I2_ON" "sCast_I2_ON; alias +sCast2_I2 sCast2_I2_OFF; dev_ON; echo "!!!Item 2 Smartcasting ON!!!"
  223. alias "sCast2_I2_OFF" "sCast_I2_OFF; alias +sCast2_I2 sCast2_I2_ON; dev_ON; echo "!!!Item 2 Smartcasting OFF!!!"
  224. alias "sCast2_I3_ON" "sCast_I3_ON; alias +sCast2_I3 sCast2_I3_OFF; dev_ON; echo "!!!Item 3 Smartcasting ON!!!"
  225. alias "sCast2_I3_OFF" "sCast_I3_OFF; alias +sCast2_I3 sCast2_I3_ON; dev_ON; echo "!!!Item 3 Smartcasting OFF!!!"
  226. alias "sCast2_I4_ON" "sCast_I4_ON; alias +sCast2_I4 sCast2_I4_OFF; dev_ON; echo "!!!Item 4 Smartcasting ON!!!"
  227. alias "sCast2_I4_OFF" "sCast_I4_OFF; alias +sCast2_I4 sCast2_I4_ON; dev_ON; echo "!!!Item 4 Smartcasting OFF!!!"
  228. alias "sCast2_I5_ON" "sCast_I5_ON; alias +sCast2_I5 sCast2_I5_OFF; dev_ON; echo "!!!Item 5 Smartcasting ON!!!"
  229. alias "sCast2_I5_OFF" "sCast_I5_OFF; alias +sCast2_I5 sCast2_I5_ON; dev_ON; echo "!!!Item 5 Smartcasting OFF!!!"
  230. alias "sCast2_I6_ON" "sCast_I6_ON; alias +sCast2_I6 sCast2_I6_OFF; dev_ON; echo "!!!Item 6 Smartcasting ON!!!"
  231. alias "sCast2_I6_OFF" "sCast_I6_OFF; alias +sCast2_I6 sCast2_I6_ON; dev_ON; echo "!!!Item 6 Smartcasting OFF!!!"
  232. /////
  233. // Actions
  234. /////
  235. alias "+sCast2_Atk" "sCast2_Atk_OFF"
  236. alias "-sCast2_Atk" "dev_OFF"
  237. alias "+sCast2_Move" "sCast2_Move_OFF"
  238. alias "-sCast2_Move" "dev_OFF"
  239. alias "sCast2_Atk_ON" "sCast_Atk_ON; alias +sCast2_Atk sCast2_Atk_OFF; dev_ON; echo "!!!Attack Smartcasting ON!!!"
  240. alias "sCast2_Atk_OFF" "sCast_Atk_OFF; alias +sCast2_Atk sCast2_Atk_ON; dev_ON; echo "!!!Attack Smartcasting OFF!!!"
  241. alias "sCast2_Move_ON" "sCast_Move_ON; alias +sCast2_Move sCast2_Move_OFF; dev_ON; echo "!!!Move Smartcasting ON!!!"
  242. alias "sCast2_Move_OFF" "sCast_Move_OFF; alias +sCast2_Move sCast2_Move_ON; dev_ON; echo "!!!Move Smartcasting OFF!!!"
  243.  
  244.  
  245. // Smartcast Hold-to-Disable (Individual)
  246. /////
  247. // Turns off Smartcasting when held
  248. //////////////////////////////////////////////////
  249. alias "+sCast0" "alias -sCast_A1; alias -sCast_A2; alias -sCast_A3; alias -sCast_A4; alias -sCast_A5; alias -sCast_A6; alias -sCast_I1; alias -sCast_I2; alias -sCast_I3; alias -sCast_I4; alias -sCast_I5; alias -sCast_I6; alias -sCast_Atk; alias -sCast_Move;"
  250. alias "-sCast0" "alias -sCast_A1 sCast_A1_Clk; alias -sCast_A2 sCast_A2_Clk; alias -sCast_A3 sCast_A3_Clk; alias -sCast_A4 sCast_A4_Clk; alias -sCast_A5 sCast_A5_Clk; alias -sCast_A6 sCast_A6_Clk; alias -sCast_I1 sCast_I1_Clk; alias -sCast_I2 sCast_I2_Clk; alias -sCast_I3 sCast_I3_Clk; alias -sCast_I4 sCast_I4_Clk; alias -sCast_I5 sCast_I5_Clk; alias -sCast_I6 sCast_I5_Clk; alias -sCast_Atk sCast_Atk_Clk; alias -sCast_Move sCast_Move_Clk;"
  251.  
  252.  
  253. // Misc
  254. //////////////////////////////////////////////////
  255. // Left-click simulation
  256. alias "clk" "+sixense_left_click; -sixense_left_click"
  257. // Developer Mode On/Off
  258. alias "dev_ON" "developer 1"
  259. alias "dev_OFF" "developer 0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement