Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: Need help!

  1. #1
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Need help!


    Could someone autocolor that road for me, please?

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

    Default

    You should have a look in AutoColor.scar located in Includes\SRL\SRL\Core

    I think the one for that is FindDirtRoadColor btw, not sure though.


    Hmm, and you do want an autocoloring function right? If someone would autocolor it for you you would just get one color, which you do get also by just picking the color from the road.

  3. #3
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    You should have a look in AutoColor.scar located in Includes\SRL\SRL\Core

    I think the one for that is FindDirtRoadColor btw, not sure though.


    Hmm, and you do want an autocoloring function right? If someone would autocolor it for you you would just get one color, which you do get also by just picking the color from the road.
    I tried FindDirtRoadColor but it got wrong color for me
    And yes, I mean autocoloring function.

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

    Default

    Try making an autocoloring function of your own

  5. #5
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried once, but its very difficult andyou need to know much about colors / scar

    [22:20] <[-jesus-]> freddy, go uninstall yourself

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

    Default

    make a small bitmap and use the function

    Autocolorthis

    or summtin

    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!

  7. #7
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by JuKKa View Post
    make a small bitmap and use the function

    Autocolorthis

    or summtin
    What tolerance I should use?

  8. #8
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by BlueDraGoN777 View Post
    pickcolor option is there, use it on any road!lol.
    The only problem is that the road color changes

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

    Default

    Wanna learn and post the ruddy 50 posts for wizzup.
    = ?

    The AutoColorThis should work, its also in the SRL\SRL\Core\AutoColor.scar

    About Tol, maybe around 20 or something?

  10. #10
    Join Date
    Jan 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  11. #11
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by david2031 View Post
    what road?

    This

  12. #12
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    = ?

    The AutoColorThis should work, its also in the SRL\SRL\Core\AutoColor.scar

    About Tol, maybe around 20 or something?
    I will try that when I can log back in whit my main
    Now I'm having login server offline problem(h)

  13. #13
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    hers another option:
    itl work perfectly IF that picture you uploaded has no color loss!
    if it does, just go into runescape and get the color, and put it where 4284786 is. youl only have to do this once, maybe not even. but it has to have a reference color. which i got from the picture. if the picture does have color loss ul need to get a new color.
    SCAR Code:
    function AutoColorDirtPath : integer;
    var
      TolLvl : integer;
    begin
      TolLvl := 0;
      repeat
        if FindColorTolerance(x, y, 4284786, MMX1, MMY1, MMX2, MMY2, TolLvl) then break;
        inc(TolLvl);
      until (TolLvl >= 15);
      if (TolLvl >= 15) then EXIT;
      Result := GetColor(x, y);
    end;
    usage:
    Code:
    FindColor(x, y, AutoColorDirtPath, MMX1, MMY1, MMX2, MMY2);
    i made it so feel free to use it, but DO NOT credit me. its a simple shitty thing that took 34.786 seconds. i don't want credit.

  14. #14
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Oh I love these....

    There are several ways of doing this:
    1. If you get me a heap of colours (at least 5) from different worlds at different times I may be able to help you.
    2. Make a bitmap (like people above me have said) and use AutoColorThis
    3. Make a DTM and use GetColor.

    From looking at that ss, I think the DTM would be the best method. The autocolour function might not work cos the surround colours are similar to the road.

  15. #15
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Oh I love these....

    There are several ways of doing this:
    1. If you get me a heap of colours (at least 5) from different worlds at different times I may be able to help you.
    2. Make a bitmap (like people above me have said) and use AutoColorThis
    3. Make a DTM and use GetColor.

    From looking at that ss, I think the DTM would be the best method. The autocolour function might not work cos the surround colours are similar to the road.
    Here is a heap of colours for you
    1. 3229527
    2. 3560800
    3. 3163478
    4. 3296089
    5. 3165270
    6. 3297113
    7. 3297881
    8. 3430749
    9. 3298905

  16. #16
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe just edit FindDirtRoadColor?

    SCAR Code:
    function FindDirtRoadColorForMiles: Integer;
    var
      GC, a, l, TestColor, Red, Green, Blue, x, y : integer;
    var
      P:array of Tpoint;
    begin
      if WaterColor = 0 then WaterColor:=FindWaterColor;
      if not (FindColor(x, y, WaterColor, MMX1, MMY1, MMX2, MMY2)) then
        WaterColor := FindWaterColor;
      GC := 4548987;// <--- put your own color here@!@!@
      Flag;
      FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 140);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        if rs_OnMinimap(P[a].x,P[a].y) then
        begin
          TestColor := GetColor(P[a].x,P[a].y);
          if SimilarColors(TestColor,GC,140) then
          begin
            red := (TestColor mod 256);
            green := ((TestColor / 256) mod 256);
            blue := ((TestColor / 256) / 256);
            if Red - Green <= 33 then if Red - Green >= 5 then if Red <= 120 then
              if Green - Blue >= 17 then if Green - Blue <= 58 then
                if Blue <=45 then if Red - Blue >= 30 then if Red - Blue <= 75 then
                  if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
                    if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
                      if GetColor(P[a].x, P[a].y + 5) = TestColor then
                        if GetColor(P[a].x + 5, P[a].y) = TestColor then
                          if GetColor(P[a].x, P[a].y + 3) = TestColor then
                            if GetColor(P[a].x + 3, P[a].y) = TestColor then
                              if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
                                if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
                                  if ((WaterColor = 0) or not (FindColor(x, y,
                                    WaterColor, P[a].x - 10, P[a].y - 10,
                                    P[a].x + 10, P[a].y + 10))) then
                                    begin
                                      Result := TestColor;
                                      WriteLn('Dirt Road Color = ' +
                                      IntToStr(TestColor));
                                      Exit;
                                    end;
          end;
        end;
      end;
      WriteLn('Could not find Dirt Road Color!');
      Result := 0;
    end;
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  17. #17
    Join Date
    Oct 2006
    Location
    I'm also from Michigan!
    Posts
    563
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    I love autocoloring I guess its kinda my specialty?

    I could work on a function for ya when I get home, if you wanted and if you still need it by then(at work right now then classes all night:/) Ill play with it when I get home tonight. if you have msn, go ahead and add me.


    offtopic, but footballjds's sig scares me, haha.

  18. #18
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by antti mies View Post
    Here is a heap of colours for you
    1. 3229527
    2. 3560800
    3. 3163478
    4. 3296089
    5. 3165270
    6. 3297113
    7. 3297881
    8. 3430749
    9. 3298905
    I made this in about 30 seconds so I'm not sure if it will work.

    SCAR Code:
    function FindDirtRoadColour: Integer;
    var
      GC, a, TestColor, Red, Green, Blue : integer;
    var
      P: TPointArray;
    begin
      GC := 3297113;
      FindColorsSpiralTolerance(MMCX, MMCY, P, GC, x1, y1, x2, y2, 60);
      for a:= 0 to High(P) do
      begin
        if (rs_OnMinimap(P[a].x, P[a].y)) then
        begin
          TestColor := GetColor(P[a].x,P[a].y);
          if SimilarColors(TestColor,GC,60) then
          begin
            Red := (TestColor mod 256);
            Green := ((TestColor / 256) mod 256);
            Blue := ((TestColor / 256) / 256);
            if (Red - Blue <= 47) then if (Red - Blue >= 33) then
            if (Red - Green <= 22) then if (Red - Green >= -2) then
            if (Green - Blue <= 42) then if (Green - Blue >= 16) then
            if (GetColor(P[a].x + 5, P[a].y + 5) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x, P[a].y + 5) = TestColor) then
            if (GetColor(P[a].x + 5, P[a].y) = TestColor) then
            if (GetColor(P[a].x, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y) = TestColor) then
            if (GetColor(P[a].x + 5, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y + 5) = TestColor) then
            begin
              Result := TestColor;
              Exit;
            end;
          end;
        end;
      end;
    end;

  19. #19
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Meh, didn't see his post (^) so I made this...

    SCAR Code:
    Function AutoColorDirtRoad: Integer;
    Var
      I, tmpColor: Integer;
      X, Y, Z: Extended;
      Points: TPointArray;
    Begin
      Result:= -1;
      FindColorsTolerance(Points, 3296089, MMX1, MMY1, MMX2, MMY2, 50);
      B:= High(Points);
      For I:= 0 To B - 1 Do
      Begin
        tmpColor:= GetColor(Points[I].x, Points[I].y);
        ColorToXYZ(tmpColor, X, Y, Z);
        If (X < 10.0) And (X > 3.0) And (Y < 10.0) And (Y > 3.0) And
           (Z < 9.0 ) And (Z > 1.0) Then
        Begin
          Result:= tmpColor;
          Break;
        End;
      End;
      If Result = -1 Then Exit;
      WriteLn('The Color is: '+ IntToStr(Result));
    End;
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  20. #20
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    I made this in about 30 seconds so I'm not sure if it will work.

    SCAR Code:
    function FindDirtRoadColour: Integer;
    var
      GC, a, TestColor, Red, Green, Blue : integer;
    var
      P: TPointArray;
    begin
      GC := 3297113;
      FindColorsSpiralTolerance(MMCX, MMCY, P, GC, x1, y1, x2, y2, 60);
      for a:= 0 to High(P) do
      begin
        if (rs_OnMinimap(P[a].x, P[a].y)) then
        begin
          TestColor := GetColor(P[a].x,P[a].y);
          if SimilarColors(TestColor,GC,60) then
          begin
            Red := (TestColor mod 256);
            Green := ((TestColor / 256) mod 256);
            Blue := ((TestColor / 256) / 256);
            if (Red - Blue <= 47) then if (Red - Blue >= 33) then
            if (Red - Green <= 22) then if (Red - Green >= -2) then
            if (Green - Blue <= 42) then if (Green - Blue >= 16) then
            if (GetColor(P[a].x + 5, P[a].y + 5) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x, P[a].y + 5) = TestColor) then
            if (GetColor(P[a].x + 5, P[a].y) = TestColor) then
            if (GetColor(P[a].x, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y) = TestColor) then
            if (GetColor(P[a].x + 5, P[a].y + 3) = TestColor) then
            if (GetColor(P[a].x + 3, P[a].y + 5) = TestColor) then
            begin
              Result := TestColor;
              Exit;
            end;
          end;
        end;
      end;
    end;
    Actually I tried that already, but it gave me wrong color :)

  21. #21
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by antti mies View Post
    Actually I tried that already, but it gave me wrong color
    Did you try the one I just made. Its different from the one in SRL. I made it based on the colours you just gave me.

  22. #22
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Did you try the one I just made. Its different from the one in SRL. I made it based on the colours you just gave me.
    I will test it now :p

  23. #23
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Did you try the one I just made. Its different from the one in SRL. I made it based on the colours you just gave me.
    I tried it and it worked quite well, but the only problem is that when I stand right
    in the same plase as in that pickture it gets wrong color

  24. #24
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by antti mies View Post
    I tried it and it worked quite well, but the only problem is that when I stand right
    in the same plase as in that pickture it gets wrong color
    Yea its probably cos its detecting the colour of the dirt to the north instead. I'll see what I can do. In the meantime would you mind getting me more colours. The more colours the better.

  25. #25
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    I tried it more and it doesn't seem to work anymore in anyplace

Page 1 of 2 12 LastLast

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
  •