Code: Select all
procedure grab_in_backpack(Stype : word);
var pID : Cardinal;
begin
findtype(Stype,backpack);
pID:=finditem;
if findquantity<200 then
begin
if findcount>0 then moveitem(findtype(Stype,ground), 300, pID,0,0,0)
else moveitem (findtype (Stype,ground), 300, backpack,0,0,0);
end;
end;