Tuesday, December 23, 2008

Setting up the EVE Macro

Setting up the Macro

So many people have been looking for the bots and macros to do the work. Bots and macros are one of the solutions for those who don't sit at the computer all the time but still want to level up. So many community sites that share macros and bots, as well as Strategy Freaks, here you can find so many EVE macros, bots, hacks, exploits, and guides.
Global $Paused
HotKeySet("^+e","vExit") ;hotkey to stop the script
HotKeySet("{PAUSE}","TogglePause")

Func TogglePause()
$Paused = NOT $Paused
While $Paused
Sleep(100)
Wend
EndFunc
Func vExit()
Exit
EndFunc
Sleep (3000)
While 1 = 1
;undock
MouseClick ("left", 16, 736)
Sleep (30000)
;warp to belt
MouseMove(774, 630)
MouseWheel ("up", 300)
Sleep (2000)
MouseClick ("Right", 744, 630)
Sleep (1000)
MouseMove (812, 676)
Sleep (1000)
MouseClickDrag ("left", 812, 676, 719, 690)
Sleep (1000)
MouseClickDrag ("left", 719, 690, 812, 691)
MouseClick ("left")
;change the next value depending on time it takes to warp to belt
sleep (60000)
;approach roid / lock / mine
MouseClick ("left", 808, 184)
sleep(1000)
MouseClick ("left", 730,120)
Sleep (100000)
MouseClick ("left", 860, 120)
sleep (6000)
;MouseClick ("left", 640, 645)
;sleep (1000)
MouseClick ("left", 645, 645)
;change this sleep for amount of time used mining, (until hold is full)
Sleep(190000)
;wait for mining....
;run loop to check for full cargo hold
;go back to dock (own sub)
MouseClick ("right", 668, 740)
MouseMove (704, 754)
]Sleep (1000)
MouseClickDrag ("left", 704, 754, 624, 727)
Sleep(1000)
;MouseClickDrag ("left", 624, 757, 718, 703)
MouseClick ("left")
;Change this value if it takes longer to dock
Sleep(70000)
MouseMove (72, 455)
sleep(2000)
MouseClickDrag ("left", 72, 455, 420, 679)
sleep(2000)
Wend
Above you will find the code for the mining macro, don't worry if it all looks a bit complicated, you will get the hang of it in no time. To get ready for editing first copy and paste the code into any text program (lets say notepad in this case) and save it. Once that is done, change the extension of the file. For example if you saved it as “mining macro.txt”, change it to “mining macro.au3”, the file should now be associated to Autoit (If you are using a different version of Autoit the extension might be slightly different, to be sure check in the folder you installed Autoit to. There should be an “Examples” folder, in there should be several Autoit associated files, just use the same extensions as them).
Now right click on the new file you have just created, one of the option in there should be “Edit Script”, click on it. Now a window will open up with the source code, it should look something like the picture below (the http://www.strategyfreaks.com is not part of the programming, just a very cool watermark made by myself).

Read more...


Now you are ready to do some editing.
Configuring the Macro for your computer
Let us at this point recap what our macro is supposed to do,

1.Undock the ship from the space station.
2.Warp to an asteroid belt.
3.Pick a particular asteroid.
4.Lock on to it and start mining it.
5.Return and dock at the space station with the mined minerals.
6.Move the minerals from your ship's cargo hold to storage within the space station.
7.Repeat step one.

All these operations could simply be done using the mouse, and that is exactly how our macro will be doing it. At this point maybe you would get a better idea if you try running the macro. Double click on the file to start running the macro. After a short time you will see that the mouse pointer is automatically moved to the bottom left hand side of your screen. If you wait a little longer the mouse pointer will be moved around some more. These two sequences represent the macro's attempt to first undock the ship (moving the mouse pointer to the bottom left hand side of the screen where the undock button is and clicking on it) and then warping to an asteroid belt.
Now that you get an idea of what a macro does its probably a good idea to end the operations, you don't want the mouse moving around automatically while you're not actually running eve. To do this look at the right hand side or your task bar at the bottom of your screen, there should be a small Autoit program icon, simply right click on it and choose “Exit”.
The main problem with macros are that they are very specific. For example, our macro attempting to click on he undock button, for different computers and setups the location of the undock button could be significantly different. What if it is a wide screen? What if the screen resolution is different? And so on and so on, generally the more complicated the macro the more difficult it is to setup and troubleshoot. So the next part of the guide will try and guide you through the code almost line by line, testing and changing it to work for “your” computer. It is possible that the macro might work first time without any trouble, but if not then read on.

No comments:

Post a Comment