Advertisement
Guest User

chunkbuilder.lua

a guest
Mar 31st, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. s=1
  2. print("Enter length: ")
  3. length=read()
  4. print("Enter width: ")
  5. width=read()
  6. function check()
  7.     if turtle.getItemCount(s)==0 then
  8.          s=s+1
  9.          turtle.select(s)
  10.      end
  11. end
  12. for a=1,width,1 do        
  13.    
  14.     for x=1,length,1 do
  15.         turtle.forward()
  16.         turtle.placeDown()
  17.         check()
  18.     end
  19.     if (a%2 == 0) then
  20.         turtle.turnLeft()
  21.         turtle.forward()
  22.         turtle.placeDown()
  23.         check()
  24.         turtle.turnLeft()
  25.     else
  26.         turtle.turnRight()
  27.         turtle.forward()
  28.         turtle.placeDown()
  29.         check()
  30.         turtle.turnRight()
  31.        
  32.     end    
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement