Untitled


SUBMITTED BY: Guest

DATE: Dec. 17, 2013, 4:38 a.m.

FORMAT: Text only

SIZE: 832 Bytes

HITS: 3088

  1. StairsTop = 0
  2. StairsBottom = 0
  3. Levels = StairsTop - StairsBottom
  4. L = 0
  5. print("So you Want to dig a tunnel?")
  6. print("You have come to the right place.")
  7. print("Please enter your starting level:")
  8. StairsTop = io.read()
  9. print("Please enter what level you would like to stop at:")
  10. StairsBottom = io.read()
  11. function Level
  12. if turtle.detectDown() = true then
  13. turtle.digDown()
  14. turtle.down()
  15. end
  16. if turtle.detect() = true then
  17. turle.dig()
  18. turtle.forward()
  19. end
  20. if turtle.detect() = true then
  21. turle.dig
  22. end
  23. L = L + 1
  24. end
  25. function Fuel
  26. turtle.getFuelLevel()
  27. if turtle.getFuelLevel() <= 5 then
  28. turtle.select(1)
  29. turtle.refuel()
  30. end
  31. end
  32. Fuel()
  33. for Levels > L do
  34. Level()
  35. Fuel()
  36. end

comments powered by Disqus