Page 1 of 1

Pixel Finder

Posted: Mon Aug 18, 2008 7:00 pm
by Impala
Since most games consist of finding a monster and clicking on it, how about someone makes a generic script to locate pixels and click on it based on that color. This would provide one script that could potentially bot for most games.

Re: Pixel Finder

Posted: Tue Aug 19, 2008 7:33 am
by 3cmSailorfuku
Impala wrote:Since most games consist of finding a monster and clicking on it, how about someone makes a generic script to locate pixels and click on it based on that color. This would provide one script that could potentially bot for most games.
Theres already a function similiar to the AutoIt one. It searches for a specific pixelcolour in a rectangle and outputs the coordinates.

http://solarimpact.servegame.com/wiki/i ... ixelSearch

Re: Pixel Finder

Posted: Tue Aug 19, 2008 11:58 am
by Impala
I'm trying to make a bot for GoonZu which is now known as Luminary. If I am successful, I will try to make it configurable for any game.

Re: Pixel Finder

Posted: Tue Aug 19, 2008 8:27 pm
by Administrator
This is actually not a bad idea. Know that pixelSearch() is still pretty slow and has room for optimization. Either way, you should use a for loop with pixelSearch() so that you are scanning maybe 200*200 sections across the scannable area. If you just straight scan the region, it'll scan all of the top row, then the second row, etc. which is not very optimized when you expect stuff near the middle of the screen.

Perhaps if you can write up a nice, clean, simple bot, it can be added to the example section on the wiki at the very least.

Re: Pixel Finder

Posted: Tue Aug 19, 2008 8:47 pm
by Impala
What I ran into when working with Luminary is that because its so colorful that most of the textures have the same pixel color as the actual monster. I was wondering if it is possible to scan a group of pixels as opposed to a single pixel.

Re: Pixel Finder

Posted: Tue Aug 19, 2008 9:00 pm
by 3cmSailorfuku
Impala wrote:What I ran into when working with Luminary is that because its so colorful that most of the textures have the same pixel color as the actual monster. I was wondering if it is possible to scan a group of pixels as opposed to a single pixel.
It is possible that you extract the sprites and interface or log it, so you can define a more unique colour.
I would try it if I had a NoGG version.

Re: Pixel Finder

Posted: Tue Aug 19, 2008 9:04 pm
by Administrator
What exactly do you mean by that? If you mean a specific pattern of pixels matching specific colors, then no. Not with pixelSearch(). You could write your own function to do this I suppose. Pixel scanning just doesn't work too well.

A better solution would be to hook into the game and use the game's internal list of nearby creatures, but this is much more advanced of course.

Re: Pixel Finder

Posted: Wed Aug 20, 2008 3:27 am
by Impala
I think a bit too advanced for me to hook. Luminary doesn't use game guard.

Re: Pixel Finder

Posted: Wed Aug 20, 2008 12:12 pm
by 3cmSailorfuku
Impala wrote:I think a bit too advanced for me to hook. Luminary doesn't use game guard.
I thought all ijji games do use GameGuard. Can't download it either since theres no good download for it, only on shitty 50kbs servers.

Re: Pixel Finder

Posted: Wed Aug 20, 2008 2:25 pm
by Impala
My fault,

http://luminary.ndoorsgames.com/center/default.asp

That is the game. I guess there's 2 separate games.

Re: Pixel Finder

Posted: Thu Aug 21, 2008 7:52 am
by 3cmSailorfuku
Impala wrote:My fault,

http://luminary.ndoorsgames.com/center/default.asp

That is the game. I guess there's 2 separate games.
Just took a look at the game, I wonder why almost everything is loaded Clientside?
There are the map tiles, spawn locations etc.

Anyway, my idea is; If you hover over an Mob the mouse cursor will turn to a Sword. You can do a second check while searching for mobs, if the Swordcursor appears.
You could also edit the SPR files.