SRL Archive - Help

If not then (SCAR-DIVI) HELP!


Daher

2012-10-18 13:16:52

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.

Nebula

2012-10-18 13:19:25

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

The Killer

2012-10-18 13:19:55

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?

Daher

2012-10-18 13:21:24

From: The Killer
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.

Olly

2012-10-18 13:31:19

What nebula posted…

Daher

2012-10-18 13:35:14

From: Ollybest
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…

footballjds

2012-10-18 13:45:01

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

Daniel

2012-10-18 21:47:58

From: Daher
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).