;
; User needs to update these values accordingly
;
$eq = "EverQuest II (Nov 19 2004 16:21:31) USER OPTIMIZED: SOEBuild=1521T"
$mX = 966 ; Mouse X coordinate for the Begin/Repeat button
$mY = 750 ; Mouse Y coordinate for the Begin/Repeat button
$stacks = 20 ; Number of complete products you have the ingredients for
;
; Make EQ2 Window Active
;
WinActivate($eq)
;
; Loop x times based on number of stacks of ingredients
;
For $count = 1 to $stacks
MouseClick("left", $mX, $mY) ; Click begin
Sleep(1500 + Random(100))
For $count2 = 1 to 25
Send("1") ; Awareness
Sleep(500 + Random(25))
Send("2") ; Constant Heat
Sleep(500 + Random(25))
Send("3") ; Seasoning
Sleep(300 + Random(25))
If (Call("crafted") = 1) Then ExitLoop 1
Sleep(2600 + Random(100))
Next
MouseClick("left", $mX, $mY) ; Click repeat
Sleep(500 + Random(25))
Next
MsgBox(0, "Done!", "Time to make the doughnuts....")
;
; Let's try and be smarter about this and see if we finished the product
; and let's add some flare by doing some random acts every now and then
;
Func crafted()
$done = 0
MouseMove($mX, $mY)
$color = PixelGetColor($mX, $mY)
If ($color = 7359501) Then $done = 1
If (($done = 1) AND (Random(0, 100) > 85)) Then Call("doSocial")
Return $done
EndFunc
;
; Determine which random act of silliness to perform
;
Func doSocial()
Send("{F2}") ; Select nobody
$social = Int(Random(1, 12))
Select
Case 1 = $social
Send("/applaud")
Case 2 = $social
Send("/curse")
Case 3 = $social
Send("/dance")
Case 4 = $social
Send("/frustrated")
Case 5 = $social
Send("/grumble")
Case 6 = $social
Send("/heelclick")
Case 7 = $social
Send("/scream")
Case 8 = $social
Send("/shimmy")
Case 9 = $social
Send("/swear")
Case 10 = $social
Send("/sigh")
Case 11 = $social
Send("/tantrum")
Case 12 = $social
Send("/yawn")
EndSelect
Send("{ENTER}{TAB}")
Sleep(3000)
EndFunc