Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #SingleInstance Force
- SetTitleMatchMode, 3
- #Persistent
- #KeyHistory, 0
- #HotKeyInterval 1
- #MaxHotkeysPerInterval 127
- #MaxMem 5
- SetKeyDelay,-1, 8
- SetControlDelay, -1
- SetMouseDelay, -1
- SetWinDelay,-1
- CastHeroic=0
- Heroicstrike = 2
- heroicstrikecancel = 0
- cleave = {WheelUp}
- Iniread, Swingstartx, %A_ScriptDir%\settings.ini, Swingtimer, Swingstartx
- Iniread, Swingstarty, %A_ScriptDir%\settings.ini, Swingtimer, Swingstarty
- Iniread, Swingcolor, %A_ScriptDir%\settings.ini, Swingtimer, Swingcolor
- Iniread, Swingendx, %A_ScriptDir%\settings.ini, Swingtimer, Swingendx
- Iniread, Swingendy, %A_ScriptDir%\settings.ini, Swingtimer, Swingendy
- Iniread, ragex, %A_ScriptDir%\settings.ini, Swingtimer, ragex
- Iniread, ragey, %A_ScriptDir%\settings.ini, Swingtimer, ragey
- Iniread, ragecolor, %A_ScriptDir%\settings.ini, Swingtimer, ragecolor
- Gui, add, button,, Settings
- gui, add, edit, readonly w200 h200 vdebug,
- gui,show
- gui +AlwaysOnTop
- return
- ButtonSettings:
- gui,submit,nohide
- WinActivate, World of Warcraft
- WinWaitActive, World of Warcraft
- Tooltip, Left click on the beginning of swingtimer WHEN color IS solid
- KeyWait, LButton, D
- KeyWait, LButton, U
- Mousegetpos, Swingstartx, SwingstartY
- PixelGetColor, Swingcolor, Swingstartx, SwingstartY
- Tooltip, Left click on the end of swingtimer
- KeyWait, LButton, D
- KeyWait, LButton, U
- Mousegetpos, Swingendx, SwingendY
- Tooltip, Left click on the rage bar were you want heroic strike to trigger. (WHEN you have enough rage)
- KeyWait, LButton, D
- KeyWait, LButton, U
- Mousegetpos, ragex, ragey
- PixelGetColor, ragecolor, ragex, ragey
- Tooltip
- Msgbox completed!
- IniWrite, %Swingstartx%, %A_ScriptDir%\settings.ini, Swingtimer, Swingstartx
- IniWrite, %Swingstarty%, %A_ScriptDir%\settings.ini, Swingtimer, Swingstarty
- IniWrite, %Swingcolor%, %A_ScriptDir%\settings.ini, Swingtimer, Swingcolor
- IniWrite, %Swingendx%, %A_ScriptDir%\settings.ini, Swingtimer, Swingendx
- IniWrite, %Swingendy%, %A_ScriptDir%\settings.ini, Swingtimer, Swingendy
- IniWrite, %ragex%, %A_ScriptDir%\settings.ini, Swingtimer, ragex
- IniWrite, %ragey%, %A_ScriptDir%\settings.ini, Swingtimer, ragey
- IniWrite, %ragecolor%, %A_ScriptDir%\settings.ini, Swingtimer, ragecolor
- return
- ~$2::
- CastHeroic = 1
- CastCleave = 0
- return
- ~$F::
- CastHeroic = 1
- CastCleave = 0
- return
- ~$WheelUp:
- CastCleave = 1
- CastHeroic = 0
- return
- ~$|::
- Gui,submit,nohide
- If Active=1
- {
- Settimer, AutoAttack, Off
- Active=0
- }
- else
- {
- settimer, AutoAttack, 50
- Active=1
- }
- return
- AutoAttack:
- Var+=1
- PixelGetColor, Color, Swingstartx, Swingstarty
- If Color = %Swingcolor%
- SwingStart=1
- else
- SwingStart=0
- PixelGetColor, Color, Swingendx, Swingendy
- If Color = %Swingcolor%
- SwingEnd=1
- Else
- SwingEnd=0
- PixelGetColor, Color, ragex, ragey
- If Color = %ragecolor%
- Rage=1
- Else
- Rage=0
- Guicontrol,,debug, SwingStart = %SwingStart%`Swingend = %Swingend%`nEnough rage = %Rage%`nCasting heroic = %CastHeroic%
- ; Start heroic
- If Castcleave = 0
- If Var = 1
- If Rage = 1
- If SwingStart = 1
- If SwingEnd = 0
- Controlsend,, %heroicstrike%, World of Warcraft
- If SwingStart = 1
- If SwingEnd = 1
- If CastHeroic = 0
- If Castcleave = 0
- Controlsend,, %heroicstrikecancel%, World of Warcraft
- If SwingStart = 0
- {
- Castcleave = 0
- CastHeroic = 0
- }
- If var = 2
- Var = 1
- return
- GuiClose:
- F12::
- Exitapp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement