well, i need a function that returns the amount of items in a shop, i already tried something, basicly what i did was i took the invcount function and changed the coordinates it clicks at... but it doesnt work, here it is:
SCAR Code:
function CountNPCtradeslot(var items: Integer; i: Integer): Boolean;
var
cc, a: Integer;
iCount: string;
ix, iy, row, col: Integer;
begin
row := i div 8;
col := i - (row * 8) - 1;
if (col < 0) then
begin
col := 7;
row := row - 1;
end;
ix := 88 + (col * 47) + Random(7);
iy := 76 + (row * 47) + Random(7);
Result := True;
cc := LoadChars2(AppPath + 'CharsChat2\fontsmall\');
iCount := GetTextAtEx(ix, iy, 0, cc, False, False, 0,
0, 65535, 10, True, tr_Digits)
a := Pos('K', iCount);
if a <> 0 then iCount := Copy(iCount, 1, Length(iCount) - 1) + '000';
a := Pos('M', iCount);
if a <> 0 then iCount := Copy(iCount, 1, Length(iCount) - 1) + '000000';
if Trim(iCount) = '' then
begin
Result := False;
iCount := '1';
end;
items := StrToInt(Trim(iCount));
end;
i want to use this in my rune buyer, so it know when to stop buying
thanks
---iloveit8---