i would just like a little feedback on this function it counts how many monks are on the mini map.
SCAR Code:
function Monks: integer;
var i: integer;
var e: extended;
var box : Tbox;
begin
dtms;
for i:= 0 to 3 do
begin
if finddtmrotated(dtm[i],x,y,mmx1,mmy1,mmx2,mmy2,0,360,1,e) then
begin
writeln('Found DTM['+inttostr(i)+'] at '+floattostr(e)+' degrees');
break;
end else;
begin
writeln('Didn''t find DTM['+inttostr(i)+']');
if i=3 then
begin
writeln('Didn''t find any DTM''s');
//nextplayer(false);
exit;
end;
end;
end;
box.x1:=x-25;
box.y1:=y-25;
box.x2:=x+25;
box.y2:=y+25;
Result:=countcolortolerance(1310462,box.x1,box.y1,box.x2,box.y2,5);
for i:= 0 to 3 do
freedtm(dtm[i]);
end;