daily pastebin goal
70%
SHARE
TWEET

WC3-AltQ-Inventory.AHK

-wtvr- May 7th, 2017 (edited) 2,850 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;;HOW TO SETUP;;; First download and install Autohotkey.com (very simple)
  2. ;;;;;Then Create New Autohotkey Script and copy this into the new .AHK file
  3. ;;;;;OR simply download this file, rename and erase .ahk.TXT to just .AHK
  4. ;;;;;Place in your WC3 folder and create shortcut on desktop
  5. ;;;;;Might require right-click and setting to Run as Admin
  6. ;;;;;In WC3 press NumLock to pause Script on/off for chat
  7. ;;;;;Now your Invetory hotkeys are switched to Alt + QWEASD
  8. ;;;;;Also disables WinKey or Alt+QQ from closing your game
  9. ;;;;;Any Hotkeys can be modified to your liking at the very bottom
  10. ;;;;;If mouse supports extra buttons can be remapped at bottom
  11.  
  12.  
  13. #SingleInstance force       ;force a single instance
  14. #HotkeyInterval 0       ;disable the warning dialog if a key is held down
  15. #InstallKeybdHook       ;Forces the unconditional installation of the keyboard hook
  16. #UseHook On         ;might increase responsiveness of hotkeys
  17. #MaxThreads 20          ;use 20 (the max) instead of 10 threads
  18. SetBatchLines, -1       ;makes the script run at max speed
  19. SetKeyDelay , -1, -1        ;faster response (might be better with -1, 0)
  20. ;Thread, Interrupt , -1, -1 ;not sure what this does, could be bad for timers
  21. SetTitleMatchMode Regex
  22. SetDefaultMouseSpeed, 0 ;Move the mouse faster for mouse moving commands
  23.  
  24. IfExist, Warcraft III.exe
  25.   menu, tray, Icon, Warcraft III.exe, 1, 1
  26.  
  27. ;;;;; Variables ;;;;;
  28. bInChatRoom := False
  29. bHealthBarOn := False
  30. Return ; End Auto-Execute Section
  31.  
  32. ; AutoCast Function
  33. AutoCast(iSpellQWERHotkey)
  34. {
  35.   MouseGetPos, iMousePosX, IMousePosY
  36.   if (iSpellQWERHotkey == 1)
  37.   {
  38.     iMouseGotoX := A_ScreenWidth*4//5
  39.     iMouseGotoY := A_ScreenHeight*4//5
  40.   }
  41.   else if (iSpellQWERHotkey == 2)
  42.   {
  43.     iMouseGotoX := A_ScreenWidth*4//5
  44.     iMouseGotoY := A_ScreenHeight*22//25
  45.   }
  46.   else if (iSpellQWERHotkey == 3)
  47.   {    iMouseGotoX := A_ScreenWidth*4//5
  48.     iMouseGotoY := A_ScreenHeight*19//20
  49.   }
  50.   else if (iSpellQWERHotkey == 4)
  51.   {
  52.     iMouseGotoX := A_ScreenWidth*17//20
  53.     iMouseGotoY := A_ScreenHeight*4//5
  54.   }
  55.   else if (iSpellQWERHotkey == 5)
  56.   {
  57.     iMouseGotoX := A_ScreenWidth*17//20
  58.     iMouseGotoY := A_ScreenHeight*22//25
  59.   }
  60.   else if (iSpellQWERHotkey == 6)
  61.   {
  62.     iMouseGotoX := A_ScreenWidth*17//20
  63.     iMouseGotoY := A_ScreenHeight*19//20
  64.   }
  65.   else if (iSpellQWERHotkey == 7)
  66.   {
  67.     iMouseGotoX := A_ScreenWidth*9//10
  68.     iMouseGotoY := A_ScreenHeight*4//5
  69.   }
  70.   else if (iSpellQWERHotkey == 8)
  71.   {
  72.     iMouseGotoX := A_ScreenWidth*9//10
  73.     iMouseGotoY := A_ScreenHeight*22//25
  74.   }
  75.   else if (iSpellQWERHotkey == 9)
  76.   {
  77.     iMouseGotoX := A_ScreenWidth*9//10
  78.     iMouseGotoY := A_ScreenHeight*19//20
  79.   }
  80.   else if (iSpellQWERHotkey == 10)
  81.   {
  82.     iMouseGotoX := A_ScreenWidth*19//20
  83.     iMouseGotoY := A_ScreenHeight*4//5
  84.   }
  85.   else if (iSpellQWERHotkey == 11)
  86.   {
  87.     iMouseGotoX := A_ScreenWidth*19//20
  88.     iMouseGotoY := A_ScreenHeight*22//25
  89.   }
  90.   else if (iSpellQWERHotkey == 12)
  91.   {
  92.     iMouseGotoX := A_ScreenWidth*19//20
  93.     iMouseGotoY := A_ScreenHeight*19//20
  94.   }
  95.   Click, Right, %iMouseGotoX%, %iMouseGotoY%
  96.   MouseMove, %iMousePosX%, %iMousePosY%
  97. }
  98.  
  99. #ifWinActive ahk_class ((WarcraftIII)|(OsWindow)|(Qt5QWindowIcon))
  100.  
  101. ;;;;; Enable/disable all hotkeys ;;;;;
  102.  
  103. ;; Escape will cancel chatting, so turn the hotkeys back on
  104. *NumLock::
  105. Suspend, Permit
  106. bInChatRoom := not bInChatRoom
  107. if (bInChatRoom == True)
  108. {
  109.   Suspend, On
  110.   SetNumLockState, Off
  111.   SoundPlay,*64
  112. }
  113. else
  114. {
  115.   Suspend, Off
  116.   SetNumLockState, On
  117.   SoundPlay,*48
  118. }
  119. return
  120.  
  121.  
  122. ; Hotkeys Remapper:
  123.  
  124. ; Disable Toggles
  125. Lwin::return
  126. <!r::return
  127. <!t::return
  128. <!f::return
  129. ;;to enable formation toggle add ;; to the line above
  130.  
  131. ; Inventory Keys:
  132. !q::SendInput, {Numpad7}
  133. +!q::SendInput, +{Numpad7}
  134. !w::SendInput, {Numpad8}
  135. +!w::SendInput, +{Numpad8}
  136. !a::SendInput, {Numpad4}
  137. +!a::SendInput, +{Numpad4}
  138. !s::SendInput, {Numpad5}
  139. +!s::SendInput, +{Numpad5}
  140. !z::SendInput, {Numpad1}
  141. +!z::SendInput, +{Numpad1}
  142. !e::SendInput, {Numpad2}
  143. +!e::SendInput, +{Numpad2}
  144.  
  145. ; Quick Chat Msgs
  146. Numpad1::SendInput, +{Enter}Careful{Enter}
  147. Numpad2::SendInput, +{Enter}Attack{Enter}
  148. Numpad3::SendInput, +{Enter}Focus Units{Enter}
  149. Numpad4::SendInput, +{Enter}Back{Enter}
  150. Numpad5::SendInput, +{Enter}Rush{Enter}
  151. Numpad6::SendInput, +{Enter}Focus Hero{Enter}
  152. Numpad7::SendInput, +{Enter}TP{Enter}
  153. Numpad8::SendInput, +{Enter}Counter{Enter}
  154. Numpad9::SendInput, +{Enter}Fast Expo{Enter}
  155. Numpad0::SendInput, +{Enter}Repair{Enter}
  156.  
  157. ; User Specified Hotkeys:
  158. CapsLock::Send, {Backspace}
  159. +CapsLock::Send, +{Backspace}
  160.  
  161. Xbutton1::F1
  162. Xbutton2::Numpad7
  163. Mbutton::Tab
  164. ; these^ are middle mouse and extra mouse buttons
  165.  
  166. ;;LCtrl::Space
  167. ;;Space::LCtrl
  168. ;To swap the Ctrl key with the Spacebar just remove the ;; from the 2 lines above
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top