Page 1 of 1

Script request

Posted: Fri Nov 28, 2014 6:35 pm
by Maxalu
Hi, i know that AA is still far away in the fog with boting but is there a possibility 2 create a scrpit that attaks mobs with 1 skill constantly when they are close (like 3m) to me and after killing them it take's the loot? it does not need 2 move only to attack and take the loot. Thanks 4 answers

Re: Script request

Posted: Sat Nov 29, 2014 12:33 am
by Administrator
Without disabling HackShield, that won't be possible the way you want. HackShield prevents reading from the game's memory so that prevents MicroMacro from having any awareness of what is happening in the game.

Re: Script request

Posted: Sat Nov 29, 2014 10:42 am
by BlubBlab
First Admin is right basically but I gave this some thoughts:

Like you guys may notices I'm experimenting with open cv + MM2, so what can I do here with this:

I could take the screen and cut out the corners where the LP bar is with cv.lines I/we could track its movements and see so when the char are under attack.
I'm don't know much about AA exists in the game some aoe ? That would be the easy variant to counter attack if not motion tracking maybe be an alternative but this would increase the CPU usage extremely.

Looting okay pressing F isn't the hard part the sparkling is I can detect objects through a special learning tool which gave out a xml file for that but I think they are too small and inconsistent for that maybe those sparkles have some special colours in it?

Re: Script request

Posted: Thu Dec 11, 2014 2:45 am
by BlubBlab
I got a new idea what I could do I found the possibility to motion tracks things on the screen since all mops are animated I could let the bot click there where they are with some luck I could let the bot also interpret the loot effects as motion but surly it would have still some weakness.

EDIT: Okay I'm not finished but the motion part will work like this:

Code: Select all

local result_num = cv.motion(hwnd[,minfound = 3][,pause_interval=100][,minimum_pixel=16][,history=15][,shadows=true][,debug=false]);
local objects_in_motions_table = cv.motions_next();
local centerx = objects_in_motions_table[1].x;
local centery = objects_in_motions_table[1].y;
local width =  objects_in_motions_table[1].width;
local height = objects_in_motions_table[1].height;
I will post it in the other thread later when I'm finished but to make it understandable 'minfound' is how often the process need to find something in a row to say yes I found something and 'minimum_pixel' is how thick in pixels the differences must be to call it something moving, pause_interval is to slow the process down in milliseconds, history is how many old picture are stored for comparing.(1024*768 are around 4 MB for one picture so be careful with it), 'shadows' are there shadows in the picture ?

Re: Script request

Posted: Fri Dec 12, 2014 9:16 pm
by BlubBlab
First try:
Image
I think this looks interesting I didn't got the windows attached either because Hackshield or because it is 64-bit but we see it works in life action. I simple ran it in windows mode and let MM2-64 watch the desktop.

I realized I could say WTF how good that works in the top left corner the client says where you(I did make it white it also says the time) are as text Open CV has a plug in for(OCR) http://sourceforge.net/projects/tesseract-ocr/ , your HP/MP and your enemies I can extract from the screen with getPixel(..) because they always on the same spot like your char together with the chat they must be ignored.

Loot I could again find with getPixel because the icon is always on the same spot. Enemies are tracked down peer motion tracking with click to run I can send the char their. The only thing left is targeting I think there was also an option with which you can take automatically the closet enemy when you attack.

Re: Script request

Posted: Fri Jan 09, 2015 10:35 am
by Maxalu
i can see things are gooing forward in making AA botalble :D are there any instructions how 2 make youre own script?

Re: Script request

Posted: Fri Jan 09, 2015 2:49 pm
by BlubBlab
I wrote a concept thread how a bot would basically work with this in the AA forum. if you want you can pick it up

Re: Script request

Posted: Sat Jan 10, 2015 3:54 am
by Maxalu
BlubBlab wrote:I wrote a concept thread how a bot would basically work with this in the AA forum. if you want you can pick it up
I already did it. Now im wondering how to make a script. Do I need 2 make a char profile like in micromacro? I just need some advices how 2 make it attack a mob or it is already implented and its need 2 be configured?

Re: Script request

Posted: Sat Jan 10, 2015 12:27 pm
by BlubBlab
Na there isn't much for MM2 until now.

First I would take a look at that topic :
http://solarstrike.net/phpBB3/viewtopic ... 4&start=20

To under stand how you should program for this.

You can make it simply as possible first and than add profiles and a skill database later.
To attack you need to make a table with the skills where you enter name, button, and cooldown and cast time, lastuse time.

You push for attacks simply those buttons with MM2 wait until cast time is over than fill the last use time into the table.
Before you use a skills you always check cooldown and last use. How they come in there for the use there are 2 different approaches basically in both you fill a queue in one you simple run a rota the other is using prioritizing