Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Diablo 3 spam script


Best Answer TakeNoPrisoners , 23 May 2012 - 11:11 AM

Go to the full post »


  • Please log in to reply
3 replies to this topic
V1P3R
  • Members
  • 28 posts
  • Last active: Jun 19 2018 12:13 PM
  • Joined: 26 Sep 2006
Hello,

My knowledge regarding AutoHotkey is pretty basic, to say the least, so I'm here to ask for assistance.
What I want to do:
I want a toggle-able key, that does the following:
If it is pressed:
Hold shift
Hold left mouse button
Spam '1' and "4" key in a random interval between 1,5 and 2 seconds
If pressed again, stop the above loop.

Hope someone can help here.

Thanks in advance.

TakeNoPrisoners
  • Guests
  • Last active:
  • Joined: --
✓  Best Answer
You said

I want a toggle-able key, that does the following:
If it is pressed:
Hold shift
Hold left mouse button
Spam '1' and "4" key in a random interval between 1,5 and 2 seconds
If pressed again, stop the above loop.

#NoEnv
#SingleInstance, Force
SetKeyDelay 30,50
MaxThreadsPerHotkey, 3

f1::
Toggle := !Toggle
If (Toggle)
{     Send, {Shift Down}
      Send, {LButton Down}
}
While {Toggle)
{     Random, delay1, 1500, 2000
      Random, delay2, 1500, 2000
      Send, 1
      Sleep, %delay1%
      Send, 4
      Sleep, %delay2%
}
Send, {LButton Up}
Send, {Shift Up}
Return
Hopefully this does what you want. There seems to be a problem in some apps/games that sending a key down code only works if it's repeated for each instance of a loop, other apps/games allow the key to be held one time starting at the beginning and released one time at the end. So this may or may not do the shift / lbutton hold the way you want it to. The code may have to be "adjusted" to provide the functionality you need. Also I wasn't completely clear on your 1,4 send if you wanted each key slept or if you wanted them both sent together and slept one time at the end. It's little details like those that can make or break a script. And finally, not knowing what keyboard keys are already being used in your game (like the f1 key for instance -- I don't play Diablo 3) I just picked one out of the hat. You may need to change that too. And, to answer your unasked question, No, I am not going to spend my life trying to maintain and modify this script. I'd recommend you get some serious "face time" with AutoHotkey and the tutorials. But this will get you started.

V1P3R
  • Members
  • 28 posts
  • Last active: Jun 19 2018 12:13 PM
  • Joined: 26 Sep 2006
Thanks m8! I had no intention to ask the unanswered question :) I just needed a kick start. I will try the stuff at home.
The code looks like just what I wanted and if any problems arise, hopefully I can manage. Cheers!

TakeNoPrisoners
  • Guests
  • Last active:
  • Joined: --
Good luck with it and remember there are always people here who are willing to help.