Results 1 to 11 of 11

Thread: FindRockColor

  1. #1
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default FindRockColor

    Old one was broken.
    I made this one.

    SCAR Code:
    Function FindRockColor2: Integer;
    var
      Lengths, TestColor, Col, i: Integer;
      Rockk: Array of TPoint;
    begin
      col := 3028286;
      FindColorsSpiralTolerance(MMCX, MMCY, Rockk, Col, MMX1, MMY1, MMX2, MMY2, 25);
      Lengths := GetarrayLength(Rockk);
      for i := 0 to Lengths - 1 do
      begin
        TestColor := Getcolor(Rockk[i].x, Rockk[i].y);
        if Getcolor(Rockk[i].x + 1, Rockk[i].y) = TestColor then
        begin
          Result := TestColor;
          writeln('RockColor = '+inttostr(result));
          exit;
        end;
      end;
      writeln('[Error]Couldnt Find The Rock Color!');
      Result := 0;
    end;
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

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

    Default

    That won't work... to fix it just expand the RGB ranges from SRL FindRockColor.


  3. #3
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    =
    Rock colors aren't static. Which is the reason we even have autocolors for them.

  4. #4
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    It works for me every time.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    or this one
    SCAR Code:
    function FindRockColor: Integer;
    var
      GC, a, l, TestColor: integer;
    var
      P:array of Tpoint;
    begin
      GC := 5591394;
      Flag;
      FindColorsSpiralTolerance(MMCX,MMCY, P, GC, MMX1,MMY1,MMX2,MMY2, 80);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        TestColor := GetColor(P[a].x,P[a].y);
        if (TestColor-GetColor(P[a].x+1,P[a].y)=1250837)then
        begin
          Result := TestColor;
          WriteLn('Rock Color = ' + IntToStr(TestColor));
          Exit;
        end;
      end;
      WriteLn('Could not find Rock Color!');
      Result := 0;
    end;
    could you test for me please
    it works for me

    ~shut

  6. #6
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    or this one
    SCAR Code:
    function FindRockColor: Integer;
    var
      GC, a, l, TestColor: integer;
    var
      P:array of Tpoint;
    begin
      GC := 5591394;
      Flag;
      FindColorsSpiralTolerance(MMCX,MMCY, P, GC, MMX1,MMY1,MMX2,MMY2, 80);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        TestColor := GetColor(P[a].x,P[a].y);
        if (TestColor-GetColor(P[a].x+1,P[a].y)=1250837)then
        begin
          Result := TestColor;
          WriteLn('Rock Color = ' + IntToStr(TestColor));
          Exit;
        end;
      end;
      WriteLn('Could not find Rock Color!');
      Result := 0;
    end;

    could you test for me please
    it works for me

    ~shut

    80 tolerance is way to much. The rock colour on hte MiniMap is the same colour as around the minimaps, like next to the Comapss. I really like DebugTPA, by Wizzup? to help find these things.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

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

    Default

    He checks the difference which makes it really accurate: if (TestColor-GetColor(P[a].x+1,P[a].y)=1250837)then

    That's how SRL FindRockColor works.


  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    He checks the difference which makes it really accurate: if (TestColor-GetColor(P[a].x+1,P[a].y)=1250837)then

    That's how SRL FindRockColor works.
    exactly so it will ONLY find the rock color not any other grey color
    by searching the color one pixel to the right it can check the differance between the two colors and if they are a certain differance then it will have found the color which is why its very accurate

    ~shut

  9. #9
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    @Shut

    Works great. Thanks man
    METAL HEAD FOR LIFE!!!

  10. #10
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    Thanks
    Added & closed
    I made a new script, check it out!.

  11. #11
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Few things:
    -Was it not possible to use the constant RGB relation?
    -Why spiral?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FindRockColor..
    By NewToAutoing in forum OSR Help
    Replies: 4
    Last Post: 05-27-2007, 03:07 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
  •