Results 1 to 12 of 12

Thread: Autocolor Dirtroad?

  1. #1
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Autocolor Dirtroad?

    I want the exact color of the dirt road from the minimap.
    But the FindDirtRoadColor function acts strange, and types:

    Code:
    Successfully compiled
    SRL Compiled in 0 msec
    Could not find Water Color!
    Could not find Water Color!
    Could not find Dirt Road Color!
    0
    Successfully executed
    Why does it need to find the Water color?

    So, I want to know, how can I find THIS color:

    *Stuff blackened out for obvious reasons*


  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Have you tried RadialRoadWalk(FindDirtRoadColor,....)?
    Project: Welcome To Rainbow

  3. #3
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That doesn't help. It simply can't, since:
    1. If the function doesn't work where it is supposed to, it won't work there.
    2. The function isn't for RadialWalk/RoadWalk only.
    3. I don't want to use it with RadialRoadWalk.

    I'm using it for a DDTM, but I guess it's possible to just leave the color out... But I still want this fixed, since It's likely I will have to use this function somewhere else.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Make A Bitmap of the ground on the MM; and use AutoColorThis

  5. #5
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    FindDirtRoadColor is meant for lumby dirt road color... not varrock, u would have to make ur own.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  6. #6
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Tried a FindColor with tol that works if your too lazy to make a BMP

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

    Default

    Use RadialWalkEx:
    SCAR Code:
    Procedure Walk;
    Var
      TPA : TPointArray;
      X,Y : Integer;
    Begin
      If RadialWalKEx(TPA, MMCX, MMCY, Color, Tolerance, StartAngle, EndAngle, Radius) Then
      Begin
        MiddleTPAex(TPA, X, Y);
        MFF(X, Y, Xmod, Ymod);
        FFlag(0);
      End Else
      Begin
        Writeln('Couldnt walk!');
        ...
      End;
    End;


  9. #9
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    It searches for water color because the colors of the riverbanks overlap with the dirt roads around lumby and barb village. So it makes sure there isn't any water color within a certain distance of any water.

    Beside that, FindDirtRoadColor hasn't been updated in a long time, and may not work at all. It was never very good to begin with.


  10. #10
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here's mine. If you use, be sure to credit me properly.
    SCAR Code:
    function AutoColorDirtRoad: Integer;
    var
      R,G,B : Integer;
      H,S,L : Extended;
      X,Y,Z : Extended;
      MyColor, TestColor : Integer;
      TPA : TPointArray;
      C1 : TIntegerArray;
      i, C2 : Integer;
    begin
      MyColor := 5598078;
      FindColorsSpiralTolerance(MMCX, MMCY, TPA, MyColor, MMX1, MMY1, MMX2, MMY2, 60);
      C1 := GetColors(TPA);
      C2 := Length(C1) -1;
      for i := 0 to C2 do
        begin
          if RS_OnMinimap(TPA[i].X, TPA[i].Y) then
          begin
            TestColor := GetColor(TPA[i].X, TPA[i].Y);
            begin
               ColorToRGB(TestColor, R, G, B);
               ColorToHSL(TestColor, H, S, L);
               ColorToXYZ(TestColor, X, Y, Z);
               if InRange(R - G, -1, 39) then
                 if InRange(R - B, 21, 61) then
                   if InRange(G - B, 2, 42) then
                     if InRange(Round(S) - Round(H), -5, 25) then
                       if InRange(Round(L) - Round(H), 17, 47) then
                         if InRange(Round(S) - Round(L), -37, -7) then
                           if InRange(Round(X) - Round(Y), -7, 7) then
                             if InRange(Round(Y) - Round(Z), -2, 12) then
                               if GetColor(TPA[i].X + 2, TPA[i].Y + 2) = TestColor then
                                 if GetColor(TPA[i].X + 1, TPA[i].Y + 1) = TestColor then
                                 begin
                                   Writeln('Dirt Road Color = '+Inttostr(TestColor));
                                   Result := TestColor;
                                   Exit;
                                 end;
          end;
        end;
      end;
      Writeln('Couldnt find My Color!');
      Result := 0;
    end;

  11. #11
    Join Date
    Sep 2007
    Location
    Bikini Bottom
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, thanks a lot for that function, itschris917!
    I'll try it out immediately, it's only like 2 minutes of work...
    If it works, I'm sure as hell gonna use it, and you will be credited


    EDIT:
    It works! +rep you for this

    EDIT MARK II:
    Hmm, it seems to pick the transfer color from dirtroad to normal road on specific places =/
    That means the little grey/brown area where normal roads and dirt roads come together...
    Any way to fix this (hopefully easily fixable) problem?

    EDIT MARK III:
    When using AutoColorThis, is suddenly works :P
    So I ain't gonna use your function, itschris197. Thanks for it anyway!

  12. #12
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Glad you got it to work.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Doesn't AutoColor
    By BKNYKavkaz in forum OSR Help
    Replies: 5
    Last Post: 04-26-2008, 10:31 AM
  2. Help AUTOCOLOR???
    By papenco in forum OSR Help
    Replies: 0
    Last Post: 12-06-2007, 06:27 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
  •