jonassvensson4

Untitled

Jun 5th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. local args = {}
  2. local dist = tonumber(args[1])
  3. for i=1,dist,1 do
  4. -- Sappling
  5.     turtle.turnRight()
  6.     turtle.select(1)
  7.     turtle.suck()
  8.     turtle.transferTo(2,1)
  9.     turtle.drop()
  10.     turtle.select(2)
  11.     turtle.transferTo(1,1)
  12. -- Bonemeal
  13.     turtle.goUp()
  14.     turtle.select(2)
  15.     turtle.suck()
  16.     turtle.transferTo(3,4)
  17.     turtle.select(3)
  18.     turtle.transferTo(2,4)
  19. -- Grow
  20.     turtle.down()
  21.     turtle.turnLeft()
  22.     turtle.forward()
  23.     turtle.forward()
  24.     turtle.forward()
  25.     turtle.forward()
  26.     turtle.forward()
  27.     turtle.forward()
  28.     turtle.forward()
  29.     turtle.forward()
  30.     turtle.forward()
  31.     turtle.select(1)
  32.     turtle.place()
  33.     turtle.select(2)
  34.     turtle.place()
  35. -- Cutting
  36. if turtle.detect() then
  37.     turtle.dig()
  38.     turtle.up()
  39. else
  40.     turtle.down()
  41. end
  42.  
  43. if turtle.detectDown() then
  44.     turtle.back()
  45.     turtle.back()
  46.     turtle.back()
  47.     turtle.back()
  48.     turtle.back()
  49.     turtle.back()
  50.     turtle.back()
  51.     turtle.back()
  52.     turtle.back()
  53.     turtle.select(1)
  54.     turtle.dropDown()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment