Diablo 3 Monk script

04/28/2013 16:16 Phil2003#1
Hi,

I want the script to press the left mouse in a random intervall, and the numbers 1 and 2 in different intervall, so my finger doesnt hurt and i dont have to think all the time about refreshing sweeping wind.

This is my first try in autoit, and my script looks like this so far
Quote:
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

$i = 1
Do
MouseClick ("Left")
$i = $i + 1
Sleep(Random(154, 583))
Until $i = 36000

$i = 1
Do
Send("{2}")
$i = $i + 1
Sleep(Random(754, 3287))
Until $i = 36000

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(102)
ToolTip('Script is "Paused = SCRIPT IS NOT RUNNING"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate()
Exit 0
EndFunc
I havent included the function for button 1 yet, but the rest is working fine, except that only one loop is working (the one on the top).

I can include the different buttons in one loop, but id like to have different intervalls, and this way it only takes one intervall. Any clue?

Thanks,
Phil

Edit: Got it now working, but now i have 4 scripts, because autoit cant do several loops at once.

3 loops for mousebutton and button 1 and 2, one script that pauses all 3 scripts and one script that starts those 4 scripts... lol

Weird, but working. :)