Page 3 of 7 FirstFirst 12345 ... LastLast
Results 51 to 75 of 169

Thread: [ACA]AutoColorAid v2 - by Nielsie95 and Sumilion

  1. #51
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Doubt the radial walk will get in here.

    For RS getting : Client > Client Window > Find RS
    (this is the main menu, not the tabs)
    Administrator's Warning:


  2. #52
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sumilion View Post
    Doubt the radial walk will get in here.

    For RS getting : Client > Client Window > Find RS
    (this is the main menu, not the tabs)

    yer when i click find rs it has jus a lil bit of the runescape window and the rest of the drop down menu init
    so were will the radial walking one be SRL mem

    tell me will there be a radial walk 1??

  3. #53
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by scaper123 View Post
    so were will the radial walking one be SRL mem
    tell me will there be a radial walk 1??
    Quote Originally Posted by Sumilion View Post
    Doubt the radial walk will get in here.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #54
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Thanks!a nub like me who is beginning to learn SCAR is gonna have an easier time now!

  5. #55
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    What is the 'Max Distance' variable for?

  6. #56
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    The Max Distance is the maximum amount 2 points can be from eachother before the script sees it as another object.
    Administrator's Warning:


  7. #57
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lordsaturn View Post
    What is the 'Max Distance' variable for?
    TPA splitting into ATPAs as far as I remember.

    A TPA is an array of the x and y coordinates for every single pixel of matching colors for the search, in the search area. But we need to split these pixels into an array of boxes, otherwise moving the mouse to each of the pixels matching the color that was searched for, would be kinda time-consuming and bot-line, no? That's why we split them into boxes with only ONE point in each box instead of all the points.

    The max distance variable is for you to enter what width and height those boxes should have. 15-30 is commonly used and works for most objects.

    Feel free to ask if you didn't fully grasp something of what I just wrote.

  8. #58
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    So you would want to use a higher number to be more safe with your object finding?

  9. #59
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    If your color matches a lot of the object (mark color), you should use a small number. If not, use a higher number.


    ............. - Small number
    . . . -Larger number

    . = matched color
    Hup Holland Hup!

  10. #60
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    If your color matches a lot of the object (mark color), you should use a small number. If not, use a higher number.


    ............. - Small number
    . . . -Larger number

    . = matched color
    Ah, okay. Now i understand.

    Thanks all. =]

  11. #61
    Join Date
    Jul 2008
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ....so this program helps you make a function to find and object in the main screen???

    like i could get a few colors of some cabbage and it would make a function to find the cabbage color????or what ....its a little complex

  12. #62
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by basic_i View Post
    ....so this program helps you make a function to find and object in the main screen???

    like i could get a few colors of some cabbage and it would make a function to find the cabbage color????or what ....its a little complex
    Yeh thats pretty much what it comes down to

    Get a few colors of your cabbage for example, make sure it doesn't find any (or at least not a lot) of other colors (by checking under the Client tab, pressing Mark Best Color after you've selected your colors). Then I suggest using the FindObjRecord tab to create the function that finds the object on the main screen .
    Administrator's Warning:


  13. #63
    Join Date
    May 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    (im beginer) So , for example i have took some colors of copper ore , and now i want so that my script finds the colors (that part is already done) and clicks on them. Wich part should be changer, or edited ?
    SCAR Code:
    program FindObject;
    {.include SRL\SRL.scar}

    var
      x, y: Integer;

    function FindObject(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      H, S, L: Extended;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);

      if not(FindColorsTolerance(arP, 6130899, MSX1, MSY1, MSX2, MSY2, 40)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToHSL(arC[i], H, S, L);

        if (H >= 6.45) and (H <= 6.84) and (S >= 46.81) and (S <= 74.87) and (L >= 50.57) and (L <= 68.65) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 28.30) and (X <= 50.03) and (Y >= 24.07) and (Y <= 44.62) and (Z >= 8.93) and (Z <= 22.51) then
          begin
            for j := 0 to arL2 do
            begin
              if (arUC[i] = arC[j]) then
              begin
                SetLength(arAP, Length(arAP) + 1);
                arAP[High(arAP)] := arP[j];
              end;
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Take')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;

    begin
      SetupSRL;
      FindObject(x, y);
    end.
    kk?

  14. #64
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Melon View Post
    (im beginer) So , for example i have took some colors of copper ore , and now i want so that my script finds the colors (that part is already done) and clicks on them. Wich part should be changer, or edited ?
    SCAR Code:
    program FindObject;
    {.include SRL\SRL.scar}

    var
      x, y: Integer;

    function FindObject(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2: Integer;
      P: TPoint;
      H, S, L: Extended;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);

      if not(FindColorsTolerance(arP, 6130899, MSX1, MSY1, MSX2, MSY2, 40)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);

      for i := 0 to arL do
      begin
        ColorToHSL(arC[i], H, S, L);

        if (H >= 6.45) and (H <= 6.84) and (S >= 46.81) and (S <= 74.87) and (L >= 50.57) and (L <= 68.65) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 28.30) and (X <= 50.03) and (Y >= 24.07) and (Y <= 44.62) and (Z >= 8.93) and (Z <= 22.51) then
          begin
            for j := 0 to arL2 do
            begin
              if (arUC[i] = arC[j]) then
              begin
                SetLength(arAP, Length(arAP) + 1);
                arAP[High(arAP)] := arP[j];
              end;
            end;
          end;
        end;
      end;

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Take')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;

    begin
      SetupSRL;
      FindObject(x, y);
    end.
    Well ... in the end you could do this :

    SCAR Code:
    begin
      SetupSRL;
      FindObject(x, y);
      Mouse(x, y, 0, 0, True);
    end.

    that will click on the found object, but... I made this function in SRL which does this, premade. I made a couple of TAutoColorInfo's (which stores the date you made in scar) of rocks and I use these for a rock finder.

    For more info, http://www.villavu.com/forum/showthr...=32668?t=35403
    Administrator's Warning:


  15. #65
    Join Date
    May 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks ... I will check http://www.srl-forums.com/forum/auto...3.html?t=35403 now .... rly thx x100 man
    kk?

  16. #66
    Join Date
    Jul 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i Will try make a autoing script

  17. #67
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Love this thing!

    Just so you know, just a thought, remove the unnecessary begins and ends in the find object procedures.

    Only thing I could find..
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  18. #68
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    IMO it is more readable But I suggest using the TAutoColorInfo's feature anyway since it is more advanced, more bugs have been removed... its just better supported
    Administrator's Warning:


  19. #69
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Sorry for the bump, but I saw that the FindObject function could be optimized a little bit, so I did.

    SCAR Code:
    function FindObject(var fx, fy: Integer): Boolean;
    var
      arP, arAP: TPointArray;
      arC, arUC: TIntegerArray;
      ararP: T2DPointArray;
      tmpCTS, i, j, arL, arL2, c: Integer;
      P: TPoint;
      H, S, L: Extended;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);

      if not(FindColorsTolerance(arP, 16316406, MSX1, MSY1, MSX2, MSY2, 14)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;

      arC := GetColors(arP);
      arUC := arC;
      ClearSameIntegers(arUC);
      arL := High(arUC);
      arL2 := High(arC);
      SetLength(arAP, (arL+1)*(arL2+1));

      for i := 0 to arL do
      begin
        ColorToHSL(arC[i], H, S, L);

        if (H >= 0.00) and (H <= 58.35) and (S >= 0.00) and (S <= 28.59) and (L >= 93.71) and (L <= 100.02) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 81.64) and (X <= 95.07) and (Y >= 86.07) and (Y <= 100.02) and (Z >= 95.49) and (Z <= 108.90) then
          begin
            for j := 0 to arL2 do
            begin
              if (arUC[i] = arC[j]) then
              begin
                arAP[c] := arP[j];
                Inc(c);
              end;
            end;
          end;
        end;
      end;
      SetLength(arAP, c);

      SortTPAFrom(arAP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arAP, 10, 10);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        if (Length(ararP[i]) < 10) then Continue;
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 5, 5);
        Wait(100 + Random(100));
        if (IsUpText('Take')) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

    So that you only edit the length of arAP twice, rather than each time you add a new index.

  20. #70
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

  21. #71
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Yeah, I was going to, but I figured nielsie/sumilion did it for a reason. Maybe for code cleanliness?

  22. #72
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lordsaturn View Post
    Yeah, I was going to, but I figured nielsie/sumilion did it for a reason. Maybe for code cleanliness?
    Yeah, that's what they told me.
    "It's easier to read that way."

  23. #73
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    May I ask you where did you get HSL and XYZ formula? Or did you find it?


  24. #74
    Join Date
    May 2007
    Location
    Sydney, Australia (Faggot Region)
    Posts
    1,465
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    I like this heheh


  25. #75
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hope you gyys wont mind i am going to post this on scion if you have any objections to this just say so and i will remove it, i have gave full credits to use guys

Page 3 of 7 FirstFirst 12345 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sumilion = Admin
    By mastaraymond in forum News and General
    Replies: 87
    Last Post: 01-28-2008, 02:27 PM
  2. ACA - AutoColorAid by Nielsie95
    By nielsie95 in forum Research & Development Lounge
    Replies: 88
    Last Post: 01-15-2008, 11:31 AM

Posting Permissions

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