Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- function down(depth)
- local x = 0
- while x < depth + 1 do
- if turtle.down() then
- x = x + 1
- end
- end
- end
- function up(height)
- local y = 0
- while y < height + 1 do
- if turtle.up() then
- y = y + 1
- end
- end
- end
- while true do
- local id, text = rednet.receive()
- if text == "banana" then
- turtle.digUp()
- down(20)
- while not turtle.placeUp() do
- turtle.placeUp()
- end
- end
- if text == "up" then
- turtle.digUp()
- up(20)
- while not turtle.placeUp() do
- turtle.placeUp()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment