Results 1 to 3 of 3

Thread: ACA with RSPS.

  1. #1
    Join Date
    Jan 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default ACA with RSPS.

    So I'm trying to use ACA with ProjectRS06.
    So I got the ACA down, but I can't follow the tutorial because it uses real RS.

    Simba Code:
    program AutoColor;
    {.include SRL\SRL.scar}

    function AutoColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.04, 0.11);

      if not (FindColorsTolerance(arP, 3167850, MSX1, MSY1, MSX2, MSY2, 9)) then
      begin
        //Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        Result := arC[i];
        //Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        //Writeln('AutoColor failed in finding the color.');
    end;

    begin
      SetupSRL;
      AutoColor;
    end.

    So I have that.
    Then I also have
    Simba Code:
    program Chopper;
    {$i srl/srl.simba}

    var
     X,Y:Integer;

    Procedure ClickTree;

    begin
     if FindColorTolerance(X, Y, 4221835, 260, 94, 260, 94, 5) then
      begin
       mmouse(X, Y,1,1); // moves the mouse to were the colot is found
       wait(250 + random(500)); // waits one fourth of a second
       ClickMouse(X, Y, mouse_Left)// clicks
      end;
    end;


    begin
     SetUpSRL;
     ClickTree;
    end.

    How do I implement the auto color finder into that?

  2. #2
    Join Date
    Jul 2012
    Posts
    279
    Mentioned
    5 Post(s)
    Quoted
    46 Post(s)

    Default

    Even if the tutorials are based on the real runescape, the ACA functions should work for anything as they're used to find a colour and not accomplish a particular task within runescape. All I see that you need to change are the coordinates to get rid of the MSX1, MSY1, etc.

  3. #3
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    [SIMBA]if not (FindColorsTolerance(arP, 3167850, MSX1, MSY1, MSX2, MSY2, 9)) then./SIMBA]

    Replace the MSX1 and MSY1 with the upper left most coordinate of the client and for MSX2 and MSY2 the lower right most coordinates
    Current Project: Retired

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
  •