Neopherus

Neo's revised tunnel

Feb 2nd, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tArgs = { ... }
  2. todo = tonumber(tArgs[1])
  3. --
  4.  
  5. turtle.select(1)
  6.  
  7. function refill()
  8.   if turtle.getItemCount(1) == 0 then
  9.   turtle.select(2)
  10.   turtle.turnRight()
  11.   turtle.turnRight()
  12.   turtle.place()
  13.   turtle.select(1)
  14.   turtle.suck()
  15.   turtle.dig()
  16.   turtle.turnRight()
  17.   turtle.turnRight()
  18.   end
  19. end
  20.  
  21. function checkwallLU()
  22. refill()
  23. turtle.turnLeft()
  24. turtle.place()
  25. turtle.down()
  26. turtle.place()
  27. turtle.up()
  28. turtle.turnRight()
  29. os.sleep(0.1)
  30. end
  31.  
  32. function checkwallU()
  33. refill()
  34. turtle.turnRight()
  35. turtle.place()
  36. turtle.placeUp()
  37. end
  38.  
  39. function checkwallD()
  40. refill()
  41. turtle.place()
  42. turtle.placeDown()
  43. turtle.turnLeft()
  44. end
  45.  
  46. for i = 1, todo do
  47. turtle.select(1)
  48. refill()
  49. turtle.dig()
  50. turtle.forward()
  51. checkwallU()
  52. turtle.digDown()
  53. turtle.down()
  54. checkwallD()
  55. turtle.up()
  56. checkwallLU()
  57. end
Advertisement
Add Comment
Please, Sign In to add comment