is there any way to make my script seach for a color on the screen everywhere that my guy isnt standing
is there any way to make my script seach for a color on the screen everywhere that my guy isnt standing
Yes.
PHP Code:function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBox: TBox): Boolean;
Works like the regular FindColorSkipBox function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.
could i use that with a tpa?
There's not a built in one but I can make one if you want.
Talk to me on MSN.
i wil tomm im tired right now and not on my comp
You can also just filter out all points of the TPA that are in the box..pretty easy stuff. Want me to write something for you?

Obviously he does. >.>
Well, I told him how to do it, so he could do it himself. I wrote it though, testing.
Edit: First wayAnother way that could be shorter would be going through the box and seeing if it finds a point in the TPA in it, then deleting it. You get the idea though.SCAR Code:function FindColorsToleranceSkipBox(var Points : TPointArray; Color, xs, ys, xe, ye, Tol : integer; SkipBox : TBox) : boolean;
var
i, h : integer;
begin
result := FindColorsTolerance(Points, Color, xs, ys, xe, ye, Tol);
if not Result then
exit;
h := high(Points);
for i := 0 to h do
if PointInBox(Points[i], SkipBox) then
begin
Swap(Points[i], Points[h]);
SetArrayLength(Points, h);
h := high(Points);
end;
result := h <> -1;
end;
An even easier way would be repeating the FindColorSkipBoxTolerance through the whole box you are searching for. Whatever, you know how to do it.
Last edited by Da 0wner; 07-17-2009 at 04:28 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)