Advertisement
Adepht

Untitled

Oct 8th, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #InstallKeybdHook
  2. ChatFlag = 0
  3. EnableFlag = 0
  4. SmartCast = 0
  5. ItemRebind = 0
  6.  
  7. CurrentNum = {sc008}
  8. setKeyDelay, -1
  9. Choice(p, s)
  10. {
  11.   Suspend
  12.   global ChatFlag
  13.   global EnableFlag
  14.   global SmartCast
  15.   global CurrentNum
  16.   if (EnableFlag == 0 || ChatFlag == 1)
  17.     send %p%
  18.   if (EnableFlag == 1 && ChatFlag == 0)
  19.   {
  20.     send %s%
  21.     if (SmartCast == 1)
  22.     {
  23.       Sleep 30
  24.       send {Click}
  25.       ;send {Esc}
  26.       ;send {Enter}
  27.       send %CurrentNum%
  28.       if (CurrentNum == "{sc008}")
  29.         CurrentNum = {sc009}
  30.       else
  31.         CurrentNum = {sc008}
  32.        
  33.     }
  34.   }
  35.    
  36.   Suspend
  37.   return
  38. }
  39.  
  40. #ifWinActive, ahk_class Warcraft III
  41. sc010:: ; Q -> D
  42.   Choice("{sc010}", "{sc020}")
  43.   return
  44. sc011:: ; W -> F
  45.   Choice("{sc011}", "{sc021}")
  46.   return
  47. sc012:: ; E -> R
  48.   Choice("{sc012}", "{sc013}")
  49.   return
  50. sc013:: ; R -> W
  51.   Choice("{sc013}", "{sc011}")
  52.   return
  53. sc020:: ; D -> E
  54.   Choice("{sc020}", "{sc012}")
  55.   return
  56. sc021:: ; F -> Q
  57.   Choice("{sc021}", "{sc010}")
  58.   return
  59. sc002:: ; 1
  60.   Choice("{sc002}", "{Numpad7}")
  61.   return
  62. sc003:: ; 2
  63.   Choice("{sc003}", "{Numpad8}")
  64.   return
  65. sc004:: ; 3
  66.   Choice("{sc004}", "{Numpad4}")
  67.   return
  68. sc005:: ; 4
  69.   Choice("{sc005}", "{Numpad5}")
  70.   return
  71. sc006:: ; 5
  72.   Choice("{sc006}", "{Numpad1}")
  73.   return
  74. sc007:: ; 6
  75.   Choice("{sc007}", "{Numpad2}")
  76.   return
  77. sc152::  ; Insert
  78.   Suspend
  79.   if (EnableFlag)
  80.     if (SmartCast == 0)
  81.     {
  82.       send {enter}
  83.       send Smartcast enabled
  84.       Sleep, 500
  85.       send {Esc}
  86.       SmartCast = 1
  87.     }
  88.     else
  89.     {
  90.       send {enter}
  91.       send Smartcast disabled
  92.       Sleep, 500
  93.       send {Esc}
  94.       SmartCast = 0
  95.     }
  96.   Suspend
  97.   return
  98. sc147::  ; Home
  99.   Suspend
  100.   if (EnableFlag == 0)
  101.   {
  102.     send {enter}
  103.     send Key rebind script enabled
  104.     Sleep, 500
  105.     send {Esc}
  106.     EnableFlag = 1
  107.     SmartCast = 0
  108.     ChatFlag = 0
  109.   }
  110.   else
  111.   {
  112.     send {enter}
  113.     send Key rebind script disabled
  114.     Sleep, 500
  115.     send {Esc}
  116.     EnableFlag = 0
  117.     SmartCast = 0
  118.     ChatFlag = 0
  119.   }
  120.   Suspend
  121.   return
  122. sc01C:: ; Enter
  123.   Suspend
  124.   send {enter}
  125.   if (EnableFlag == 1)
  126.     if (ChatFlag == 0)
  127.       ChatFlag = 1
  128.     else
  129.       ChatFlag = 0
  130.   Suspend
  131.   return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement