Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; SWToggleKey -- Key that toggles SW spamming on/off (Default "*F1", read:F1
- ; key with any modifier)
- SWToggleKey1 := "4"
- SWToggleKey2 := "3"
- SWToggleKey3 := "2"
- ; SWKey -- Key press to send when spamming is active, set to your Sweeping
- ; Wind key (Default "4")
- SWKey1 := "r"
- SWKey2 := "{RButton}"
- SWKey3 := "{LButton}"
- ; LoopIntervalMin -- Minimum time in milliseconds between loops (Default 1000)
- ; NOTE: Strongly recommended you do not set this below 100
- LoopMinS := 30
- LoopMinL := 100
- ; LoopIntervalMax -- Maximum time in milliseconds between loops (Default 1500)
- LoopMaxS := 50
- LoopMaxL := 150
- ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ; !!!!!! DO NOT CHANGE ANYTHING BELOW THIS LINE !!!!!
- ; !!!!!! CHANGE VALUES IN CUSTOMIZING SECTION ABOVE !!!!!
- ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- ; Limit scope of all hotkeys below to Diablo3 window
- #ifwinactive ahk_class D3 Main Window Class
- Hotkey, IfWinActive, ahk_class D3 Main Window Class
- GoSub, Init1
- Return
- ; Set everything up
- Init1:
- _EnableSW1 := False
- HotKey,%SWToggleKey1%,ToggleSW1
- _EnableSW2 := False
- HotKey,%SWToggleKey2%,ToggleSW2
- _EnableSW3 := False
- HotKey,%SWToggleKey3%,ToggleSW3
- SetKeyDelay, 33, 0
- Return
- ; SW enable/disable
- ToggleSW1:
- _EnableSW1 := !_EnableSW1
- If _EnableSW1 {
- SetTimer AutoLoop1, On
- }
- Return
- ToggleSW2:
- _EnableSW2 := !_EnableSW2
- If _EnableSW2 {
- SetTimer AutoLoop1, On
- }
- Return
- ToggleSW3:
- _EnableSW3 := !_EnableSW3
- If _EnableSW3 {
- SetTimer AutoLoop1, On
- }
- Return
- ; The actual spam loop
- AutoLoop1:
- While _EnableSW1
- {
- If WinActive("ahk_class D3 Main Window Class")
- {
- Send %SWKey1%
- }
- If _EnableSW3
- {
- Send %SWKey3%
- }
- Random, random, %LoopMinL%, %LoopMaxL%
- Sleep %random%
- }
- While _EnableSW2
- {
- If WinActive("ahk_class D3 Main Window Class")
- {
- Send %SWKey2%
- }
- Random, random, %LoopMinS%, %LoopMaxS%
- Sleep %random%
- }
- While _EnableSW3
- {
- If WinActive("ahk_class D3 Main Window Class")
- {
- Send %SWKey3%
- }
- Random, random, %LoopMinS%, %LoopMaxS%
- Sleep %random%
- }
- Return
- F2::Suspend, toggle
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement