Jump to content
AC Tool Forums
  • Sign Up
Sign in to follow this  
Ego

EnB Building Macros 101

Recommended Posts

I have started this thread as I have received a few requests on how to use and modify my code

This thread will be a way to explain things as we go and hopefully users will be able to code their

own macros for their screen resolution

I will be using my latest Aragoth Macro and break it down into modules, this should allow a

user/coder to add to a macro, their modules, with information for their resolution

To start you must have downloaded and installed actools

http://ac-tool.com/

And below is the macro which has modules in it that we will be studying

 

Also I use graphics options for a clear screen by doing the following

 

To set graphics for EnB Macros I have coded by going to

Options

Graphics

Untick Box

Leave Gamma alone

Move all the other sliders to the right

 

Graphics Sliders.zip

 

Modules.zip

 

RelogIn.zip

 

relogV1.4.zip

 

I thank Bear for some coding and the Object Mapper and everyone else's code I have 'borrowed' and

modified "Thanks"

When you open the download, there are 15 modules, Aragoth Combined Macro, Ego OBJ Maker and object

mapper. Most Modules can be used as a macro in their own right and there is some repeated code in

some modules, and some missing code as the modules were copied and pasted and modded as I needed. You

can use them to test different events you are trying to code. The download has the following modules

and macros and program included

1 Combo Box

2 Cargo Check

3 Get Sector

4 Start Run

5 Terminal Jobs

6 Aragoth Run In

7 Open Job Terminal

8 Get Jobs

9 Check for Jobs

10 Aragoth Run Out

11 Wait for Sector

12 Dock to Dock

13 Move Reactor

14 Move Wormhole

15 Warp Timer

Aragoth Combined

Object Mapper

Ego OBJ Maker

Share this post


Link to post
Share on other sites

1

 

Combo Box

As you will see it has 3 sub modules, ComboBox, ComboBox Settings and Constants

I use the ComboBox to set my constants instead of going into the code and trying to find where and

what information to modify

The ComboBox calls 'is showform settings' which in turn adds the information typed into the Setconst.

The name in the square brackets is for information for the coder

You have 2 choices

1: editbox. Will add information directly after the: This information is added directly into a

constant, can be typed over to change information

i.e. Name = editbox: Your Player Name: xXx

2: ComboBox. Will provide a dropdown list of information after the:

This information will be displayed in a separate box that a user clicks in appropriate box to add to

constant. The information is separated by a coma, to add a new box

i.e. kraken = ComboBox: Position of Warp Hotkey?:1,2,3,4,5,6

The constants are where I place the names of the variables I need to change throughout the code. I

find it easier to keep them in one module if I can, easier to find

(Note: Setconst's are placed in modules where needed to signal an event)

Share this post


Link to post
Share on other sites

2

 

Cargo Check

The start of this module opens cargo hold on ship by pressing the o key, then sets the setconst

jobcount = 0 so when the code checks for cargo, it starts on zero

A small delay of 1 second allows the screen to focus in the cargo screen cargo, in some modules this

delay is longer as the screen needs more time to focus

The command 'isgreen 79, 424' Checks the X, Y coordinates to see if the Green Pixel colour is the

highest RGB colour at the selected coordinates. If Green is tied for the highest it will return

true. This information is in the ac tool Help listing, a required read

The Timestamp command Logs the current time and any text following the Timestamp command into the AC

Tool Test Log. This command can be VERY useful for debugging your macro. They can be deleted after

all testing has been completed to shrink the overall size of the code if a coder desires

The 'inc' command increments or adds one to a numeric constant, so if isgreen is true add 1 to the

$jobcount variable. This variable will be accessed in a later module

Share this post


Link to post
Share on other sites

3

 

Get Sector

This module has 2 sub modules, Get Sector and Map. When GetSector is opened it calls Map

Keys M opens the map then the code clicks where the large map might be to ensure the map is small.

With the map open, holding the minus [-] key down [keydown] for .3 of a second shrinks the small map

as far as it can go then moves to the bottom left of the opened, shrunk small map to rightclick 3

times to move the map into the same place for every sector to use when clicking on a nav, gate,

station etc to warp to. Then the cursor is moved to the target window to rightclick to remove any

object in that targeting window

The code then returns to the GetSector Procedure, waits 2 seconds to allow screen focus then looks at

mouse positions for isgreen colour to find location. If avatar was chosen as No then the code will

stop. If the Avatar in the combo screen was chosen as Yes, the code will activate wormhole to get to

VT Weft and warp into station

[Note the // marks stop code after them]

Share this post


Link to post
Share on other sites

4

 

Start Run

This module looks at the constants that have been set to determine where the code is sent to next.

The first 'if' checks to see if the jobcount is less than the maxjobs and in Aragoth station, if so,

start running to the Terminal 'call ExpTermJobs'

The second 'if' checks that jobcount = maxjobs and in Aragoth Station, if so, undock 'call

DeliverCargo1'

As you follow the code down you see now what it looks for and sets a command on what information has

been found by running code to 'find' items etc

Share this post


Link to post
Share on other sites

5

 

Terminal Jobs

This module is the command code. When activated, each sub module does what it have been commanded to

do, be it running to the terminal, activating wormhole to get to VT Weft or starting the run to sutri

and back. All the commands end up in the 'Looping' sub module to count the number of runs completed

Share this post


Link to post
Share on other sites

6

 

Aragoth Run In

This module has 3 sub modules, runtoterminal, runtoterminal2 and sbreset

runtoterminal starts by placing the cursor on the screen in a position that will be used in a later

module

Call sbreset 0 is used to place the avatar in the same position in the rooms every time so the code

knows where it is

If the avatar misses the few turns when running in the docking bay, the code does a iswhite check to

see if the avatar is in the next room, if it is the code calls runtoterminal2, if the code doesn't

register iswhite it repeats runtoterminal

By using // in front of the 'call runtoterminal2' and 'call runtoterminal' A player can adjust the

turns and time running

[Note: if the 'procedure sbreset using point' is not present in the macro, the avatar will start in

random places in stations and the code will fail]

Share this post


Link to post
Share on other sites

7

 

Open Job Terminal

This module has 2 sub modules, openjobterm and termrunin

openjobterm moves the cursor to open the terminal, it then loops 5 times to ensure terminal is open

and the reward button is pressed 2 times to ensure the highest paid jobs are on top. If the code

cannot find 'isgreen' it moves the cursor to click out of terminal and call termrunin to run back to

terminal and open the terminal again

(I think I was going to add a relogin module here if 5 loops didn't find the terminal and looking at

changing the code to work a little different than as it is now)

Share this post


Link to post
Share on other sites

8

 

Get Jobs

This module has 4 sub modules, getjobs, colours, movedown and Getem

The procedure getjobs sets constant movedown to zero then checks to see if $jobcount equals $maxjobs.

If $jobcount is lower the code sets mouse position Y outside the loop that will check the jobs ten

times

Starting the ten loops, the x mouse position stays in the same position [The X position never

changes]leftclicks the first job and calls colours

Colours checks 3 positions on the screen to ensure the job is a '$6000' 'Deploy Satellite' to 'Sutri'

As the code 'reads' the screen, it sets constants to a yes or a no. The code then returns to getjobs

to check if all the constants read yes, if so the code calls Getem

Getem moves the cursor to the correct position to get the job. The code then clicks on the Trade Area

again so screen refreshes the trade jobs to remove false positives, then the cursor is moved to

access the trade jobs, add 1 to $jobcount and return to getjobs

If the $jobcount = $maxjobs the code breaks the loop cycle [This is where the code will continue in

the TerminalJobs Command Coding] If $jobcount doesn't = $maxjobs the code adds 29 pixels to Y2 by $Y

+ 29, then sets Y the same as Y2. If the code completes ten loops call movedown is activated

Movedown positions the cursor to the bottom of the slider to move jobs down, leftclicks and adds 1 to

movedown constant. If the constant $movedown = 3 the code moves the cursor to the top of the job

slider and clicks 3 times to return to the top of the rewards listing and starts the getjobs again.

This code continues until $jobcount = $maxjobs

Share this post


Link to post
Share on other sites

9

 

Check for Jobs

This module is a small sub command code module to make sure $jobcount equals $MaxJobs by looking at

cargocheck again before calling outofterm sub module

outofterm moves cursor to close the job terminal

If $jobcount is smaller than $MaxJobs the code calls getjobs and cargocheck again [cargocheck and

getjobs have been added for testing]

Share this post


Link to post
Share on other sites

10

 

Aragoth Run Out

This has 3 sub modules, runtodock, runtodock2 and sbreset

Runtodock runs Avatar out to docking bay from terminal

Runtodock2 is used when previous module constants are met

Call sbreset 0 is used to place the avatar in the same position in the rooms every time so the code

knows where it is

[Note: if the 'procedure sbreset using point' is not present in the macro, the avatar will start in

random places in stations and the code will fail]

Share this post


Link to post
Share on other sites

11

 

Wait For Sector

This module checks the splash screen between gating and docking. The code looks for isgrey to start

looking for isgrey again, while the splash screen is open the code waits in a loop, when the isgrey

is lost there is a 7 second delay before this module ends

Share this post


Link to post
Share on other sites

12

 

Dock to Dock

This module has 6 different docktodock coding as the code that is activated depends on previous

modules

docktodock1 ,2 and 3 sent your ship to sutri with cargo and return and if you are not able to use a

wormhole, return by warping thru the sectors

docktodock4, 5, 6 return your ship to Aragoth Station when no cargo is present when starting macro

[Detected in previous modules] either by warping or using a wormhole

The procedure Map_Gate using X, Y, Boost uses the 'call Map_Gate xxx, yyy, $kraken to position the

cursor in a chosen mouse position to click on a gate or station or object, checks to see if warp

boost is active, if not activate it, then open the map

Keys M opens the map then the code clicks where the large map might be to ensure the map is small.

With the map open, holding the minus [-] key down [keydown] for .3 of a second shrinks the small map

as far as it can go then moves to the bottom left of the opened, shrunk small map to rightclick 3

times to move the map into the same place for every sector to use when clicking on a nav, gate,

station etc to warp to

MousePos $X, $Y is the next map gate position for the cursor to be placed and the code leftclicks to

lock in that mouse position, then closes the map [Can delete the keys m to keep map open if desired]

The loop 5 code runs thru the activate warp cycle and ensures ship is in warp (I think I was going to

add a relogin module here if 5 loops didn't find the isgreen to activate warp then the isblue to

ensure ship was in warp)

Share this post


Link to post
Share on other sites

13

 

Move Reactor

This module has 2 sub modules, movereactor and movepos

These two sub modules work together to drag the warp reactor icon to the requested hotkey that was

set in a previous module [ This module can be used to move devices etc to hotkeys with the correct

mouse positions in Procedure movepos using X, Y

You can change the X, Y to read [xxx], [yyy] or change the MousePos 852, 813// Reactor position on

Ship to the correct item mouse position

Share this post


Link to post
Share on other sites

14

 

Move Wormhole

This module has 4 sub modules, movewormhole, Whslot, wormhole and whhotkey

Movewormhole is a sub command code that a previous module has added to $moveworm constant to prevent

the repeat activation of the movewormhole code

Whslot and wormhole work together to drag the VT Weft Wormhole from the skills screen to a hotkey

that was designated in a previous module

Whhotkey is the code to activate the hotkey that the wormhole icon has been dragged to

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.