Problems with diablo 3 script

Ask gaming related questions (AHK v1.1 and older)
WturboM
Posts: 5
Joined: 05 Jun 2019, 11:03

Problems with diablo 3 script

05 Jun 2019, 11:36

Hello,

autohotkey is great for gaming. I am using this code here for diablo 3 and it worked great, i have used it for a long time. But since last month i have some problems and i don't understand why.

Code: Select all

~*Numpad1::
Sleep, 670
Send {Blind}{RButton Down}
Sleep, 1200
Send {Blind}{RButton Up}
Return
#::ExitApp ; schließt das Skript bei Drücken von Win (="#")
The Code is not working like before, i did not change anything, the only thing what seems different is that the game isn't running so good like before, i have many lags and a high ping. But when the ping is lower the result is the same. I have changed the code a bit the result is now better but i am still wondering why its not always the same. I mean: It looks like the code isn't always running in the same way, is there any delay time on it? I don't understand this, when i run it for example 10 times, then its working ... about 8 times.

The changed code is here: i have added the Numpad2, it should be kept pressed all the time, in the other code i have pressed the key by myself, why isn't the result the same?

Code: Select all

~*Numpad1::
Sleep, 100
Send {Numpad2 Down}
Sleep, 570
Send {Numpad2 Up}
Send {Blind}{RButton Down}
Sleep, 1200
Send {Blind}{RButton Up}
Return
#::ExitApp ; schließt das Skript bei Drücken von Win (="#")
I would be thankful for any help,

regards
TurboM

[Mod edit: Topic name added]
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Problems with diablo 3 script

10 Jun 2019, 15:09

try this

Code: Select all

if Not A_IsAdmin AND A_OSVersion <> WIN_XP
{
	Run *RunAs "%A_ScriptFullPath%"
	ExitApp
}
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
SetWorkingDir %A_ScriptDir%
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input

~*Numpad1::
DllCall("Sleep",UInt,670)
Send {Blind}{RButton Down}
DllCall("Sleep",UInt,1200)
Send {Blind}{RButton Up}
Return
#::ExitApp ; schließt das Skript bei Drücken von Win (="#")

:wave: There is always more than one way to solve a problem. ;)
WturboM
Posts: 5
Joined: 05 Jun 2019, 11:03

Re: Problems with diablo 3 script

12 Jun 2019, 12:45

I am playing the wizard in diablo 3, its for the skill starpact. I don't know if you play this game. Thanks for the code but the result is still the same. Sometimes, my wizard is standing still and doing nothing and sometimes he is casting his spell (electrocute Numpad2). I wonder if blizzard has done something against autohotkey user, some kind of software which blocks it ... i don't know
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Problems with diablo 3 script

12 Jun 2019, 12:54

try this

Code: Select all

if Not A_IsAdmin AND A_OSVersion <> WIN_XP
{
	Run *RunAs "%A_ScriptFullPath%"
	ExitApp
}
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
SetWorkingDir %A_ScriptDir%
ListLines Off
Process, Priority, , A
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input

*~Numpad1::
DllCall("Sleep",UInt,670)
Send {Blind}{RButton Down}
DllCall("Sleep",UInt,1200)
Send {Blind}{RButton Up}
Return
#::ExitApp ; schließt das Skript bei Drücken von Win (="#")
:wave: There is always more than one way to solve a problem. ;)
WturboM
Posts: 5
Joined: 05 Jun 2019, 11:03

Re: Problems with diablo 3 script

12 Jun 2019, 13:04

It's the same? I will try it again ...

Edit: sometimes working ... sometimes not .. different results .. i don't understand why my wizard is standing still sometimes (he is standing still when i press mouse right click to fast after pressing Numpad1 (for that reason sleep 670)
WturboM
Posts: 5
Joined: 05 Jun 2019, 11:03

Re: Problems with diablo 3 script

14 Jun 2019, 13:12

Hello,

i have tried something and i have a better code now can you tell me why the RButton (mouse right) will not be pressed?

Code: Select all

~*Numpad1:: Send,{Numpad2 down}
if (getkeystate("Numpad2"))
{
	Send,{Numpad2 up}
	Sleep, 700
	Send, {RButton Down}
	Sleep, 1200
	Send, {RButton Up}
}
        return
User avatar
PipeDreams
Posts: 165
Joined: 19 Dec 2015, 00:20

Re: Problems with diablo 3 script

16 Jun 2019, 22:19

Blizzard doesn't make anything to intermittently break AHK, it will either work or it will not. I think your machine may need maintenance, or perhaps a freshly installed version of windows.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Problems with diablo 3 script

17 Jun 2019, 02:18

Code: Select all

~*Numpad1:: Send,{Numpad2 down}    ; <----------hotkey one liner code below does not run!
if (getkeystate("Numpad2"))
{
	Send,{Numpad2 up}
	Sleep, 700
	Send, {RButton Down}
	Sleep, 1200
	Send, {RButton Up}
}
        return
The logic of sending Numpad2 down and then checking if its down and then sending it up doesnt make sense but hey its your script.

HTH
Newbie_101
Posts: 4
Joined: 20 Jun 2019, 16:52

Re: Problems with diablo 3 script

20 Jun 2019, 17:03

Xtra wrote:
17 Jun 2019, 02:18

Code: Select all

~*Numpad1:: Send,{Numpad2 down}    ; <----------hotkey one liner code below does not run!
if (getkeystate("Numpad2"))
{
	Send,{Numpad2 up}
	Sleep, 700
	Send, {RButton Down}
	Sleep, 1200
	Send, {RButton Up}
}
        return
The logic of sending Numpad2 down and then checking if its down and then sending it up doesnt make sense but hey its your script.

HTH
I think I know why he checks for it. By pressing a numpad key then turning off Numlk, the key stays down.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Shoobis and 74 guests