Bonfield
2010-09-15 06:30:19
I tried to use CountItemBlackline, butv couldnt really get it to work so i made this
feedback?
EDIT: how can i save the results to an array, eg an item exists in inventory spots 2-10, i want to save the spots with the correct numbers of black pixels so i can choose a random spot to bank
eg [2, 4, 5, 6, 9, 28]
i want to bank one of those, but i dont know how to save the results to an array
function GetBlackline(InvSlot: Integer): Integer;
var
b: TBox;
begin
b := InvBox(InvSlot);
Result := CountColor(SRL_OUTLINE_BLACK, b.x1, b.y1, b.x2, b.y2);
end;
function CountItems_BlackLine(Count, Start_Slot, Finish_Slot: Integer): Integer;
var
i: Integer;
begin
Result := 0;
GameTab(tab_inv);
for i := Start_Slot to Finish_Slot do
if (GetBlackline(i) = Count) then
Inc(Result);
end;
feedback?
EDIT: how can i save the results to an array, eg an item exists in inventory spots 2-10, i want to save the spots with the correct numbers of black pixels so i can choose a random spot to bank
eg [2, 4, 5, 6, 9, 28]
i want to bank one of those, but i dont know how to save the results to an array