noidea
2008-12-08 21:33:32
Here. It doesn't use DTM's or anything, so that makes it way faster. It just counts the black pixels around the Ore. If it find the right amount of black pixels, +1.
Here. Rate, hate, love, comments, concerns?
Here. Rate, hate, love, comments, concerns?
program New;
{.include srl/srl.scar}
{*****************************************************
Function CountOre: Integer;
By: noidea
Description: Counts any ore except clay you can mine.
Use/Example: Ore := Ore + CountOre;
writeln(IntToStr(CountOre));
*****************************************************}
Function CountOre: Integer;
var
k, I: Integer;
p : TBox;
begin
I := 1
While I < 29 do
begin
GetInvItemBounds(I, p);
if countcolor(65536, p.x1, p.y1, p.x1+34, p.y1+27) = 171 then
inc(k);
inc(I);
end;
Result := k;
end;
begin
setupsrl;
writeln(inttostr(CountOre));
end.