Results 1 to 8 of 8

Thread: If not then (SCAR-DIVI) HELP!

  1. #1
    Join Date
    Aug 2012
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default If not then (SCAR-DIVI) HELP!

    I need help i want my bot to do a task if the color is not red

    something like if color not then mouse(a,b,0,0,true);

    I want it to simply do a task if the color is not the color i'm looking for.

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    If not (GetColor(x, y) = 12345) then...

  3. #3
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    sorry are you looking to see if the mouse has the red cross after clicking , or do you not want it to click on red?

  4. #4
    Join Date
    Aug 2012
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by The Killer View Post
    sorry are you looking to see if the mouse has the red cross after clicking , or do you not want it to click on red?
    No i want it to detect red and if it's not red do something else.

  5. #5
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    What nebula posted...

  6. #6
    Join Date
    Aug 2012
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    What nebula posted...
    Doesn't work how do i make it check Dimensions of x,y,rx,ry

    example it's not this but i'm hoping for another syntax:
    If not (GetColor(x, y, rx, ry) = 2124024) then

    And i change the x,y,rx,ry to numbers of coordinates...

  7. #7
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Daher, are you searching an area for colors or a specific pixel?

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by Daher View Post
    Doesn't work how do i make it check Dimensions of x,y,rx,ry

    example it's not this but i'm hoping for another syntax:
    If not (GetColor(x, y, rx, ry) = 2124024) then

    And i change the x,y,rx,ry to numbers of coordinates...
    The syntax is exactly the same as SCAR.

    GetColor only accepts two parametres, an integer x and an integer y, as it is designed to only grab the colour of one pixel on the screen (and not multiple).

    If you want to search an area if a colour exists, then use FindColor.

    If you want to check if an area solely contains one colour, then check if the output of CountColor matches the area-size of the area you want to search (i.e. width * height, basic maths).
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

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
  •