SHARE
TWEET

house.lua

a guest Oct 19th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. length = 3
  2. --turtle.refuel()
  3. function build_floor(size)
  4.     turtle.select(1)
  5.     for i=1, size do
  6.         for i=1, size do
  7.             turtle.place()
  8.             sleep(0.4)
  9.             turtle.turnLeft()
  10.             turtle.forward()
  11.             turtle.turnRight()
  12.             sleep(0.2)
  13.         end
  14.         turtle.back()
  15.         turtle.turnRight()
  16.         for i=1, size do
  17.             turtle.forward()
  18.         end
  19.        
  20.         turtle.turnLeft()
  21.            
  22.     end
  23.    
  24. end
  25.  
  26. function build_wall(size, height)
  27.     turtle.turnRight()
  28.     turtle.forward()
  29.     turtle.turnLeft()
  30.     --turtle.back()
  31.     turtle.select(5)
  32.     for i=1, 4 do
  33.         for i=1, height do
  34.             for i=1, size+2 do
  35.                 turtle.place()
  36.                 turtle.turnLeft()
  37.                 turtle.forward()
  38.                 turtle.turnRight()
  39.             end
  40.             turtle.turnRight()
  41.             for i=1, size+2 do
  42.                 turtle.forward()
  43.             end
  44.             turtle.turnLeft()
  45.             turtle.up()
  46.    
  47.         end
  48.         turtle.turnRight()
  49.         turtle.forward()
  50.         turtle.turnLeft()
  51.         for i=1, size+2 do
  52.             turtle.forward()
  53.         end
  54.         for i=1, height do
  55.             turtle.down()
  56.         end
  57.         turtle.turnLeft()
  58.        
  59.     end
  60. end  
  61. build_floor(2)
  62. sleep(0.2)
  63. build_wall(2, 2)
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top