Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dig()
- for i = 1,11 do
- turtle.dig()
- turtle.forward()
- end
- turtle.forward()
- turtle.up()
- turtle.up()
- end
- function back()
- for i = 1,12 do
- turtle.back()
- end
- turtle.down()
- turtle.down()
- -- drop part
- for i = 1,16 do
- turtle.getItemCount(i) > 0 then
- turtle.select(i)
- turtle.dropDown()
- end
- end
- rednet.open("right")
- while true do
- local id, msg = rednet.receive()
- if msg == "detected" then
- dig()
- back()
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement