View difference between Paste ID: KaMitU39 and LEctauaV
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
   while true do
16
      if not turtle.digUp() then
17
      turtle.up()
18
      else turtle.back()
19
      break
20
      end
21
   end
22
end
23
24
function movetodrop()
25
   for g=1,7 do
26
      turtle.back()
27
   end
28
end
29
30
function refuel()
31-
   if (turtle.getFuel()=="Unlimited") then
31+
   if (turtle.getFuelLevel()=="Unlimited") then
32
      end
33
   else turtle.select(16)
34
   turtle.turnRight()
35
   turtle.turnRight()
36
   turtle.suck()
37
   turtle.refuel(64)
38
   turtle.select(1)
39
   turtle.turnLeft()
40
   turtle.turnLeft()
41
end
42
43
function plant()
44
   turtle.select(15)
45
   turtle.place()
46
   turtle.select(1)
47-
   turtle.suckRight()
47+
48
49
function saplings()
50
   turtle.select(15)
51
   turtle.turnRight()
52
   turtle.suck()
53
   turtle.select(1)
54
   turtle.turnLeft()
55
end
56
57
while true do
58
   refuel()
59
   saplings()
60
   movetotree()
61
   for z=1,64 do
62
      plant()
63
      sleep(180)
64
      cut()
65
   end
66
   movetodrop()
67
   drop()
68
end