AHK Image Recognition

11/25/2009 16:59 Kittymew#1
Hey guys, I've got most of my metallurgy bot done, but Qilla beach is just too spammy with hard black and hard whites to get it to work without a lot of false positives. If you've played with metallurgy much you know that making the sites ctrl-clickable breaks the game, so that's out. I've been playing around with the illumination mod in MAMP but I can't get ANYTHING in AHK's imagelib to work while that's on regardless of when I take the screenshot and what filter I put on.

What gives, and what have you guys done on your bots?
11/25/2009 17:03 thekeytothedoor#2
With the bot I'm working on I have it detect the image and then click +10 X axis (directly below) to avoid ctrl-clicking the actual spot.
11/25/2009 17:08 Kittymew#3
Yeah, I've done that. The problem isn't that, the problem is the fact that there's so many places the black mask will register that ISN'T the image, like the bottom of the ship or the rocks. Messing around with *N hasn't helped that much.
11/25/2009 17:16 thekeytothedoor#4
Quote:
Originally Posted by Kittymew View Post
Yeah, I've done that. The problem isn't that, the problem is the fact that there's so many places the black mask will register that ISN'T the image, like the bottom of the ship or the rocks. Messing around with *N hasn't helped that much.
What about making a gif with only the text? there's a function in ahk that allows you to ignore the clear space if you make the gif and remove the off-color. this is the line i have (but i'm still working on the sensitivity)
Code:
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, *50 *TransWhite Images\ironspot.gif
11/25/2009 17:29 Kittymew#5
Yeah, again, that's exactly what I'm doing. I'm using a white mask exactly like you're using. I had it working decently well for a while but not perfectly, I think it comes down to Mabinogi's fonts being really flaky because they're like 80% opaque.

Can anyone pull off a DLL edit for opaque fonts?
11/25/2009 17:36 lostmage333#6
I use falls site, and I still have absolutely no problem w/ AHK's imagesearch. The code quoted above by thekeytothedoor is almost exactly what I use.
11/25/2009 18:31 Kittymew#7
Thanks for the help then...
11/25/2009 19:04 thekeytothedoor#8
Quote:
Originally Posted by Kittymew View Post
Thanks for the help then...
I'm still working on my metallurbot (I'm having more problem finding the site than I am not), so if I find any more information on targetting I'll let you know.
11/26/2009 00:33 lostmage333#9
If you're getting false positives, the easiest way would be to tweak the picture you're using. Longer name -> Less positives. Are you just searching for "Iron" or "Gold"? Try searching for "Metallurgy Site", or "Iron/Gold Metallurgy Site". The downside of longer names is longer searchtime/more processor load.

Alternatively, tweak how you trim the image itself. Maybe it was that little black outline around the letters that was left (for me) that prevented false positives.
05/30/2011 08:36 Snoweł#10
Bump
05/30/2011 08:41 adam_j#11
Why? Isn't AHK detected on NA?
05/30/2011 08:50 Snoweł#12
Quote:
Originally Posted by adam_j View Post
Why? Isn't AHK detected on NA?
Mabinogi ZM is coming out soon... ;)
05/30/2011 08:57 adam_j#13
It's probably easier to garner interest in what you're doing if you provide more detail than a name.

For instance, I'm working on Project E. OMGZDONTUALLWANTTOKNOWNOW?!!?

Exactly.
05/30/2011 09:13 Snoweł#14
Quote:
Originally Posted by adam_j View Post
It's probably easier to garner interest in what you're doing if you provide more detail than a name.

For instance, I'm working on Project E. OMGZDONTUALLWANTTOKNOWNOW?!!?

Exactly.
Nexon staff informed me that Mabinogi Zimbabwe was going to be released soon.
05/30/2011 16:04 adam_j#15
If you really didn't want to post what your project is, why did you post at all?

Mabi for Zimbabwe would be lulz though.
NOT CONTENT WITH ONE DICTATORSHIP, NEXON SETS UP ANOTHER: THEMSELVES.

Cichol is replaced with Mugabe.
All the characters are black, other than Manus and Bebhin.
Elves get a more tribal look, and mud huts.

Fuck yeah, I'd proxy for that.