CountGround

Searching for items with type ObjType on the ground and returning FindFullQuantity.

NB: The search on the ground limited by FindDistance and FindDistance

Pascal

function CountGround(ObjType : Word) : Integer;

Python

def CountGround(ObjType) -> Integer

Example Pascal

Program New;
var foodamount: integer;
begin
 if (count(food) < maxfood) then
  begin
   foodamount:=count (food);
   FindType(food,ground);
   if FindQuantity = 0 then continue;
   if (FindQuantity > (maxfood-food)) then
      grab (finditem, maxfood-food);
   else 
      grab (finditem, 0);
   wait (200);
  end;
end.```