View difference between Paste ID: dyWAFy8Q and 63WWvqL4
SHOW: | | - or go back to the newest paste.
1
hauteur=0
2
turtle.select(2)
3
function ender ()
4
  turtle.dig()
5
  turtle.select(4)
6
  turtle.place()
7-
    turtle.placeDown(0)
7+
  sleep(1)
8
  turtle.select(1)
9
  turtle.drop()
10
  turtle.select(2)
11
  turtle.drop()
12
  turtle.select(3)
13
  turtle.drop()
14
  turtle.select(5)
15
  turtle.drop()
16
  turtle.select(6)
17
  turtle.drop()
18
  turtle.select(7)
19
  turtle.drop()
20
  turtle.select(8)
21
  turtle.drop()
22
  turtle.select(9)
23
  turtle.drop()
24
  turtle.select(10)
25
  turtle.drop()
26
  turtle.select(11)
27
  turtle.drop()
28
  turtle.select(12)
29
  turtle.drop()
30
  turtle.select(13)
31
  turtle.drop()
32
  turtle.select(14)
33
  turtle.drop()
34-
   if mon~=((("minecraft:stone") or ("minecraft:dirt")) or ("minecraft:grass")) then
34+
  turtle.select(15)
35
  turtle.drop()
36
  turtle.select(4)
37
  sleep(1)
38
  turtle.dig()
39
  turtle.select(1)
40
 end
41
function remonte ()
42
 hauto=(hauteur*hauteur)
43
 hauto1=math.sqrt(hauto)
44
   for i=1,hauto1 do
45
	turtle.select(1)
46
    turtle.up()
47
    turtle.placeDown(1)
48
  end
49
end
50
function checkDown()
51
  succes,rim=turtle.inspectDown()
52
  ram=rim.name
53
   print(ram)
54
     if ram=="minecraft:bedrock"then
55
        print(hauto)
56
        remonte () 
57
		ender ()
58
        turtle.forward()
59
        turtle.forward()
60
        turtle.forward()
61
    end
62
 end
63
function desc ()
64
  turtle.digDown()
65
  turtle.down()
66
  hauteur=hauteur-1
67
 end
68
function turn ()
69
  turtle.turnLeft()
70
end
71
function check ()
72
  succes,min=turtle.inspect()
73
  print(min.name)
74
  mon=min.name
75
   if mon~=("minecraft:stone") and mon~=("minecraft:dirt") and mon~=("minecraft:grass") then
76
    turtle.dig()
77
    end
78
 end
79
 
80
       while true do 
81
        check() 
82
        turn()
83
        check()
84
        turn()
85
        check()
86
        turn()
87
        check()
88
        turn()
89
        checkDown()
90
        desc()
91
        print(hauteur)
92
        end