Advertisement
Guest User

Room.lua

a guest
Apr 1st, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.31 KB | None | 0 0
  1.  
  2. B = 0
  3. C = 0
  4.  
  5. function start1x3()
  6.     A = A + 1.92
  7.     turtle.dig()
  8.     turtle.forward()
  9.     turtle.digUp()
  10.     turtle.digDown()
  11.     term.clear()
  12.     term.setCursorPos(1,1)
  13.     print("Room "..A.."% complete")
  14.     sleep(0.05)
  15.    
  16. end
  17.  
  18. function start3x3()
  19.     start1x3()
  20.     turtle.turnLeft()
  21.     start1x3()
  22.     turtle.turnLeft()
  23.     turtle.turnLeft()
  24.     turtle.forward()
  25.     start1x3()
  26.     turtle.turnLeft()
  27.     turtle.turnLeft()
  28.     turtle.forward()
  29.     turtle.turnRight()
  30. end
  31.  
  32. --Program Start
  33.     A = 0
  34.     print("Digging room...")
  35.         sleep(2)
  36.         start3x3()
  37.         start1x3()
  38.         turtle.turnLeft()
  39.        
  40.             repeat
  41.                 start1x3()
  42.             until A == 13.44
  43.            
  44.             repeat
  45.                 turtle.turnRight()
  46.                 B = 0
  47.                     repeat
  48.                         start1x3()
  49.                         B = B + 1
  50.                     until B == 6
  51.                 C = C + 1
  52.             until C == 3
  53.              
  54.             turtle.turnRight()
  55.             B = 0
  56.             C = 0
  57.            
  58.             repeat
  59.                 start1x3()
  60.                 B = B + 1
  61.             until B == 3
  62.            
  63.             turtle.turnRight()
  64.             start1x3()
  65.             turtle.turnRight()
  66.             B = 0
  67.            
  68.             repeat
  69.                 start1x3()
  70.                 B = B + 1
  71.             until B == 2
  72.                
  73.             B = 0
  74.            
  75.             repeat
  76.                 turtle.turnLeft()
  77.                 B = 0
  78.                 C = C + 1
  79.                     repeat
  80.                         start1x3()
  81.                         B = B + 1
  82.                     until B == 4
  83.             until C == 3
  84.            
  85.             turtle.turnLeft()
  86.             start1x3()
  87.             turtle.forward()
  88.             turtle.turnLeft()
  89.             B = 0
  90.            
  91.             repeat
  92.                 start3x3()
  93.                 B = B + 1
  94.             until B == 3
  95.            
  96.             B = 0
  97.             term.clear()
  98.             term.setCursorPos(1,1)
  99.             print("Room 100% Complete")
  100.            
  101.             repeat
  102.                 turtle.back()
  103.                 B = B + 1
  104.             until B == 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement