Guest User

mining

a guest
Aug 31st, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.57 KB | None | 0 0
  1. turtle.select(16)
  2. richtung=true
  3. run=true
  4.  
  5. function fGRABEN()
  6.   if turtle.detectUp() == true then
  7.     turtle.digUp()
  8.   end
  9.   if turtle.detect() == true then
  10.     turtle.dig()
  11.     turtle.forward()
  12.     if turtle.detectDown() == true then
  13.       turtle.placeDown()
  14.     end
  15.   end
  16. end
  17.  
  18. while run==true do
  19.   for i=1,10 do
  20.     fGRABEN()
  21.   end
  22.   if richtung==true then
  23.       turtle.turnLeft()
  24.       fGRABEN()
  25.       turtle.turnLeft()
  26.       richtung=false
  27.     else
  28.       turtle.turnRight()
  29.       fGRABEN()
  30.       turtle.turnRight()
  31.       richtung=true
  32.   end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment