
Untitled
By: a guest on
Aug 19th, 2012 | syntax:
None | size: 1.23 KB | hits: 10 | expires: Never
function InvSpotSearch(itemid, spot: Integer): Boolean;
var
spotY, s1: Integer;
begin
s1 := spot;
if ((spot < 1) or (spot > 30)) then
begin
Writeln('Please enter a correct inventory spot!');
Exit;
end;
if ((spot > 5) and (spot < 11)) then
begin
spotY := 1;
spot := spot - 5;
end;
if ((spot > 10) and (spot < 16)) then
begin
spotY := 2;
spot := spot - 10;
end;
if ((spot > 15) and (spot < 21)) then
begin
spotY := 3 ;
spot := spot - 15;
end;
if ((spot > 20) and (spot < 26)) then
begin
spotY := 4;
spot := spot - 20;
end;
if ((spot > 25) and (spot < 31)) then
begin
spotY := 5;
spot := spot - 25;
end;
if OpenGameTab(5) then
Wait(100);
if LoadItem(itemid, bmp, item_name) then
begin
GetBitmapSize(bmp, width, height);
if FindDeformedBitmapToleranceIn(bmp, X, Y, 264 + (48 * (spot-1)) , 35 + ( 35 * spotY), 314 + (48 * (spot-1)), 70 + (35 * spotY), 0, 5, false, accuracy) then
begin
Result := True;
Wait(300);
Writeln('Found ' + item_name + ' in inventory spot: ' + IntToStr(s1));
end else
Writeln('Could NOT locate ' + item_name + ' in inventory spot: ' + IntToStr(s1));
end;
FreeBitmap(Bmp);
end;