View difference between Paste ID: qEmctpT1 and tH3XG5pT
SHOW: | | - or go back to the newest paste.
1
function movetotree()
2
   for i=1,7 do
3
      turtle.forward()
4
   end
5
end
6
7
function drop()
8
   for d=1,15 do
9
      turtle.select(i)
10
      turtle.dropDown()
11
   end
12
end
13
14
function cut()
15
   turtle.dig()
16
   turtle.forward()
17
   while true do
18
      if turtle.digUp() then
19
      turtle.up()
20
      else if not turtle.down() then
21
      turtle.back()
22
      break
23
      end
24
   end
25
end
26
end
27
28
function movetodrop()
29
   for g=1,7 do
30
      turtle.back()
31
   end
32
end
33
34
function refuel()
35
   if (turtle.getFuelLevel()=="Unlimited") then
36
      return true
37
      end
38
   turtle.select(16)
39
   turtle.turnRight()
40
   turtle.turnRight()
41
   turtle.suck()
42
   turtle.refuel(64)
43
   turtle.select(1)
44
   turtle.turnLeft()
45
   turtle.turnLeft()
46
end
47
48
function plant()
49
   turtle.select(15)
50
   turtle.place()
51
   turtle.select(1)
52
end
53
54
function saplings()
55
   turtle.select(15)
56
   turtle.turnRight()
57
   turtle.suck()
58
   turtle.select(1)
59
   turtle.turnLeft()
60
end
61
62
while true do
63
   refuel()
64
   saplings()
65
   movetotree()
66
   for z=1,64 do
67
      plant()
68
      sleep(180)
69
      cut()
70
   end
71
   movetodrop()
72
   drop()
73
end