Advertisement
Guest User

pandora

a guest
Nov 24th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. turtle.refuel()
  2. turtle.select(2)
  3.  
  4. local frontFinished = 0
  5.  
  6. function buildFront(width, height)
  7.  
  8.   local i = 0
  9.   local j = 0
  10.  
  11.   if frontFinished == 0 then
  12.  
  13.     turtle.forward()
  14.     turtle.turnRight()
  15.     turtle.forward()
  16.     turtle.forward()
  17.     turtle.turnRight()
  18.  
  19.     while i < height/2 do
  20.    
  21.       while j < width do
  22.         turtle.place()
  23.         turtle.turnLeft()
  24.         turtle.forward()
  25.         turtle.turnRight()
  26.         j = j + 1
  27.         print("placed block ", j+1)
  28.       end
  29.    
  30.       turtle.up()
  31.       turtle.turnRight()
  32.       turtle.forward()
  33.       turtle.turnLeft()
  34.    
  35.       while j > 0 do
  36.         turtle.place()
  37.         turtle.turnRight()
  38.         turtle.forward()
  39.         turtle.turnLeft()
  40.         j = j - 1
  41.       end  
  42.       i = i + 1
  43.     end
  44.     frontFinished = 1  
  45.   end
  46. end
  47.  
  48. buildFront(10, 6)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement