Advertisement
praetorianer777

Untitled

Sep 1st, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.detectDown()==true then
  13.     turtle.digDown()
  14.     turtle.placeDown()
  15.   end
  16.   if turtle.detect() == true then
  17.     turtle.dig()
  18.   end
  19.   turtle.forward()
  20.   if turtle.detectDown() == true then
  21.     turtle.placeDown()
  22.   end
  23. end
  24.  
  25. while true do
  26.   for i=1,10 do
  27.     fGRABEN()
  28.   end
  29.   if richtung==true then
  30.       turtle.turnLeft()
  31.       fGRABEN()
  32.       turtle.turnLeft()
  33.       richtung=false
  34.     else
  35.       turtle.turnRight()
  36.       fGRABEN()
  37.       turtle.turnRight()
  38.       richtung=true
  39.   end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement