Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- cAss = peripheral.wrap("bottom")
- storage = peripheral.wrap("back")
- mon = peripheral.find("monitor")
- cDir = "up"
- sDir = "north"
- cPull = cAss.pullItem
- sPull = storage.pullItem
- t = turtle
- tIC = t.getItemCount
- local start = os.day() * 24 + os.time()
- local now = start + 0.001
- mon.clear()
- local count = 0
- local amount = 0
- local n = 0
- while true do
- if tIC(1) == 0 then os.pullEvent("turtle_inventory") end
- if tIC(1) == 1 then cPull(cDir,1,1)
- else
- amount = tIC(1)
- count = count + amount
- if n % 10 == 0 then
- n = 1
- mon.setCursorPos(1,1)
- mon.clearLine()
- mon.write(count / (os.day()*24 + os.time() - start))
- else
- n = n + 1
- end
- sPull(sDir,1,amount - 1)
- cPull(cDir,1,1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment