Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5. #SingleInstance Force
  6. SetTitleMatchMode, 3
  7.  
  8. #Persistent
  9. #KeyHistory, 0
  10. #HotKeyInterval 1
  11. #MaxHotkeysPerInterval 127
  12. #MaxMem 5
  13. SetKeyDelay,-1, 8
  14. SetControlDelay, -1
  15. SetMouseDelay, -1
  16. SetWinDelay,-1
  17.  
  18. CastHeroic=0
  19.  
  20. Heroicstrike = 2
  21. heroicstrikecancel = 0
  22. cleave = {WheelUp}
  23.  
  24.  
  25. Iniread, Swingstartx, %A_ScriptDir%\settings.ini, Swingtimer, Swingstartx
  26. Iniread, Swingstarty, %A_ScriptDir%\settings.ini, Swingtimer, Swingstarty
  27. Iniread, Swingcolor, %A_ScriptDir%\settings.ini, Swingtimer, Swingcolor
  28.  
  29. Iniread, Swingendx, %A_ScriptDir%\settings.ini, Swingtimer, Swingendx
  30. Iniread, Swingendy, %A_ScriptDir%\settings.ini, Swingtimer, Swingendy
  31.  
  32.  
  33. Iniread, ragex, %A_ScriptDir%\settings.ini, Swingtimer, ragex
  34. Iniread, ragey, %A_ScriptDir%\settings.ini, Swingtimer, ragey
  35. Iniread, ragecolor, %A_ScriptDir%\settings.ini, Swingtimer, ragecolor
  36.  
  37. Gui, add, button,, Settings
  38. gui, add, edit, readonly w200 h200 vdebug,
  39. gui,show
  40. gui +AlwaysOnTop
  41. return
  42.  
  43.  
  44. ButtonSettings:
  45. gui,submit,nohide
  46. WinActivate, World of Warcraft
  47. WinWaitActive, World of Warcraft
  48. Tooltip, Left click on the beginning of swingtimer WHEN color IS solid
  49. KeyWait, LButton, D
  50. KeyWait, LButton, U
  51. Mousegetpos, Swingstartx, SwingstartY
  52. PixelGetColor, Swingcolor, Swingstartx, SwingstartY
  53.  
  54. Tooltip, Left click on the end of swingtimer
  55. KeyWait, LButton, D
  56. KeyWait, LButton, U
  57. Mousegetpos, Swingendx, SwingendY
  58.  
  59.  
  60. Tooltip, Left click on the rage bar were you want heroic strike to trigger. (WHEN you have enough rage)
  61. KeyWait, LButton, D
  62. KeyWait, LButton, U
  63. Mousegetpos, ragex, ragey
  64. PixelGetColor, ragecolor, ragex, ragey
  65.  
  66. Tooltip
  67.  
  68. Msgbox completed!
  69.  
  70. IniWrite, %Swingstartx%, %A_ScriptDir%\settings.ini, Swingtimer, Swingstartx
  71. IniWrite, %Swingstarty%, %A_ScriptDir%\settings.ini, Swingtimer, Swingstarty
  72. IniWrite, %Swingcolor%, %A_ScriptDir%\settings.ini, Swingtimer, Swingcolor
  73.  
  74. IniWrite, %Swingendx%, %A_ScriptDir%\settings.ini, Swingtimer, Swingendx
  75. IniWrite, %Swingendy%, %A_ScriptDir%\settings.ini, Swingtimer, Swingendy
  76.  
  77.  
  78. IniWrite, %ragex%, %A_ScriptDir%\settings.ini, Swingtimer, ragex
  79. IniWrite, %ragey%, %A_ScriptDir%\settings.ini, Swingtimer, ragey
  80. IniWrite, %ragecolor%, %A_ScriptDir%\settings.ini, Swingtimer, ragecolor
  81. return
  82.  
  83. ~$2::
  84. CastHeroic = 1
  85. CastCleave = 0
  86. return
  87. ~$F::
  88. CastHeroic = 1
  89. CastCleave = 0
  90. return
  91.  
  92. ~$WheelUp:
  93. CastCleave = 1
  94. CastHeroic = 0
  95. return
  96.  
  97. ~$|::
  98. Gui,submit,nohide
  99. If Active=1
  100. {
  101. Settimer, AutoAttack, Off
  102. Active=0
  103. }
  104. else
  105. {
  106. settimer, AutoAttack, 50
  107. Active=1
  108. }
  109. return
  110.  
  111. AutoAttack:
  112. Var+=1
  113.  
  114. PixelGetColor, Color, Swingstartx, Swingstarty
  115. If Color = %Swingcolor%
  116. SwingStart=1
  117. else
  118. SwingStart=0
  119.  
  120. PixelGetColor, Color, Swingendx, Swingendy
  121. If Color = %Swingcolor%
  122. SwingEnd=1
  123. Else
  124. SwingEnd=0
  125.  
  126. PixelGetColor, Color, ragex, ragey
  127. If Color = %ragecolor%
  128. Rage=1
  129. Else
  130. Rage=0
  131.  
  132.  
  133. Guicontrol,,debug, SwingStart = %SwingStart%`Swingend = %Swingend%`nEnough rage = %Rage%`nCasting heroic = %CastHeroic%
  134.  
  135. ; Start heroic
  136. If Castcleave = 0
  137. If Var = 1
  138. If Rage = 1
  139. If SwingStart = 1
  140. If SwingEnd = 0
  141. Controlsend,, %heroicstrike%, World of Warcraft
  142.  
  143.  
  144. If SwingStart = 1
  145. If SwingEnd = 1
  146. If CastHeroic = 0
  147. If Castcleave = 0
  148. Controlsend,, %heroicstrikecancel%, World of Warcraft
  149.  
  150.  
  151. If SwingStart = 0
  152. {
  153. Castcleave = 0
  154. CastHeroic = 0
  155. }
  156.  
  157.  
  158. If var = 2
  159. Var = 1
  160. return
  161.  
  162. GuiClose:
  163. F12::
  164. Exitapp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement