Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Button = "!{0}" ;alt+0 initiates swap
- $title = "Diablo III - Gear Switcher"
- $win_title = "Diablo III"
- Global $Paused
- HotKeySet("{PAUSE}", "TogglePause")
- HotKeySet("+{PAUSE}", "RequestEnd")
- func RequestEnd()
- Exit
- endfunc
- func switchGear()
- if WinActive($win_title) then
- $StartPos = MouseGetPos()
- ; this is for 1920*1080 res
- Send("{i}")
- MouseClick ( "right", 1725, 730, 1, 0 )
- MouseClick ( "right", 1725, 825, 1, 0 )
- ; 0
- MouseClick ( "right", 1775, 816, 1, 0 )
- MouseClick ( "right", 1775, 725, 1, 0 )
- MouseClick ( "right", 1775, 633, 1, 0 )
- ; 0
- MouseClick ( "right", 1825, 610, 1, 0 )
- MouseClick ( "right", 1825, 650, 1, 0 )
- MouseClick ( "right", 1825, 725, 1, 0 )
- MouseClick ( "right", 1825, 825, 1, 0 )
- ; 0
- MouseClick ( "right", 1875, 825, 1, 0 )
- MouseClick ( "right", 1875, 725, 1, 0 )
- MouseClick ( "right", 1875, 650, 1, 0 )
- ; 0
- Send("{ALT DOWN}"); 0
- ;sleep(100)
- MouseClick ( "right", 1875, 605, 1, 0 )
- ;sleep(100)
- Send("{ALT UP}")
- Send("{i}")
- MouseMove($StartPos[0], $StartPos[1], 0)
- endif
- endfunc
- if not WinExists($win_title, "") then
- MsgBox(0, $title, $win_title & " window must be open.")
- Exit
- endif
- func TogglePause()
- $Paused = NOT $Paused
- while $Paused
- sleep(100)
- HotKeySet($Button)
- ToolTip($title & ' is "Paused"',0,0)
- wend
- HotKeySet($Button, "switchGear")
- ToolTip("")
- endfunc
- while 1
- Sleep(1)
- if WinActive($win_title) then
- HotKeySet($Button, "switchGear")
- else
- HotKeySet($Button)
- endif
- wend
Add Comment
Please, Sign In to add comment