Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function moveforward()
- turtle.forward()
- end
- function moveup()
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.up()
- end
- function movedown()
- if turtle.detectDown() then
- turtle.digDown()
- end
- turtle.down()
- end
- function chest()
- turtle.select(1)
- turtle.placeUp()
- for i=2,16 do
- turtle.select(i)
- turtle.dropUp()
- sleep(0.25)
- end
- turtle.select(1)
- turtle.digUp()
- end
- while true do
- id,msg = rednet.receive()
- if id ==0 or id ==71 then
- if msg == "stop" then
- error()
- end
- if msg == "dumpall" then
- turtle.select(1)
- turtle.placeUp()
- for i=1,16 do
- turtle.select(i)
- turtle.dropUp()
- sleep(0.25)
- end
- end
- if msg == "chest" then
- chest()
- end
- if msg == "forward" then
- moveforward()
- end
- if msg == "back" then
- turtle.back()
- end
- if msg == "up" then
- moveup()
- end
- if msg == "down" then
- movedown()
- end
- if msg == "left" then
- turtle.turnLeft()
- end
- if msg == "right" then
- turtle.turnRight()
- end
- if msg == "dig" then
- for i =0,73 do
- movedown()
- end
- sleep(1)
- for j =0,73 do
- moveup()
- end
- chest()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement