gerauchert
2007-12-01 18:05:11
So im trying to make my ranger script break the waiting loop if it finds a full red bar near it, so to do this I wanted to use FindBitmapIn and have it look in a box around the coords of my player. The problem I am having is that it will detect the bitmap perfectly fine if I use FindBitmap or I use FindBitmapIn using msx1 msy1 ect. but the moment i do something like fx+100,fy+100,fx-100,fy-100 it will not even detect it if I am standing 2 pixels from the bar…
I dont know what I am doing wrong…been testing it with this and imputing the fx and fy value each login:
I dont know what I am doing wrong…been testing it with this and imputing the fx and fy value each login:
program New;
{.include SRL/SRL.scar}
var fx,fy,x,y,RedBar : integer;
begin
SetupSRL;
fx := 240;
fy := 164;
RedBar := BitmapFromString(29, 5, 'beNpjYPjPMIqGFAIAdvCQcA=' +
'=');
ActivateClient;
Wait(1000);
repeat
Wait(100);
until FindBitmapIn(RedBar,x,y,fx+150,fy+150,fx-150,fy-150);
end.