View difference between Paste ID: hZ1F3jic and j1dipd7p
SHOW: | | - or go back to the newest paste.
1-
--cutTree by djPtica v0.1.3
1+
2-
--SETUP
2+
3-
--put turtle in front of bottom left block of 2x2 tree
3+
4-
--put chest behind turtle
4+
5
   j = j + 1
6
end
7
8
function cutDown()
9
   turtle.digDown()
10
   turtle.down()
11
   turtle.dig()
12
end
13
14
--GLAVNI PROGRAM
15
j=0
16
if turtle.dig() then
17
   turtle.forward()
18
   while turtle.detectUp() do
19
      cutUp()
20
   end
21
   turtle.turnRight()
22-
   print("Drvo pronadjeno, zapocinjem sijecu.")
22+
23
   turtle.forward()
24
   turtle.turnLeft()
25
   turtle.dig()
26
   for i=1, j do
27
      cutDown()
28
   end
29
   turtle.turnLeft()
30
   turtle.forward()
31
   turtle.turnLeft()
32
   turtle.forward()
33
   for i=1, 16 do
34
      turtle.select(i)
35
      turtle.drop()
36
   end 
37
else
38
   print("Drvo nije pronadjeno")
39
end