Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Got a lot of ideas and code from
- ; a script by Valarauka
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #InstallKeybdHook ; Force install of keyboard hook
- SendMode Play ; Game-compatible input mode.
- Suspend On ;Start in suspended mode
- #IfWinActive, Warcraft III
- #UseHook On ; Force hotkeys to use keyboard hook
- *F5:: ;toggle hotkeys and do initial setup
- ;*~Enter:: ;Enter will also enable/disable script so you can chat easily
- Suspend
- GridSetup()
- if (A_IsSuspended)
- SoundPlay *64
- else
- SoundPlay *48
- return
- *F6:: ;; autosave
- Loop
- {
- Send {Enter}-save{Enter}
- Sleep 300000
- }
- return
- *F7:: ;; autoheal
- Loop
- {
- SetMouseDelay, 10, Play
- Send e
- Sleep 500
- ClickReturn(selfx, selfy) ;Click Self Portrait
- SetMouseDelay, -1, Play
- Sleep 25000
- }
- return
- *F8:: ;;Target Self
- SetMouseDelay, 10, Play
- ClickReturn(selfx, selfy) ;Click Self Portrait
- SetMouseDelay, -1, Play
- return
- ClickReturn(x, y) ;click then return mouse to original position
- {
- MouseGetPos, xpos, ypos
- if (GetKeyState("Alt")) ;Modifier button for right-click - can be changed to "Ctrl" etc.
- Send {Click %x%, %y%, R}
- else
- Send {Click %x%, %y%, L}
- MouseMove, %xpos%, %ypos%
- }
- GridSetup() ;set up the screen coords for clicking
- {
- global
- x1:=(510*A_ScreenWidth)//640
- x2:=(544*A_ScreenWidth)//640
- x3:=(578*A_ScreenWidth)//640
- x4:=(612*A_ScreenWidth)//640
- y1:=(390*A_ScreenHeight)//480
- y2:=(424*A_ScreenHeight)//480
- y3:=(458*A_ScreenHeight)//480
- sentinelx:=(13*A_ScreenWidth)//640 ;Sentinel fountain
- sentinely:=(467*A_ScreenHeight)//480
- scourgex:=(110*A_ScreenWidth)//640 ;Scourge fountain
- scourgey:=(374*A_ScreenHeight)//480
- selfx:=(200*A_ScreenWidth)//640
- selfy:=(420*A_ScreenHeight)//480
- }
Add Comment
Please, Sign In to add comment