Jump to content


Photo

[Works] D2 Diablo II key down for run script


  • Please log in to reply
1 reply to this topic

#1 CoreTwo

CoreTwo
  • Members
  • 23 posts

Posted 24 March 2012 - 12:11 AM

I wanted a key to toggle when pressed, so pressing once would keep it down, and pressing again would stop pressing down - the purpose to always-run in Diablo II, and here it is:

#IfWinActive, Diablo II   ; Only run if this window is active.
e::                                         ; e key pressed, else exits.
GetKeyState, state, F12           ; Right mouse button.
if state = D                             ; if F12 is down
    Send {F12 up}           ;     set it up.
else                               ; If F12 is up.
    Send {F12 down}       ;     set it down.
return

Maybe people would comment code more if not for this ^^ mess :)

#2 snoopy3612

snoopy3612
  • Members
  • 5 posts

Posted 06 April 2012 - 02:07 PM

i play DII too,and i think u can be banned for that :)