Results 1 to 5 of 5

Thread: Need some help with LinearWalk

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

    Default Need some help with LinearWalk

    Code:
    procedure DoSomeWalking;
    begin
      RoadColor:=FindFallyRoadColor;
      LinearWalk(RoadColor,90,70,2,2);
      Flag;
    end;
    Ok, i dont see anything wrong with that, if you run it in Scar, all it does is
    Code:
    SRL Compiled in 31msec.
    Found Compass
    Falador RoadColor = 4543328
    Successfully executed
    in the debug box. It doesnt actually click on the map, all it does is find the Falador Road Color. Can anyone help me? I get the same problem with RadialWalk, and RadialRoadWalk.

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

    Default

    I dont think that the roadcolor it spits out is the actualy road color ... check it out ...
    Administrator's Warning:


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

    Default

    Ahhh, you're right.
    Thank you.
    Edit: That was the problem. It works now. Thanks a bunch Sumilion!

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

    Default

    No problem, let me help you even more.

    A working fala road color finder (does require you to log in + out once! ). Also finds normal road color if wanted.

    SCAR Code:
    function SumFindRoadColor(FalaColor: Boolean): Integer;
    var
      arRoadPoints: TPointArray;
      GenericColor, a, b: Integer;
      arRoughRoadColors, arRoadColors: array of Integer;
      WeGotIt: Boolean;
      ResultString: string;
    begin
      if(FalaColor)then
        GenericColor := 6057843
      else
        GenericColor := 5921377;
      if(FalaColor)then
        ResultString := 'Fala';
      ColorToleranceSpeed(2);
      SetColorspeed2Modifiers(10.0, 0.03);
      FindColorsTolerance(arRoadPoints, GenericColor, MMX1, MMY1, MMX2, MMY2, 50);
      ColorToleranceSpeed(1);
      arRoughRoadColors := GetColors(arRoadPoints);
      for a := 0 to GetArrayLength(arRoughRoadColors) - 1 do
      begin
        WeGotIt := False;
        if(arRoughRoadColors[a] > 5000000)and(arRoughRoadColors[a] < 8000000)then
        begin
          for b := 0 to GetArrayLength(arRoadColors) - 1 do
          begin
            if(arRoadColors[b] = arRoughRoadColors[a])then
              WeGotIt := True;
          end;
          if not(WeGotIt)then
          begin
            if(CountColor(arRoughRoadColors[a], MMX1, MMY1, MMX2, MMY2) > 200)then
            begin
              if(rs_OnMinimap(arRoadPoints[a].x, arRoadPoints[a].y))then
              begin
                //Writeln(IntToStr(arRoughRoadColors[a]));
                SetArrayLength(arRoadColors, GetArrayLength(arRoadColors) + 1);
                arRoadColors[GetArrayLength(arRoadColors) - 1] := arRoughRoadColors[a];
              end;
            end;
          end;
        end;
      end;
      if not(GetArrayLength(arRoadColors) = 1)then
      begin
        Writeln('Failed to find the road using SumFindRoadColor.');
        Writeln('Trying default autocoloring.');
        if(FalaColor)then
          Result := FindFallyRoadColor
        else
          Result := FindRoadColor;
      end else
        Result := arRoadColors[0];
      Writeln('RoadColor = '+IntToStr(Result));
      if(Result = 0)then
      begin
        Writeln('Failed to find the road color.');
        Writeln('Leaving it what it was.');
        if(FalaColor)then
          Result := FalaRoadColor
        else
          Result := RoadColor;
      end;
    end;
    Administrator's Warning:


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

    Default

    Thanks for that Sumilion, but now I'm having more trouble with just a normal road color. I checked to see if that was the same problem, but the color it spits out is the exact same road color. If someone could help, that would be great, here's what i have, and i dont see what's wrong with it..
    Code:
      RadialRoadWalk(RoadColor,100,150,65,2,2);
      Flag;
    And in the debug box:
    Code:
    SRL Compiled in 31msec.
    RoadColor = 6381415
    Successfully executed

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to use Radialwalk and Linearwalk. [Video]
    By ub3r |<1||3r*1337* in forum Outdated Tutorials
    Replies: 6
    Last Post: 02-20-2008, 11:34 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
  •