Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

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.```