Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function down()
- i = 2
- while i > 0 do
- if turtle.detectDown() then
- turtle.digDown()
- turtle.down(1)
- i = i - 1
- else
- turtle.down(1)
- i = i - 1
- end
- end
- i = 0
- forward()
- end
- function forward()
- i = 15
- while i > 0 do
- while turtle.detectDown() do
- turtle.digDown()
- end
- while turtle.detect() do
- turtle.dig()
- sleep(0.5)
- end
- while turtle.detectUp() do
- turtle.digUp()
- end
- turtle.forward(1)
- i = i - 1
- end
- i = 0
- turn()
- end
- function turn()
- while turtle.detectUp() do
- turtle.digUp()
- end
- if turtle.detectDown() then
- turtle.digDown()
- turtle.down(1)
- else
- turtle.down(1)
- end
- turtle.turnLeft()
- turtle.turnLeft()
- down()
- end
- --Programm Start--
- rednet.open("right")
- while true do
- x, y, z = rednet.receive()
- if y == "Start" then
- turtle.refuel()
- down()
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement