Simba Code:
procedure CheckInventory;
var
i,p,tmpCTS:Integer;
Box:TBox;
foodCount,x,y:Integer;
begin
ToIni('Checking for food in inventory');
tmpCTS := GetColorToleranceSpeed;
for i := 1 to 28 do
begin
for p := 0 to 2 do
begin
SetColorspeed2Modifiers(Foods[p].HMod,Foods[p].SMod);
Box := InvBox(i);
if FindColor(x,y,Foods[p].Color,Box.X1,Box.Y1,Box.X2,Box.Y2) then
begin
foodCount := foodCount + 1;
ToIni('Food found in slot ' + IntToStr(i));
end;
end;
end;
How exactly does "InvBox" work? Does it convert the slot in the parameters into a box? Not too clear on it. If it doesn't... I'll just have to write a new one.
Not the complete procedure btw.