Guest User

Untitled

a guest
Jan 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local x=0
  2. local y=0
  3. local z=0
  4. local z1=0
  5. local length=0
  6.  
  7. function Ground(length)
  8.  
  9.  while y<length do    
  10.    while x<length do
  11.     turtle.select(1)
  12.     turtle.dig()
  13.     turtle.forward()
  14.     turtle.digDown()
  15.     turtle.placeDown()
  16.     x=x+1
  17.    end
  18.     y=y+1
  19.     if y%2==0 then
  20.      turtle.dig()
  21.      turtle.forward()
  22.      turtle.turnRight()
  23.      turtle.dig()
  24.      turtle.forward()
  25.      turtle.turnRight()
  26.     else
  27.      turtle.dig()
  28.      turtle.forward()
  29.      turtle.turnLeft()
  30.      turtle.dig()
  31.      turtle.forward()
  32.      turtle.turnLeft()
  33.     end
  34.     x=0
  35.   end
  36.  while z<(length+1) do
  37.   turtle.dig()
  38.   turtle.forward()
  39.   z=z+1
  40.  end
  41.  turtle.turnLeft()
  42.  while z1<length do
  43.   turtle.dig()
  44.   turtle.forward()
  45.   z1=z1+1
  46.  end
  47.  turtle.turnLeft()
  48. end
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. term.write(" Welche Laenge soll das Haus haben? ")
  56. length=read()
  57. length=tonumber(length)
  58. Ground(length)
Add Comment
Please, Sign In to add comment