Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const
- ItemsIDs = [3031,3492] //here is items id to drop, put other ids of items here
- X = 32351 // Position X
- Y = 32228 // Position Y
- Z = 7 // Position Z
- function GetItemFromOpenBackpack(ID: integer): TItem;
- var
- x: integer;
- y: integer;
- begin
- Result := nil;
- for x := 0 to Self.Containers.Count - 1 do
- begin
- if x >= Self.Containers.Count then Break;
- for y := 0 to Self.Containers.Container[x].Count - 1 do
- begin
- if y >= Self.Containers.Container[x].Count then Break;
- if Self.Containers.Container[x].Item[y].ID = ID then
- begin
- Result := Self.Containers.Container[x].Item[y];
- Exit;
- end;
- end;
- end;
- end;
- while not terminated do
- begin
- UpdateWorld;
- for i := self.containers.count - 1 downto 0 do
- begin
- for x1 := self.containers.container[i].count - 1 downto 0 do
- begin
- ok := false;
- for y1 := Low(ItemsIDs) to High(ItemsIDs) do
- begin
- if self.containers.container[i].item[x1].id = ItemsIDs[y1] then
- ok := true;
- end;
- if ok then
- begin
- self.containers.container[i].item[x1].movetoground(X,Y,Z,2);
- Self.DisplayText(self.containers.container[i].item[x1].id);
- sleep(500);
- end;
- end;
- end;
- sleep(100);
- Items := 0;
- for i := low(ItemsIDs) to High(ItemsIDS) do
- begin
- Item := GetItemFromOpenBackpack(ItemsIDs[i]);
- if Item <> nil then
- Items := Items + 1;
- end;
- if not Items then
- break;
- sleep(100);
- end;
Add Comment
Please, Sign In to add comment