daily pastebin goal
23%
SHARE
TWEET

try

a guest Feb 13th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. turtle.select(1)
  2.  
  3. textutils.slowWrite("\n")
  4. textutils.slowWrite("loading... \n")
  5.  
  6. textutils.slowWrite("refueling... \n")
  7.  
  8. fuellevel=turtle.getFuelLevel()
  9. turtle.refuel()
  10. if fuellevel==turtle.getFuelLevel() then
  11.     textutils.slowWrite("Warning: no fuel added! \n\n")
  12. end
  13.  
  14. textutils.slowWrite("ask questions... \n")
  15. textutils.slowWrite("what length do you want to dig? \n")
  16. lengthdig = tonumber(read())
  17. textutils.slowWrite("how deep do you want to dig? \n")
  18. deepdig = tonumber(read())
  19.  
  20. textutils.slowWrite("starting... \n")
  21.  
  22. length = 1
  23. deep = 0
  24.  
  25. print("Deep: "..deep.."/"..deepdig)
  26. print("Length: "..length.."/"..lengthdig)
  27.  
  28. while true do
  29.  
  30. if deep~=deepdig then
  31.     turtle.digDown()
  32.     turtle.down()
  33.     turtle.turnLeft()
  34.     turtle.dig()
  35.     turtle.turnRight()
  36.     turtle.turnRight()
  37.     turtle.dig()
  38.     turtle.turnLeft()
  39.     deep = deep+1
  40.     print("Deep: "..deep.."/"..deepdig)
  41. else
  42.     print("Length: "..length.."/"..lengthdig)
  43.     if length==lengthdig then
  44.         finish()
  45.     else
  46.         turtlegoup = 0
  47.         while turtlegoup ~= deepdig do
  48.             turtle.up()
  49.             turtlegoup = turtlegoup + 1
  50.         end
  51.         deep = 0
  52.         length = length+1
  53.         turtle.forward()
  54.     end
  55. end
  56.  
  57. end
  58.  
  59. function finish()
  60.  
  61. textutils.slowWrite("\n")
  62. textutils.slowWrite("Finished! \n")
  63. textutils.slowWrite("\n")
  64.  
  65. end
RAW Paste Data
Top