Results 1 to 8 of 8

Thread: is there

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default is there

    is there any way to make my script seach for a color on the screen everywhere that my guy isnt standing

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes.

    PHP Code:
    function FindColorSkipBoxTolerance(var xyIntegercolorx1y1x2y2ToleranceIntegerSkipBoxTBox): Boolean;
    Works like the regular FindColorSkipBox function but with a tolerance parameter for finding any similar colorTolerance is used to find a color in range of the color you are looking for. The greater color range you wantthe higher the tolerance parameter should be

  3. #3
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    could i use that with a tpa?

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There's not a built in one but I can make one if you want.

    Talk to me on MSN.

  5. #5
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    i wil tomm im tired right now and not on my comp

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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?

  7. #7
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Obviously he does. >.>

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, I told him how to do it, so he could do it himself. I wrote it though, testing.

    Edit: First way
    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;
    Another 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.

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •