David_Turtle

Turtle "Auto-Road"

Nov 8th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. print "Slot 1 = Road    Slot 2 = Decke"
  2. turtle.select(1)
  3. while turtle.getItemCount(1) > 0 and turtle.getItemCount(2) > 0 do
  4.         if turtle.detectDown() then
  5.                 turtle.digDown()
  6.                 end
  7.         turtle.placeDown()
  8.         if turtle.detectUp() then
  9.                 turtle.digUp()
  10.                 end
  11.         if turtle.detect() then
  12.                 turtle.dig()
  13.                 end
  14.     turtle.select(2)
  15.     turtle.turnLeft()
  16.     if turtle.detect() then
  17.     else
  18.         turtle.place()
  19.         end
  20.     turtle.turnRight()
  21.     turtle.turnRight()
  22.     if turtle.detect() then
  23.     else
  24.         turtle.place()
  25.         end
  26.     turtle.turnLeft()
  27.         turtle.up()
  28.     turtle.turnLeft()
  29.     if turtle.detect() then
  30.     else
  31.         turtle.place()
  32.         end
  33.     turtle.turnRight()
  34.     turtle.turnRight()
  35.     if turtle.detect() then
  36.     else
  37.         turtle.place()
  38.         end
  39.     turtle.turnLeft()
  40.     if turtle.detectUp() then
  41.     else
  42.             turtle.placeUp()
  43.         end
  44.         turtle.select(1)
  45.         turtle.down()
  46.     if turtle.detect() then
  47.         turtle.dig()
  48.     else
  49.         end
  50.         turtle.forward()
  51.         if turtle.getItemCount(1) ~= 0 or turtle.getItemCount(2) ~= 0 then
  52.                
  53.         else
  54.             print "Unzureichende Bloecke"
  55.                 end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment