Strafe Locking (autohotkey)

Demon Hunter
I know a lot of people using the in-game numlock trick for Strafe locking. But for me, it's quite trouble to turn it on-off, or you need to use the mid-mouse button to force move.

So I've made a small script to turn Strafe( set it to key 2 ) toggle on/off. Hope that help if you're autohotkey users.


; initial setting
StrafeLocking :=1
StrafeStatus := 0
Send, {2 up}

; key2 is set to Strafe
$2::
IfWinActive Diablo III
{
If( StrafeLocking = 1 ){
If( StrafeStatus = 0 ){
Send, {2 down}
StrafeStatus = 1
}
Else If ( StrafeStatus = 1){
Send, {2 up}
StrafeStatus = 0
}
}
Else
{
Send, 2
}
}
Else{
Send, 2
}
Return
You've used StrafeLockingON in one place, and StrafeLocking elsewhere, is that a typo? I'm only vaguely familiar with ahk scripting, but I'm guessing that you want those variables to be the same.
I'm not so sure if ahk is allowed.
I vaguely remember people getting banned for using it during the CM wiz days.

When it comes to strafe however, I use the thumb button on my Performance MX as force move.
Yap typo, thx for pointing out, already corrected.

05/26/2015 07:07 PMPosted by Lion
I'm not so sure if ahk is allowed.
I vaguely remember people getting banned for using it during the CM wiz days.


It's a grey area. It's just a myth wiz get banned. Everyone played Wiz on Vanilla used it.

It's not really a game-cheating or breaking feather. Key locking is already here in-game. It's just using the autokey u can just press "2" instead of the "numlock+2" which is a little too trouble.
Sorry, I am not familiar with programming. Should I save that text to a .bat file and execute it?
^ nah, it's .ahk, I think... download and install AHK first, go from there
What about Mac OS X users like myself?
05/26/2015 07:07 PMPosted by Lion
I'm not so sure if ahk is allowed.
I vaguely remember people getting banned for using it during the CM wiz days.


I remember that zero people got banned for using ahk. Not to mention it's not detectable so there wouldn't be any way for blizzard to find it.
05/26/2015 08:28 PMPosted by DerfelCadarn
Sorry, I am not familiar with programming. Should I save that text to a .bat file and execute it?


Autohotkey is the commonest macro program for windows, just google "autohotkey" and you will find the website and tons of resources about that.

Just install it, make a new script. When you make a new script, there's a few "defualt" lines, just copy and paste my codes after that and save.

For autohotkey

; is the comment, the texts after that are for people to read, not for mechine
:: is where you set the hotkey, for my example $2:: meaning I set the key "2" to do the macro; if you want to set the macro to other key, for example F1, change "2" to "{F1}"(need to have the blanket)

05/26/2015 08:44 PMPosted by Gzip
What about Mac OS X users like myself?


Sorry, not a Mac user. ;p

and there's no mac version of autohotkey. there're some alternatives but as I've never used that so I won't suggest here.
just curious:
this script basicly only simulates you holding down the 2 key, right?
I thought people use numlock for prep and wolf.
05/27/2015 12:28 AMPosted by WildPants
just curious:
this script basicly only simulates you holding down the 2 key, right?


05/27/2015 12:36 AMPosted by Meltdown
I thought people use numlock for prep and wolf.


Yap, for holding down "2" key,

of cos you can do it with any other keys, the format is

{#somekeyhere# down} : press it down
{#somekeyhere# up} : relieve it

You can make it work with Left and Right mouse click, but it's easier to get messy so I won't recommand unless you know what you're doing.

{LButton down} and {LButton up} for mouse left-click
{RButton down} and {RButton up} for mouse right-click

So, for instant, if you want to have wolf and prep on auto-cast too, you can just add that


; initial setting
StrafeLocking :=1
StrafeStatus := 0
Send, {2 up}

; F1 is start locking the key 2, 3, 4
$F1::
IfWinActive Diablo III
{
If( StrafeLocking = 1 ){
If( StrafeStatus = 0 ){
Send, {2 down}
Send, {3 down}
Send, {4 down}
StrafeStatus = 1
}
Else If ( StrafeStatus = 1){
Send, {2 up}
Send, {3 up}
Send, {4 up}
StrafeStatus = 0
}
}
Else
{
Send, {F1}
}
}
Else{
Send, {F1}
}
Return



Notice:
1) the macro key is changed to "F1"
2) "2" is set to skill :Strafe; "3" is set to Wolf, "4" is set to Prep
05/27/2015 02:48 AMPosted by stefan
05/27/2015 12:28 AMPosted by WildPants
just curious:
this script basicly only simulates you holding down the 2 key, right?


05/27/2015 12:36 AMPosted by Meltdown
I thought people use numlock for prep and wolf.


Yap, for holding down "2" key,

of cos you can do it with any other keys, the format is

{#somekeyhere# down} : press it down
{#somekeyhere# up} : relieve it

You can make it work with Left and Right mouse click, but it's easier to get messy so I won't recommand unless you know what you're doing.

{LButton down} and {LButton up} for mouse left-click
{RButton down} and {RButton up} for mouse right-click

So, for instant, if you want to have wolf and prep on auto-cast too, you can just add that


; initial setting
StrafeLocking :=1
StrafeStatus := 0
Send, {2 up}

; F1 is start locking the key 2, 3, 4
$F1::
IfWinActive Diablo III
{
If( StrafeLocking = 1 ){
If( StrafeStatus = 0 ){
Send, {2 down}
Send, {3 down}
Send, {4 down}
StrafeStatus = 1
}
Else If ( StrafeStatus = 1){
Send, {2 up}
Send, {3 up}
Send, {4 up}
StrafeStatus = 0
}
}
Else
{
Send, {F1}
}
}
Else{
Send, {F1}
}
Return



Notice:
1) the macro key is changed to "F1"
2) "2" is set to skill :Strafe; "3" is set to Wolf, "4" is set to Prep


Likely a stupid question - with this since the script is essentially holding down strafe how is wolf and preperation auto cast? Wouldn't it not allow another input? Slightly confused by that part.
05/27/2015 09:07 AMPosted by HCGaist
Likely a stupid question - with this since the script is essentially holding down strafe how is wolf and preperation auto cast? Wouldn't it not allow another input? Slightly confused by that part.


When u holding down wolf/prep keys, they will cast when the cd are up (but you can't be moving). it's same when you do the numlocking trick with them.

Personally I don't do that as I use prep/punishment (not the disc regen rune) so I'd like to do it manually.
Big help, my wrists thank you.

Join the Conversation

Return to Forum