Compiles fine, findcolor doesnt seem to do its job?

Discussion in 'Scar/Simba Help' started by evoX, Aug 17, 2008.

Compiles fine, findcolor doesnt seem to do its job?
  1. Unread #1 - Aug 17, 2008 at 6:24 PM
  2. evoX
    Referrals:
    0

    evoX Guest

    Compiles fine, findcolor doesnt seem to do its job?

    Hi folks,

    I havent used SCAR before; But im using it for a non-rs game.

    This is what ive got so far..

    Code:
    program findMonster;
    var
    x, y, loopcount : integer;
    
    procedure findMonster;
              begin
                   If (FindColorTolerance(x, y, 329034, 33, 127, 950, 720, 250))then
                   MoveMouseSmooth(x, y);
                   writeln('Mouse moving to ('+ IntToStr(x)+', '+IntToStr(y)+')');
                   wait(3000+random(2000));
                   ClickMouse(x, y, True);
                   GetMousePos(x, y);
                   writeln('Mouse @ ('+ IntToStr(x)+', '+IntToStr(y)+')');
                   wait(3000+random(2000));
              end;
              
    begin
    repeat
          findMonster;
    until(loopcount>3)
    end.
    
    All i seem to get in my debug window is

    Code:
    Successfully compiled (37 ms)
    Mouse moving to (0, 0)
    Mouse now at (-1, 0)
    
    Am i missing something? It must be finding the colour if its moving onto the next part of the program
     
  3. Unread #2 - Aug 19, 2008 at 8:27 PM
  4. Runescapian321
    Joined:
    Sep 19, 2007
    Posts:
    179
    Referrals:
    0
    Sythe Gold:
    0

    Runescapian321 Active Member

    Compiles fine, findcolor doesnt seem to do its job?

    A tolerance of 250 (The last argument in FindColorTolerance) looks for a HUGE range of colors (Either 255 or 355, I forget which, is the highest tolerance can be, in which case it would look for any color at all). I would suggest changing it to 25 or lower if you want it to look for a color atleast somewhat similar to the one you put in.
     
< Something Wrong in Math.scar | >>>>>>>>>>>>Do rsbot scripts work with scar?<<<<<<<<<< >

Users viewing this thread
1 guest


 
 
Adblock breaks this site