Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("right")
- modem.open(106)
- local count = 7
- while true do
- event,side,_,_,msg = os.pullEvent("modem_message")
- if msg == "open" then
- sleep(0.5)
- while turtle.getItemCount(1) ~= count do
- turtle.dig()
- sleep(0.2)
- end
- elseif msg == "close" then
- while turtle.getItemCount(1) > 0 do
- turtle.place()
- sleep(0.2)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment