Post Reply Home » Forums » MMO Forums » Age of Conan » Age of Conan Guides, Bots & Tools

AOC Bots - Auto Combat Script w/ In Combat Check : Age of Conan Guides, Bots & Tools

Posted: May 24th, 2008
Total Posts:107 Joined:2007
Version 3.0
--------------------------------------------------
Greetings...

I've developed a script based on one that I used in SWG quite a bit for camping static spawns. This is the first version, but at this time it will accomplish the following:

1. Turn your character in a circle to auto-target mobs in your line of sight
2. Start swinging combos at the target
3. If you are no longer in combat, it will return you to combat check stage after finishing remaining combos

Any feedback is appreciated.

-----------------------------------------------------
Setup

To setup this script you will need the following:

1. AutoIT version 3
2. This script
3. Some patience


Step 1 - Enabling AoC Interface Options (Basic Window):
Enable Auto-Targetting = On
Enable Target Auto-Facing = On

Step 2 - Finding the Correct Pixel to Check for Combat and setup Combos:

I've included a download for a Pixel Position script. The combat script has it included, but it will require you to run the combat script, get your pixels, then exit the script before editing. Or you can run the Pixel Position script, edit, then run your combat script. It is up to you. Both Pixel Position tooltips end by left clicking your mouse or hitting escape.

This script uses 'PixelGetColor' to check for a change in the GUI. If you look carefully, when you target something or enter into combat, your bottom right bar changes slightly. It will have the target's health and other bars displayed. This change also changes a few pixels that are always the same color. What happens is the system displays the targets info on top of the bottom toolbar. The bottom toolbar pixels are always the same color, unless this target info is on top of it.

So, with 'PixelGetColor' we setup our "Non-Combat Pixel Color" and test it against what is happening on screen. Our "NCPC" is a standard and if our check tells us that the pixel we are checking is different than our "NCPC" the script knows that we are in combat or have targetted something.

You will need to find your pixel (x,y) coordinates. I've included a tool tip that will tell you the position of your cursor.

You will need to find (x,y) coordinates for your target check and (x,y) coordinates for your three to five onscreen combo buttons (1,2,3,q,e).

I've found that the location of the bottom bar that is just over the #5 slot, where it starts to bevel up at a 45% angle is the best pixel area for target check. In my testing, this has been the best spot to check for a pixel. I have good luck with the edge pixel on the 45% angle border. I found this to work well, but you may have to work with the coordinates a bit before you find one that works for you.

You can use a pixel almost anywhere on the combo buttons, however I've found that the top left corner of each button works the best. Just make sure the button is in down state (Not moved up when you mouse over it) when you record the pixel location.

After finding the pixels you want to try to use record them on paper or wherever and then click the mouse. Unfortunatley at this time getting the position automatically by click is unreliable, so you still have to manually enter pixel locations. It is much more reliable this way.

After clicking, the script will want to run, but you don't have variables working, so just hit escape to close out the script.

Step 3 - Open the Script in your Editor and Make Changes
Now you'll need to open the script in your editor and begin to make changes.

The first change is to set your (x,y) coordinates in the $portraitx, $portraity variables.

The second change is to set your combo buttons - they are respectively
$atk1x
$atk1y
.
.

$atk5x
$atk5y

Next, you'll be able to fool around with your pauses, or in AutoIT your "Sleep". This is in milliseconds.

Values for attack/combo keys 'q' and 'e' or '4' and '5' are currently commented out since many people may not be to the level where they have more combo buttons. To make these function, just put in your pixel values and uncomment the sections by removing the ';' from each line that is commented referring to the fourth and fifth combo buttons.

There are four sections you'd need to uncomment.
-------------------------------------------------------------

In order to run this script, I believe you'll need to be in windowed mode, but I haven't tested it in full-screen so I'm not sure. Just, start the script and it will fire off.

If you want to pause, you can use the 'Pause' button (Or assign a different button within the script). To exit the script, you can hit escape.

Please let me know if you have questions. I look forward to the testing and feedback. Now we just need a list of good static spawns. =) I'll hopefully be adding some more automation to this soon as well as looting, however I've spent to much time scripting and not enough playing. So, now it is time to get to the game.

-------------------------------------------------------

Please let me know if you have questions.

Attached is also the ToolTip to find your pixels without launching the full combat script.


Attachments:
aoc_auto_pixelpos.zip Register to unlock hidden link
Pixel position finder - self standing w/o combat - left click to exit script
(443 Bytes) Downloaded 72 times
auto_combat_aoc_v3_0.zip Register to unlock hidden link
Latest version w/ combos and easier pixel detection
(1.53 KiB) Downloaded 92 times
auto_combat_aoc_v2_5.zip Register to unlock hidden link
(1.12 KiB) Downloaded 31 times
auto_combat_aoc_v1_0.zip Register to unlock hidden link
(1.01 KiB) Downloaded 24 times


Last edited by arvida on May 25th, 2008, 8:14 pm, edited 4 times in total.
Posted: May 24th, 2008
User avatar
administrator
Total Posts:29891 Joined:2002
Can members say yay or nay to this so we may give tu bucks and/or premium.
Posted: May 25th, 2008
mrannon
arvida wrote:Greetings...

I've developed a script based on one that I used in SWG quite a bit for camping static spawns. This is the first version, but at this time it will accomplish the following:

1. Turn your character in a circle to auto-target mobs in your line of sight
2. Take a test swing using "1" to see if you hit something
3. If you hit something, your GUI changes slightly - it will run a combat function based on this change
4. The script will check if you are still in combat, if you are not you will return to your "combat checking" stage. If you are in combat, it will continue firing your combat macros until all combat is finished

At this time I have not put in an auto-loot or combo macro. The script will fire off your 1,2,3 buttons as attacks, but I have included space and commented a small section within the combat sequence that you can use to try to fire off combos based on key presses and pauses for the second and third combo presses.

Any feedback is appreciated.

-----------------------------------------------------
Setup

To setup this script you will need the following:

1. AutoIT version 3
2. This script
3. Microsoft Paint (Or a photo editing software with pixel x,y coordinates)
4. Some patience


Step 1 - Enabling AoC Interface Options (Basic Window):
Enable Auto-Targetting = On
Enable Target Auto-Facing = On

Step 2 - Finding the Correct Pixel to Check for Combat:
This script uses 'PixelGetColor' to check for a change in the GUI. If you look carefully, when you target something or enter into combat, your bottom right bar changes slightly. It will have the target's health and other bars displayed. This change also changes a few pixels that are always the same color. What happens is the system displays the targets info on top of the bottom toolbar. The bottom toolbar pixels are always the same color, unless this target info is on top of it.

So, with 'PixelGetColor' we setup our "Non-Combat Pixel Color" and test it against what is happening on screen. Our "NCPC" is a standard and if our check tells us that the pixel we are checking is different than our "NCPC" the script knows that we are in combat or have targetted something.

You will need to find your pixel (x,y) coordinates. The best way to do this is take a print screen of your GUI in non-combat and non-target mode. DO NOT HAVE A TARGET when taking this screenshot.

Do - alt+PrintScrn and then paste this screen shot into Paint or Photoshop or an editor with zoom and pixel location.

After taking the screen shot and loading it, zoom in on the location of the bottom bar that is just over the #5 slot, where it starts to bevel up at a 45% angle. In my testing, this has been the best spot to check for a pixel. Zoom in as much as you can and find a 'grayish' pixel sort of on the middle of the edge. I found this to work well, but you may have to work with the coordinates a bit before you find one that works for you.

I also have found that taking a screen shot of me not targetting something and taking a screen shot with targetting helps find the pixel with the greatest difference in color.

Once you chose a pixel, look at the (x,y) coordinates and remember or record them.

Step 3 - Open the Script in your Editor and Make Changes
Now you'll need to open the script in your editor and begin to make changes.

The first change is to set your (x,y) coordinates in the $portraitx, $portraity variables.

Next, you'll be able to fool around with your pauses, or in AutoIT your "Sleep". This is in milliseconds.

Finally, if you look at Func ConstantCombat(), you'll see where you can modify the pause between checking for a target as well as the Combat Routine.

Step 4 - Changing your combat routine
To change your combat routine, you'll just input the number you want to fire and the "Sleep" pause times needed to fire off the attacks and combos. Currently, I have it set to fire 1,2,3 with a second pause between each of them. I have created other lines and commented them out so you can see how a combo may work.
-------------------------------------------------------------

In order to run this script, I believe you'll need to be in windowed mode, but I haven't tested it in full-screen so I'm not sure. Just, start the script and it will fire off.

If you want to pause, you can use the 'Pause' button (Or assign a different button within the script). To exit the script, you can hit escape.

Please let me know if you have questions. I look forward to the testing and feedback. Now we just need a list of good static spawns. =) I'll hopefully be adding some more automation to this soon, however I've spent to much time scripting and not enough playing. So, now it is time to get to the game.
Thx works great, thx for the tip on the combat facing I was able to fix the problem in my script. Also instead of having to use the windows paint program to get the pixel locations I use the window spy that comes in the autohotkey package, makes it easier to get the pixel location and the pixel hex color.
Posted: May 25th, 2008
muddflap
This script works pretty good. It does exactly what the OP said it would do. I think it requires the user to have some development skills because of the modifications needed to make it work.
Posted: May 25th, 2008
Total Posts:107 Joined:2007
Yeah, there are definitely some mods...Using an automated pixel finder/color finder like 'Mrannon' said helps.

I've got a second version coming that automates combo's as well...we'll see if I can get that out too.
Posted: May 25th, 2008
Total Posts:107 Joined:2007
Okay, uploaded version 2.5 - It includes auto firing of combos in slot 4,5,6. Let me know if you have questions/problems.
Posted: May 25th, 2008
Total Posts:107 Joined:2007
Uploaded version 3.0 - It includes a pixel detector and added functionality for 'q' and 'e' combo buttons - You'll need to uncomment four sections of code for those to function, in addition to providing the pixel locations.
Posted: May 25th, 2008
pnot
Would you be able to upload a version that just does auto combos? A few of the other scripts on here have not worked out so well.

Thanks
Posted: May 26th, 2008
mrannon
arvida wrote:Uploaded version 3.0 - It includes a pixel detector and added functionality for 'q' and 'e' combo buttons - You'll need to uncomment four sections of code for those to function, in addition to providing the pixel locations.
Great Pixel Detector, can ya do me a favor, could you add the color of the pixel in hex on the tooltip so we know what the color of the pixel is at the x,y location. Something like "Color: 0xfa12fd44", ect..

Also how hard would it be a write a macro recording script for AutoIT. Im not skilled with AutoIT at all, but a macro recording script would help us newbies. Basicly the script would work like this. Run the Macro Record Script, then when your in the AoC window and you want to record your actions you would hit the Start Record key, then do your actions, and the script would record all your mouse movements and clicks, and your keyboard actions. Then you would hit the Stop record key and the script would output everything you did into the script editor. Not sure how hard this would be.
Posted: May 26th, 2008
Total Posts:107 Joined:2007
mrannon wrote:
arvida wrote:Uploaded version 3.0 - It includes a pixel detector and added functionality for 'q' and 'e' combo buttons - You'll need to uncomment four sections of code for those to function, in addition to providing the pixel locations.
Great Pixel Detector, can ya do me a favor, could you add the color of the pixel in hex on the tooltip so we know what the color of the pixel is at the x,y location. Something like "Color: 0xfa12fd44", ect..

Also how hard would it be a write a macro recording script for AutoIT. Im not skilled with AutoIT at all, but a macro recording script would help us newbies. Basicly the script would work like this. Run the Macro Record Script, then when your in the AoC window and you want to record your actions you would hit the Start Record key, then do your actions, and the script would record all your mouse movements and clicks, and your keyboard actions. Then you would hit the Stop record key and the script would output everything you did into the script editor. Not sure how hard this would be.
The second would be pretty tough. I believe that XUnleashed used to do that, but I han't tried it lately. There are programs out that do such a thing, but I'm unaware of them. Writing it from scratch would be a lot of work. =)

As far as the color is concerned - take a look at this pixel one...it has color.


Attachments:
aoc_auto_pixelpos_color.zip Register to unlock hidden link
(457 Bytes) Downloaded 20 times
Posted: May 26th, 2008
Total Posts:107 Joined:2007
pnot wrote:Would you be able to upload a version that just does auto combos? A few of the other scripts on here have not worked out so well.

Thanks
I'll start a new thread for another auto-combo script. Mine works great, however I've not gotten to 5 keys yet, so I'm not sure what it does when you have to edit it for 5.
Posted: May 27th, 2008
User avatar
administrator
Total Posts:29891 Joined:2002
moved to confirmed and 500 to you.
Posted: June 18th, 2008
pnot
Has there been anymore development on this script by the author?
Posted: June 20th, 2008
Total Posts:9 Joined:2006
I'm having a a bit of trouble getting the combos to work. I've put in all the locations and the combat check seems to work but the combos aren't. It seems to be going 123123123 instead of checking the colors. I've never done this before, I'm sorry for being a noob :oops: .

I got it, it helps if I read the instructions properly. I getting the coords of the button stay in "down state" :oops:

Ok now Ive got it working but is there any way to have it check to see if you're out of stamina? When the bot runs out of stamina it continuously tries to use combos and since theres no stamina to use them it sits there. I know a very small amount about programming and couldn't figure out how to fix it myself.
Posted: June 20th, 2008
Total Posts:107 Joined:2007
Hm...stamina and health check. Interesting. Let me do some work on it and I'll let you know. It should be simple enough to do as another color check on the stamina/health bars and if that check comes back as a change, it'll fire off your health or stamina pot.

I'll see if I can get to it. Thanks for the feedback.
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 2 guests
Post Reply