JoshuaKade

Untitled

Jun 16th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print("+-------------------------------------+")
  4. print("|  Please place fuel in the lower-    |")
  5. print("|  right slot.                        |")
  6. print("|  Place building materials in the    |")
  7. print("|  remaining slots.                   |")
  8. print("+-------------------------------------+")
  9. sleep(1)
  10. print("How big of a square do you want? ")
  11.  
  12. sqrSize = read()
  13.  
  14. print("How tall (On the inside) do you want it? ")
  15.  
  16. sqrTall = read()
  17.  
  18. function plcColumn()
  19.   for i = 1, sqrSize do
  20.     turtle.forward()
  21.     turtle.placeDown()
  22.   end
  23. end
  24.  
  25. --Even Column Placement
  26.  
  27. function aa()
  28.     turtle.placeDown()
  29.     plcColumn()
  30.     turtle.turnLeft()
  31.     turtle.forward()
  32.     turtle.turnLeft()
  33. end
  34.  
  35. --Odd Column Placement
  36.  
  37. function ab()
  38.     turtle.placeDown()
  39.     plcColumn()
  40.     turtle.turnRight()
  41.     turtle.forward()
  42.     turtle.turnRight()
  43. end
  44.  
  45. if sqrSize %2 == 0 then
  46.   isEven = true
  47. else
  48.   isEven = false
  49. end
  50.  
  51. --print(isEven)
  52. --Test for isEven ^
  53.  
  54.  
  55. function fltSqr()
  56.   if isEven == true then
  57.     for i = 1, sqrSize/2 do
  58.       aa()
  59.       ab()
  60.     end
  61.   else
  62.     for i = 1, sqrSize/2 do
  63.       aa()
  64.       ab()
  65.     end
  66.     aa()
  67.   end
  68. end
  69.  
  70. function bldWall()
  71.   for i = 1,4 do
  72.     plcColumn()
  73.     turtle.turnLeft()
  74.     turtle.up()
  75.   end
  76. end  
  77.  
  78. slotNum = 1
  79.  
  80. itemCount = turtle.getItemCount(slotNum)
  81.  
  82. print(slotNum)
  83. print(itemCount)
  84.  
  85. while true do
  86.   for i = 1, 15 do
  87.       if itemCount == 0 then
  88.         slotNum = slotNum + 1
  89.         turtle.select(slotNum)
  90.       end
  91.   end
  92. end
  93.  
  94. fltSqr()
  95. matSlot()
  96. turtle.up()
  97. for i = 1, sqrTall do
  98.   bldWall()
  99.   matSlot()
  100. end
  101. fltSqr()
  102. matSlot()
Advertisement
Add Comment
Please, Sign In to add comment