Guest User

Untitled

a guest
Jul 5th, 2016
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.06 KB | None | 0 0
  1. ; AutoHotkey Version: 1.x
  2. ; Language: English
  3. ; Platform: Win9x/NT/XP/Vista/7
  4. ; Author: AucT <[email protected]>
  5. ; Code helper: yayuhhz (thanks to him there is awesome chat-suspending system and window mode)
  6. ; Main Tester: DenSiL7
  7. ; Web-Site: http://aht.auct.eu
  8. ;********************************************FORCE TO RUN AS ADMIN*************************
  9. RegRead, UAC, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, EnableLUA
  10. if !A_IsAdmin
  11. {
  12. Log("Not running as admin. Restarting as admin")
  13. if A_IsCompiled
  14. DllCall("shell32\ShellExecuteA","uint",0,"str","RunAs","str",A_ScriptFullPath,"uint",0,"str",A_WorkingDir,"int",1)
  15. else
  16. DllCall("shell32\ShellExecuteA","uint",0,"str","RunAs","str",A_AhkPath,"str","""" . A_ScriptFullPath . """","str",A_WorkingDir,"int",1)
  17. ExitApp
  18. }
  19. DebugPrivilegesEnable()
  20. FileInstall, all.gif, %A_temp%\all.gif
  21. FileInstall, blue.gif, %A_temp%\blue.gif
  22. FileInstall, pink.gif, %A_temp%\pink.gif
  23. FileInstall, AutoCast.jpg, %A_temp%\AutoCast.jpg
  24. FileInstall, Inventory.jpg, %A_temp%\Inventory.jpg
  25. FileInstall, Skills.jpg, %A_temp%\Skills.jpg
  26. GroupAdd, WC3DOTA , Warcraft III
  27. GroupAdd, WC3DOTA , DOTA 2
  28. GroupAdd, WC3DOTA , Dota 2
  29. ;********************************************INITIAL SCRIPT SETTINGS*************************
  30. #UseHook on ;forces to use it at start and not in game
  31. #SingleInstance force ;makes sure second execution of the tool will stop teh first
  32. #HotkeyInterval 0
  33. #NoEnv
  34. #MaxThreads
  35. Process, priority, , High
  36. SetWorkingDir %A_ScriptDir%
  37. SetBatchLines, -1
  38. SetKeyDelay , -1, -1
  39. SetDefaultMouseSpeed, 0
  40. #ifWinActive, ahk_group WC3DOTA
  41. VK_LIST = VK41,VK42,VK43,VK44,VK45,VK46,VK47,VK48,VK49,VK4A,VK4B,VK4C,VK4D,VK4E,VK4F,VK50,VK51,VK52,VK53,VK54,VK55,VK56,VK57,VK58,VK59,VK5A,VK30,VK31,VK32,VK33,VK34,VK35,VK36,VK37,VK38,VK39,VKC0,VKDB,VKDD,VKBE,VKBF,VKBA,VKDE,VKDC
  42. HK_LIST = A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,``,[,],.,/,;,',\
  43.  
  44. Version=AucT Hotkeys Tool v2.9 ;current verison for update
  45. ;************************************************PROFILE MANAGEMENT********************************//////////////
  46. IniRead, profile, %A_WorkingDir%\settings.ini, Others, profile, General
  47. if profile=General
  48. profileini=settings.ini
  49. else
  50. profileini=%profile%.ini
  51. ;************************************************STYLE COLOR**********************************************
  52. IniRead, stylecolor, %A_WorkingDir%\%profileini%, Others, stylecolor, %A_Space%
  53. if stylecolor {
  54. IniRead, darkstyle, %A_WorkingDir%\%profileini%, Others, darkstyle, 0
  55. Gui, Color, %stylecolor%
  56. Gui, 2:Color, %stylecolor%
  57. Gui, 3:Color, %stylecolor%
  58. Gui, 4:Color, %stylecolor%
  59. Gui, 5:Color, %stylecolor%
  60. if darkstyle {
  61. gui, font, cwhite
  62. gui,2:font, cwhite
  63. gui,3:font, cwhite
  64. gui,4:font, cwhite
  65. gui,5:font, cwhite
  66. }
  67. }
  68. ;************************************************TRAY MENU********************************************************
  69. ;Menu
  70. Menu, tray, NoStandard
  71. Menu, Tray, Click, 1
  72. Menu, tray, add, Configuration, configuration
  73. Menu, tray, Default, Configuration
  74. Menu, tray, add
  75. Menu, tray, add, Run WarCraft 3, RunWC3
  76. Menu, tray, add
  77. Menu, tray, add, About, About
  78. Menu, tray, add, Check update, UpdateCheck
  79. Menu, tray, add
  80. Menu, tray, add, Save, ButtonReload
  81. Menu, tray, add
  82. Menu, tray, add, Mouse Capture, SetWMC
  83. Menu, tray, add, Exit
  84. ;Menu, Tray, Icon, %A_ScriptDir%\%A_ScriptName%,1,1
  85.  
  86. CoordMode,Mouse,Screen
  87.  
  88. IniRead, ScrollIndicator, %A_WorkingDir%\%profileini%, Others, ScrollIndicator, 0
  89. if ScrollIndicator
  90. SetScrollLockState, On
  91. else
  92. SetScrollLockState, Off
  93. IniRead, ReloadScr, %A_WorkingDir%\%profileini%,Others, ReloadScr, %A_Space%
  94. if ReloadScr
  95. Hotkey,% VK(ReloadScr), ReloadScript
  96. Hotkey, IfWinActive, ahk_group WC3DOTA
  97. IniRead, WMC, %A_WorkingDir%\%profileini%,Others, WMC, 0
  98. IniRead, WMChotkey, %A_WorkingDir%\%profileini%,Others, WMChotkey, %A_Space%
  99. if WMC
  100. SetTimer,CheckActiveWar3
  101. if WMChotkey
  102. Hotkey,% VK(WMChotkey), SetWMC
  103. ;************************************************INVENTORY*************************************
  104.  
  105. IniRead, EnInventory, %A_WorkingDir%\%profileini%, Inventory, EnInventory, 1
  106. IniRead, h1, %A_WorkingDir%\%profileini%, Inventory, item1, %A_Space%
  107. IniRead, h2, %A_WorkingDir%\%profileini%, Inventory, item2, %A_Space%
  108. IniRead, h3, %A_WorkingDir%\%profileini%, Inventory, item3, %A_Space%
  109. IniRead, h4, %A_WorkingDir%\%profileini%, Inventory, item4, %A_Space%
  110. IniRead, h5, %A_WorkingDir%\%profileini%, Inventory, item5, %A_Space%
  111. IniRead, h6, %A_WorkingDir%\%profileini%, Inventory, item6, %A_Space%
  112. if %EnInventory%
  113. {
  114. i1:=VK(h1)
  115. i2:=VK(h2)
  116. i3:=VK(h3)
  117. i4:=VK(h4)
  118. i5:=VK(h5)
  119. i6:=VK(h6)
  120.  
  121.  
  122. if i1 {
  123. Hotkey,%i1%, i1
  124. Hotkey,+%i1%, i1S,
  125. }
  126. if i2 {
  127. Hotkey,%i2%, i2
  128. Hotkey,+%i2%, i2S
  129. }
  130. if i3 {
  131. Hotkey,%i3%, i3
  132. Hotkey,+%i3%, i3S
  133. }
  134. if i4 {
  135. Hotkey,%i4%, i4
  136. Hotkey,+%i4%, i4S
  137. }
  138. if i5 {
  139. Hotkey,%i5%, i5
  140. Hotkey,+%i5%, i5S
  141. }
  142. if i6 {
  143. Hotkey,%i6%, i6
  144. Hotkey,+%i6%, i6S
  145. }
  146. }
  147. ;************************************************CUSTOMKEYS**********************************************
  148.  
  149. IniRead, EnSkills, %A_WorkingDir%\%profileini%, CustomKeys, EnSkills, 0
  150. IniRead, SmartSkills, %A_WorkingDir%\%profileini%, CustomKeys, SmartSkills, 0
  151. IniRead, SelfCast, %A_WorkingDir%\%profileini%, CustomKeys, SelfCast, 0
  152. IniRead, skill1, %A_WorkingDir%\%profileini%, CustomKeys, skill1, Q
  153. IniRead, skill2, %A_WorkingDir%\%profileini%, CustomKeys, skill2, W
  154. IniRead, skill3, %A_WorkingDir%\%profileini%, CustomKeys, skill3, E
  155. IniRead, skill4, %A_WorkingDir%\%profileini%, CustomKeys, skill4, R
  156. IniRead, skill5, %A_WorkingDir%\%profileini%, CustomKeys, skill5, %A_Space%
  157. IniRead, skill6, %A_WorkingDir%\%profileini%, CustomKeys, skill6, D
  158. IniRead, skill7, %A_WorkingDir%\%profileini%, CustomKeys, skill7, F
  159. IniRead, skill8, %A_WorkingDir%\%profileini%, CustomKeys, skill8, %A_Space%
  160. IniRead, skill9, %A_WorkingDir%\%profileini%, CustomKeys, skill9, %A_Space%
  161. IniRead, skill10, %A_WorkingDir%\%profileini%, CustomKeys, skill10, %A_Space%
  162. IniRead, skill11, %A_WorkingDir%\%profileini%, CustomKeys, skill11, %A_Space%
  163. IniRead, skill12, %A_WorkingDir%\%profileini%, CustomKeys, skill12, %A_Space%
  164. if %EnSkills%
  165. {
  166. if (!Selfcast and !SmartSkills) {
  167. if %skill1%
  168. Hotkey,% VK(skill1), LC1L
  169. if %skill2%
  170. Hotkey,% VK(skill2), LC2L
  171. if %skill3%
  172. Hotkey,% VK(skill3), LC3L
  173. if %skill4%
  174. Hotkey,% VK(skill4), LC4L
  175.  
  176. if %skill5%
  177. Hotkey,% VK(skill5), LC5L
  178. if %skill6%
  179. Hotkey,% VK(skill6), LC6L
  180. if %skill7%
  181. Hotkey,% VK(skill7), LC7L
  182. if %skill8%
  183. Hotkey,% VK(skill8), LC8L
  184. }
  185. else {
  186. if %skill1%
  187. Hotkey,% VK(skill1), LC1
  188. if %skill2%
  189. Hotkey,% VK(skill2), LC2
  190. if %skill3%
  191. Hotkey,% VK(skill3), LC3
  192. if %skill4%
  193. Hotkey,% VK(skill4), LC4
  194.  
  195. if %skill5%
  196. Hotkey,% VK(skill5), LC5
  197. if %skill6%
  198. Hotkey,% VK(skill6), LC6
  199. if %skill7%
  200. Hotkey,% VK(skill7), LC7
  201. if %skill8%
  202. Hotkey,% VK(skill8), LC8
  203.  
  204. }
  205.  
  206. if %skill9%
  207. Hotkey,% VK(skill9), LC9
  208. if %skill10%
  209. Hotkey,% VK(skill10), LC10
  210. if %skill11%
  211. Hotkey,% VK(skill11), LC11
  212. if %skill12%
  213. Hotkey,% VK(skill12), LC12
  214. }
  215.  
  216.  
  217. ;************************************************AUTO-CASTS*****************************************
  218.  
  219. IniRead, EnAutoCast, %A_WorkingDir%\%profileini%, Auto-Casts, EnAutoCast, 0
  220. IniRead, DoubleAutoCast, %A_WorkingDir%\%profileini%, Auto-Casts, DoubleAutoCast, 0
  221. IniRead, auto1, %A_WorkingDir%\%profileini%, Auto-Casts, auto1, !E
  222. IniRead, auto2, %A_WorkingDir%\%profileini%, Auto-Casts, auto2, !R
  223. IniRead, autoall, %A_WorkingDir%\%profileini%, Auto-Casts, autoALL, !F
  224. if %EnAutoCast%
  225. {
  226. if DoubleAutoCast
  227. {
  228. a1:=VK(auto1)
  229. a2:=VK(auto2)
  230. aa:=VK(autoall)
  231. if %auto1%
  232. Hotkey,~%a1%, DAC1
  233. if %auto2%
  234. Hotkey,~%a2%, DAC2
  235. if %autoall%
  236. Hotkey,~%aa%, DACa
  237. }
  238. else
  239. {
  240. if %auto1%
  241. if UAC
  242. Hotkey,% VK(auto1), AC1UAC
  243. else
  244. Hotkey,% VK(auto1), AC1
  245. if %auto2%
  246. if UAC
  247. Hotkey,% VK(auto2), AC2UAC
  248. else
  249. Hotkey,% VK(auto2), AC2
  250. if %autoall%
  251. if UAC
  252. Hotkey,% VK(autoall), ACaUAC
  253. else
  254. Hotkey,% VK(autoall), ACa
  255. }
  256. }
  257. ;***************************
  258. ;Chat Suspending
  259. IniRead, chat, %A_WorkingDir%\%profileini%, Others, chat, 1
  260. ;IniRead, AutoDetect, %A_WorkingDir%\%profileini%, Others, AutoDetect, 1
  261. if chat
  262. {
  263. SetTimer, CheckWarcraft, 1000
  264.  
  265. }
  266. ;************************************************MESSAGES***********************************************
  267. loop, 36 {
  268. IniRead, mh%A_Index%, %A_WorkingDir%\%profileini%,Messages, hotkey%A_Index%, %A_Space%
  269. IniRead, mv%A_Index%, %A_WorkingDir%\%profileini%,Messages, message%A_Index%, %A_Space%
  270. if mh%A_Index% {
  271.  
  272. vmh%A_Index%:=VK(mh%A_Index%)
  273. Hotkey, % vmh%A_Index%, mv%A_Index%
  274. }
  275. }
  276. ;************************************************INVOKER*********************************
  277. IniRead, EnInvokerA, %A_WorkingDir%\%profileini%, Invoker, EnInvokerA, 0
  278. IniRead, EnInvokerU, %A_WorkingDir%\%profileini%, Invoker, EnInvokerU, 0
  279. IniRead, EnInvokerD, %A_WorkingDir%\%profileini%, Invoker, EnInvokerD, 0
  280.  
  281. IniRead, ColdSnapA, %A_WorkingDir%\%profileini%, Invoker, ColdSnapA, !Q
  282. IniRead, GhostWalkA, %A_WorkingDir%\%profileini%, Invoker, GhostWalkA, !V
  283. IniRead, TornadoA, %A_WorkingDir%\%profileini%, Invoker, TornadoA, !X
  284. IniRead, EMPA, %A_WorkingDir%\%profileini%, Invoker, EMPA, !C
  285. IniRead, AlacrityA, %A_WorkingDir%\%profileini%, Invoker, AlacrityA, !Z
  286. IniRead, ChaosMeteorA, %A_WorkingDir%\%profileini%, Invoker, ChaosMeteorA, !D
  287. IniRead, SunStrikeA, %A_WorkingDir%\%profileini%, Invoker, SunStrikeA, !T
  288. IniRead, ForgeSpiritA, %A_WorkingDir%\%profileini%, Invoker, ForgeSpiritA, !F
  289. IniRead, IceWallA, %A_WorkingDir%\%profileini%, Invoker, IceWallA, !G
  290. IniRead, BlastA, %A_WorkingDir%\%profileini%, Invoker, BlastA, !B
  291.  
  292. IniRead, AlacrityAS, %A_WorkingDir%\%profileini%, Invoker, AlacrityAS, %A_Space%
  293. IniRead, AlacrityUS, %A_WorkingDir%\%profileini%, Invoker, AlacrityUS, %A_Space%
  294.  
  295. IniRead, ColdSnapU, %A_WorkingDir%\%profileini%, Invoker, ColdSnapU, ^Q
  296. IniRead, GhostWalkU, %A_WorkingDir%\%profileini%, Invoker, GhostWalkU, ^V
  297. IniRead, TornadoU, %A_WorkingDir%\%profileini%, Invoker, TornadoU, ^X
  298. IniRead, EMPU, %A_WorkingDir%\%profileini%, Invoker, EMPU, ^C
  299. IniRead, AlacrityU, %A_WorkingDir%\%profileini%, Invoker, AlacrityU, ^Z
  300. IniRead, ChaosMeteorU, %A_WorkingDir%\%profileini%, Invoker, ChaosMeteorU, ^D
  301. IniRead, SunStrikeU, %A_WorkingDir%\%profileini%, Invoker, SunStrikeU, ^T
  302. IniRead, ForgeSpiritU, %A_WorkingDir%\%profileini%, Invoker, ForgeSpiritU, ^F
  303. IniRead, IceWallU, %A_WorkingDir%\%profileini%, Invoker, IceWallU, ^G
  304. IniRead, BlastU, %A_WorkingDir%\%profileini%, Invoker, BlastU, ^B
  305.  
  306.  
  307. IniRead, QQQ, %A_WorkingDir%\%profileini%, Invoker, QQQ, %A_Space%
  308. IniRead, WWW, %A_WorkingDir%\%profileini%, Invoker, WWW, %A_Space%
  309. IniRead, EEE, %A_WorkingDir%\%profileini%, Invoker, EEE, %A_Space%
  310. IniRead, il, %A_WorkingDir%\%profileini%, Invoker, il, l
  311.  
  312. IniRead, Q, %A_WorkingDir%\%profileini%, Invoker, Q, Q
  313. IniRead, W, %A_WorkingDir%\%profileini%, Invoker, W, W
  314. IniRead, E, %A_WorkingDir%\%profileini%, Invoker, E, E
  315. IniRead, R, %A_WorkingDir%\%profileini%, Invoker, R, R
  316.  
  317. vQ:=VK(Q)
  318. vW:=VK(W)
  319. vE:=VK(E)
  320. vR:=VK(R)
  321.  
  322.  
  323. if EnInvokerA
  324. {
  325. if EnInvokerD
  326. {
  327. if %ColdSnapA%
  328. ColdSnapA:=VK(ColdSnapA)
  329. GhostWalkA:=VK(GhostWalkA)
  330. TornadoA:=VK(TornadoA)
  331. AlacrityA:=VK(AlacrityA)
  332. ChaosMeteorA:=VK(ChaosMeteorA)
  333. SunStrikeA:=VK(SunStrikeA)
  334. ForgeSpiritA:=VK(ForgeSpiritA)
  335. IceWallA:=VK(IceWallA)
  336. BlastA:=VK(BlastA)
  337. EMPA:=VK(EMPA)
  338. Hotkey,~%ColdSnapA%, DSnap
  339. if %GhostWalkA%
  340. Hotkey,~%GhostWalkA%, DWalk
  341. if %TornadoA%
  342. Hotkey,~%TornadoA%, DTornado
  343. if %EMPA%
  344. Hotkey,~%EMPA%, DEMP
  345. if %AlacrityA%
  346. Hotkey,~%AlacrityA%, DAlacrity
  347. if %ChaosMeteorA%
  348. Hotkey,~%ChaosMeteorA%, DMeteor
  349. if %SunStrikeA%
  350. Hotkey,~%SunStrikeA%, DStrike
  351. if %ForgeSpiritA%
  352. Hotkey,~%ForgeSpiritA%, DSpirit
  353. if %IceWallA%
  354. Hotkey,~%IceWallA%, DWall
  355. if %BlastA%
  356. Hotkey,~%BlastA%, DBlast
  357. }
  358. else
  359. {
  360. if %ColdSnapA%
  361. Hotkey,% VK(ColdSnapA), Snap
  362. if %GhostWalkA%
  363. Hotkey,% VK(GhostWalkA), Walk
  364. if %TornadoA%
  365. Hotkey,% VK(TornadoA), Tornado
  366. if %EMPA%
  367. Hotkey,% VK(EMPA), EMP
  368. if %AlacrityA%
  369. Hotkey,% VK(AlacrityA), Alacrity
  370. if %ChaosMeteorA%
  371. Hotkey,% VK(ChaosMeteorA), Meteor
  372. if %SunStrikeA%
  373. Hotkey,% VK(SunStrikeA), Strike
  374. if %ForgeSpiritA%
  375. Hotkey,% VK(ForgeSpiritA), Spirit
  376. if %IceWallA%
  377. Hotkey,% VK(IceWallA), Wall
  378. if %BlastA%
  379. Hotkey,% VK(BlastA), Blast
  380. }
  381. }
  382. if EnInvokerU
  383. {
  384. if EnInvokerD
  385. {
  386. ColdSnapU:=VK(ColdSnapU)
  387. TornadoU:=VK(TornadoU)
  388. EMPU:=VK(EMPU)
  389. AlacrityU:=VK(AlacrityU)
  390. SunStrikeU:=VK(SunStrikeU)
  391. ChaosMeteorU:=VK(ChaosMeteorU)
  392. ForgeSpiritU:=VK(ForgeSpiritU)
  393. IceWallU:=VK(IceWallU)
  394. BlastU:=VK(BlastU)
  395. if %ColdSnapU%
  396. Hotkey,~%ColdSnapU%, DSnap2
  397. if %GhostWalkA%
  398. Hotkey,~%GhostWalkU%, DWalk2
  399. if %TornadoU%
  400. Hotkey,~%TornadoU%, DTornado2
  401. if %EMPU%
  402. Hotkey,~%EMPU%, DEMP2
  403. if %AlacrityA%
  404. Hotkey,~%AlacrityU%, DAlacrity2
  405. if %ChaosMeteorU%
  406. Hotkey,~%ChaosMeteorU%, DMeteor2
  407. if %SunStrikeU%
  408. Hotkey,~%SunStrikeU%, DStrike2
  409. if %ForgeSpiritU%
  410. Hotkey,~%ForgeSpiritU%, DSpirit2
  411. if %IceWallU%
  412. Hotkey,~%IceWallU%, DWall2
  413. if %BlastU%
  414. Hotkey,~%BlastU%, DBlast2
  415. }
  416. else
  417. {
  418. if %ColdSnapU%
  419. Hotkey,% VK(ColdSnapU), Snap2
  420. if %GhostWalkA%
  421. Hotkey,% VK(GhostWalkU), Walk2
  422. if %TornadoU%
  423. Hotkey,% VK(TornadoU), Tornado2
  424. if %EMPU%
  425. Hotkey,% VK(EMPU), EMP2
  426. if %AlacrityA%
  427. Hotkey,% VK(AlacrityU), Alacrity2
  428. if %ChaosMeteorU%
  429. Hotkey,% VK(ChaosMeteorU), Meteor2
  430. if %SunStrikeU%
  431. Hotkey,% VK(SunStrikeU), Strike2
  432. if %ForgeSpiritU%
  433. Hotkey,% VK(ForgeSpiritU), Spirit2
  434. if %IceWallU%
  435. Hotkey,% VK(IceWallU), Wall2
  436. if %BlastU%
  437. Hotkey,% VK(BlastU), Blast2
  438. }
  439. }
  440. if EnInvokerA or EnInvokerU
  441. {
  442. if %QQQ%
  443. Hotkey,% VK(QQQ), gQQQ
  444. if %WWW%
  445. Hotkey,% VK(WWW), gWWW
  446. if %EEE%
  447. Hotkey,% VK(EEE), gEEE
  448. if %il%
  449. Hotkey,% VK(il), gilist
  450. if EnInvokerD
  451. {
  452. AlacrityAS:=VK(AlacrityAS)
  453. AlacrityUS:=VK(AlacrityUS)
  454. if %AlacrityAS%
  455. Hotkey,~%AlacrityAS%, DAlacrity3
  456. if %AlacrityUS%
  457. Hotkey,~%AlacrityUS%, DAlacrity4
  458. }
  459. else
  460. {
  461. if %AlacrityAS%
  462. Hotkey,% VK(AlacrityAS), Alacrity3
  463. if %AlacrityUS%
  464. Hotkey,% VK(AlacrityUS), Alacrity4
  465. }
  466. }
  467.  
  468.  
  469. ;************************************************OTHER*********************************
  470. IniRead, sound, %A_WorkingDir%\%profileini%, Others, sound, 0
  471. IniRead, Shield, %A_WorkingDir%\%profileini%, Others, Shield, 0
  472. IniRead, ShieldR, %A_WorkingDir%\%profileini%, Others, ShieldR, 0
  473. if Shield
  474. Hotkey, LWin, disable
  475. if ShieldR
  476. Hotkey, RWin, disable
  477.  
  478. IniRead, UpdateAtStart, %A_WorkingDir%\%profileini%, Others, UpdateAtStart, 0
  479.  
  480. IniRead, RunAtStart, %A_WorkingDir%\%profileini%, Others, RunAtStart, 0
  481. if RunAtStart
  482. FileCreateShortcut , %A_ScriptDir%\%A_ScriptName%, %A_Startup%\AHT.lnk
  483. else{
  484. IfExist %A_Startup%\AHT.lnk
  485. FileDelete, %A_Startup%\AHT.lnk
  486. }
  487.  
  488. IniRead, Scoreboard, %A_WorkingDir%\%profileini%,Others, Scoreboard, ``
  489. if Scoreboard
  490. if UAC
  491. Hotkey,% VK(Scoreboard), SBUAC
  492. else
  493. Hotkey,% VK(Scoreboard), SB
  494.  
  495. IniRead, share, %A_WorkingDir%\%profileini%,Others, share, F6
  496. if %share%
  497. Hotkey,% VK(share), ShareControl
  498.  
  499. IniRead, ignore, %A_WorkingDir%\%profileini%,Others, ignore, ^S
  500. if %ignore%
  501. Hotkey,% VK(ignore), gIgnore
  502.  
  503. IniRead, Garena, %A_WorkingDir%\%profileini%,Others, Garena, !J
  504. Hotkey, IfWinActive, Garena
  505. if %Garena%
  506. Hotkey,% VK(Garena), GarenaJoiner
  507. Hotkey, IfWinActive, ahk_group WC3DOTA
  508.  
  509. IniRead, Time, %A_WorkingDir%\%profileini%,Others, time, %A_Space%
  510. if %Time%
  511. Hotkey,% VK(Time), TimeNow
  512.  
  513. IniRead, toggle, %A_WorkingDir%\%profileini%,Others, toggle, Home
  514. if %toggle%
  515. Hotkey,% VK(toggle), Switch
  516.  
  517. IniRead, pause, %A_WorkingDir%\%profileini%,Others, pause, !P
  518. if %pause%
  519. Hotkey,% VK(pause), PauseGame
  520.  
  521. IniRead, Roshan, %A_WorkingDir%\%profileini%,Others, Roshan, %A_Space%
  522. if %Roshan%
  523. Hotkey,% VK(Roshan), Rosh
  524.  
  525. IniRead, hero, %A_WorkingDir%\%profileini%,Others, hero, %A_Space%
  526. if %hero%
  527. Hotkey,% VK(hero), GetHero
  528.  
  529. ;HPBar
  530. IniRead,AHP, %A_WorkingDir%\%profileini%,Others, AHP, ![
  531. IniRead,EHP, %A_WorkingDir%\%profileini%,Others, EHP, !]
  532. ;IniRead,AHPS, %A_WorkingDir%\%profileini%,Others, AHPS, 0
  533. ;IniRead,EHPS, %A_WorkingDir%\%profileini%,Others, EHPS, 0
  534. if %AHP%
  535. Hotkey,% VK(AHP), ShowAHP
  536. if %EHP%
  537. Hotkey,% VK(EHP), ShowEHP
  538. ;if AHPS
  539. ;SetTimer, AHPST, 1000
  540. ;if EHPS
  541. ;SetTimer, EHPST, 1000
  542.  
  543. IniRead, prog1, %A_WorkingDir%\%profileini%, Others, prog1, %A_Space%
  544. IniRead, runprog1s, %A_WorkingDir%\%profileini%, Others, runprog1s, 0
  545. IniRead, prog2, %A_WorkingDir%\%profileini%, Others, prog2, %A_Space%
  546. IniRead, runprog2s, %A_WorkingDir%\%profileini%, Others, runprog2s, 0
  547. IniRead, prog3, %A_WorkingDir%\%profileini%, Others, prog3, %A_Space%
  548. IniRead, runprog3s, %A_WorkingDir%\%profileini%, Others, runprog3s, 0
  549.  
  550. loop, 35 {
  551. IniRead, krh%A_Index%, %A_WorkingDir%\%profileini%,RemapKey, KRhotkey%A_Index%, %A_Space%
  552. IniRead, krv%A_Index%, %A_WorkingDir%\%profileini%,RemapKey, KRvalue%A_Index%, %A_Space%
  553. if krh%A_Index%
  554. Hotkey,% VK(krh%A_Index%), krv%A_Index%
  555. }
  556.  
  557. IniRead, DontShowConfigTemp, %A_WorkingDir%\settings.ini,Others, DontShowConfigTemp, 0
  558. IniRead, DontShowConfig, %A_WorkingDir%\settings.ini,Others, DontShowConfig, 0
  559. ;==================================================================================
  560. ;=====================================GUI==========================================
  561. ;==================================================================================
  562. if runprog1s
  563. gosub, runprog1
  564. if runprog2s
  565. gosub, runprog2
  566. if runprog3s
  567. gosub, runprog3
  568.  
  569. if DontShowConfig or DontShowConfigTemp
  570. {
  571. EmptyMem()
  572. IniWrite, 0, %A_WorkingDir%\settings.ini, Others, DontShowConfigTemp
  573. return
  574. }
  575.  
  576. configuration:
  577. if ConfigCreated
  578. {
  579. gui, show, autosize center, %Version% - %profile% profile
  580. }
  581. else {
  582. ConfigCreated:=1
  583. Menu, ProfileMenu, Add, &New Profile, ProfileNew
  584. Menu, ProfileMenu, Add
  585. Menu, ProfileMenu, Add, &General, ChooseGeneral
  586. Menu, ProfileMenu, Add
  587. Loop, %A_WorkingDir%\*.ini
  588. {
  589. if A_LoopFileName!=settings.ini
  590. cprofile:= SubStr(A_LoopFileName,1,-4)
  591. Menu, ProfileMenu, Add, %cprofile%, ProfileChoose
  592. }
  593. Menu, Warcraft, Add, Registry Fixer, WarRegFix
  594. Menu, Warcraft, Add, Resolution Changer, ResChange
  595.  
  596. RegRead, healthbars, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Gameplay, healthbars
  597. RegRead, mcustomkeys, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Gameplay, customkeys
  598. Menu, Warcraft, Add, Show HealthBars, showhealthbars
  599. if healthbars
  600. menu, warcraft, check, Show HealthBars
  601. else
  602. menu, warcraft, uncheck, Show HealthBars
  603.  
  604. menu, warcraft, add, Use Customkeys, usecustomkeys
  605. if mcustomkeys
  606. menu, warcraft, check, Use Customkeys
  607. else
  608. menu, warcraft, uncheck, Use Customkeys
  609.  
  610. RegRead, opengl, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, Gfx OpenGL
  611. RegRead, fps, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Video, lockfb
  612. Menu, Warcraft, Add, OpenGL on, OpenGL
  613. Menu, Warcraft, Add, Improve FPS, ImprFPS
  614. if opengl
  615. menu, warcraft, check, OpenGL on
  616. else
  617. menu, warcraft, uncheck, OpenGL on
  618.  
  619. if !fps
  620. menu, warcraft, check, Improve FPS
  621. else
  622. menu, warcraft, uncheck, Improve FPS
  623.  
  624. Menu, Options, Add, Scroll Indicator, SetScrollIndicator
  625. Menu, Options, Add, Sound Indicator, SetSoundIndicator
  626. Menu, Options, Add
  627. Menu, Options, Add, Shield LeftWin, SetShieldLWin
  628. Menu, Options, Add, Shield RightWin, SetShieldRWin
  629. Menu, Options, Add
  630. Menu, Options, Add, Run at start, SetRunatStart
  631. Menu, Options, Add, Update at start, SetUpdateAtStart
  632. Menu, Options, Add
  633. Menu, Options, Add, Mouse Capture, SetWMC
  634.  
  635. Menu, Chat-Suspend, Add, Chat-free in game, Setchat
  636. ;Menu, Chat-Suspend, Add, Chat-free in lobby, Setautodetect
  637.  
  638. Menu, Submenu1, Add, default, styledefault
  639. Menu, Submenu1, Add
  640. Menu, Submenu1, Add, light purple, stylelpurple
  641. Menu, Submenu1, Add, light blue, stylelblue
  642. Menu, Submenu1, Add, light green, stylelgreen
  643. Menu, Submenu1, Add
  644. Menu, Submenu1, Add, purple, stylepurple
  645. Menu, Submenu1, Add, blue, styleblue
  646. Menu, Submenu1, Add, green, stylegreen
  647. Menu, Submenu1, Add, grey, stylegrey
  648.  
  649. Menu, Options, Add, Color Style, :Submenu1
  650.  
  651. if chat
  652. menu, Chat-Suspend, check, Chat-free in game
  653. if ScrollIndicator
  654. menu, Options, check, Scroll Indicator
  655. if sound
  656. menu, Options, check, Sound Indicator
  657. if Shield
  658. menu, Options, check, Shield LeftWin
  659. if ShieldR
  660. menu, Options, check, Shield RightWin
  661. if RunAtStart
  662. menu, Options, check, Run at start
  663. if UpdateAtStart
  664. menu, Options, check, Update at start
  665. if WMC {
  666. menu, Options, check, Mouse Capture
  667. menu, tray, check, Mouse Capture
  668. }
  669.  
  670.  
  671. Menu, HelpMenu, Add, &Check updates, UpdateCheck
  672. Menu, HelpMenu, Add, &Commands, Commands
  673. Menu, HelpMenu, Add, &About, About
  674.  
  675. Menu, LinksMenu, Add, How to use, Help
  676. Menu, LinksMenu, Add, Generate CustomKeys.txt, Customkeystxt
  677. Menu, LinksMenu, Add, AucT Blog, auctblog
  678. Menu, LinksMenu, Add, Dota Resources, dotaresources
  679.  
  680.  
  681. ; Create the menu bar by attaching the sub-menus to it:
  682. Menu, MyMenuBar, Add, Profile, :ProfileMenu
  683. Menu, MyMenuBar, Add, WarCraft, :WarCraft
  684. Menu, MyMenuBar, Add, Options, :Options
  685. Menu, MyMenuBar, Add, Chat-Suspend, :Chat-Suspend
  686. Menu, MyMenuBar, Add, Links, :LinksMenu
  687. Menu, MyMenuBar, Add, Help, :HelpMenu
  688.  
  689.  
  690. Gui, Menu, MyMenuBar
  691.  
  692. Gui, Add, Tab2, x0 y0 w470 h500 , Inventory|Skills|Autocast|Messages|Invoker|Remap|Other
  693. Gui, Tab, Inventory
  694. if darkstyle
  695. gui, font, cwhite
  696. else
  697. gui, font, cblue
  698. Gui, Add, GroupBox, x6 y32 w450 h400 , Inventory
  699. if darkstyle
  700. gui, font, cwhite
  701. else
  702. gui, font
  703. Gui, Add, Picture, x115 y92 w200 h300 , %A_temp%\Inventory.jpg
  704. Gui, Add, Checkbox, Checked%EnInventory% vEnInventory gSwitchInv x115 y62 , Enable Keys
  705. Gui, Add, button, vb1 gSetItem x120 y150 w85 h30,%h1%
  706. Gui, Add, button, vb2 gSetItem x225 y150 w85 h30,%h2%
  707. Gui, Add, button, vb3 gSetItem x120 y240 w85 h30,%h3%
  708. Gui, Add, button, vb4 gSetItem x225 y240 w85 h30,%h4%
  709. Gui, Add, button, vb5 gSetItem x120 y350 w85 h30,%h5%
  710. Gui, Add, button, vb6 gSetItem x225 y350 w85 h30,%h6%
  711. if EnInventory=0
  712. Gosub, SwitchInv
  713.  
  714.  
  715. Gui, Tab, Skills
  716. if darkstyle
  717. gui, font, cwhite
  718. else
  719. gui, font, cblue
  720. Gui, Add, GroupBox, x6 y32 w450 h400 , Customkeys
  721. if darkstyle
  722. gui, font, cwhite
  723. else
  724. gui, font
  725. Gui, Add, CheckBox,Checked%EnSkills% vEnSkills gEnSkills x36 y55 w200 h30 , Enable Custom Keys
  726. Gui, Add, CheckBox,Checked%SmartSkills% vSmartSkills gSmartSkills x236 y55 w200 h30 , Smart Learning Skills*
  727. Gui, Add, CheckBox,Checked%SelfCast% vSelfCast gSelfCast x36 y80 w200 h30 , Selfcast on double-click
  728. gui, add, text, x30 y390 w410,*Smart Learning will click the right (upper) skill when learning skill.
  729. gui, add, text, cBlue gCustomkeystxt x30 y410 w410,AucT CustomKeys.txt Generator
  730. Gui, Add, Picture, x36 y110 w402 h272 , %A_temp%\Skills.jpg
  731. Gui, Add, Hotkey, vskill9 gskill9 x94 y142 w30 h30 , %skill9%
  732. Gui, Add, Hotkey, vskill10 gskill10 x194 y142 w30 h30 , %skill10%
  733. Gui, Add, Hotkey, vskill11 gskill11 x294 y142 w30 h30 , %skill11%
  734. Gui, Add, Hotkey, vskill12 gskill12 x394 y142 w30 h30 , %skill12%
  735. Gui, Add, Hotkey, vskill8 gskill8 x394 y232 w30 h30 , %skill8%
  736. Gui, Add, Hotkey, vskill7 gskill7 x294 y232 w30 h30 , %skill7%
  737. Gui, Add, Hotkey, vskill6 gskill6 x194 y232 w30 h30 , %skill6%
  738. Gui, Add, Hotkey, vskill5 gskill5 x94 y232 w30 h30 , %skill5%
  739. Gui, Add, Hotkey, vskill1 gskill1 x94 y322 w30 h30 , %skill1%
  740. Gui, Add, Hotkey, vskill2 gskill2 x194 y322 w30 h30 , %skill2%
  741. Gui, Add, Hotkey, vskill3 gskill3 x294 y322 w30 h30 , %skill3%
  742. Gui, Add, Hotkey, vskill4 gskill4 x394 y322 w30 h30 , %skill4%
  743.  
  744. Gui, Tab, Autocast
  745. Gui, Add, Picture, x36 y92 w402 h272 , %A_temp%\AutoCast.jpg
  746. if darkstyle
  747. gui, font, cwhite
  748. else
  749. gui, font, cblue
  750. Gui, Add, GroupBox, x6 y32 w450 h400 , Autocast
  751. if darkstyle
  752. gui, font, cwhite
  753. else
  754. gui, font
  755. Gui, Add, CheckBox,Checked%EnAutoCast% vEnAutoCast gEnAutoCast x36 y62 w200 h30 , Enable AutoCast Keys
  756. Gui, Add, CheckBox,Checked%DoubleAutoCast% vDoubleAutoCast gDoubleAutoCast x236 y62 w200 h30 ,Autocast on double click*
  757. gui, add, text, x30 y370 w410,*If double click is checked the autocast key isn't blocked
  758. Gui, Add, Picture, x36 y392 w30 h30 , %A_temp%\blue.gif
  759. Gui, Add, Picture, x170 y392 w30 h30 , %A_temp%\pink.gif
  760. Gui, Add, Picture, x314 y392 w30 h30 , %A_temp%\all.gif
  761. Gui, Add, Hotkey, vauto1 gauto1 x76 y392 w80 h30 , %auto1%
  762. Gui, Add, Hotkey, vauto2 gauto2 x215 y392 w80 h30 , %auto2%
  763. Gui, Add, Hotkey, vautoall gautoall x354 y392 w80 h30 , %autoall%
  764.  
  765. Gui, Tab, Messages
  766. if darkstyle
  767. gui, font, cwhite
  768. else
  769. gui, font, cblue
  770. Gui, Add, GroupBox, x6 y32 w450 h400,Messages
  771.  
  772.  
  773. mesinfo =
  774. (
  775. To make random message add "|" after each. For example:
  776. GJ|GREAT|nice1|I love u
  777. )
  778. if darkstyle
  779. gui, font, cwhite
  780. else
  781. gui, font
  782. gui, add, text, x30 y390 w410,%mesinfo%
  783. gui, add, checkbox, x380 y55 w70 h30 vtoAll, To All?
  784. gui, font
  785.  
  786.  
  787. gui, add, hotkey,vHotkeyChoose_Mes x30 y55 w100 h30,
  788. gui, add, button, gAddMes x140 y55 w110 h30, ADD
  789. gui, add, button, gDeleteMes x260 y55 w110 h30, DELETE
  790.  
  791. Gui, Add, ListBox, x30 y90 w100 h295 vMes_Key gMes_MesUpdate
  792. gui, add, edit, x140 y90 w300 h290 vMesEdit,
  793.  
  794. gosub, Mes_KeyUpdate
  795.  
  796.  
  797. Gui, Tab, Invoker
  798. if darkstyle
  799. gui, font, cwhite
  800. else
  801. gui, font, cblue
  802. Gui, Add, GroupBox, x6 y32 w450 h400 , Invoker
  803. if darkstyle
  804. gui, font, cwhite
  805. else
  806. gui, font
  807. gui, add, text, x30 y48, *Put customkeys in bottom right fields. only Add Spell will work with customkeys.
  808. gui, add, Checkbox, Checked%EnInvokerA% vEnInvokerA gEnInvokerA x120 y68, Add Spell
  809. gui, add, checkbox, Checked%EnInvokerU% vEnInvokerU gEnInvokerU x220 y68, Use Spell
  810. gui, add, checkbox, Checked%EnInvokerD% vEnInvokerD gEnInvokerD x320 y68, Double Click
  811. gui, add, text, x30 y90, Cold Snap
  812. gui, add, text, x30 y125, Ghost Walk
  813. gui, add, text, x30 y160, Tornado
  814. gui, add, text, x30 y195, EMP
  815. gui, add, text, x30 y230, Alacrity
  816. gui, add, text, x30 y265, Chaos Meteor
  817. gui, add, text, x30 y300, Sun Strike
  818. gui, add, text, x30 y335, Forge Spirit
  819. gui, add, text, x30 y370, Ice Wall
  820. gui, add, text, x30 y405, Blast
  821.  
  822. gui, add, text, x320 y90, QQQ
  823. gui, add, text, x320 y125, WWW
  824. gui, add, text, x320 y160, EEE
  825. gui, add, text, x320 y195, -il
  826. gui, add, text, x320 y230, Self-Cast Z:
  827. gui, add, text, x320 y275, Invoke + Self-Cast Z:
  828.  
  829. gui, add, hotkey,vQQQ gQQQ x360 y90 w80, %QQQ%
  830. gui, add, hotkey,vWWW gWWW x360 y125 w80, %WWW%
  831. gui, add, hotkey,vEEE gEEE x360 y160 w80, %EEE%
  832. gui, add, hotkey,vil gil x360 y195 w80, %il%
  833. gui, add, hotkey,vAlacrityAS gAlacrityAS x320 y250 w120, %AlacrityAS%
  834. gui, add, hotkey,vAlacrityUS gAlacrityUS x320 y290 w120, %AlacrityUS%
  835.  
  836. gui, add, text, x320 y320, Your Customkeys*:
  837. gui, add, text, x320 y340, Quas
  838. gui, add, hotkey,vQ gQ x355 y340 w80, %Q%
  839. gui, add, text, x320 y360, Wex
  840. gui, add, hotkey,vW gW x355 y360 w80, %W%
  841. gui, add, text, x320 y380, Exort
  842. gui, add, hotkey,vE gE x355 y380 w80, %E%
  843. gui, add, text, x320 y400, Invoke
  844. gui, add, hotkey,vR gR x355 y400 w80, %R%
  845.  
  846. gui, add, hotkey,vColdSnapA gColdSnapA x120 y90 w80, %ColdSnapA%
  847. gui, add, hotkey,vColdSnapU gColdSnapU x220 y90 w80, %ColdSnapU%
  848. gui, add, hotkey,vGhostWalkA gGhostWalkA x120 y125 w80, %GhostWalkA%
  849. gui, add, hotkey,vGhostWalkU gGhostWalkU x220 y125 w80, %GhostWalkU%
  850. gui, add, hotkey,vTornadoA gTornadoA x120 y160 w80, %TornadoA%
  851. gui, add, hotkey,vTornadoU gTornadoU x220 y160 w80, %TornadoU%
  852. gui, add, hotkey,vEMPA gEMPA x120 y195 w80, %EMPA%
  853. gui, add, hotkey,vEMPU gEMPU x220 y195 w80, %EMPU%
  854. gui, add, hotkey,vAlacrityA gAlacrityA x120 y230 w80, %AlacrityA%
  855. gui, add, hotkey,vAlacrityU gAlacrityU x220 y230 w80, %AlacrityU%
  856. gui, add, hotkey,vChaosMeteorA gChaosMeteorA x120 y265 w80, %ChaosMeteorA%
  857. gui, add, hotkey,vChaosMeteorU gChaosMeteorU x220 y265 w80, %ChaosMeteorU%
  858. gui, add, hotkey,vSunStrikeA gSunStrikeA x120 y300 w80, %SunStrikeA%
  859. gui, add, hotkey,vSunStrikeU gSunStrikeU x220 y300 w80, %SunStrikeU%
  860. gui, add, hotkey,vForgeSpiritA gForgeSpiritA x120 y335 w80, %ForgeSpiritA%
  861. gui, add, hotkey,vForgeSpiritU gForgeSpiritU x220 y335 w80, %ForgeSpiritU%
  862. gui, add, hotkey,vIceWallA gIceWallA x120 y370 w80, %IceWallA%
  863. gui, add, hotkey,vIceWallU gIceWallU x220 y370 w80, %IceWallU%
  864. gui, add, hotkey,vBlastA gBlastA x120 y405 w80, %BlastA%
  865. gui, add, hotkey,vBlastU gBlastU x220 y405 w80, %BlastU%
  866.  
  867. Gui, Tab, Remap
  868. gui, font
  869. gui, font, s14
  870. Gui, Add, ListBox, x30 y90 w400 h342 vRemap_Key gRemap_Update
  871. gui, font
  872. if darkstyle
  873. gui, font, cwhite
  874. else
  875. gui, font, cblue
  876. Gui, Add, GroupBox, x6 y32 w450 h400,Key Remap
  877. if darkstyle
  878. gui, font, cwhite
  879. else
  880. gui, font
  881.  
  882. gui, add, hotkey,vHK_Remap x30 y55 w80 h30,
  883. gui, add, hotkey,vValue_Remap x120 y55 w80 h30,
  884. gui, add, button, gAddRemap x210 y55 w110 h30, ADD
  885. gui, add, button, gDeleteRemap x330 y55 w110 h30, DELETE
  886.  
  887. gosub, Remap_KeyUpdate
  888. Gui, Tab, Other
  889.  
  890. if darkstyle
  891. gui, font, cwhite
  892. else
  893. gui, font, cblue
  894. Gui, Add, GroupBox, x6 y32 w450 h270 , Other
  895. if darkstyle
  896. gui, font, cwhite
  897. else
  898. gui, font
  899.  
  900. Gui, Add, Hotkey, vScoreboard gScoreboard x26 y60 w80, %Scoreboard%
  901. Gui, Add, Text, x116 y60, Show ScoreBoard
  902. Gui, Add, Hotkey, vShare gShare x26 y95 w80, %Share%
  903. Gui, Add, Text, x116 y95, Share Control
  904. Gui, Add, Hotkey, vIgnore gIgnore x26 y130 w80, %Ignore%
  905. Gui, Add, Text, x116 y130, Ignore (/squelch)
  906. Gui, Add, Hotkey, vAHP gAHP x26 y165 w80, %AHP%
  907. Gui, Add, Text, x116 y165, Show ally HP
  908. Gui, Add, Hotkey, vGarena gGarena x26 y200 w80, %Garena%
  909. Gui, Add, Text, x116 y200, Garena AutoJoin
  910. Gui, Add, Hotkey, vReloadScr gReloadScr x26 y235 w80, %ReloadScr%
  911. Gui, Add, Text, x116 y235, Reload Script
  912. Gui, Add, Hotkey, vWMChotkey gWMChotkey x26 y270 w80, %WMChotkey%
  913. Gui, Add, Text, x116 y270, Window Mouse Capture
  914.  
  915. Gui, Add, Hotkey, vTime gTime x250 y60 w80, %Time%
  916. Gui, Add, Text, x340 y60, Get Time
  917. Gui, Add, Hotkey, vtoggle gtoggle x250 y95 w80, %toggle%
  918. Gui, Add, Text, x340 y95, Pause Script
  919. Gui, Add, Hotkey, vpause gpause x250 y130 w80, %pause%
  920. Gui, Add, Text, x340 y130, Pause Game
  921. Gui, Add, Hotkey, vEHP gEHP x250 y165 w80, %EHP%
  922. Gui, Add, Text, x340 y165, Show enemy HP
  923. Gui, Add, Hotkey, vRoshan gRoshan x250 y200 w80, %Roshan%
  924. Gui, Add, Text, x340 y200, Rosh Notification
  925. Gui, Add, Hotkey, vHero gHero x250 y235 w80, %Hero%
  926. Gui, Add, Text, x340 y235, Get Hero
  927.  
  928. if darkstyle
  929. gui, font, cwhite
  930. else
  931. gui, font, cblue
  932. Gui, Add, GroupBox, x6 y305 w450 h125,Run Program
  933.  
  934. gui, font
  935. gui, add, edit,r1 vprog1 x26 y330 w200, %prog1%
  936. gui, add, button, x+5 gBrowseProg1 w40,...
  937. gui, add, button, x+5 gRunProg1 w60,Run
  938. if darkstyle
  939. gui, font, cwhite
  940. gui, add, checkbox,checked%runprog1s% vrunprog1s grunprog1s x+5 yp+4, Run At Start
  941. gui, font
  942.  
  943. gui, add, edit,r1 vprog2 x26 y360 w200, %prog2%
  944. gui, add, button, x+5 gBrowseProg2 w40,...
  945. gui, add, button, x+5 gRunProg2 w60,Run
  946. if darkstyle
  947. gui, font, cwhite
  948. gui, add, checkbox,checked%runprog2s% vrunprog2s grunprog2s x+5 yp+4, Run At Start
  949. gui, font
  950.  
  951. gui, add, edit,r1 vprog3 x26 y390 w200, %prog3%
  952. gui, add, button, x+5 gBrowseProg3 w40,...
  953. gui, add, button, x+5 gRunProg3 w60,Run
  954. if darkstyle
  955. gui, font, cwhite
  956. gui, add, checkbox,checked%runprog3s% vrunprog3s grunprog3s x+5 yp+4, Run At Start
  957. gui, font
  958.  
  959. Gui, Tab
  960. if darkstyle
  961. gui, font, cwhite
  962. gui, add, checkbox,Checked%DontShowConfig% vDontShowConfig gDontShowConfig x16 y457, Don't show it later
  963. gui, font, bold
  964. Gui, Add, Button, x155 y450 w90 h30,Hide
  965. Gui, Add, Button, gButtonReload x250 y450 w110 h30,Reload
  966. Gui, Add, Button, x365 y450 w90 h30,Exit
  967. if darkstyle
  968. gui, font, cwhite
  969. else
  970. gui, font
  971. Gui, Show, x209 y100 h500 w470, %Version% - %profile% profile
  972. }
  973. EmptyMem()
  974. return
  975.  
  976. :*b0:/l ::
  977. suspend, permit
  978. Input arguments, V I , {enter}
  979.  
  980. if arguments!=general
  981. {
  982. IfNotExist %arguments%.ini
  983. {
  984. ;MsgBox 16, Error ,Profile doesn't exist!,3
  985. soundplay *-1
  986. sleep 1000
  987. send {enter}Profile doesn't exist{enter}
  988. return
  989. }
  990. }
  991.  
  992. IniWrite, 1, %A_WorkingDir%\settings.ini, Others, DontShowConfigTemp
  993.  
  994. IniWrite, %arguments%, %A_WorkingDir%\settings.ini, Others, profile
  995. ;MsgBox 64, Info ,Loaded successfully!,2
  996. soundplay *64
  997. sleep 1000
  998. send {enter}%arguments% profile loaded successfully{enter}
  999. reload
  1000. return
  1001.  
  1002. ::/reload::
  1003. ::reload::
  1004. suspend, permit
  1005. send {esc}
  1006. IniWrite, 1, %A_WorkingDir%\settings.ini, Others, DontShowConfigTemp
  1007. sleep 150
  1008. send {enter}Script reloaded successfully{enter}
  1009. reload
  1010. return
  1011.  
  1012. ::/exit::
  1013. ::exit::
  1014. suspend, permit
  1015. ExitApp
  1016. return
  1017.  
  1018. ::/suspend::
  1019. ::suspend::
  1020. suspend, permit
  1021. send {enter}
  1022. sleep, 150
  1023. gosub, switch
  1024. return
  1025.  
  1026. ::-u::
  1027. suspend, permit
  1028. send -unlock{enter}
  1029. return
  1030.  
  1031. ::-ro::
  1032. suspend, permit
  1033. send -roll{enter}
  1034. return
  1035.  
  1036. ::-wa::
  1037. suspend, permit
  1038. send -water{space}
  1039. return
  1040.  
  1041. ::-we::
  1042. suspend, permit
  1043. send -weather{space}
  1044. return
  1045.  
  1046. ::-ra::
  1047. suspend, permit
  1048. send -random{enter}
  1049. return
  1050.  
  1051. ::-c::
  1052. suspend, permit
  1053. send -clear{enter}
  1054. return
  1055.  
  1056. ::-re::
  1057. suspend, permit
  1058. send -repick{enter}
  1059. return
  1060.  
  1061. ::-1x1::
  1062. suspend, permit
  1063. send -apshomnp{enter}
  1064. return
  1065.  
  1066. BrowseProg1:
  1067. FileSelectFile, prog1, , , Select your prog, Anything (*.*)
  1068. if prog1
  1069. GuiControl Text, prog1, %prog1%
  1070. IniWrite, %prog1%, %profileini%, Others, prog1
  1071. return
  1072. BrowseProg2:
  1073. FileSelectFile, prog2, , , Select your prog, Anything (*.*)
  1074. GuiControl Text, prog2, %prog2%
  1075. IniWrite, %prog2%, %profileini%, Others, prog2
  1076. return
  1077. BrowseProg3:
  1078. FileSelectFile, prog3, , , Select your prog, Anything (*.*)
  1079. GuiControl Text, prog3, %prog3%
  1080. IniWrite, %prog3%, %profileini%, Others, prog3
  1081. return
  1082.  
  1083. RunProg1:
  1084. Run, %Prog1%
  1085. return
  1086. RunProg2:
  1087. Run, %Prog2%,, UseErrorLevel
  1088. return
  1089. RunProg3:
  1090. Run, %Prog3%,, UseErrorLevel
  1091. return
  1092.  
  1093.  
  1094. FileNew:
  1095. FileOpen:
  1096. FileSaveAs:
  1097. FileExit:
  1098.  
  1099. return
  1100.  
  1101. ProfileNew:
  1102. Gui 3:Default
  1103. Gui, +owner1
  1104. gui, add, text,, Name of new profile:
  1105. gui, add, edit,vNewProf w200
  1106. gui, add, checkbox,Checked1 vblankprofile x+5 yp h25, Blank?*
  1107. gui, add, text, x10, *If not blank - will copy current keys to new profile
  1108. gui, add, button,x10 gOkNewProfile w145, OK
  1109. gui, add, button, yp x+10 w145, Cancel
  1110. gui, show,,Create new profile
  1111. return
  1112.  
  1113. OkNewProfile:
  1114. gui, submit, nohide
  1115. if NewProf
  1116. {
  1117. IniWrite, %NewProf%, %A_WorkingDir%\settings.ini, Others, profile
  1118.  
  1119. if blankprofile
  1120. IniWrite,%A_Space%, %A_WorkingDir%\%NewProf%.ini, Inventory, item1
  1121. else
  1122. FileCopy, %A_WorkingDir%\%profileini%, %NewProf%.ini
  1123. gui, 3:destroy
  1124. reload
  1125. }
  1126. else
  1127. MsgBox 262160, Error ,Choose name for profile
  1128. return
  1129.  
  1130. ChooseGeneral:
  1131. IniWrite, general, %A_WorkingDir%\settings.ini, Others, profile
  1132. reload
  1133. return
  1134.  
  1135. ProfileChoose:
  1136. IniWrite, %A_ThisMenuItem%, %A_WorkingDir%\settings.ini, Others, profile
  1137. reload
  1138. return
  1139.  
  1140.  
  1141.  
  1142. Commands:
  1143. Commandlist =
  1144. (
  1145. Default Commands:
  1146. /l ProfileName - will load profile (if it exists).
  1147. /reload (or reload) - will reload script
  1148. /suspend (or suspend) - will pause (unpause) script
  1149. /exit (or exit) - will exit script
  1150.  
  1151. Default Hotstrings:
  1152. -u - -unlock
  1153. -wa - -water
  1154. -we - -weather
  1155. -re - -repick
  1156. -ra - -random
  1157. -ro - -roll
  1158. -1x1 - -apshomnp
  1159. )
  1160.  
  1161. MsgBox 64, Command List ,%Commandlist%
  1162. return
  1163.  
  1164. Help:
  1165. run, http://aht.auct.eu/guide.html
  1166. return
  1167.  
  1168.  
  1169. auctblog:
  1170. run, http://auct.eu
  1171. return
  1172. dotaresources:
  1173. run, https://yadi.sk/d/arn3UVKVHxdSk
  1174. return
  1175. Customkeystxt:
  1176. run, http://dotacustomkeys.appspot.com/
  1177. return
  1178.  
  1179. UpdateCheck:
  1180. UrlDownloadToFile, https://auct.eu/latestaht.html, %A_Temp%\latest.html
  1181. FileReadLine, NetVer, %A_Temp%\latest.html, 1
  1182. If (Version <> NetVer)
  1183. {
  1184. ;MsgBox, 4,Check for update, %NetVer% is available! `nWould you like to download new version?
  1185. MsgBox 68, Update is available ,%NetVer% is available! `nWould you like to download new version?,5
  1186. IfMsgBox Yes
  1187. run, http://aht.auct.eu/download.html
  1188. }
  1189. else
  1190. MsgBox 64, Info ,Your AHT is up to date!,2
  1191. return
  1192.  
  1193. UpdateCheckS:
  1194. UrlDownloadToFile, https://auct.eu/latestaht.html, %A_Temp%\latest.html
  1195. FileReadLine, NetVer, %A_Temp%\latest.html, 1
  1196. If (Version <> NetVer){
  1197. MsgBox, 4,Check for Update, %NetVer% is available! `nWould you like to download new version?
  1198. IfMsgBox Yes
  1199. run, http://aht.auct.eu/download.html
  1200. }
  1201. return
  1202.  
  1203. RunWC3:
  1204. regread, path, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, ProgramX
  1205. if path
  1206. {
  1207. if WMC
  1208. run %path% -windowed
  1209. else
  1210. run %path%
  1211. }
  1212. else
  1213. gosub, WarRegFix
  1214. return
  1215.  
  1216. About:
  1217. if aboutcreated
  1218. gui, 2:show, autosize center, About
  1219. else {
  1220. Gui +Disabled ; Disable main window.
  1221. Gui 2:Default
  1222. Gui, +owner1 ; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
  1223.  
  1224. if darkstyle
  1225. gui, font,s10 cwhite
  1226. else
  1227. gui, font,s10 cblue
  1228. Gui, Add, GroupBox, x10 y0 w330 R1 , Author
  1229. if darkstyle
  1230. gui, font, cwhite
  1231. else
  1232. gui, font
  1233. gui, font, s10 underline
  1234. Gui, add, text,x140 y25 gmailauct,AucT
  1235.  
  1236. if darkstyle
  1237. gui, font,s10 cwhite
  1238. else
  1239. gui, font,s10 cblue
  1240. Gui, Add, GroupBox, x10 w330 R1 , Main Tester
  1241. if darkstyle
  1242. gui, font, cwhite
  1243. else
  1244. gui, font
  1245. gui, font, s10
  1246. Gui, add, text,x130 y85,DenSiL7
  1247.  
  1248. if darkstyle
  1249. gui, font,s10 cwhite
  1250. else
  1251. gui, font,s10 cblue
  1252. Gui, Add, GroupBox, x10 w330 R1 ,Window mode
  1253. if darkstyle
  1254. gui, font, cwhite
  1255. else
  1256. gui, font
  1257. gui, font, s10
  1258. Gui, add, text,x130 y145,yayuhhz
  1259.  
  1260. if darkstyle
  1261. gui, font,s10 cwhite
  1262. else
  1263. gui, font,s10 cblue
  1264. Gui, Add, GroupBox, x10 w330 R1 , Website
  1265. if darkstyle
  1266. gui, font, cwhite
  1267. else
  1268. gui, font
  1269. gui, font, s10 underline
  1270. Gui, add, text,x100 y205 gAHTISGREAT, http://aht.auct.eu
  1271. if darkstyle
  1272. gui, font, cwhite
  1273. else
  1274. gui, font
  1275. gui, font, s10
  1276. gui, add, button, x10 y+20 w330, OK
  1277. if darkstyle
  1278. gui, font, cwhite
  1279. else
  1280. gui, font
  1281. gui, show, autosize center, About
  1282. aboutcreated:=1
  1283. }
  1284. return
  1285.  
  1286. 2ButtonOK:
  1287. 2GuiClose:
  1288. 2GuiEscape:
  1289. Gui, 1:-Disabled ; Re-enable the main window (must be done prior to the next step).
  1290. Gui, hide ; Destroy the about box.
  1291. return
  1292.  
  1293. AHTISGREAT:
  1294. run, http://aht.auct.eu
  1295. return
  1296. mailauct:
  1297. run, mailto:[email protected]?Subject=AHT
  1298. return
  1299.  
  1300.  
  1301. ;*******************************Warcraft III Registry Fixer***********************************
  1302. WarRegFix:
  1303. Gui 5:Default
  1304. RegRead, CPath, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III,InstallPathX
  1305. Gui, -MinimizeBox -MaximizeBox
  1306. Gui, Add, Text,, Warcraft III Directory:
  1307. Gui, Add, Edit,w300 vWarcraftPath , %CPath%
  1308. Gui, Add, Button, x+5 yp w100 gBrowseRegFix , Browse
  1309. Gui, Add, Button, x10 w200 gRegFix , Fix Registry
  1310. Gui, Add, Button, x+5 w200, Cancel
  1311. Gui, Show, , Warcraft III Registry Fixer
  1312. Return
  1313.  
  1314. BrowseRegFix:
  1315. FileSelectFolder, SPath, , , Select you Warcraft III folder.
  1316. IfExist, %SPath%\war3.exe
  1317. ControlSetText, Edit1, %SPath%, A
  1318. else
  1319. MsgBox, 16, Warcraft III Registry Fixer, You did not choose the correct folder.
  1320. return
  1321.  
  1322. RegFix:
  1323. Gui 5:Default
  1324. Gui, Submit, NoHide
  1325. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, InstallPath, %SPath%
  1326. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, InstallPathX, %SPath%
  1327. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, Program, %SPath%\Warcraft III.exe
  1328. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, ProgramX, %SPath%\Frozen Throne.exe
  1329. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, War3CD, %SPath%
  1330. RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, War3XCD, %SPath%
  1331. MsgBox, 32, Warcraft III Registry Fixer, The registry has been fixed.
  1332. return
  1333.  
  1334. 5GuiEscape:
  1335. 5GuiClose:
  1336. 5ButtonCancel:
  1337. Gui, destroy
  1338. return
  1339.  
  1340. ResChange:
  1341. Gui 6:Default
  1342. SysGet, SysWidth, 0
  1343. SysGet, SysHeight, 1
  1344. gui, add, edit,vwarw w100,%SysWidth%
  1345. gui, add, edit,vwarh yp x+5 w100,%SysHeight%
  1346. gui, add, button,x10 w100, Change
  1347. gui, add, button,x+5 w100, Cancel
  1348. Gui, Show, , Warcraft III Res Changer
  1349. return
  1350.  
  1351. 6ButtonChange:
  1352. gui, submit, nohide
  1353. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Video, reswidth, %warw%
  1354. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Video, resheight, %warh%
  1355. MsgBox, 32, Warcraft III Resolution have been setted.
  1356. Gui, destroy
  1357. return
  1358. 6GuiEscape:
  1359. 6GuiClose:
  1360. 6ButtonCancel:
  1361. Gui, destroy
  1362. return
  1363.  
  1364.  
  1365. showhealthbars:
  1366. healthbars:=!healthbars
  1367. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Gameplay, healthbars, %healthbars%
  1368. menu, warcraft, togglecheck, Show HealthBars
  1369. return
  1370.  
  1371. usecustomkeys:
  1372. mcustomkeys:=!mcustomkeys
  1373. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Gameplay, customkeys, %mcustomkeys%
  1374. menu, warcraft, togglecheck, Use Customkeys
  1375. return
  1376.  
  1377. OpenGL:
  1378. opengl:=!opengl
  1379. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, Gfx OpenGL, %opengl%
  1380. menu, warcraft, togglecheck, OpenGL on
  1381. return
  1382.  
  1383. ImprFPS:
  1384. fps:=!fps
  1385. RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\Video, lockfb, %fps%
  1386. menu, warcraft, togglecheck, Improve FPS
  1387. return
  1388.  
  1389.  
  1390.  
  1391.  
  1392. SetScrollIndicator:
  1393. ScrollIndicator:=!ScrollIndicator
  1394. IniWrite, %ScrollIndicator%, %A_WorkingDir%\%profileini%, Others, ScrollIndicator
  1395. menu, options, togglecheck, Scroll Indicator
  1396. return
  1397.  
  1398. SetSoundIndicator:
  1399. sound:=!sound
  1400. IniWrite, %sound%, %A_WorkingDir%\%profileini%, Others, sound
  1401. menu, options, togglecheck, Sound Indicator
  1402. return
  1403.  
  1404. SetShieldLWin:
  1405. Shield:=!Shield
  1406. IniWrite, %Shield%, %A_WorkingDir%\%profileini%, Others, Shield
  1407. menu, options, togglecheck, Shield LeftWin
  1408. return
  1409.  
  1410. SetShieldRWin:
  1411. ShieldR:=!ShieldR
  1412. IniWrite, %ShieldR%, %A_WorkingDir%\%profileini%, Others, ShieldR
  1413. menu, options, togglecheck, Shield RightWin
  1414. return
  1415.  
  1416. SetChat:
  1417. chat:=!chat
  1418. IniWrite, %chat%, %A_WorkingDir%\%profileini%, Others, chat
  1419. menu, Chat-Suspend, togglecheck, Chat-free in game
  1420. return
  1421.  
  1422. SetAutodetect:
  1423. autodetect:=!autodetect
  1424. IniWrite, %autodetect%, %A_WorkingDir%\%profileini%, Others, autodetect
  1425. menu, Chat-Suspend, togglecheck, Chat-free in lobby
  1426. return
  1427.  
  1428. SetRunatStart:
  1429. RunatStart:=!RunatStart
  1430. IniWrite, %RunatStart%, %A_WorkingDir%\%profileini%, Others, RunatStart
  1431. menu, options, togglecheck, Run at Start
  1432. return
  1433.  
  1434. SetUpdateatStart:
  1435. UpdateatStart:=!UpdateatStart
  1436. IniWrite, %UpdateatStart%, %A_WorkingDir%\%profileini%, Others, UpdateatStart
  1437. menu, options, togglecheck, Update at Start
  1438. return
  1439.  
  1440. SetWMC:
  1441. WMC:=!WMC
  1442. IniWrite, %WMC%, %A_WorkingDir%\%profileini%, Others, WMC
  1443. if ConfigCreated
  1444. menu, options, togglecheck, Mouse Capture
  1445. menu, tray, togglecheck, Mouse Capture
  1446. if WMC
  1447. SetTimer,CheckActiveWar3
  1448. else
  1449. {
  1450. SetTimer,CheckActiveWar3,off
  1451. SetTimer,CheckInactiveWar3,Off
  1452. DllCall("ClipCursor", UInt, 0)
  1453. _locked:=0
  1454. }
  1455. return
  1456. styledefault:
  1457. IniWrite, %A_Space%, %A_WorkingDir%\%profileini%, Others, stylecolor
  1458. IniWrite,0, %A_WorkingDir%\%profileini%, Others, darkstyle
  1459. reload
  1460. return
  1461. stylelpurple:
  1462. IniWrite, 9185be, %A_WorkingDir%\%profileini%, Others, stylecolor
  1463. IniWrite,0, %A_WorkingDir%\%profileini%, Others, darkstyle
  1464. reload
  1465. return
  1466. stylelblue:
  1467. IniWrite, 83d0f5, %A_WorkingDir%\%profileini%, Others, stylecolor
  1468. IniWrite,0, %A_WorkingDir%\%profileini%, Others, darkstyle
  1469. reload
  1470. return
  1471. stylelgreen:
  1472. IniWrite,86c06a, %A_WorkingDir%\%profileini%, Others, stylecolor
  1473. IniWrite,0, %A_WorkingDir%\%profileini%, Others, darkstyle
  1474. reload
  1475. return
  1476. stylepurple:
  1477. IniWrite,1d0e46, %A_WorkingDir%\%profileini%, Others, stylecolor
  1478. IniWrite,1, %A_WorkingDir%\%profileini%, Others, darkstyle
  1479. reload
  1480. return
  1481. styleblue:
  1482. IniWrite,009fe3, %A_WorkingDir%\%profileini%, Others, stylecolor
  1483. IniWrite,1, %A_WorkingDir%\%profileini%, Others, darkstyle
  1484. reload
  1485. return
  1486. stylegreen:
  1487. IniWrite,006b2d, %A_WorkingDir%\%profileini%, Others, stylecolor
  1488. IniWrite,1, %A_WorkingDir%\%profileini%, Others, darkstyle
  1489. reload
  1490. return
  1491. stylegrey:
  1492. IniWrite,c1c1c1, %A_WorkingDir%\%profileini%, Others, stylecolor
  1493. IniWrite,0, %A_WorkingDir%\%profileini%, Others, darkstyle
  1494. reload
  1495. return
  1496.  
  1497. SetItem:
  1498. ChoosenB=%A_GuiControl%
  1499. ;Gui , 2:+Disabled
  1500. ;Gui , 2:-Minimizebox +owner2
  1501. Gui 4:Default
  1502. gui, destroy
  1503. Gui, Color, %stylecolor%
  1504. if darkstyle
  1505. gui, font, cwhite
  1506. Gui, Add, GroupBox, w220 h50, Modifier
  1507. gui, add, checkbox, vAltModifier xp+15 yp+20 gHotkey_UpdateHotkey, &Alt
  1508. gui, add, checkbox, vCtrlModifier x+0 gHotkey_UpdateHotkey, &Ctrl
  1509. gui, add, checkbox, vShiftModifier x+0 gHotkey_UpdateHotkey, &Shift
  1510. gui, add, checkbox, vWinModifier x+0 gHotkey_UpdateHotkey, &Win
  1511.  
  1512. gui, add, groupbox,x10 w220 h180, Keys
  1513.  
  1514. gui, add, radio, xp+5 yp+30 vRadioKey gHotkey_UpdateKeyList Checked, Standart
  1515. gui, add, radio, y+10 gHotkey_UpdateKeyList, Function
  1516. gui, add, radio, y+10 gHotkey_UpdateKeyList, Numpad
  1517. gui, add, radio, y+10 gHotkey_UpdateKeyList, Mouse
  1518. gui, add, radio, y+10 gHotkey_UpdateKeyList, Multimedia
  1519. gui, add, radio, y+10 gHotkey_UpdateKeyList, None
  1520. gui, font
  1521. gui, add, listbox, x110 y85 w120 h150 vHG_Key gHotkey_UpdateHotkey
  1522. gosub, Hotkey_UpdateKeyList
  1523. if darkstyle
  1524. gui, font, cwhite
  1525. gui, add, text, x10 y250 w40 h20, Key:
  1526. gui, add, edit, vhotkeyshow x+5 w190 h20 +readonly
  1527.  
  1528. gui, add, text, x10 y+5 w40 h20, Desc:
  1529. gui, add, text, vdescshow x+5 w190 h20 +readonly, None
  1530.  
  1531. gui, add, button, x25 y300 w100 h30 gHotkey_AcceptButton, Accept
  1532. gui, add, button, x+5 w100 h30 gHotkeyClose, Cancel
  1533.  
  1534. gui, show, autosize center, Choose hotkey...
  1535.  
  1536. return
  1537.  
  1538. ;==================================Hotkey Mechanism============================================
  1539. HotkeyClose:
  1540. gui, 4:destroy
  1541. return
  1542.  
  1543. Hotkey_AcceptButton:
  1544. Gui, Submit
  1545. i := SubStr(ChoosenB,2)
  1546. loop, 18
  1547. {
  1548. if HG_Hotkey and HG_Hotkey=h%A_Index%
  1549. {
  1550. gui, 4:destroy
  1551. HG_Hotkey=
  1552. MsgBox 262160, Error ,Dublicate Hotkeys not allowed
  1553. return
  1554. }
  1555. }
  1556.  
  1557. h%i%=%HG_Hotkey%
  1558. i2:=i-6
  1559. if i<7
  1560. IniWrite, %HG_Hotkey%, %A_WorkingDir%\%profileini%, Inventory, item%i%
  1561. else
  1562. IniWrite, %HG_Hotkey%, %A_WorkingDir%\%profileini%, RemapKey, KRhotkey%i2%
  1563. gui, 4:destroy
  1564. hDialog:=0
  1565. Gui 1:Default
  1566. GuiControl Text, %ChoosenB%, %HG_Hotkey%
  1567. HG_Hotkey=
  1568. return
  1569.  
  1570. Hotkey_UpdateKeyList:
  1571. Gui 4:Default
  1572. Gui, Submit, Nohide
  1573. GUIControl -Redraw,HG_Key
  1574. if (RadioKey = 1)
  1575. GuiControl,, HG_Key, |A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|1|2|3|4|5|6|7|8|9|0|``|-|=|\|[|]|;|'|,|.|/|Space|Tab|Enter|Escape|Delete|ScrollLock|CapsLock|NumLock|PrintScreen|BackSpace|CtrlBreak|Pause|Break|Up|Down|Left|Right|Home|End|Insert|Page Up|Page Down
  1576. if (RadioKey = 2)
  1577. GuiControl,, HG_Key, |F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12|LWin|RWin|LControl|RControl|LShift|RShift|LAlt|RAlt
  1578. if (RadioKey = 3)
  1579. GuiControl,, HG_Key, |Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|Numpadmult|NumpadAdd|NumpadSub|NumpadDiv|NumpadDot|NumpadEnter
  1580. if (RadioKey = 4)
  1581. GuiControl,, HG_Key, |LButton|RButton|MButton|WheelUp|WheelDown|XButton1|XButton2
  1582. if (RadioKey = 5)
  1583. GuiControl,, HG_Key, |Browser_back|Browser_forward|Browser_refresh|Browser_stop|Browser_search|Browser_favorites|Browser_home|volume_mute|volume_down|volume_up|Media_next|Media_prev|Media_stop|Media_play_h8|launch_media|launch_mail|launch_app1|launch_app2|Help|Sleep
  1584. if (RadioKey = 6)
  1585. GuiControl,, HG_Key, |%A_Blank%
  1586. GUIControl +Redraw,HG_Key
  1587. return
  1588.  
  1589.  
  1590. Hotkey_UpdateHotkey:
  1591. gui, submit, nohide
  1592. HG_Hotkey=
  1593. HG_HKDesc=
  1594. if CtrlModifier
  1595. {
  1596. HG_Hotkey:=HG_Hotkey . "^"
  1597. HG_HKDesc:=HG_HKDesc . "Ctrl + "
  1598. }
  1599.  
  1600. if ShiftModifier
  1601. {
  1602. HG_Hotkey:=HG_Hotkey . "+"
  1603. HG_HKDesc:=HG_HKDesc . "Shift + "
  1604. }
  1605.  
  1606. if WinModifier
  1607. {
  1608. HG_Hotkey:=HG_Hotkey . "#"
  1609. HG_HKDesc:=HG_HKDesc . "Win + "
  1610. }
  1611.  
  1612. if AltModifier
  1613. {
  1614. HG_Hotkey:=HG_Hotkey . "!"
  1615. HG_HKDesc:=HG_HKDesc . "Alt + "
  1616. }
  1617.  
  1618. HG_Hotkey:=HG_Hotkey . HG_Key
  1619. HG_HKDesc:=HG_HKDesc . HG_Key
  1620.  
  1621. GUIControl ,,hotkeyshow,%HG_Hotkey%
  1622. GUIControl ,,descshow,%HG_HKDesc%
  1623. if a_guievent = DoubleClick
  1624. gosub, Hotkey_AcceptButton
  1625. return
  1626.  
  1627.  
  1628.  
  1629. 3GuiEscape:
  1630. 3GuiClose:
  1631. 3ButtonCancel:
  1632. Gui, destroy
  1633. return
  1634.  
  1635. 4GuiEscape:
  1636. 4GuiClose:
  1637. gui, 4:destroy
  1638. return
  1639.  
  1640. GuiEscape:
  1641. GuiClose:
  1642. ButtonHide:
  1643. Gui, Hide
  1644. return
  1645.  
  1646. ButtonExit:
  1647. Exit:
  1648. ExitApp
  1649. return
  1650.  
  1651. ButtonReload:
  1652. reload
  1653. return
  1654.  
  1655.  
  1656.  
  1657. SwitchInv:
  1658. ;Gui,submit,nohide
  1659. GuiControlGet, EnInventory
  1660. IniWrite, %EnInventory%, %A_WorkingDir%\%profileini%, Inventory, EnInventory
  1661. if (EnInventory=1){
  1662. GuiControl, Enable, b1
  1663. GuiControl, Enable, b2
  1664. GuiControl, Enable, b3
  1665. GuiControl, Enable, b4
  1666. GuiControl, Enable, b5
  1667. GuiControl, Enable, b6
  1668. }
  1669. else{
  1670. GuiControl, Disable, b1
  1671. GuiControl, Disable, b2
  1672. GuiControl, Disable, b3
  1673. GuiControl, Disable, b4
  1674. GuiControl, Disable, b5
  1675. GuiControl, Disable, b6
  1676. }
  1677. return
  1678.  
  1679.  
  1680. ;=======================================END of GUI===============================
  1681.  
  1682. ;=======================================SAVE INI=================================
  1683. EnSkills:
  1684. SmartSkills:
  1685. SelfCast:
  1686. skill1:
  1687. skill2:
  1688. skill3:
  1689. skill4:
  1690. skill5:
  1691. skill6:
  1692. skill7:
  1693. skill8:
  1694. skill9:
  1695. skill10:
  1696. skill11:
  1697. skill12:
  1698. gui, submit, nohide
  1699. IniWrite, % %A_ThisLabel%, %A_WorkingDir%\%profileini%, CustomKeys, %A_ThisLabel%
  1700. return
  1701.  
  1702. EnInvokerA:
  1703. EnInvokerU:
  1704. EnInvokerD:
  1705. ColdSnapA:
  1706. ColdSnapU:
  1707. GhostWalkA:
  1708. GhostWalkU:
  1709. TornadoA:
  1710. TornadoU:
  1711. EMPA:
  1712. EMPU:
  1713. AlacrityA:
  1714. AlacrityU:
  1715. AlacrityAS:
  1716. AlacrityUS:
  1717. ChaosMeteorA:
  1718. ChaosMeteorU:
  1719. SunStrikeA:
  1720. SunStrikeU:
  1721. ForgeSpiritA:
  1722. ForgeSpiritU:
  1723. IceWallA:
  1724. IceWallU:
  1725. BlastA:
  1726. BlastU:
  1727. QQQ:
  1728. WWW:
  1729. EEE:
  1730. il:
  1731. Q:
  1732. W:
  1733. E:
  1734. R:
  1735. gui, submit, nohide
  1736. IniWrite, % %A_ThisLabel%, %A_WorkingDir%\%profileini%, Invoker, %A_ThisLabel%
  1737. return
  1738.  
  1739. chat:
  1740. autodetect:
  1741. ScrollIndicator:
  1742. sound:
  1743. Shield:
  1744. RunAtStart:
  1745. UpdateAtStart:
  1746. Scoreboard:
  1747. Share:
  1748. Ignore:
  1749. AHP:
  1750. Garena:
  1751. ReloadScr:
  1752. WMChotkey:
  1753. Time:
  1754. toggle:
  1755. pause:
  1756. EHP:
  1757. Roshan:
  1758. Hero:
  1759. AHPS:
  1760. EHPS:
  1761. DontShowConfig:
  1762. runprog1s:
  1763. runprog2s:
  1764. runprog3s:
  1765. gui, submit, nohide
  1766. IniWrite, % %A_ThisLabel%, %A_WorkingDir%\%profileini%, Others, %A_ThisLabel%
  1767. return
  1768.  
  1769.  
  1770. auto1:
  1771. auto2:
  1772. autoall:
  1773. EnAutoCast:
  1774. DoubleAutoCast:
  1775. gui, submit, nohide
  1776. IniWrite, % %A_ThisLabel%, %A_WorkingDir%\%profileini%, Auto-Casts, %A_ThisLabel%
  1777. return
  1778.  
  1779. ;=====================================CORE CODE=================================
  1780.  
  1781. ;====================================INVENTORY==================================
  1782. i1:
  1783. send {vk67}
  1784. return
  1785. i1S:
  1786. sendplay +{vk67}
  1787. return
  1788.  
  1789. i2:
  1790. send {vk68}
  1791. return
  1792. i2S:
  1793. sendplay +{vk68}
  1794. return
  1795.  
  1796. i3:
  1797. send {vk64}
  1798. return
  1799. i3S:
  1800. sendplay +{vk64}
  1801. return
  1802.  
  1803. i4:
  1804. send {vk65}
  1805. return
  1806. i4S:
  1807. sendplay +{vk65}
  1808. return
  1809.  
  1810. i5:
  1811. send {vk61}
  1812. return
  1813. i5S:
  1814. sendplay +{vk61}
  1815. return
  1816.  
  1817. i6:
  1818. send {vk62}
  1819. return
  1820. i6S:
  1821. sendplay +{vk62}
  1822. return
  1823. ;===================================================CUSTOM KEYS=======================
  1824. LC(xx,yy)
  1825. {
  1826. global _locked
  1827. global left
  1828. global top
  1829. global cWidth
  1830. global cHeight
  1831. global UAC
  1832. if _locked
  1833. {
  1834. x:=left+cWidth*xx
  1835. y:=top+cHeight*yy
  1836. }
  1837. else
  1838. {
  1839. x:=A_ScreenWidth*xx
  1840. y:=A_ScreenHeight*yy
  1841. }
  1842.  
  1843. BlockInput,MouseMove
  1844. MouseGetPos, x0, y0
  1845. if UAC
  1846. {
  1847. MouseMove,x,y
  1848. sleep,1
  1849. Click
  1850. }
  1851. else
  1852. {
  1853. SendPlay, {Click %x%, %y%, Left}{Click %x0%, %y0%, 0}
  1854. }
  1855. Send {Click %x0%, %y0%, 0}
  1856. BlockInput,MouseMoveOff
  1857. }
  1858.  
  1859. IsLearning()
  1860. {
  1861. global SmartSkills
  1862. if !SmartSkills
  1863. return 0
  1864. global _locked
  1865. global left
  1866. global top
  1867. global cWidth
  1868. global cHeight
  1869. if _locked
  1870. {
  1871. x:=left+cWidth*0.9595
  1872. y:=top+cHeight*0.878
  1873. x2:=left+cWidth*0.79
  1874. y2:=top+cHeight*0.95
  1875. }
  1876. else
  1877. {
  1878. x:=A_ScreenWidth*0.9595
  1879. y:=A_ScreenHeight*0.878
  1880. x2:=A_ScreenWidth*0.79
  1881. y2:=A_ScreenHeight*0.95
  1882. }
  1883.  
  1884. PixelGetColor, color1, %x%, %y%
  1885. PixelGetColor, color2, %x2%, %y2%
  1886. ;msgbox %color1% %color2%
  1887. if (color1=0x000000 and color2=0x000000)
  1888. return 1
  1889. return 0
  1890. }
  1891. LC1L:
  1892. LC(.79,.95)
  1893. return
  1894. LC1:
  1895. if SelfCast {
  1896. if lc1
  1897. LC(0.02381, 0.0806)
  1898. lc1:=!lc1
  1899. SetTimer, lc1off, -1000
  1900. }
  1901. if IsLearning()
  1902. LC(.79,.81)
  1903. else
  1904. LC(.79,.95)
  1905. return
  1906. LC1off:
  1907. lc1:=0
  1908. return
  1909.  
  1910. LC2L:
  1911. LC(.84,.95)
  1912. return
  1913. LC2:
  1914. if SelfCast {
  1915. if lc2
  1916. LC(0.02381, 0.0806)
  1917. lc2:=!lc2
  1918. SetTimer, lc2off, -1000
  1919. }
  1920. if IsLearning()
  1921. LC(.84,.81)
  1922. else
  1923. LC(.84,.95)
  1924. return
  1925. LC2off:
  1926. lc2:=0
  1927. return
  1928.  
  1929. LC3L:
  1930. LC(.9,.95)
  1931. return
  1932. LC3:
  1933. if SelfCast {
  1934. if lc3
  1935. LC(0.02381, 0.0806)
  1936. lc3:=!lc3
  1937. SetTimer, lc3off, -1000
  1938. }
  1939. if IsLearning()
  1940. LC(.9,.81)
  1941. else
  1942. LC(.9,.95)
  1943. return
  1944. LC3off:
  1945. lc3:=0
  1946. return
  1947.  
  1948. LC4L:
  1949. LC(.95,.95)
  1950. return
  1951. LC4:
  1952. if SelfCast {
  1953. if lc4
  1954. LC(0.02381, 0.0806)
  1955. lc4:=!lc4
  1956. SetTimer, lc4off, -1000
  1957. }
  1958. if IsLearning()
  1959. LC(.95,.81)
  1960. else
  1961. LC(.95,.95)
  1962. return
  1963. LC4off:
  1964. lc4:=0
  1965. return
  1966.  
  1967. LC5L:
  1968. LC(.79,.88)
  1969. return
  1970. LC5:
  1971. if SelfCast {
  1972. if lc5
  1973. LC(0.02381, 0.0806)
  1974. lc5:=!lc5
  1975. SetTimer, lc5off, -1000
  1976. }
  1977. LC(.79,.88)
  1978. return
  1979. LC5off:
  1980. lc5:=0
  1981. return
  1982. LC6L:
  1983. LC(.84,.88)
  1984. return
  1985. LC6:
  1986. if SelfCast {
  1987. if lc6
  1988. LC(0.02381, 0.0806)
  1989. lc6:=!lc6
  1990. SetTimer, lc6off, -1000
  1991. }
  1992. LC(.84,.88)
  1993. return
  1994. LC6off:
  1995. lc6:=0
  1996. return
  1997.  
  1998. LC7L:
  1999. LC(.9,.88)
  2000. return
  2001. LC7:
  2002. if SelfCast {
  2003. if lc7
  2004. LC(0.02381, 0.0806)
  2005. lc7:=!lc7
  2006. SetTimer, lc7off, -1000
  2007. }
  2008. LC(.9,.88)
  2009. return
  2010. LC7off:
  2011. lc7:=0
  2012. return
  2013.  
  2014. LC8L:
  2015. LC(.95,.88)
  2016. return
  2017. LC8:
  2018. if SelfCast {
  2019. if lc8
  2020. LC(0.02381, 0.0806)
  2021. lc8:=!lc8
  2022. SetTimer, lc8off, -1000
  2023. }
  2024. LC(.95,.88)
  2025. return
  2026. LC8off:
  2027. lc8:=0
  2028. return
  2029. LC9:
  2030. LC(.79,.81)
  2031. return
  2032.  
  2033. LC10:
  2034. LC(.84,.81)
  2035. return
  2036.  
  2037. LC11:
  2038. LC(.9,.81)
  2039. return
  2040.  
  2041. LC12:
  2042. LC(.95,.81)
  2043. return
  2044. ;==================================================AUTO CAST===================================
  2045. AC1:
  2046. if _locked
  2047. {
  2048. x1:=left+cWidth*0.79
  2049. x2:=left+cWidth*0.84
  2050. y:=top+cHeight*0.95
  2051. y2:=top+cHeight*0.88
  2052. }
  2053. else
  2054. {
  2055. x1:=A_ScreenWidth*0.79
  2056. x2:=A_ScreenWidth*0.84
  2057. y:=A_ScreenHeight*0.95
  2058. y2:=A_ScreenHeight*0.88
  2059. }
  2060. BlockInput,MouseMove
  2061. MouseGetPos, x0, y0
  2062. SendPlay, {Click %x1%, %y%, Right}{Click %x2%, %y%, Right}{Click %x2%, %y2%, Right}{Click %x0%, %y0%, 0}
  2063. BlockInput,MouseMoveOff
  2064. return
  2065.  
  2066. DAC1:
  2067. if dac1
  2068. {
  2069. if UAC
  2070. gosub, AC1UAC
  2071. else
  2072. gosub, AC1
  2073. }
  2074. dac1:=!dac1
  2075. SetTimer, dac1off, -1000
  2076. return
  2077.  
  2078. dac1off:
  2079. dac1:=0
  2080. return
  2081.  
  2082. DAC2:
  2083. if dac2
  2084. {
  2085. if UAC
  2086. gosub, AC2UAC
  2087. else
  2088. gosub, AC2
  2089. }
  2090. dac2:=!dac2
  2091. SetTimer, dac2off, -1000
  2092. return
  2093.  
  2094. dac2off:
  2095. dac2:=0
  2096. return
  2097.  
  2098. DACa:
  2099. if daca
  2100. {
  2101. if UAC
  2102. gosub, ACaUAC
  2103. else
  2104. gosub, ACa
  2105. }
  2106. daca:=!daca
  2107. SetTimer, dacaoff, -1000
  2108. return
  2109.  
  2110. dacaoff:
  2111. daca:=0
  2112. return
  2113.  
  2114. AC1UAC:
  2115. if _locked
  2116. {
  2117. x1:=left+cWidth*0.79
  2118. x2:=left+cWidth*0.84
  2119. y:=top+cHeight*0.95
  2120. y2:=top+cHeight*0.88
  2121. }
  2122. else
  2123. {
  2124. x1:=A_ScreenWidth*0.79
  2125. x2:=A_ScreenWidth*0.84
  2126. y:=A_ScreenHeight*0.95
  2127. y2:=A_ScreenHeight*0.88
  2128. }
  2129. BlockInput,MouseMove
  2130. MouseGetPos, x0, y0
  2131. MouseClick,Right,x1,y,,0
  2132. MouseClick,Right,x2,y,,0
  2133. MouseClick,Right,x2,y2,,0
  2134. MouseMove,x0,y0
  2135. BlockInput,MouseMoveOff
  2136. return
  2137.  
  2138.  
  2139. ACaUAC:
  2140. if _locked {
  2141. x1:=left+cWidth*0.79
  2142. x2:=left+cWidth*0.84
  2143. x3:=left+cWidth*0.9
  2144. x4:=left+cWidth*0.95
  2145. y:=top+cHeight*0.95
  2146. y2:=top+cHeight*0.88
  2147. }
  2148. else {
  2149. x1:=A_ScreenWidth*0.79
  2150. x2:=A_ScreenWidth*0.84
  2151. x3:=A_ScreenWidth*0.9
  2152. x4:=A_ScreenWidth*0.95
  2153. y:=A_ScreenHeight*0.95
  2154. y2:=A_ScreenHeight*0.88
  2155. }
  2156.  
  2157. BlockInput,MouseMove
  2158. MouseGetPos, x0, y0
  2159. MouseClick,Right,x1,y,,0
  2160. MouseClick,Right,x2,y,,0
  2161. MouseClick,Right,x3,y,,0
  2162. MouseClick,Right,x4,y,,0
  2163. MouseClick,Right,x3,y2,,0
  2164. MouseMove,x0,y0
  2165. BlockInput,MouseMoveOff
  2166. return
  2167.  
  2168. ACa:
  2169. if _locked {
  2170. x1:=left+cWidth*0.79
  2171. x2:=left+cWidth*0.84
  2172. x3:=left+cWidth*0.9
  2173. x4:=left+cWidth*0.95
  2174. y:=top+cHeight*0.95
  2175. y2:=top+cHeight*0.88
  2176. }
  2177. else {
  2178. x1:=A_ScreenWidth*0.79
  2179. x2:=A_ScreenWidth*0.84
  2180. x3:=A_ScreenWidth*0.9
  2181. x4:=A_ScreenWidth*0.95
  2182. y:=A_ScreenHeight*0.95
  2183. y2:=A_ScreenHeight*0.88
  2184. }
  2185. BlockInput,MouseMove
  2186. MouseGetPos, x0, y0
  2187. SendPlay, {Click %x1%, %y%, Right}{Click %x2%, %y%, Right}{Click %x3%, %y%, Right}{Click %x4%, %y%, Right}{Click %x3%, %y2%, Right}{Click %x0%, %y0%, 0}
  2188. BlockInput,MouseMoveOff
  2189. return
  2190.  
  2191. AC2:
  2192. if _locked
  2193. {
  2194. x3:=left+cWidth*0.9
  2195. x4:=left+cWidth*0.95
  2196. y:=top+cHeight*0.95
  2197. y2:=top+cHeight*0.88
  2198. }
  2199. else
  2200. {
  2201. x3:=A_ScreenWidth*0.9
  2202. x4:=A_ScreenWidth*0.95
  2203. y:=A_ScreenHeight*0.95
  2204. y2:=A_ScreenHeight*0.88
  2205. }
  2206. BlockInput,MouseMove
  2207. MouseGetPos, x0, y0
  2208. SendPlay, {Click %x3%, %y%, Right}{Click %x4%, %y%, Right}{Click %x3%, %y2%, Right}{Click %x0%, %y0%, 0}
  2209. BlockInput,MouseMoveOff
  2210. return
  2211.  
  2212. AC2UAC:
  2213. if _locked
  2214. {
  2215. x3:=left+cWidth*0.9
  2216. x4:=left+cWidth*0.95
  2217. y:=top+cHeight*0.95
  2218. y2:=top+cHeight*0.88
  2219. }
  2220. else
  2221. {
  2222. x3:=A_ScreenWidth*0.9
  2223. x4:=A_ScreenWidth*0.95
  2224. y:=A_ScreenHeight*0.95
  2225. y2:=A_ScreenHeight*0.88
  2226. }
  2227. BlockInput,MouseMove
  2228. MouseGetPos, x0, y0
  2229. MouseClick,Right,x3,y,,0
  2230. MouseClick,Right,x4,y,,0
  2231. MouseClick,Right,x3,y2,,0
  2232. MouseMove,x0,y0
  2233. BlockInput,MouseMoveOff
  2234. return
  2235. ;===========================================================MESSAGES===================================
  2236. RandomMessage(M)
  2237. {
  2238. Loop, parse, M, `|
  2239. Random, rand, 1, %A_Index%
  2240. Loop, parse, M, `|
  2241. {
  2242. if rand=%A_Index%
  2243. return %A_LoopField%
  2244. }
  2245.  
  2246. return
  2247. }
  2248. mv1:
  2249. mv2:
  2250. mv3:
  2251. mv4:
  2252. mv5:
  2253. mv6:
  2254. mv7:
  2255. mv8:
  2256. mv9:
  2257. mv10:
  2258. mv11:
  2259. mv12:
  2260. mv13:
  2261. mv14:
  2262. mv15:
  2263. mv16:
  2264. mv17:
  2265. mv18:
  2266. mv19:
  2267. mv20:
  2268. mv21:
  2269. mv22:
  2270. mv23:
  2271. mv24:
  2272. mv25:
  2273. mv26:
  2274. mv27:
  2275. mv28:
  2276. mv29:
  2277. mv30:
  2278. mv31:
  2279. mv32:
  2280. mv33:
  2281. mv34:
  2282. mv35:
  2283. mv36:
  2284. m:=% %A_ThisLabel%
  2285. if SubStr(m,1,4)="All:"
  2286. {
  2287. m:=SubStr(m,5)
  2288. typemes=+{vk0D}
  2289. }
  2290. else
  2291. typemes={vk0D}
  2292.  
  2293. if instr(m,"|")
  2294. {
  2295. r:=RandomMessage(m)
  2296. send %typemes%{Raw}%r%
  2297. send {vk0D}
  2298. sleep, 1
  2299. }
  2300. else {
  2301. StringReplace, m, m,\n,`n, All
  2302. loop, parse, m, `n
  2303. {
  2304. send %typemes%{Raw}%A_LoopField%
  2305. send {vk0D}
  2306. sleep, 1
  2307. }
  2308. }
  2309. return
  2310.  
  2311.  
  2312. Mes_KeyUpdate:
  2313. Mes_KeyList=
  2314. loop, 35 {
  2315. IniRead, mh, %A_WorkingDir%\%profileini%,Messages, hotkey%A_Index%, %A_Space%
  2316. if mh
  2317. Mes_KeyList=%Mes_KeyList%|%mh%
  2318. }
  2319. GuiControl,, Mes_Key,%Mes_KeyList%
  2320. return
  2321.  
  2322.  
  2323. Mes_MesUpdate:
  2324. gui, submit, nohide
  2325. Mes_Keyi=% getKeyIndex(Mes_Key)
  2326. IniRead, H, %A_WorkingDir%\%profileini%,Messages, hotkey%Mes_Keyi%, %A_Space%
  2327. IniRead, M, %A_WorkingDir%\%profileini%,Messages, message%Mes_Keyi%, %A_Space%
  2328. StringReplace, M, M,\n,`n, All
  2329. if SubStr(M,1,4)="All:"
  2330. {
  2331. M:=SubStr(M,5)
  2332. GUIControl ,,toAll,1
  2333. }
  2334. else
  2335. GUIControl ,,toAll,0
  2336. GUIControl ,,MesEdit,%M%
  2337. GUIControl ,,HotkeyChoose_Mes,%H%
  2338. return
  2339.  
  2340. AddMes:
  2341. gui, submit, nohide
  2342.  
  2343. if HotkeyChoose_Mes=
  2344. {
  2345. MsgBox 262160, Error ,Choose hotkey first!
  2346. return
  2347. }
  2348.  
  2349.  
  2350. StringReplace, MesEdit, MesEdit,`n,\n, All
  2351. loop {
  2352. IniRead, h, %A_WorkingDir%\%profileini%, Messages, hotkey%A_Index%, %A_Space%
  2353. if !h
  2354. {
  2355. i=%A_Index%
  2356. break
  2357. }
  2358. }
  2359.  
  2360. if toAll
  2361. MesEdit:="ALL:" . MesEdit
  2362. IniWrite, %HotkeyChoose_Mes%, %A_WorkingDir%\%profileini%, Messages, hotkey%i%
  2363. IniWrite, %MesEdit%, %A_WorkingDir%\%profileini%, Messages, message%i%
  2364.  
  2365. GUIControl ,,toAll,0
  2366. gosub, Mes_KeyUpdate
  2367. GUIControl ,,HotkeyChoose_Mes,
  2368. GUIControl ,,MesEdit,
  2369. HotkeyChoose_Mes=
  2370. MesEdit=
  2371. return
  2372.  
  2373. DeleteMes:
  2374. gui, submit, nohide
  2375. Mes_Keyi=% getKeyIndex(Mes_Key)
  2376. IniWrite, %A_Space%, %A_WorkingDir%\%profileini%,Messages, hotkey%Mes_Keyi%
  2377. IniWrite, %A_Space%, %A_WorkingDir%\%profileini%,Messages, message%Mes_Keyi%
  2378. GUIControl ,,toAll,0
  2379. gosub, Mes_KeyUpdate
  2380. GUIControl ,,HotkeyChoose_Mes,
  2381. GUIControl ,,MesEdit,
  2382. HotkeyChoose_Mes=
  2383. MesEdit=
  2384. return
  2385.  
  2386.  
  2387.  
  2388. Remap_Update:
  2389. gui, submit, nohide
  2390. Remap_Keyi=% getKRIndex(Remap_Key)
  2391. IniRead, H, %A_WorkingDir%\%profileini%,RemapKey, KRhotkey%Remap_Keyi%, %A_Space%
  2392. IniRead, M, %A_WorkingDir%\%profileini%,RemapKey, KRvalue%Remap_Keyi%, %A_Space%
  2393. GUIControl ,,HK_Remap,%H%
  2394. GUIControl ,,Value_Remap,%M%
  2395. return
  2396.  
  2397. Remap_KeyUpdate:
  2398. Remap_KeyList=
  2399. loop, 36 {
  2400. IniRead, rh, %A_WorkingDir%\%profileini%,RemapKey, KRhotkey%A_Index%, %A_Space%
  2401. IniRead, rv, %A_WorkingDir%\%profileini%,RemapKey, KRvalue%A_Index%, %A_Space%
  2402. if rh
  2403. Remap_KeyList=%Remap_KeyList%|%rh% => %rv%
  2404. }
  2405. GuiControl,, Remap_Key,%Remap_KeyList%
  2406. return
  2407.  
  2408. AddRemap:
  2409. gui, submit, nohide
  2410. if HK_Remap=
  2411. {
  2412. MsgBox 262160, Error ,Choose hotkey first!
  2413. return
  2414. }
  2415. loop {
  2416. IniRead, h, %A_WorkingDir%\%profileini%, RemapKey, KRhotkey%A_Index%, %A_Space%
  2417. if !h
  2418. {
  2419. i=%A_Index%
  2420. break
  2421. }
  2422. }
  2423. IniWrite, %HK_Remap%, %A_WorkingDir%\%profileini%, RemapKey, KRhotkey%i%
  2424. IniWrite, %Value_Remap%, %A_WorkingDir%\%profileini%, RemapKey, KRvalue%i%
  2425.  
  2426. gosub, Remap_KeyUpdate
  2427. GUIControl ,,HK_Remap,
  2428. GUIControl ,,Value_Remap,
  2429. HK_Remap=
  2430. Value_Remap=
  2431. return
  2432.  
  2433.  
  2434. DeleteRemap:
  2435. gui, submit, nohide
  2436. Remap_Keyi=% getKRIndex(Remap_Key)
  2437. IniWrite, %A_Space%, %A_WorkingDir%\%profileini%,RemapKey, KRhotkey%Remap_Keyi%
  2438. IniWrite, %A_Space%, %A_WorkingDir%\%profileini%,RemapKey, KRvalue%Remap_Keyi%
  2439. gosub, Remap_KeyUpdate
  2440. GUIControl ,,HK_Remap,
  2441. GUIControl ,,Value_Remap,
  2442. HK_Remap=
  2443. Value_Remap=
  2444. return
  2445.  
  2446. getKeyIndex(a) {
  2447. global
  2448. loop, 36 {
  2449. IniRead, h, %A_WorkingDir%\%profileini%,Messages, hotkey%A_Index%, %A_Space%
  2450. if (h = a)
  2451. {
  2452. i=%A_Index%
  2453. return i
  2454. }
  2455. }
  2456. return
  2457. }
  2458. getKRIndex(a) {
  2459. global
  2460. loop, 36 {
  2461. IniRead, h, %A_WorkingDir%\%profileini%, RemapKey, KRhotkey%A_Index%, %A_Space%
  2462. if h and (h = SubStr(a,1,StrLen(h)))
  2463. {
  2464. i=%A_Index%
  2465. return i
  2466. }
  2467. }
  2468. }
  2469. ;==========================================INVOKER===========================================
  2470. DSnap:
  2471. if dsnap
  2472. {
  2473. gosub, Snap
  2474. }
  2475. dsnap:=!dsnap
  2476. SetTimer, dsnapoff, -1000
  2477. return
  2478.  
  2479. dsnapoff:
  2480. dsnap:=0
  2481. return
  2482.  
  2483. DWall:
  2484. if dwall
  2485. {
  2486. gosub, Wall
  2487. }
  2488. dwall:=!dwall
  2489. SetTimer, dwalloff, -1000
  2490. return
  2491.  
  2492. dwalloff:
  2493. dwall:=0
  2494. return
  2495.  
  2496. DWalk:
  2497. if dwalk
  2498. {
  2499. gosub, Walk
  2500. }
  2501. dwalk:=!dwalk
  2502. SetTimer, dwalkoff, -1000
  2503. return
  2504.  
  2505. dwalkoff:
  2506. dwalk:=0
  2507. return
  2508.  
  2509. DBlast:
  2510. if dblast
  2511. {
  2512. gosub, Blast
  2513. }
  2514. dblast:=!dblast
  2515. SetTimer, dblastoff, -1000
  2516. return
  2517.  
  2518. dblastoff:
  2519. dblast:=0
  2520. return
  2521.  
  2522. DTornado:
  2523. if dtornado
  2524. {
  2525. gosub, Tornado
  2526. }
  2527. dtornado:=!dtornado
  2528. SetTimer, dtornadooff, -1000
  2529. return
  2530.  
  2531. dtornadooff:
  2532. dtornado:=0
  2533. return
  2534.  
  2535.  
  2536. DSnap2:
  2537. if dsnap2
  2538. {
  2539. gosub, Snap2
  2540. }
  2541. dsnap2:=!dsnap2
  2542. SetTimer, dsnap2off, -1000
  2543. return
  2544.  
  2545. dsnap2off:
  2546. dsnap2:=0
  2547. return
  2548.  
  2549. DWall2:
  2550. if dwall2
  2551. {
  2552. gosub, Wall2
  2553. }
  2554. dwall2:=!dwall2
  2555. SetTimer, dwall2off, -1000
  2556. return
  2557.  
  2558. dwall2off:
  2559. dwall2:=0
  2560. return
  2561.  
  2562. DWalk2:
  2563. if dwalk2
  2564. {
  2565. gosub, Walk2
  2566. }
  2567. dwalk2:=!dwalk2
  2568. SetTimer, dwalk2off, -1000
  2569. return
  2570.  
  2571. dwalk2off:
  2572. dwalk2:=0
  2573. return
  2574.  
  2575. DEMP:
  2576. if demp
  2577. {
  2578. gosub, EMP
  2579. }
  2580. demp:=!demp
  2581. SetTimer, dempoff, -1000
  2582. return
  2583.  
  2584. dempoff:
  2585. demp:=0
  2586. return
  2587.  
  2588. DEMP2:
  2589. if demp2
  2590. {
  2591. gosub, EMP2
  2592. }
  2593. demp2:=!demp2
  2594. SetTimer, demp2off, -1000
  2595. return
  2596.  
  2597. demp2off:
  2598. demp2:=0
  2599. return
  2600.  
  2601. DMeteor:
  2602. if DMeteor
  2603. {
  2604. gosub, Meteor
  2605. }
  2606. DMeteor:=!DMeteor
  2607. SetTimer, DMeteoroff, -1000
  2608. return
  2609.  
  2610. DMeteoroff:
  2611. DMeteor:=0
  2612. return
  2613.  
  2614. DMeteor2:
  2615. if DMeteor2
  2616. {
  2617. gosub, Meteor2
  2618. }
  2619. DMeteor2:=!DMeteor2
  2620. SetTimer, DMeteor2off, -1000
  2621. return
  2622.  
  2623. DMeteor2off:
  2624. DMeteor2:=0
  2625. return
  2626.  
  2627. DStrike:
  2628. if DStrike
  2629. {
  2630. gosub, Strike
  2631. }
  2632. DStrike:=!DStrike
  2633. SetTimer, DStrikeoff, -1000
  2634. return
  2635.  
  2636. DStrikeoff:
  2637. DStrike:=0
  2638. return
  2639.  
  2640. DStrike2:
  2641. if DStrike2
  2642. {
  2643. gosub, Strike2
  2644. }
  2645. DStrike2:=!DStrike2
  2646. SetTimer, DStrike2off, -1000
  2647. return
  2648.  
  2649. DStrike2off:
  2650. DStrike2:=0
  2651. return
  2652.  
  2653. DSpirit:
  2654. if DSpirit
  2655. {
  2656. gosub, Spirit
  2657. }
  2658. DSpirit:=!DSpirit
  2659. SetTimer, DSpiritoff, -1000
  2660. return
  2661.  
  2662. DSpiritoff:
  2663. DSpirit:=0
  2664. return
  2665.  
  2666. DSpirit2:
  2667. if DSpirit2
  2668. {
  2669. gosub, Spirit2
  2670. }
  2671. DSpirit2:=!DSpirit2
  2672. SetTimer, DSpirit2off, -1000
  2673. return
  2674.  
  2675. DSpirit2off:
  2676. DSpirit:=0
  2677. return
  2678.  
  2679. DBlast2:
  2680. if dblast2
  2681. {
  2682. gosub, Blast2
  2683. }
  2684. dblast2:=!dblast2
  2685. SetTimer, dblast2off, -1000
  2686. return
  2687.  
  2688. dblast2off:
  2689. dblast2:=0
  2690. return
  2691.  
  2692. DTornado2:
  2693. if dtornado2
  2694. {
  2695. gosub, Tornado2
  2696. }
  2697. dtornado2:=!dtornado2
  2698. SetTimer, dtornado2off, -1000
  2699. return
  2700.  
  2701. dtornado2off:
  2702. dtornado2:=0
  2703. return
  2704.  
  2705.  
  2706. DAlacrity:
  2707. if dalacrity
  2708. {
  2709. gosub, Alacrity
  2710. }
  2711. dalacrity:=!dalacrity
  2712. SetTimer, dalacrityoff, -1000
  2713. return
  2714.  
  2715. dalacrityoff:
  2716. dalacrity:=0
  2717. return
  2718.  
  2719. DAlacrity2:
  2720. if dalacrity2
  2721. {
  2722. gosub, Alacrity2
  2723. }
  2724. dalacrity2:=!dalacrity2
  2725. SetTimer, dalacrity2off, -1000
  2726. return
  2727.  
  2728. dalacrity2off:
  2729. dalacrity2:=0
  2730. return
  2731.  
  2732. DAlacrity3:
  2733. if dalacrity3
  2734. {
  2735. gosub, Alacrity3
  2736. }
  2737. dalacrity3:=!dalacrity3
  2738. SetTimer, dalacrity3off, -1000
  2739. return
  2740.  
  2741. dalacrity3off:
  2742. dalacrity3:=0
  2743. return
  2744.  
  2745. DAlacrity4:
  2746. if dalacrity4
  2747. {
  2748. gosub, Alacrity4
  2749. }
  2750. dalacrity4:=!dalacrity4
  2751. SetTimer, dalacrity4off, -1000
  2752. return
  2753.  
  2754. dalacrity4off:
  2755. dalacrity4:=0
  2756. return
  2757.  
  2758. Snap:
  2759. send {%vQ%}{%vQ%}{%vQ%}{%vR%}
  2760. return
  2761. Snap2:
  2762. send {%vQ%}{%vQ%}{%vQ%}{%vR%}
  2763. sleep 250
  2764. send {vk59}
  2765. return
  2766. Wall:
  2767. send {%vQ%}{%vQ%}{%vE%}{%vR%}
  2768. return
  2769. Wall2:
  2770. send {%vQ%}{%vQ%}{%vE%}{%vR%}
  2771. sleep 250
  2772. send {vk47}
  2773. return
  2774. Blast:
  2775. send {%vQ%}{%vW%}{%vE%}{%vR%}
  2776. return
  2777. Blast2:
  2778. send {%vQ%}{%vW%}{%vE%}{%vR%}
  2779. sleep 250
  2780. send {vk42}
  2781. return
  2782. Tornado:
  2783. send {%vQ%}{%vW%}{%vW%}{%vR%}
  2784. return
  2785. Tornado2:
  2786. send {%vQ%}{%vW%}{%vW%}{%vR%}
  2787. sleep 250
  2788. send {vk58}
  2789. return
  2790. Alacrity:
  2791. send {%vW%}{%vW%}{%vE%}{%vR%}
  2792. return
  2793. Alacrity2:
  2794. send {%vW%}{%vW%}{%vE%}{%vR%}
  2795. sleep 250
  2796. send {vk5A}
  2797. return
  2798.  
  2799. Alacrity3:
  2800. sleep 150
  2801. send {vk5A}
  2802.  
  2803.  
  2804. if _locked
  2805. {
  2806. x:=left+cWidth*0.02381
  2807. y:=top+cHeight*0.95
  2808. }
  2809. else
  2810. {
  2811. x:=A_ScreenWidth*0.02381
  2812. y:=A_ScreenHeight*0.0806
  2813. }
  2814. BlockInput,MouseMove
  2815. MouseGetPos, x0, y0
  2816. MouseMove,x,y
  2817. sleep,1
  2818. Click
  2819. Send {Click %x0%, %y0%, 0}
  2820. BlockInput,MouseMoveOff
  2821. return
  2822.  
  2823. Alacrity4:
  2824. send {%vW%}{%vW%}{%vE%}{%vR%}
  2825. sleep 250
  2826. send {vk5A}
  2827.  
  2828. if _locked
  2829. {
  2830. x:=left+cWidth*0.02381
  2831. y:=top+cHeight*0.95
  2832. }
  2833. else
  2834. {
  2835. x:=A_ScreenWidth*0.02381
  2836. y:=A_ScreenHeight*0.0806
  2837. }
  2838. BlockInput,MouseMove
  2839. MouseGetPos, x0, y0
  2840. MouseMove,x,y
  2841. sleep,1
  2842. Click
  2843. Send {Click %x0%, %y0%, 0}
  2844. BlockInput,MouseMoveOff
  2845. return
  2846. Meteor:
  2847. send {%vW%}{%vE%}{%vE%}{%vR%}
  2848. return
  2849. Meteor2:
  2850. send {%vW%}{%vE%}{%vE%}{%vR%}
  2851. sleep 250
  2852. send {vk44}
  2853. return
  2854. Strike:
  2855. send {%vE%}{%vE%}{%vE%}{%vR%}
  2856. return
  2857. Strike2:
  2858. send {%vE%}{%vE%}{%vE%}{%vR%}
  2859. sleep 250
  2860. send {vk54}
  2861. return
  2862. Walk:
  2863. send {%vQ%}{%vQ%}{%vW%}{%vR%}{%vW%}{%vW%}
  2864. return
  2865. Walk2:
  2866. send {%vQ%}{%vQ%}{%vW%}{%vR%}{%vW%}{%vW%}
  2867. sleep 250
  2868. send {vk56}
  2869. return
  2870. Spirit:
  2871. send {%vQ%}{%vE%}{%vE%}{%vR%}
  2872. return
  2873. Spirit2:
  2874. send {%vQ%}{%vE%}{%vE%}{%vR%}
  2875. sleep 250
  2876. send {vk46}
  2877. return
  2878. EMP:
  2879. send {%vW%}{%vW%}{%vW%}{%vR%}
  2880. return
  2881. EMP2:
  2882. send {%vW%}{%vW%}{%vW%}{%vR%}
  2883. sleep 250
  2884. send {vk43}
  2885. return
  2886. gQQQ:
  2887. send {%vQ%}{%vQ%}{%vQ%}
  2888. return
  2889. gWWW:
  2890. send {%vW%}{%vW%}{%vW%}
  2891. return
  2892. gEEE:
  2893. send {%vE%}{%vE%}{%vE%}
  2894. return
  2895. gilist:
  2896. send {Enter}-il{Enter}
  2897. return
  2898. ;===============================OTHER======================================================
  2899.  
  2900. disable:
  2901. return
  2902.  
  2903. SBUAC:
  2904. if _locked {
  2905. x:=left+cWidth*189/192
  2906. y:=top+cHeight*7/120
  2907. }
  2908. else {
  2909. x:=A_ScreenWidth*189/192
  2910. y:=A_ScreenHeight*7/120
  2911. }
  2912. BlockInput,MouseMove
  2913. MouseGetPos, x0, y0
  2914. MouseMove,x,y
  2915. sleep,1
  2916. Click
  2917. Send {Click %x0%, %y0%, 0}
  2918. BlockInput,MouseMoveOff
  2919. return
  2920. SB:
  2921. if _locked {
  2922. x:=left+cWidth*1651/1680
  2923. y:=top+cHeight*0.06
  2924. }
  2925. else {
  2926. x:=A_ScreenWidth*1651/1680
  2927. y:=A_ScreenHeight*0.06
  2928. }
  2929. BlockInput,MouseMove
  2930. MouseGetPos, x0, y0
  2931. SendPlay, {Click %x%, %y%, 0}
  2932. Click
  2933. SendPlay, {Click %x0%, %y0%, 0}
  2934. BlockInput,MouseMoveOff
  2935. return
  2936.  
  2937. ShareControl:
  2938. BlockInput, On
  2939. MouseGetPos, x0, y0
  2940. if _locked
  2941. {
  2942. xShare:=left+cWidth*0.6
  2943. y1Share:=top+cHeight*0.2
  2944. y2Share:=top+cHeight*0.25
  2945. y3Share:=top+cHeight*0.3
  2946. y4Share:=top+cHeight*0.345
  2947. y5Share:=top+cHeight*0.39
  2948. y6Share:=top+cHeight*0.435
  2949. y7Share:=top+cHeight*0.482
  2950. y8Share:=top+cHeight*0.527
  2951. y9Share:=top+cHeight*0.574
  2952. }
  2953. else
  2954. {
  2955. xShare:=A_ScreenWidth*0.6
  2956. y1Share:=A_ScreenHeight*0.2
  2957. y2Share:=A_ScreenHeight*0.25
  2958. y3Share:=A_ScreenHeight*0.3
  2959. y4Share:=A_ScreenHeight*0.345
  2960. y5Share:=A_ScreenHeight*0.39
  2961. y6Share:=A_ScreenHeight*0.435
  2962. y7Share:=A_ScreenHeight*0.482
  2963. y8Share:=A_ScreenHeight*0.527
  2964. y9Share:=A_ScreenHeight*0.574
  2965. }
  2966. send {vk7A}
  2967. Sleep, 100
  2968. if UAC {
  2969. MouseMove,xShare,y1Share
  2970. Sleep 100
  2971. Click
  2972. MouseMove,xShare,y2Share
  2973. Sleep 100
  2974. Click
  2975. MouseMove,xShare,y3Share
  2976. Sleep 100
  2977. Click
  2978. MouseMove,xShare,y4Share
  2979. Sleep 100
  2980. Click
  2981. MouseMove,xShare,y5Share
  2982. Sleep 100
  2983. Click
  2984. MouseMove,xShare,y6Share
  2985. Sleep 100
  2986. Click
  2987. MouseMove,xShare,y7Share
  2988. Sleep 100
  2989. Click
  2990. MouseMove,xShare,y8Share
  2991. Sleep 100
  2992. Click
  2993. MouseMove,xShare,y9Share
  2994. Sleep 100
  2995. Click
  2996. }
  2997. else {
  2998. Send {Click %xShare%, %y1Share%, 0}
  2999. Sleep 100
  3000. Click
  3001. Send {Click %xShare%, %y2Share%, 0}
  3002. Sleep 100
  3003. Click
  3004. Send {Click %xShare%, %y3Share%, 0}
  3005. Sleep 100
  3006. Click
  3007. Send {Click %xShare%, %y4Share%, 0}
  3008. Sleep 100
  3009. Click
  3010. Send {Click %xShare%, %y5Share%, 0}
  3011. Sleep 100
  3012. Click
  3013. Send {Click %xShare%, %y6Share%, 0}
  3014. Sleep 100
  3015. Click
  3016. Send {Click %xShare%, %y7Share%, 0}
  3017. Sleep 100
  3018. Click
  3019. Send {Click %xShare%, %y8Share%, 0}
  3020. Sleep 100
  3021. Click
  3022. Send {Click %xShare%, %y9Share%, 0}
  3023. Sleep 100
  3024. Click
  3025. }
  3026.  
  3027. Send {Enter}
  3028. Send {Click %x0%, %y0%, 0}
  3029. BlockInput, Off
  3030. return
  3031.  
  3032.  
  3033. ;********************************************OTHER*********************************
  3034. gIgnore:
  3035. squelch:="/squelch "
  3036. send {Enter}-hhn{Enter}
  3037. send {Enter}%squelch%
  3038. if !A_IsSuspended
  3039. {
  3040. if ScrollIndicator
  3041. SetScrollLockState, Off
  3042. }
  3043. return
  3044.  
  3045. GetHero:
  3046. send {vk70}{vk70}
  3047. return
  3048.  
  3049. Rosh:
  3050. if RoshDead
  3051. {
  3052. if A_Min<10
  3053. t:=10-A_Min-60+RoshTime
  3054. else
  3055. t:=10-A_Min+RoshTime
  3056. send {enter}Rosh will spawn in %t% mins {enter}
  3057. }
  3058. else
  3059. {
  3060. RoshTime:=A_Min
  3061. RoshDead:=1
  3062. SetTimer, RoshAnounce, 600000
  3063. send {enter}Press %Roshan% to view Roshan Info {enter}
  3064. }
  3065. return
  3066.  
  3067. RoshAnounce:
  3068. SetTimer, RoshAnounce, off
  3069. RoshDead:=0
  3070. ifWinActive, ahk_class Warcraft III
  3071. send {enter}Rosh has been spawned {enter}
  3072. return
  3073.  
  3074. TimeNow:
  3075. FormatTime, TimeString,, Time
  3076. send {enter}The current time is %TimeString%.{enter}
  3077. return
  3078.  
  3079. Switch:
  3080. suspend
  3081. ManualSuspend:=!ManualSuspend
  3082. if !A_IsSuspended
  3083. {
  3084. SetTimer, CheckWarcraft, on
  3085. if ScrollIndicator
  3086. SetScrollLockState, On
  3087. if Sound
  3088. soundplay, *48
  3089. }
  3090. Else
  3091. {
  3092. SetTimer, CheckWarcraft, off
  3093. if ScrollIndicator
  3094. SetScrollLockState, Off
  3095. if Sound
  3096. soundplay, *64
  3097. }
  3098. return
  3099.  
  3100.  
  3101. PauseGame:
  3102. send {vk79}{vk4D}{vk52}
  3103. return
  3104.  
  3105.  
  3106. CheckActiveWar3:
  3107. hWnd := WinActive("ahk_classWarcraft III")
  3108. if hWnd
  3109. {
  3110. SetTimer,CheckActiveWar3,Off
  3111. if GetWindowClientRect(hWnd,rect) && DllCall("ClipCursor","UInt",&rect)
  3112. {
  3113. _locked := 1
  3114. SetTimer,CheckInactiveWar3
  3115. }
  3116. else
  3117. SetTimer,CheckActiveWar3
  3118. }
  3119. Return
  3120.  
  3121. CheckInactiveWar3:
  3122. IfWinNotActive,ahk_id%hWnd%
  3123. {
  3124. SetTimer,CheckInactiveWar3,Off
  3125. if DllCall("ClipCursor")
  3126. {
  3127. _locked := 0
  3128. SetTimer,CheckActiveWar3
  3129. }
  3130. else
  3131. SetTimer,CheckInactiveWar3
  3132. }
  3133. Return
  3134.  
  3135. GetWindowClientRect(hWnd,ByRef rect)
  3136. {
  3137. if !hWnd
  3138. Return,0
  3139.  
  3140. VarSetCapacity(cRect,16)
  3141. if !DllCall("GetClientRect","UInt",hWnd,"UInt",&cRect)
  3142. Return,0
  3143.  
  3144. global cWidth := NumGet(cRect,8,"Int") - NumGet(cRect,0,"Int")
  3145. global cHeight := NumGet(cRect,12,"Int") - NumGet(cRect,4,"Int")
  3146.  
  3147. VarSetCapacity(rect,16)
  3148. if !DllCall("GetWindowRect","UInt",hWnd,"UInt",&rect)
  3149. Return,0
  3150.  
  3151. wWidth := NumGet(rect,8,"Int") - NumGet(rect,0,"Int")
  3152. margin := (wWidth - cWidth)//2
  3153.  
  3154. NumPut(NumGet(rect,8,"Int") - margin,rect,8,"Int")
  3155. NumPut(NumGet(rect,12,"Int") - margin,rect,12,"Int")
  3156. NumPut(NumGet(rect,8,"Int") - cWidth,rect,0,"Int")
  3157. NumPut(NumGet(rect,12,"Int") - cHeight,rect,4,"Int")
  3158.  
  3159. global left := NumGet(rect,0,"Int")
  3160. global top := NumGet(rect,4,"Int")
  3161.  
  3162. Return,1
  3163. }
  3164.  
  3165. GarenaJoiner:
  3166. ifWinActive, Warcraft III ahk_class Warcraft III
  3167. return
  3168. gojoin:=!gojoin
  3169. if gojoin
  3170. {
  3171. gosub, autojoin
  3172. sleep 100
  3173. SetTimer, autojoin, 5010
  3174. }
  3175. else
  3176. {
  3177. ToolTip
  3178. SetTimer, autojoin, off
  3179. }
  3180. return
  3181.  
  3182. autojoin:
  3183. ToolTip, GarenaJoiner is active
  3184. send, {click 2}
  3185. sleep, 2000
  3186. send {space}
  3187. return
  3188.  
  3189.  
  3190. AHPST:
  3191. ifWinActive, ahk_class Warcraft III
  3192. {
  3193. if !A_IsSuspended {
  3194. Send, {[ Down}
  3195. AHealthBarOn := 1
  3196. }
  3197. }
  3198. return
  3199.  
  3200. EHPST:
  3201. ifWinActive, ahk_class Warcraft III
  3202. {
  3203. if !A_IsSuspended {
  3204. Send, {] Down}
  3205. EHealthBarOn := 1
  3206. }
  3207. }
  3208. return
  3209.  
  3210. ShowAHP:
  3211. If AHealthBarOn
  3212. Send {VKDB Up}
  3213. Else
  3214. Send {VKDB Down}
  3215. AHealthBarOn:=!AHealthBarOn
  3216. Return
  3217.  
  3218. ShowEHP:
  3219. If EHealthBarOn
  3220. Send, {VKDD Up}
  3221. Else
  3222. Send, {VKDD Down}
  3223. EHealthBarOn:=!EHealthBarOn
  3224. Return
  3225.  
  3226. ReloadScript:
  3227. reload
  3228. return
  3229.  
  3230. krv1:
  3231. krv2:
  3232. krv3:
  3233. krv4:
  3234. krv5:
  3235. krv6:
  3236. krv7:
  3237. krv8:
  3238. krv9:
  3239. krv10:
  3240. krv11:
  3241. krv12:
  3242. krv13:
  3243. krv14:
  3244. krv15:
  3245. krv16:
  3246. krv17:
  3247. krv18:
  3248. krv19:
  3249. krv20:
  3250. krv21:
  3251. krv22:
  3252. krv23:
  3253. krv24:
  3254. krv25:
  3255. krv26:
  3256. krv27:
  3257. krv28:
  3258. krv29:
  3259. krv30:
  3260. krv31:
  3261. krv32:
  3262. krv33:
  3263. krv34:
  3264. krv35:
  3265.  
  3266. v:=% %A_ThisLabel%
  3267. v:=VK(v)
  3268.  
  3269. if v {
  3270. send {%v%}
  3271. }
  3272. return
  3273.  
  3274.  
  3275. VK(Param)
  3276. {
  3277. global
  3278. if InStr(Param,"[")
  3279. return % RegExReplace(Param, "\[$", "VKDB")
  3280. if InStr(Param,"]")
  3281. return % RegExReplace(Param, "\]$", "VKDD")
  3282. if InStr(Param,"\")
  3283. return % RegExReplace(Param, "\\$", "VKDC")
  3284. if InStr(Param,",")
  3285. return % RegExReplace(Param, "\,$", "VKBC")
  3286. if InStr(Param,".")
  3287. return % RegExReplace(Param, "\.$", "VKBE")
  3288. if InStr(Param,"/")
  3289. return % RegExReplace(Param, "\/$", "VKBF")
  3290. Hotkey:=RegExReplace(Param, "[\^\!\+\#]+(.*)", "$1")
  3291. If StrLen(Hotkey) > 1
  3292. return Param
  3293. Loop, parse, HK_LIST, CSV
  3294. If (Hotkey = A_LoopField)
  3295. {
  3296. Index := A_Index
  3297. Loop, parse, VK_LIST, CSV
  3298. If (A_Index = Index)
  3299. return % RegExReplace(Param, "(.*)" Hotkey, "$1" A_LoopField)
  3300. }
  3301. }
  3302.  
  3303. EmptyMem(PID="AHT v2.9"){
  3304. pid:=(pid="AHT v2.9") ? DllCall("GetCurrentProcessId") : pid
  3305. h:=DllCall("OpenProcess", "UInt", 0x001F0FFF, "Int", 0, "Int", pid)
  3306. DllCall("SetProcessWorkingSetSize", "UInt", h, "Int", -1, "Int", -1)
  3307. DllCall("CloseHandle", "Int", h)
  3308. }
  3309.  
  3310.  
  3311.  
  3312.  
  3313. CheckWarcraft:
  3314. Log("Checking Warcraft III")
  3315. IfWinNotExist, ahk_class Warcraft III
  3316. Return
  3317. SetTimer, CheckWarcraft, Off
  3318. Log("Warcraft III found. Waiting 5 seconds...")
  3319. Sleep, 5000
  3320. IfWinExist, ahk_class Warcraft III
  3321. {
  3322. WinGet, pid, PID
  3323. Log("Warcraft III still found")
  3324. if hWar3Proc > 0
  3325. DllCall("CloseHandle", "UInt", hWar3Proc)
  3326. hWar3Proc := DllCall("OpenProcess", "UInt", 0x0010 | 0x0400, "Int", 0, "UInt", pid)
  3327. if (hWar3Proc = 0 || ErrorLevel)
  3328. {
  3329. Log("Failed to open war3 process with code: " . A_LastError)
  3330. SetTimer, CheckWarcraft, On
  3331. Return
  3332. }
  3333. chatAddr := GetChatAddr(pid)
  3334. if (chatAddr < 0)
  3335. {
  3336. Log("Failed to get chat address")
  3337. if (chatAddr = -1)
  3338. SetTimer, CheckWarcraft, On
  3339. Return
  3340. }
  3341. Log("Got chat address: " . chatAddr)
  3342. SetTimer, CheckChatting, 100
  3343. }
  3344. else
  3345. {
  3346. Log("Warcraft III no longer found")
  3347. SetTimer, CheckWarcraft, On
  3348. }
  3349. Return
  3350.  
  3351. GetChatAddr(pid)
  3352. {
  3353. hSnapshot := DllCall("CreateToolhelp32Snapshot", "UInt", 0x08, "UInt", pid)
  3354. if (hSnapshot < 0 || ErrorLevel)
  3355. {
  3356. Log("Failed to take module snapshot with code: " . A_LastError)
  3357. Return -2
  3358. }
  3359.  
  3360. VarSetCapacity(me32, 548)
  3361. NumPut(548, me32)
  3362.  
  3363. if DllCall("Module32First", "UInt", hSnapshot, "UInt", &me32)
  3364. {
  3365. VarSetCapacity(szModule, 256)
  3366.  
  3367. Loop
  3368. {
  3369. DllCall("RtlMoveMemory", "Str", szModule, "UInt", &me32 + 32, "UInt", 256)
  3370. Log("Found module: " . szModule)
  3371. if (szModule = "Game.dll")
  3372. {
  3373. DllCall("CloseHandle", "UInt", hSnapshot)
  3374.  
  3375. VarSetCapacity(szExePath, 260)
  3376. DllCall("RtlMoveMemory", "Str", szExePath, "UInt", &me32 + 288, "UInt", 260)
  3377. Log("Path of game.dll: " . szExePath)
  3378.  
  3379. FileGetVersion,version,%szExePath%
  3380. if (InStr(version, "1.24."))
  3381. offset := 0xAE8450
  3382. else if (version = "1.26.0.6401")
  3383. offset := 0xAD15F0
  3384. ;else if (version = "1.27.0.52240")// dont wanna do exac match if new patch will be and offset will be the same
  3385. else if (InStr(version, "1.27."))
  3386. offset := 0xBDAA14
  3387. else
  3388. {
  3389. Log("Warcraft III version: " . version . " is not supported")
  3390. Return -2
  3391. }
  3392. Return NumGet(me32, 20, "UInt") + offset
  3393. }
  3394.  
  3395. if !DllCall("Module32Next", "UInt", hSnapshot, "UInt", &me32)
  3396. Break
  3397. }
  3398. }
  3399.  
  3400. DllCall("CloseHandle", "UInt", hSnapshot)
  3401. Log("game.dll was not found")
  3402. Return -1
  3403. }
  3404.  
  3405. CheckChatting:
  3406. if ManualSuspend
  3407. return
  3408. if ReadChatState(hWar3Proc, chatAddr, chatState)
  3409. {
  3410. if chatState
  3411. Suspend, On
  3412. else
  3413. Suspend, Off
  3414. }
  3415. else
  3416. {
  3417. SetTimer, CheckChatting, Off
  3418. DllCall("CloseHandle", "UInt", hWar3Proc)
  3419. hWar3Proc := 0
  3420. SetTimer, CheckWarcraft, On
  3421. Suspend, Off
  3422. }
  3423. Return
  3424.  
  3425. ReadChatState(handle, chatAddr, ByRef chatState)
  3426. {
  3427. if (DllCall("ReadProcessMemory", "UInt", handle, "UInt", chatAddr, "UInt*", chatState, "UInt", 4, "UInt", 0) = 0 || ErrorLevel)
  3428. {
  3429. Log("Can not read memory location: " . chatAddr . ". Last chat state: " . chatState)
  3430. Return 0
  3431. }
  3432. Return 1
  3433. }
  3434.  
  3435. DebugPrivilegesEnable()
  3436. {
  3437. Log("In DebugPrivilegesEnable")
  3438. Process, Exist ; sets ErrorLevel to the PID of this running script
  3439. ; Get the handle of this script with PROCESS_QUERY_INFORMATION (0x0400)
  3440. h := DllCall("OpenProcess", "UInt", 0x0400, "Int", false, "UInt", ErrorLevel)
  3441. if (!h || ErrorLevel)
  3442. Log("OpenProcess failed with code: " . A_LastError)
  3443. ; Open an adjustable access token with this process (TOKEN_ADJUST_PRIVILEGES = 32)
  3444. success := DllCall("Advapi32.dll\OpenProcessToken", "UInt", h, "UInt", 32, "UIntP", t)
  3445. if (!success || ErrorLevel)
  3446. Log("OpenProcessToken failed with code: " . A_LastError)
  3447. VarSetCapacity(ti, 16, 0) ; structure of privileges
  3448. NumPut(1, ti, 0) ; one entry in the privileges array...
  3449. ; Retrieves the locally unique identifier of the debug privilege:
  3450. sucecss := DllCall("Advapi32.dll\LookupPrivilegeValueA", "UInt", 0, "Str", "SeDebugPrivilege", "Int64P", luid)
  3451. if (!success || ErrorLevel)
  3452. Log("LookupPrivilegeValue failed with code: " . A_LastError)
  3453. NumPut(luid, ti, 4, "int64")
  3454. NumPut(2, ti, 12) ; enable this privilege: SE_PRIVILEGE_ENABLED = 2
  3455. ; Update the privileges of this process with the new access token:
  3456. success := DllCall("Advapi32.dll\AdjustTokenPrivileges", "UInt", t, "Int", false, "UInt", &ti, "UInt", 0, "UInt", 0, "UInt", 0)
  3457. if (!success || ErrorLevel)
  3458. Log("AdjustTokenPrivileges failed with code: " . A_LastError)
  3459. else
  3460. Log("AdjustTokenPrivileges succeeded with code: " . A_LastError)
  3461. DllCall("CloseHandle", "UInt", h) ; close this process handle to save memory
  3462. }
Advertisement
Add Comment
Please, Sign In to add comment