Ledger Nano X - The secure hardware wallet
SHARE
TWEET

chunkbuilder.lua

a guest Mar 31st, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. s=1
  2. print("Enter length: ")
  3. length=read()
  4. print("Enter width: ")
  5. width=read()
  6. blocks=length*width
  7. print("Need ",blocks," blocks")
  8. print("Press any key to continue")
  9. key=read()
  10. function check()
  11.     if turtle.getItemCount(s)==0 then
  12.          s=s+1
  13.          turtle.select(s)
  14.      end
  15. end
  16. for a=1,width,1 do        
  17.    
  18.     for x=1,length,1 do
  19.         turtle.forward()
  20.         turtle.placeDown()
  21.         check()
  22.     end
  23.     if (a%2 == 0) then
  24.         turtle.turnLeft()
  25.         turtle.forward()
  26.         turtle.placeDown()
  27.         check()
  28.         turtle.turnLeft()
  29.     else
  30.         turtle.turnRight()
  31.         turtle.forward()
  32.         turtle.placeDown()
  33.         check()
  34.         turtle.turnRight()
  35.        
  36.     end    
  37. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top