Forum o bocie TibiaNG oraz ElfBotNG
[hide]
Const ItemsIDs = [7425,3286,3410,3359,3349,3358,3264,3377,3558,3275, 3056,3073,3354] X = 32430 Y = 31976 Z = 9 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 ,0); 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; end;[/hide]
Offline