Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 19th, 2012  |  syntax: None  |  size: 1.23 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function InvSpotSearch(itemid, spot: Integer): Boolean;
  2.  
  3. var
  4.   spotY, s1: Integer;
  5.  
  6. begin
  7. s1 := spot;
  8. if ((spot < 1) or (spot > 30)) then
  9. begin
  10. Writeln('Please enter a correct inventory spot!');
  11. Exit;
  12. end;
  13.  
  14. if  ((spot > 5) and (spot < 11)) then
  15. begin
  16.   spotY := 1;
  17.   spot := spot - 5;
  18. end;
  19. if  ((spot > 10) and (spot < 16)) then
  20. begin
  21.   spotY := 2;
  22.   spot := spot - 10;
  23. end;
  24. if  ((spot > 15) and (spot < 21)) then
  25. begin
  26.   spotY := 3 ;
  27.   spot := spot - 15;
  28. end;
  29. if  ((spot > 20) and (spot < 26)) then
  30. begin
  31.   spotY := 4;
  32.   spot := spot - 20;
  33. end;
  34. if  ((spot > 25) and (spot < 31)) then
  35. begin
  36.   spotY := 5;
  37.   spot := spot - 25;
  38. end;
  39.   if OpenGameTab(5) then
  40.     Wait(100);
  41.     if LoadItem(itemid, bmp, item_name) then
  42.     begin
  43.       GetBitmapSize(bmp, width, height);
  44.       if FindDeformedBitmapToleranceIn(bmp, X, Y, 264 + (48 * (spot-1)) , 35 + ( 35 * spotY), 314 + (48 * (spot-1)), 70 + (35 * spotY), 0, 5,  false, accuracy) then
  45.       begin
  46.         Result := True;
  47.         Wait(300);
  48.         Writeln('Found ' + item_name + ' in inventory spot: ' + IntToStr(s1));
  49.       end else
  50.         Writeln('Could NOT locate ' + item_name + ' in inventory spot: ' + IntToStr(s1));
  51.     end;
  52.   FreeBitmap(Bmp);
  53. end;