Guest User

Untitled

a guest
Apr 25th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. Const
  2. ItemsIDs = [3031,3492] //here is items id to drop, put other ids of items here
  3. X = 32351 // Position X
  4. Y = 32228 // Position Y
  5. Z = 7 // Position Z
  6.  
  7. function GetItemFromOpenBackpack(ID: integer): TItem;
  8. var
  9. x: integer;
  10. y: integer;
  11. begin
  12. Result := nil;
  13. for x := 0 to Self.Containers.Count - 1 do
  14. begin
  15. if x >= Self.Containers.Count then Break;
  16. for y := 0 to Self.Containers.Container[x].Count - 1 do
  17. begin
  18. if y >= Self.Containers.Container[x].Count then Break;
  19. if Self.Containers.Container[x].Item[y].ID = ID then
  20. begin
  21. Result := Self.Containers.Container[x].Item[y];
  22. Exit;
  23. end;
  24. end;
  25. end;
  26. end;
  27.  
  28. while not terminated do
  29. begin
  30. UpdateWorld;
  31. for i := self.containers.count - 1 downto 0 do
  32. begin
  33. for x1 := self.containers.container[i].count - 1 downto 0 do
  34. begin
  35. ok := false;
  36. for y1 := Low(ItemsIDs) to High(ItemsIDs) do
  37. begin
  38. if self.containers.container[i].item[x1].id = ItemsIDs[y1] then
  39. ok := true;
  40. end;
  41. if ok then
  42. begin
  43. self.containers.container[i].item[x1].movetoground(X,Y,Z,2);
  44. Self.DisplayText(self.containers.container[i].item[x1].id);
  45. sleep(500);
  46. end;
  47. end;
  48. end;
  49. sleep(100);
  50. Items := 0;
  51. for i := low(ItemsIDs) to High(ItemsIDS) do
  52. begin
  53. Item := GetItemFromOpenBackpack(ItemsIDs[i]);
  54. if Item <> nil then
  55. Items := Items + 1;
  56. end;
  57. if not Items then
  58. break;
  59. sleep(100);
  60. end;
Add Comment
Please, Sign In to add comment