Guest User

Untitled

a guest
Jan 7th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. rednet.open("right")
  2. function down(depth)
  3. local x = 0
  4. while x < depth + 1 do
  5. if turtle.down() then
  6. x = x + 1
  7. end
  8. end
  9. end
  10.  
  11. function up(height)
  12. local y = 0
  13. while y < height + 1 do
  14. if turtle.up() then
  15. y = y + 1
  16. end
  17. end
  18. end
  19.  
  20. while true do
  21. local id, text = rednet.receive()
  22. if text == "banana" then
  23. turtle.digUp()
  24. down(20)
  25. while not turtle.placeUp() do
  26. turtle.placeUp()
  27. end
  28. end
  29.  
  30. if text == "up" then
  31. turtle.digUp()
  32. up(20)
  33. while not turtle.placeUp() do
  34. turtle.placeUp()
  35. end
  36. end
  37.  
  38. end
Advertisement
Add Comment
Please, Sign In to add comment