Log in

View Full Version : wrond xs to a finder function?



wantonman
01-02-2012, 09:29 PM
program poop;

procedure sraigtupwin;
var x,y,x1,y1,x2,y2:integer;
begin
x1:= x-45 ;
y1:= y-45 ;
x2:= x+45 ;
y2:= y+45 ;

if findcolor(x,y,255,0,0,480,410) then
begin
movemouse(x,y);
getmousepos(x,y);
if
findcolorspiral(x,y,8421376,x1,y1,x2,y2)then
begin
writeln('yes');
end;
end;
end;


begin
activateclient;
wait(2000);
sraigtupwin;
end.

logical
01-02-2012, 09:42 PM
You add and subtract from x and y before you have set them as a number.
x and y will start off as 0 and your x1 and y1 values will be -45 which is outside the client area :)
Start working on your standards as well.

E:
program poop;

procedure SraigtUpWin;
var
x, y, a: Integer;
begin
a := 45;
if FindColor(x, y, 255, 0, 0, 480, 410) then
begin
//movemouse(x, y); // this is a built in function and very unhuman (will get your banned quickly)
MMouse(x, y, 9, 9); // use this instead so it will randomise your movements
if FindColorSpiral(x, y, 8421376, x - a, y - a, x + a, y + a) then
WriteLn('yes');
end;
end;


begin
ActivateClient;
Wait(2000);
SraigtUpWin;
end.

wantonman
01-02-2012, 10:04 PM
cool thank you

if i wanted to make the box a rectangle would i do something like this?


FindColorSpiral(x, y, 8421376, x - a, y - a, x + a, y + a+10)