Advertisement
Guest User

Untitled

a guest
May 26th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1.  
  2. ; SWToggleKey -- Key that toggles SW spamming on/off (Default "*F1", read:F1
  3. ; key with any modifier)
  4. SWToggleKey1 := "4"
  5. SWToggleKey2 := "3"
  6. SWToggleKey3 := "2"
  7.  
  8. ; SWKey -- Key press to send when spamming is active, set to your Sweeping
  9. ; Wind key (Default "4")
  10. SWKey1 := "r"
  11. SWKey2 := "{RButton}"
  12. SWKey3 := "{LButton}"
  13.  
  14.  
  15.  
  16. ; LoopIntervalMin -- Minimum time in milliseconds between loops (Default 1000)
  17. ; NOTE: Strongly recommended you do not set this below 100
  18. LoopMinS := 30
  19. LoopMinL := 100
  20.  
  21. ; LoopIntervalMax -- Maximum time in milliseconds between loops (Default 1500)
  22. LoopMaxS := 50
  23. LoopMaxL := 150
  24.  
  25.  
  26. ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  27. ; !!!!!! DO NOT CHANGE ANYTHING BELOW THIS LINE !!!!!
  28. ; !!!!!! CHANGE VALUES IN CUSTOMIZING SECTION ABOVE !!!!!
  29. ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  30.  
  31. ; Limit scope of all hotkeys below to Diablo3 window
  32. #ifwinactive ahk_class D3 Main Window Class
  33. Hotkey, IfWinActive, ahk_class D3 Main Window Class
  34.  
  35. GoSub, Init1
  36. Return
  37.  
  38. ; Set everything up
  39. Init1:
  40. _EnableSW1 := False
  41. HotKey,%SWToggleKey1%,ToggleSW1
  42. _EnableSW2 := False
  43. HotKey,%SWToggleKey2%,ToggleSW2
  44. _EnableSW3 := False
  45. HotKey,%SWToggleKey3%,ToggleSW3
  46.  
  47. SetKeyDelay, 33, 0
  48. Return
  49.  
  50. ; SW enable/disable
  51. ToggleSW1:
  52. _EnableSW1 := !_EnableSW1
  53. If _EnableSW1 {
  54. SetTimer AutoLoop1, On
  55. }
  56.  
  57. Return
  58.  
  59. ToggleSW2:
  60. _EnableSW2 := !_EnableSW2
  61. If _EnableSW2 {
  62. SetTimer AutoLoop1, On
  63. }
  64.  
  65. Return
  66.  
  67. ToggleSW3:
  68. _EnableSW3 := !_EnableSW3
  69. If _EnableSW3 {
  70. SetTimer AutoLoop1, On
  71. }
  72.  
  73. Return
  74.  
  75. ; The actual spam loop
  76. AutoLoop1:
  77. While _EnableSW1
  78. {
  79. If WinActive("ahk_class D3 Main Window Class")
  80. {
  81. Send %SWKey1%
  82.  
  83. }
  84. If _EnableSW3
  85. {
  86. Send %SWKey3%
  87. }
  88. Random, random, %LoopMinL%, %LoopMaxL%
  89. Sleep %random%
  90. }
  91. While _EnableSW2
  92. {
  93. If WinActive("ahk_class D3 Main Window Class")
  94. {
  95. Send %SWKey2%
  96. }
  97. Random, random, %LoopMinS%, %LoopMaxS%
  98. Sleep %random%
  99. }
  100. While _EnableSW3
  101. {
  102. If WinActive("ahk_class D3 Main Window Class")
  103. {
  104. Send %SWKey3%
  105. }
  106. Random, random, %LoopMinS%, %LoopMaxS%
  107. Sleep %random%
  108. }
  109. Return
  110.  
  111.  
  112. F2::Suspend, toggle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement