Notes: This is a full screen tutortial, I friggin' hate windowed mode only stuff. This has full error checking with clicks, so you will probably want to stare at a wall while running this, be up in your ship so you don't click on a passer-by, or have someone bust out a droid with a station in it near you as I didn't add the mouse clicks for that, but you can quite easily if you wish. I don't use the keys as their just not as reliable IMO. Also, This will pause automatically when the SWG window is not active (not at any point, but after each craft it will check), so when you want to check your mail or browse the web for a second just wait for the creation click and alt-tab out. You can then exit the script by right-clicking on the tray icon if you wish to disable it all together. It will automatically exit on the last tool if you tab out then. You can add the winwait's after every crafting action if you wish to be able to alt-tab out whenever you wish.
Background:
The whole reason I joined is because I lost my old autoit script that I made when I got fed up with grinding thru weaponsmith back in the early days. I found one in the verified section, but it doesn't work with any of the new versions. Crap.
So I spent a couple hours figuring this new fangled version out, and this should help the other souls out that have been asking when I searched.
At any rate, it's been pretty much totally overhauled. Goto and many of the commands have been either dropped completely (as is the case with goto) or redone. So here's a working example of a script used to do artisan(the basic trader level) that I made; copy and alter to your hearts desire:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
WinWaitActive("SwgClient") ;Waits for you to tab back into swg.
While WinActive ("SwgClient")
;start of first crafting session
If WinActive ("SwgClient") Then
Sleep(500)
Send("{ESC}") ;in case of close dialog box
Send("{ESC}") ;in case of close dialog box
MouseClick("left", 829, 480, 1, 5) ;Resource loss dialog
MouseClick("left", 720, 480, 1, 5) ;Center screen error message
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 1239, 840, 1, 5) ;First crafting tool coords.
Sleep(2000)
MouseClick("left", 720, 480, 1, 5) ;Center screen error message
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 615, 509, 1, 5) ;NEXT button
Sleep(1500)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
Sleep(500)
MouseClick("left", 615, 509, 1, 5);Assemble button
Sleep(1000)
MouseClick("left", 615, 509, 1, 5);Another next button
Sleep(1100)
MouseClick("left", 615, 509, 1, 5);Create/Practice button
Sleep(1600)
Else
WinWaitActive ("SwgClient", "")
Endif
;start of second crafting session
If WinActive ("SwgClient") Then
Sleep(500)
Send("{ESC}") ;in case of close dialog box
Send("{ESC}") ;in case of close dialog box
MouseClick("left", 829, 480, 1, 5) ;Resource loss dialog
MouseClick("left", 720, 480, 1, 5) ;Center screen error
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 1277, 840, 1, 5) ;Second crafting tool coords.
Sleep(2000)
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 615, 509, 1, 5) ;NEXT button
Sleep(1500)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
Sleep(500)
MouseClick("left", 615, 509, 1, 5);Assemble button
Sleep(1000)
MouseClick("left", 615, 509, 1, 5);Another next button
Sleep(1100)
MouseClick("left", 615, 509, 1, 5);Create/Practice button
Sleep(1600)
Else
WinWaitActive ("SwgClient", "")
Endif
;start of third crafting session
If WinActive ("SwgClient") Then
Sleep(500)
Send("{ESC}") ;in case of close dialog box
Send("{ESC}") ;in case of close dialog box
MouseClick("left", 829, 480, 1, 5) ;Resource loss dialog
MouseClick("left", 720, 480, 1, 5) ;Center screen error
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 1313, 840, 1, 5) ;Third crafting tool coords.
Sleep(2000)
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 615, 509, 1, 5) ;NEXT button
Sleep(1500)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
Sleep(500)
MouseClick("left", 615, 509, 1, 5);Assemble button
Sleep(1000)
MouseClick("left", 615, 509, 1, 5);Another next button
Sleep(1100)
MouseClick("left", 615, 509, 1, 5);Create/Practice button
Sleep(1600)
Else
WinWaitActive ("SwgClient", "")
Endif
;start of fourth crafting session
If WinActive ("SwgClient") Then
Sleep(500)
Send("{ESC}") ;in case of close dialog box
Send("{ESC}") ;in case of close dialog box
MouseClick("left", 829, 480, 1, 5) ;Resource loss dialog
MouseClick("left", 720, 480, 1, 5) ;Center screen error
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 1351, 840, 1, 5) ;Fourth crafting tool coords.
Sleep(2000)
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
MouseClick("left", 720, 460, 1, 5) ;for already crafting errors, etc..
Sleep(300)
MouseClick("left", 615, 509, 1, 5) ;NEXT button
Sleep(1500)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
;MouseClick("left", 55, 181, 2) ;first resource container
;Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(100)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
MouseClick("left", 102, 181, 2, 5) ;second resource container
Sleep(700)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
;Sleep(100)
;MouseClick("left", 152, 181, 2);third resource container
Sleep(500)
MouseClick("left", 615, 509, 1, 5);Assemble button
Sleep(1000)
MouseClick("left", 615, 509, 1, 5);Another next button
Sleep(1100)
MouseClick("left", 615, 509, 1, 5);Create/Practice button
Sleep(1600)
Else
WinWaitActive ("SwgClient", "")
Endif
Wend
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Now, this might look complicated at first glance, but it's not. I have it set up in a loop, with the while statement. And all of my box buttons for the crafting tool in-game ui are set to close to the same spot, so I only have to specify the coords once. All that is really needed for you to adapt this script for your machine is:
1) install the latest autoit of course
2) use the Au3info.exe to get the coords to your ingame mouse
Do this by alt-tabing into the game with au3info running, left-clicking on what you wish to get the coords for WITHOUT releaseing the button when you click. Hold it down then alt-tab out to au3info that's running, it will then list the ingame resolution's coords.
3) replace the coords from:
720, 480 <-this is the center screen error message dialog box that will crop up.
720, 460 <-this is the error that'll crop up when it lags and you start another session sometimes, this is put in 4 times to compensate for just about any combo of errors, so on the next pass it should clean up.
1239, 840 <-coords to first tool in toolbar (drag and drop from inventory)
1277, 840 <-coords to second tool in toolbar
1313, 840 <-coords to third tool in toolbar
1351, 840 <-coords to fourth tool in toolbar
615, 509 <-for next buttons, assemble and create/practice button -remember to run thru and set your box buttons to the same coords or get the coords for each and enter them where the comments are.
102, 181 <-second resource in left box (active)
55, 181 <-first resource in left box (inactive, commented out as I didn't wish to use that resource I had on me)
152, 181 -third resource in left box (inactive, commented out)
You can just use notepad's replace to do the above if your really having problems understanding what's what.
Save as "whatever.au3" (if you don't have show extensions on from explorers options, do so now so you can rename it when you save this to a file).
Before you load it, in addition to the above, run thru one of what you wish to do (usually the mineral survey devices, which this is based), check pratice mode and do it once. Now so long as you don't disconnect, or have different tools used (get 4 item tools), it will always default to this one, and the script should run til SOE reboots it's servers.
You might need to fine tune the times.
Last edited by Guest on September 6th, 2006, 4:49 pm, edited 3 times in total.
|