Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function InvSpotSearch(itemid, spot: Integer): Boolean;
- var
- bx: TBox;
- bmp: Integer;
- begin
- if ((spot < 1) or (spot > 30)) then
- begin
- WriteLn('Please enter a correct inventory spot!');
- Exit;
- end;
- bx := IntToBox(265 + ((spot mod 5) * 49), 37 + ((spot div 5) * 34), 312 + ((spot mod 5) * 49), 69 + ((spot div 5) * 34));
- if OpenGameTab(5) then
- begin
- Wait(100);
- if LoadItem(itemid, bmp, item_name) then
- begin
- GetBitmapSize(bmp, width, height);
- Result := FindDeformedBitmapToleranceIn(bmp, X, Y, bx.X1, bx.Y1, bx.X2, bx.Y2, 0, 5, False, accuracy);
- if Result then
- WriteLn('Found ' + item_name + ' in inventory spot: ' + IntToStr(s1))
- else
- WriteLn('Could NOT locate ' + item_name + ' in inventory spot: ' + IntToStr(s1));
- FreeBitmap(bmp);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment