Results 1 to 5 of 5

Thread: FindRoadColor Problem

  1. #1
    Join Date
    Apr 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindRoadColor Problem

    I have been working on a script to cut logs from Varrock, but with this new update, findroadcolor has stopped working.
    Anyone know how I can figure out the road color without using that, or how to fix that?
    The player is standing in the Varrock east bank.

    Error message:
    Could Not Find Road Color!

  2. #2
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    just use autocolorthis it works fine

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

    Default

    You can put this in your script until the next SRL update.

    Code:
    function FindVarrockRoadColor: Integer;
    var
      GC, a, l, TestColor, Red, Green, Blue : integer;
    var
      P:array of Tpoint;
    begin
      GC := 7304312;
      Flag;
      FindColorsSpiralTolerance(x, y, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        TestColor := GetColor(P[a].x, P[a].y);
        red := (TestColor mod 256);
        green := ((TestColor / 256) mod 256);
        blue := ((TestColor / 256) / 256);
        if Red - Blue <= 12 then if Red - Blue >= 8 then
          if Red - Green <= 6 then if Red - Green >= -1 then
            if Green - Blue <= 10 then if Green - Blue >= 4 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;
                              WriteLn('Varrock RoadColor = ' + IntToStr(TestColor));
                              Exit;
                            end;
      end;
      WriteLn('Could not find Varrock Road Color!');
      Result := 0;
    end;

  4. #4
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Tara to the resuce, I also think Wizzup? made an function to find the new road colors.

  5. #5
    Join Date
    Apr 2007
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you all, I created my own function to find the color from that autocolorthis function.
    Here is what I did:

    Declare roadcol and roadbmp as integers

    Declare this somewhere:
    SCAR Code:
    roadbmp := BitmapFromString(3, 3, 'z78DAB370B170B430B62' +
           '0910400557F0C61');
    The function:
    SCAR Code:
    procedure findroadcol;
    begin
      roadcol:=AutoColorThis(roadbmp,20,MMX1,MMY1,MMX2,MMY2);
      writeln('Road color: '+inttostr(roadcol));
    end;
    and you can just use 'roadcol' instead of 'roadcolor'

    The first version of the script should be posted later today or tomorrow.
    I just have to get the banking working correctly and it will be runable.
    (currently it goes to the bank symbol, but it can't open the booth)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FindRoadColor
    By Bobzilla69 in forum Research & Development Lounge
    Replies: 2
    Last Post: 07-03-2008, 07:17 AM
  2. FindRoadColor; problem
    By cocodog13 in forum OSR Help
    Replies: 7
    Last Post: 03-28-2008, 03:35 AM
  3. FindRoadColor?
    By 3Garrett3 in forum OSR Help
    Replies: 7
    Last Post: 05-08-2007, 09:27 PM

Posting Permissions

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