Pixel Finder

You may request or share scripts for MicroMacro in this forum.
Post Reply
Message
Author
Impala
Posts: 14
Joined: Mon Aug 18, 2008 6:58 pm

Pixel Finder

#1 Post by Impala » Mon Aug 18, 2008 7:00 pm

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.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Pixel Finder

#2 Post by 3cmSailorfuku » Tue Aug 19, 2008 7:33 am

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

Impala
Posts: 14
Joined: Mon Aug 18, 2008 6:58 pm

Re: Pixel Finder

#3 Post by Impala » Tue Aug 19, 2008 11:58 am

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.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Pixel Finder

#4 Post by Administrator » Tue Aug 19, 2008 8:27 pm

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.

Impala
Posts: 14
Joined: Mon Aug 18, 2008 6:58 pm

Re: Pixel Finder

#5 Post by Impala » Tue Aug 19, 2008 8:47 pm

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.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Pixel Finder

#6 Post by 3cmSailorfuku » Tue Aug 19, 2008 9:00 pm

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.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Pixel Finder

#7 Post by Administrator » Tue Aug 19, 2008 9:04 pm

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.

Impala
Posts: 14
Joined: Mon Aug 18, 2008 6:58 pm

Re: Pixel Finder

#8 Post by Impala » Wed Aug 20, 2008 3:27 am

I think a bit too advanced for me to hook. Luminary doesn't use game guard.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Pixel Finder

#9 Post by 3cmSailorfuku » Wed Aug 20, 2008 12:12 pm

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.

Impala
Posts: 14
Joined: Mon Aug 18, 2008 6:58 pm

Re: Pixel Finder

#10 Post by Impala » Wed Aug 20, 2008 2:25 pm

My fault,

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

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

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: Pixel Finder

#11 Post by 3cmSailorfuku » Thu Aug 21, 2008 7:52 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests