Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oldclock = os.clock()
- mon = peripheral.wrap("top")
- term.clear()
- mon.clear()
- while turtle.getItemCount(9) < 64 do
- turtle.select(1)
- if turtle.detect() then
- turtle.dig()
- end
- sleep(0.0001)
- total = 0
- for i = 1, 9 do
- total = turtle.getItemCount(i) + total
- end
- mon.clear()
- mon.setCursorPos(1, 1)
- term.clear()
- term.setCursorPos(1, 1)
- term.redirect(mon)
- print("Status: Generating cobble")
- print("Total cobble: " .. total)
- print("Time elapsed: " .. (math.ceil(os.clock() - oldclock)) .. " seconds")
- aspeed = math.ceil((total/(math.ceil(os.clock() - oldclock)))*600)
- speed = aspeed/10
- print("Speed: " .. speed .. " cobble/min")
- term.restore()
- print("Status: Generating cobble")
- print("Total cobble: " .. total)
- print("Time elapsed: " .. (math.ceil(os.clock() - oldclock)))
- aspeed = math.ceil((total/(math.ceil(os.clock() - oldclock)))*600)
- speed = aspeed/10
- print("Speed: " .. speed .. " cobble/min")
- end
- mon.setCursorPos(1, 1)
- mon.clearLine()
- mon.write("Status: Full!")
- mon.setCursorPos(1, 4)
- mon.write("Please empty and reboot the turtle")
- term.setCursorPos(1, 1)
- term.clear()
- write("Status: Full!")
- term.setCursorPos(1, 4)
- write("Please empty and reboot the turtle")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement