Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scan with a circle as area.
#1
Would it be posible to enhance the scan functionality to have its work area being a circle instead of a rectangle?

For example as you know by now im coding a complete jobsystem for a game.
The game allows to pickup items in a circle around you.
With the current scan functionality you can only scan in a rectangular area.
The problem becomes obvious when the item that you find, with the rectangular scan, is outside the circlular area that you can draw inside that rectangular box.

Now i hear you thinking then why not check the coordinates of the found position and calculate if it is inside the circle you ment to?
Well the answer to that is:
Because you can not pick it up the next scan keeps finding it, thus disabling finding other items in the area.
And if you keep scanning until not found, your whole macro hangs...

To make sure, im not asking for help to program for a specific game. :lol:
Im just demonstrating the benefit of enhancing the scan functionality with a circular area. :wink:

The usage and circle structure tobe used should ofcourse look like this:
Code:
Copy      Help
type CIRCLE
,POINT'center
,int'radius
scan(file [window] [RECT|CIRCLE] [flags])
Well thats all for now, 3M
#2
Maybe somebody needs triangle Smile . Instead of CIRCLE better would be mask bitmap.

scan($file [window] [RECT] [flags] [$mask])
#3
hmmmm
So you could supply a image with a mask where to recognize or not...hmmm
Sounds indeed better...

But it would not allow dynamic areas...but thats ok...
Only thing to provide would be which color in the mask is going tobe considered as "recognize here" and "dont recognize here".
Because you could obviously not take the top-left color in that image as color...
I think black/white for mask woul be best, where either one is defined as "recognize here" or "dont recognize here" pixel color...

But anyway you think this is a nice enhancement or not?
(If yes, when it will be in :lol: :twisted: )
Well thats all for now, 3M
#4
This would be very rarely used, so will not be near the top of my long to do list.

What about temporarily adding a mask on the screen while searching? Create a mask bitmap. Assign it to a toolbar. You can make one of mask colors transparent, and remaining part partially transparent (almost invisible, but will not allow to find image in that area).

Example:

Code:
Copy      Help
int h=mac("mask_tb")
mov 300 300 h
scan(...)
clo h

Toolbar mask_tb (example):
Code:
Copy      Help
;/set 0x425 0xFCFF /transp 64 0 /bmp "C:\Documents and Settings\G\My Documents\My Pictures\untitled.bmp"

See the circle mask in the picture?


Attached Files Image(s)
   
#5
Hmm interesting...
Is this always on top?
Because when i use a popup menu, it's graphics is overwritten by the game and thus not viewable.
All i see is flickering when i move mouse.

So if this toolbar thing will be always on top and not being overwritten, then it could work maybe...

Ohh PS: im using client window area in all my scans so will this be recognized when used like that, or will only the gamescreen being scanned?
Well thats all for now, 3M
#6
The toolbar is always on top, but if the game overwrites other windows, it will probably overwrite the toolbar too.
#7
Hmm ok so that wont work also...ahh well...
Thanks for giving idea about it..
Well thats all for now, 3M


Forum Jump:


Users browsing this thread: 1 Guest(s)