Advertisement
soee

flog

Jun 7th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function fellTree()
  2.   turtle.dig()
  3.   turtle.forward()
  4.   local height = 0
  5.   while ( turtle.detectUp() ) do
  6.     turtle.dig()
  7.     turtle.digUp()
  8.     turtle.up()
  9.     height = height + 1
  10.   end
  11.  
  12.   turtle.turnRight()
  13.   turtle.dig()
  14.   turtle.forward()
  15.   turtle.turnLeft()
  16.  
  17.   for i=1,height do
  18.     turtle.dig()
  19.     turtle.digDown()
  20.     turtle.down()
  21.   end
  22.   turtle.dig()
  23. end
  24.  
  25. local function plant()
  26.   turtle.up()
  27.   turtle.select(2)
  28.   for i=1,4 do
  29.     turtle.suckDown()
  30.     turtle.placeDown()
  31.     turtle.forward()
  32.     turtle.turnLeft()
  33.   end
  34. end
  35.  
  36. local function moveToSuck()
  37.   turtle.turnRight()
  38.   turtle.forward()
  39.   turtle.forward()
  40.   turtle.turnLeft()
  41.   turtle.down()
  42. end
  43.  
  44. local function suckWalk(dist)
  45.   for i=1,dist do
  46.     turtle.suck()
  47.     turtle.turnRight()
  48.     turtle.suck()
  49.     turtle.turnLeft()
  50.     turtle.turnLeft()
  51.     turtle.suck()
  52.     turtle.turnRight()
  53.     turtle.forward()
  54.   end
  55. end
  56.  
  57. local function suckRound()
  58.   for i=1,4 do
  59.     suckWalk(3)  
  60.     turtle.turnLeft()
  61.     suckWalk(2)
  62.   end
  63. end
  64.  
  65. fellTree()
  66. plant()
  67. moveToSuck()
  68. suckRound()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement