Page 1 of 1

Diablo Smash v1

Posted: 06 Feb 2020, 17:46
by Ruevil2
So I was bored and decided to play some Diablo 3 which prompted digging up this little tool for the game. Is really helpful
with keeping the hand and wrist strain down in that insanely clicky game. Really this could be pretty generally applied to
any game that requires regular button mashing.

Controls are explained in the comments.

Code: Select all

;Script created by Ruevil
;2018-03-25

#IfWinActive, Diablo III	;Make sure key smashing only works inside the game
SetTimer, Smash, 1000		;Interval to smash keys, lower this number to smash faster

ent := 1					;Set state of Enter key variable for stopping smash while chatting

^1::t1 := !t1				;Ctrl+1 through Ctrl+4 turn on and off smashing for the
^2::t2 := !t2				;corresponding spell 1-4.
^3::t3 := !t3
^4::t4 := !t4

~t::						;Turn off smashing when town portal is activated
	t1 := 0, t2 := 0, t3 := 0, t4 := 0
Return

~Enter::					;Pause smashing for typing into the chat
	If ent 					;(first press) - Save state to temp var and turn off skills
		t1t := t1, t1 := 0, t2t := t2, t2 := 0, t3t := t3, t3 := 0, t4t := t4, t4 := 0
	Else 					;(second press) - reset state from temp vars and set temps to zero
		t1 := t1t, t1t := 0, t2 := t2t, t2t := 0, t3 := t3t, t3t := 0, t4 := t4t, t4t := 0
	ent := !ent				;Toggle state variable
return

Smash: 						;Timer for smashing keys
	If t1
		Send 1
	If t2
		Send 2
	If t3
		Send 3
	If t4
		Send 4
Return

/*
~LButton::					;Uncomment this to turn left click into a 'hold down' instead of furiously clicking, I prefer the scroll trick
							;as this makes it very difficult to click some npcs, change gear, etc...
	While GetKeyState("LButton", "P") && WinActive("Diablo III")
	{
		MouseClick
		Sleep, 75
	}
return
*/

Re: Diablo Smash v1

Posted: 08 Mar 2020, 12:31
by Hajin
Thanks, with this script i think i found a way to use my "buffs" automatically in the torchlight 2 game (i was too lazy to look for a way in the help file).
I made a similar script on this topic:
viewtopic.php?f=19&t=73317

Re: Diablo Smash v1

Posted: 23 Mar 2020, 02:03
by Lystig
Nice stuff.

What is the "scroll trick" that is mentioned in the code comments?

Re: Diablo Smash v1

Posted: 23 Mar 2020, 07:53
by Ruevil2
Lystig wrote:
23 Mar 2020, 02:03
Nice stuff.

What is the "scroll trick" that is mentioned in the code comments?
In D3 there is a trick for relieving some of the constant clicking involved in the game. If you bind 'force move' to scroll up and scroll down in the settings then you can just roll the scroll back and forth to move instead of clicking. It is much easier on the hands.

Check here for a little more info on it. https://www.youtube.com/watch?v=wCk24bueIkM

Re: Diablo Smash v1

Posted: 30 Dec 2021, 14:44
by erikurruti
Hi, and how do I use that Script?, do I have to download it and change the extension name?, or is there a way to add it to AutoHotKey. Thanks @Ruevil2 and @Hajin