Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function getItems()
- print("Collecting items.")
- local tTurtles = {peripheral.find("turtle")}
- local sChest
- for _, sName in ipairs(peripheral.getNames()) do
- if sName:find("chest") then
- sChest = sName
- break
- end
- end
- if not sChest then
- error("Couldn't find chest!")
- end
- for i = 1, #tTurtles do
- local tCurrent = tTurtles[i]
- for o = 1, 16 do
- tCurrent.pushItems(sChest, o, 1, o)
- end
- end
- end
- getItems()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement