|
|
|
Page 1 of 1 |
[ 4 posts ] |
|
 Macro for Crafting efficiently : EverQuest 2 Submissions
|
|
Posted: April 26th, 2005, 11:20 pm
|
|
|
|
tault_reeddl6797
tault_reeddl6797's Reps:
|
Hey all. I took one of the basic crafting macros that I've seen here and modified it a bit to do specifically what I want.
This script makes use of coords all over the page so using the pixelhelper is crucial in adapting this to your needs. It uses teh colors of the icons displayed that represent the tradeskill that needs to be executed.
Basically, run pixelhelper, then comment out the "mouseclick(left)" commands, uncomment the "mouseover" command, then set the coords of where the icon appears on your screen (the mouseover command will hover the cursor at that spot for you to note the RGB value and the X/Y coord values to input into variables at the top of the screen).
It takes a bit of up front work, but once you have it for one tradeskill, it is a cinch to set up for others. You need to also lock down teh recipe window so it doesn move. Once you run pixelhelper, your window will be in the same postion everytime (each time you run pixelhelper) so once you lock down the recipe window, your coords will be the same everytime.
I created this due to dying at the forge when I miss a skill. Using this script, I the appropriate tradeskill gets executed when the icon flashes. Aside from not dying at the forge, it saves on power too b/c you only execute tradeksills that use power when needed.
Hope this helps you all...
;
; User needs to update these values accordingly
;
$eq = "EverQuest II (Nov 19 2004 16:21:31) USER OPTIMIZED: SOEBuild=1521T"
$mX = 645 ; Mouse X coordinate for the Begin/Repeat button
$mY = 609 ; Mouse Y coordinate for the Begin/Repeat button
$mcolor = 7359757 ; Color of begin/repeat button
$skillcoordx = 608 ; Mouse X coordinate for the tradeskill needed
$skillcoordy = 559 ; Mouse Y coordinate for the tradeskill needed
$skillcolor1 = 6656178
$skillcolor2 = 7115439
$skillcolor3 = 5526887
$durabilitycoords1x = 727
$durabilitycoords1y = 470
$durabilitycoords2x = 843
$durabilitycoords2y = 468
$durabilitycolor = 1944359
$statuscoordx = 881 ; Mouse X coordinate for the status bar (end of status bar)
$statuscoordy = 208 ; Mouse Y coordinate for the status bar (end of status bar)
$statuscolor = 2568897 ; color of status bar (end of blue area to determine complete)
$stacks = 266 ; Number of complete products you have the ingredients for
HotKeySet("'", "StopExecution") ;stop script
HotKeySet("=", "clickenter") ; manually hit enter, used for testing
;
; 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
For $count2 = 1 to 100
MouseClick("left", $mX, $mY) ; Click begin
Sleep(500 + Random(25))
if (call("checkstatus") = 1) then exitloop 1 ;check to see if status bar is complete
if (call("checkdurability") = 1) then call("spamskills") ; durability low? spam skills to bring up
call("checkskill") ; Checks current icon of tradeskill needed to be executed and executes accordingly
;MouseMove($skillcoordx, $skillcoordy) ; Used for testing. Comment out "mouseclicks" and use this to hover over area that displays tradeskill icon
MouseClick("left", $mX, $mY) ; Click begin
;If (Call("crafted") = 1) Then ExitLoop 1 ;in orig code, used for reference on func call
Next
MouseClick("left", $mX, $mY) ; Click repeat
Next
;MsgBox(0, "Done!", "Time to make the doughnuts....")
Func checkskill()
$color = PixelGetColor($skillcoordx, $skillcoordy)
If ($color = $skillcolor1) Then Send("1") ; Tradeskill in slot 1
If ($color = $skillcolor1) Then Send("5") ; Tradeskill in slot 5
If ($color = $skillcolor2) Then Send("2") ; Tradeskill in slot 2
If ($color = $skillcolor2) Then Send("6") ; Tradeskill in slot 6
If ($color = $skillcolor3) Then Send("3") ; Tradeskill in slot 3
If ($color = $skillcolor3) Then Send("7") ; Tradeskill in slot 7
EndFunc
Func spamskills()
Send("1") ; Tradeskill in slot 1
Send("2") ; Tradeskill in slot 2
Send("3") ; Tradeskill in slot 3
Send("1") ; Tradeskill in slot 1
Send("2") ; Tradeskill in slot 2
Send("3") ; Tradeskill in slot 3
Send("1") ; Tradeskill in slot 1
Send("2") ; Tradeskill in slot 2
Send("3") ; Tradeskill in slot 3
Send("1") ; Tradeskill in slot 1
Send("2") ; Tradeskill in slot 2
Send("3") ; Tradeskill in slot 3
EndFunc
Func checkstatus()
$done = 0
$color = PixelGetColor($statuscoordx, $statuscoordy)
If ($color = $statuscolor) Then $done = 1
If ($color = $statuscolor) Then MouseClick("left", $mX, $mY) ; Click begin
Return $done
EndFunc
Func checkdurability()
$done = 0
$color = PixelGetColor($durabilitycoords1x, $durabilitycoords1y)
If ($color <> $durabilitycolor) Then $done = 1
;If ($color = $statuscolor) Then MouseClick("left", $mX, $mY) ; Click begin
Return $done
EndFunc
Func StopExecution()
Exit(0)
EndFunc
Func clickenter()
MouseClick("left", $mX, $mY) ; Click begin
EndFunc
|
|
|
|
|
Posted: April 27th, 2005, 1:34 pm
|
|
|
|
Tault_nazeroth
Total Posts: 1390
Joined: November 17th, 2004, 5:16 pm
Tault_nazeroth's Reps: 1
|
Not bad. Though we already have atleast 2 that can already do this, and be more userfriendly. Also, i believe you can set Akanon's macro to not use crafting buffs unless they pop up in events, which means you avoid dieing at the forge.
|
|
|
|
|
Posted: April 27th, 2005, 3:46 pm
|
|
|
|
tault_nuad
tault_nuad's Reps:
|
This looks like a copy & paste of our first macros here (from aktlingit and me)...
You don't even changed the EQ2 Version Date...
(!empty($user->lang['QUOTE'])) ? $user->lang['QUOTE'] : ucwords(strtolower(str_replace('_', ' ', 'QUOTE'))): EverQuest II (Nov 19 2004 16:21:31)
Better luck next time.
|
|
|
|
|
Posted: April 27th, 2005, 6:33 pm
|
|
|
|
tault_reeddl6797
tault_reeddl6797's Reps:
|
Number one, I used an original script and altered it, therefore some of the variables are the same.
Number two, I highly doubt that whatever script you see this as a copy and paste from uses the same variables that I name, ie. durability etc. Not to mention the names of the functions.
Number three, although I figured someone may have already gone this far with a macro, I didn't see it. In fact, had I seen it, I would not have spent the time re-doing this one for myself.
Number four, this is a post for information to try to help people, simple as that.
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 15 guests |
|
|
|