• Log in or sign up for an account here: https://www.sythe.org/login

Help with FindColour()

chris4815

Newcomer
Joined
Jan 2, 2010
Sythe Gold
0
Messages
2
Hi I'm having a bit of a problem with FindColor(). I've used it before in my first script(This is my second) but I have since lost the script :( .
Anyway This is for a 2D game where you press arrows to train your character a set of 5 is shown on the screen which you have to press in sequence.
I got the colors for the tip of each arrow and the coords on the screen to search in but it just seems to fail. I would really appreciate any help any help or a better way of implementing this.

Code:
program train;
var
 x,y:Integer;
begin
     Writeln('Started');
     Wait(1000);
     if(FindColor(x,y,3881271,271,305,277,311) = True)then
        begin
         Writeln('1');
         sendarrowwait(3,10);
         Wait(500);
        end;
     if(FindColor(x,y,1773327,300,298,306,304) = True)then
        begin
         Writeln('2');
         sendarrowwait(0,10);
         Wait(500);
        end;
     if(FindColor(x,y,3881271,329,305,335,311) = True)then
        begin
         Writeln('3');
         sendarrowwait(1,10);
         Wait(500);
        end;
end.

Now individually each one works fine but when I put them together it messes up.

Thanks Chris
 
Take the = then out and it should work...you have too many thens in an if statement.

EDIT: keep the parenthesis after the = then.....you need two so you can close the if statement then the find color function.
 
Runescape Gamblingrunescape gambling
Back
Top