Results 1 to 4 of 4

Thread: FindColorSkipBoxTolerance....

  1. #1
    Join Date
    Jan 2009
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindColorSkipBoxTolerance....

    Hey,

    How do I use this in a script?

    SCAR Code:
    FindColorSkipBoxTolerance

    Thanks in advance.

    Fort Ash
    I was born to cheat on Hero

  2. #2
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    I wanted to explain it for you, but I thought it would be easier explained with a script. Take a look at this:

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}

    function FindObjectSkipBoxTol: Boolean;
    var
      SkipBox: TBox;
      X, Y: Integer;
      UpText: string;

    begin
      Color := 0; // Set the color to search for.
      Tolerance := 0; // Set the tolerance to search for.
      UpText := ''; // Set the uptext for the target object.
      with SkipBox do
      begin
        X1 := 0;  // Set the coordinates for the SkipBox.
        Y1 := 0;
        X2 := 0;
        Y2 := 0;
      end;


      Result := False;
      If not LoggedIn then Exit;
      if FindColorSkipBoxTolerance(X, Y, Color, MSX1, MSY1, MSX2, MSY2, Tolerance, SkipBox) then
      begin
        MMouse(X, Y, 4, 4);
        Wait(170 + Random(175));
        if Pos(UpText, RS_GetUpText) > 0 then
        begin
          GetMousePos(X, Y);
          Mouse(X, Y, 0, 0, True);
          Result := True;
        end;
      end;
    end.

    begin
      WriteLn('Object found: ' + BoolToStr(FindObjectSkipBoxTol));
    end.

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

    Default

    You can alteratively use the IntToBox conversion . Which means you dont have to create a variable. e.g

    SCAR Code:
    with SkipBox do
      begin
        X1 := 0;  // Set the coordinates for the SkipBox.
        Y1 := 0;
        X2 := 0;
        Y2 := 0;
      end;

    can be changed to

    SCAR Code:
    SkipBox := IntToBox(0, 0, 0, 0);
    Just like FindColor e.t.c

  4. #4
    Join Date
    Jan 2009
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey,

    Thanks guys !

    Fort Ash
    I was born to cheat on Hero

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. FindColorSkipBoxTolerance
    By Killerdou in forum OSR Help
    Replies: 4
    Last Post: 12-31-2006, 12:28 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
  •