Guest User

Untitled

a guest
Aug 19th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. $Button = "!{0}" ;alt+0 initiates swap
  2.  
  3. $title = "Diablo III - Gear Switcher"
  4. $win_title = "Diablo III"
  5.  
  6. Global $Paused
  7. HotKeySet("{PAUSE}", "TogglePause")
  8. HotKeySet("+{PAUSE}", "RequestEnd")
  9.  
  10. func RequestEnd()
  11. Exit
  12. endfunc
  13.  
  14. func switchGear()
  15. if WinActive($win_title) then
  16. $StartPos = MouseGetPos()
  17. ; this is for 1920*1080 res
  18. Send("{i}")
  19. MouseClick ( "right", 1725, 730, 1, 0 )
  20. MouseClick ( "right", 1725, 825, 1, 0 )
  21. ; 0
  22. MouseClick ( "right", 1775, 816, 1, 0 )
  23. MouseClick ( "right", 1775, 725, 1, 0 )
  24. MouseClick ( "right", 1775, 633, 1, 0 )
  25. ; 0
  26. MouseClick ( "right", 1825, 610, 1, 0 )
  27. MouseClick ( "right", 1825, 650, 1, 0 )
  28. MouseClick ( "right", 1825, 725, 1, 0 )
  29. MouseClick ( "right", 1825, 825, 1, 0 )
  30. ; 0
  31. MouseClick ( "right", 1875, 825, 1, 0 )
  32. MouseClick ( "right", 1875, 725, 1, 0 )
  33. MouseClick ( "right", 1875, 650, 1, 0 )
  34. ; 0
  35. Send("{ALT DOWN}"); 0
  36. ;sleep(100)
  37. MouseClick ( "right", 1875, 605, 1, 0 )
  38. ;sleep(100)
  39. Send("{ALT UP}")
  40.  
  41. Send("{i}")
  42.  
  43. MouseMove($StartPos[0], $StartPos[1], 0)
  44. endif
  45. endfunc
  46.  
  47. if not WinExists($win_title, "") then
  48. MsgBox(0, $title, $win_title & " window must be open.")
  49. Exit
  50. endif
  51.  
  52. func TogglePause()
  53. $Paused = NOT $Paused
  54. while $Paused
  55. sleep(100)
  56. HotKeySet($Button)
  57. ToolTip($title & ' is "Paused"',0,0)
  58. wend
  59. HotKeySet($Button, "switchGear")
  60. ToolTip("")
  61. endfunc
  62.  
  63.  
  64. while 1
  65. Sleep(1)
  66. if WinActive($win_title) then
  67. HotKeySet($Button, "switchGear")
  68. else
  69. HotKeySet($Button)
  70. endif
  71. wend
Add Comment
Please, Sign In to add comment