KeepBotting
07-10-2014, 07:13 PM
getArrayFromDtm() returns a TIntegerArray of backpack box slots that contain the specified DTM. Can be used for creating an array of nonstackable items in the inventory, or even multiple stacks of items that look the same (e.g. seeds).
function getArrayFromDtm(theDtm:integer):TIntegerArray;
var
theArray:TIntegerArray;
i:integer;
begin
for i := 1 to 28 do
begin
if tabBackpack.getSlotBox(i).dtmExists(theDtm) then
theArray.append(i);
end;
result := theArray;
end;
getItemAmountFromDtm() returns the amount of an item stack with the specified DTM. Useful for counting items that change slots, or if you're not sure what slot they're in.
function getItemAmountFromDtm(theDtm:integer):integer;
var
i:integer;
begin
for i := 1 to 28 do
begin
if tabBackpack.getSlotBox(i).dtmExists(theDtm) then
result := getItemAmount(tabBackpack.getSlotBox(i));
end;
end;
function getArrayFromDtm(theDtm:integer):TIntegerArray;
var
theArray:TIntegerArray;
i:integer;
begin
for i := 1 to 28 do
begin
if tabBackpack.getSlotBox(i).dtmExists(theDtm) then
theArray.append(i);
end;
result := theArray;
end;
getItemAmountFromDtm() returns the amount of an item stack with the specified DTM. Useful for counting items that change slots, or if you're not sure what slot they're in.
function getItemAmountFromDtm(theDtm:integer):integer;
var
i:integer;
begin
for i := 1 to 28 do
begin
if tabBackpack.getSlotBox(i).dtmExists(theDtm) then
result := getItemAmount(tabBackpack.getSlotBox(i));
end;
end;