EQ2 Crafting Macro

06/04/2005 00:11 undispudet#1
Use AutoIt Spy Window to find the Begin/Repeat button and update the variables in the script. Likewise you can update the number of times you have enough ingredients to run this script. I also added some randomness for those people who might be watching for macros. The actual spamming of the related abilities is slightly randomized (500 ms + a random number). Also, there's a 15% chance your toon will perform one of the 12 social interactions. I got bored just watching LOL (I know it's gonna be used by a lot of AFK people but they can modify very easily to remove the socials, and I'll probably make that configurable in the very near future when I also create a few more to keep leveling up with.

So enough rambling on my part - here's the script - hope someone finds it useful
06/04/2005 00:11 undispudet#2
;
; 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
08/12/2005 02:24 ultimatedestroyer#3
Good macro. ;)

Man you dont half do some good work.
02/26/2006 04:43 vincer20#4
is there someone or some were i can go to learn what each lines do
11/05/2008 16:21 sevti#5
not sure where i am going wrong on this one.
i got it working but begin and repeat buttons are 2 different buttons
so i guess i need to know how to add the second button to the script and get the script to use the added button. i may be wrong here but i think that the begin/repeat button used to do both functions. the begin button now says begin on it and the coords are 930,767 atm the repeat button doesnt show up until the item is created then it appears at these coords 1152,767 so i guess either ive messed up the coords in some way or the game has been updated and there is an additional button that im not sure how to add ...sorry...very new to scripting and do not yet know any programming/scripting languages ty :confused:
11/05/2008 21:42 sevti#6
OK.....
i think i figured it out....
I did an ugly hack job on your script...(lol sorry about that) but it is working better than it was i added the extra button and made the script use it. Still cant figure out how to get the repeat to trigger faster it just keeps hitting buffs for a while then triggers the repaet seems random i guess it has something to do with the sleep entry but not sure which one and i havent seen the socials kick in yet so i guess thats something ill have to figure out too. I`ll try to post the script and see if anyone can suggest any changes ty

Code:
; 
; User needs to update these values accordingly 
; 
$eq = "EverQuest II (Nov  3 2008 11:10:13) USER OPTIMIZED: SOEBuild=5202L " 
$mX = 888 ; Mouse X coordinate for the Begin button 
$mY = 784 ; Mouse Y coordinate for the Begin button 
$mX2 = 1114 ; Mouse X coordinate for the Repeat button  
$mY2 = 784 ; Mouse Y coordinate for the 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", $mX2, $mY2) ; Click repeat 
Sleep(500 + Random(25)) 
Next 
MsgBox(0, "Done!", "Lets get on with the crafting....") 

; 
; 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 = 0x572B16) 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
11/06/2008 09:20 sevti#7
YES!!! :D
It works awesome now!!!
thanks for the script i know its old and there is probably way better script for the game crafting now but this was a huge find for me thanks again. this works well as of 11/6/08 just be sure to follow the instructions and add the repeat button coords seems to run better if you have your crafting window up and set at the begin button. also for those who are afraid of putting in coords just save the script below with a . au3 file extension, start it then move the crafting window until the mouse pointer is sitting where the repeat button is. once you get it set there restart the macro/script


Code:
; 
; User needs to update these values accordingly 
; 
$eq = "EverQuest II (Nov  3 2008 11:10:13) USER OPTIMIZED: SOEBuild=5202L " 
$mX = 893 ; Mouse X coordinate for the Begin button 
$mY = 785 ; Mouse Y coordinate for the Begin button 
$mX2 = 1112 ; Mouse X coordinate for the Repeat button  
$mY2 = 785 ; Mouse Y coordinate for the Repeat button
$stacks = 82 ; 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("created") = 1) Then ExitLoop 1 
Sleep(2600 + Random(100)) 
Next 
MouseClick("left", $mX2, $mY2) ; Click repeat 
Sleep(500 + Random(25)) 
Next 
MsgBox(0, "Done!", "Lets get on with the crafting....") 

; 
; 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 created() 
$done = 0 
MouseMove($mX2, $mY2) 
$color = PixelGetColor($mX2, $mY2) 
If ($color = 0x212039) Then $done = 1 
If (($done = 1) AND (Random(0, 100) > 58)) 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