View difference between Paste ID: seS9LB2J and kprK6bpr
SHOW: | | - or go back to the newest paste.
1
--initialisierung
2
turtle.select(1)
3
turtle.refuel()
4
turtle.select(16)
5
richtung=true
6
run=true
7
8
function fGRABEN()
9
  while turtle.detectUp() == true do
10
    turtle.digUp()
11
  end
12
  if turtle.detect() == true then
13
    turtle.dig()
14
  end
15
  turtle.forward()
16
  if turtle.detectDown() == true then
17
    turtle.placeDown()
18
  end
19
end
20
21
while run==true do
22
  for i=1,10 do
23
    fGRABEN()
24
  end
25
  if richtung==true then
26
      turtle.turnLeft()
27
      fGRABEN()
28
      turtle.turnLeft()
29
      richtung=false
30
    else
31
      turtle.turnRight()
32
      fGRABEN()
33
      turtle.turnRight()
34
      richtung=true
35
  end
36
end