Results 1 to 10 of 10

Thread: X, y

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default X, y

    How would i get
    SCAR Code:
    FindColorTolerance(x, y, Color, msx1, msy1, msx2, msy2, Tol)
    to look for a color in the middle of the mainscreen, Where the player is?

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Depends on how great area around the player?(What box)
    ~Hermen

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

    Default

    In a box of 50*50 do this:

    SCAR Code:
    FindColorTolerance(x, y, Color, MSCX - 50, MSCY - 50, MSXY + 50, MSCY + 50, Tol)


  4. #4
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Like this?:
    SCAR Code:
    procedure CheckShark;
    begin
      if InvFull or (not LoggedIn) then Exit;
      repeat
        X := MSCX;
        Y := MSCY;
        if FindColorTolerance(x, y, 423, X - 50, Y - 50, Y + 50, Y + 50, 50) then
        begin
          RWait(1500,500);
        end else
        Exit;
      until(not FindColorTolerance(x, y, 586, X - 50, Y - 50, Y + 50, Y + 50, 50))
    end;
    Last edited by DeSnob; 05-16-2009 at 04:41 AM.

  5. #5
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no because x and y is where the colour is found. you need to do
    SCAR Code:
    FindColorTolerance(x, y, Color, MSCX - 50, MSCY - 50, MSXY + 50, MSCY + 50, Tol)

  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    That gives me an error:
    SCAR Code:
    Line 367: [Error] (17902:55): Unknown identifier 'MSXY' in script C:\Program Files (x86)\SCAR 3.20\Scripts\WishFish V1.2.scar

    SCAR Code:
    procedure CheckShark;
    begin
      if InvFull or (not LoggedIn) then Exit;
      repeat
        if FindColorTolerance(x, y,767, MSCX - 50, MSCY - 50, MSXY + 50, MSCY + 50, 876) then
        begin
          RWait(1500,500);
        end else
        Exit;
      until(not FindColorTolerance(x, y, 56, MSCX - 50, MSCY - 50, MSXY + 50, MSCY + 50, 456))
    end;

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    D'oh just change the faulty MSXY to MSCY that's the error.
    Ce ne sont que des gueux


  8. #8
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    change xy to cx. sorry my bad just copied Nauman

  9. #9
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah well..i searched everywhere. I make like 100+ silly mistakes

  10. #10
    Join Date
    Mar 2008
    Location
    The Netherlands
    Posts
    1,395
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Yeah well..i searched everywhere. I make like 100+ silly mistakes
    That's okay, you only learn from them!

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
  •