SRL Archive - Help and Support

Help with bitmap counting function


Google

2014-02-24 13:22:31

Stumped with how to update a function, and the includes countBitmap only returns the slot matches. I am looking for it to count stacked items in a certain slot.


function countastrals: integer;
begin
if findbitmaptolerancein(astral, x, y, mix1, miy1, mix2, miy2, 55) then
count := getamount(x, y);
result:= count;
end;

Something like this for SRL6.

Olly

2014-02-24 14:16:50

GetItemAmount(b: TBox);

findbitmap(x, y)..
writeln(getItemAmount(tabBackpack.getSlotBox(tabBackpack.pointToSlot(point(x, y))));

masterBB

2014-02-25 17:33:23

From: Olly
GetItemAmount(b: TBox);

findbitmap(x, y)..
writeln(getItemAmount(tabBackpack.getSlotBox(tabBackpack.pointToSlot(point(x, y))));


Hehe, that might need some overloads :p