Log in

View Full Version : How to make SIMBA do a task when it can't recognize a color



Daher
08-20-2012, 10:56 AM
How can i make SIMBA do a task when it can't recognize the color

maybe?


var
A:Integer
B:Integer

const
GOLDC = 1816341; // Goldcharms color

begin
repeat;
if findcolor(A,B,4143674,790,301,983,550)then
clickmouse(A,B,0,0,mouse_left);
until(false);
end.

begin
ClickMouse(790,549,391,493,mouse_left) // This is the task it should do if it can't find the color ?,
end;

So basically i have the main task loop, but if it can't find it then it'll go to the clickmouse one


Please give me the syntax what i did at up, is just a example....

P1ng
08-20-2012, 10:59 AM
This would work, but I recommend using the SRL include and checking out Mouse, MMouse and ClickMouse2 if this is for runescape. Also, tolerance is likely to be needed because the colours in RS change a fair bit.
var
A:Integer
B:Integer

const
GOLDC = 1816341; // Goldcharms color

begin
repeat;
if findcolor(A,B,4143674,790,301,983,550)then
clickmouse(A,B,0,0,mouse_left) else
ClickMouse(790,549,391,493,mouse_left);
until(false);
end.

riwu
08-20-2012, 10:59 AM
if findcolor(A,B,4143674,790,301,983,550)then
clickmouse(A,B,0,0,mouse_left)
else
ClickMouse(790,549,391,493,mouse_left);

Daher
08-20-2012, 11:00 AM
if findcolor(A,B,4143674,790,301,983,550)then
clickmouse(A,B,0,0,mouse_left)
else
ClickMouse(790,549,391,493,mouse_left);

So the syntax is else ?

Daher
08-20-2012, 11:01 AM
This would work, but I recommend using the SRL include and checking out Mouse, MMouse and ClickMouse2 if this is for runescape. Also, tolerance is likely to be needed because the colours in RS change a fair bit.
var
A:Integer
B:Integer

const
GOLDC = 1816341; // Goldcharms color

begin
repeat;
if findcolor(A,B,4143674,790,301,983,550)then
clickmouse(A,B,0,0,mouse_left) else
ClickMouse(790,549,391,493,mouse_left);
until(false);
end.

It's for private servers.

P1ng
08-20-2012, 11:06 AM
Then that code should work perfectly fine

Daher
08-20-2012, 02:02 PM
Thanks p1ng, great member :)