Advertisement
Aixler

Ender1

Sep 6th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.61 KB | None | 0 0
  1. print("'Put turtle in bottom left corner on the ground, facing to top left corner'")
  2. print("--------")
  3. print("|      |")
  4. print("--------")
  5. print("Type anything to proceed")
  6. io.read()
  7.  
  8. print("slot 1-2 = blocks 1stack+38")
  9. print("slots 3-10 = slabs 7stacks+28")
  10. print("slot 11-12 = blocks 1stack+4")
  11. print("Type anything to proceed")
  12. io.read()
  13.  
  14. slot = 1
  15.  
  16. function place()
  17.         inventory()
  18.         turtle.place()
  19. end
  20.  
  21. function placeUp()
  22.         inventory()
  23.         turtle.placeUp()
  24. end
  25.  
  26. function placeDown()
  27.         inventory()
  28.         turtle.placeDown()
  29. end
  30.  
  31. function inventory()
  32.         if turtle.getItemCount(slot) == 0 then
  33.                 slot = slot + 1
  34.         end
  35.         turtle.select(slot)
  36. end
  37.  
  38. function buildBaseBlock()
  39.     placeDown()
  40.     placeUp()
  41.     turtle.back()
  42.     place()
  43. end
  44.  
  45. function buildBaseSlab()
  46.     placeDown()
  47.     turtle.forward()
  48. end
  49.  
  50. function base()
  51.     turtle.select(1)
  52.     turtle.up()
  53.     turtle.turnLeft()
  54.     turtle.back()
  55.     for x=1, 13 do
  56.         buildBaseBlock()
  57.     end
  58.     turtle.turnLeft()
  59.     for x=1, 3 do
  60.         buildBaseBlock()
  61.     end
  62.     turtle.turnLeft()
  63.     for x=1, 14 do
  64.         buildBaseBlock()
  65.     end
  66.     turtle.turnLeft()
  67.     for x=1, 4 do
  68.         buildBaseBlock()
  69.     end
  70.     turtle.up()
  71.     turtle.up()
  72.     turtle.up()
  73.    
  74.     turtle.forward()
  75.     turtle.turnRight()
  76.     turtle.forward()
  77.    
  78.     turtle.select(3)
  79.    
  80.     for x=1, 13 do
  81.         buildBaseSlab()
  82.     end
  83.     turtle.turnLeft()
  84.     for x=1, 3 do
  85.         buildBaseSlab()
  86.     end
  87.     turtle.turnLeft()
  88.     for x=1, 14 do
  89.         buildBaseSlab()
  90.     end
  91.     turtle.turnLeft()
  92.     for x=1, 4 do
  93.         buildBaseSlab()
  94.     end
  95.     turtle.up()
  96. end
  97.  
  98. function buildLayer()
  99.     placeUp()
  100.     turtle.forward()
  101. end
  102.  
  103. function layer()
  104.     turtle.back()
  105.     turtle.turnLeft()
  106.     turtle.forward()
  107.     for x=1, 13 do
  108.         buildLayer()
  109.     end
  110.     turtle.turnLeft()
  111.     for x=1, 3 do
  112.         buildLayer()
  113.     end
  114.     turtle.turnLeft()
  115.     for x=1, 14 do
  116.         buildLayer()
  117.     end
  118.     turtle.turnLeft()
  119.     for x=1, 4 do
  120.         buildLayer()
  121.     end
  122.     turtle.up()
  123.     turtle.up()
  124.     turtle.up()
  125. end
  126.  
  127. function layers()
  128.     for x=1, 13 do
  129.         layer()
  130.     end
  131. end
  132.  
  133. function buildVines()
  134.     placeDown()
  135.     turtle.back()
  136.     place()
  137. end
  138.  
  139. function vines()
  140.     turtle.select(11)
  141.     turtle.up()
  142.     turtle.up()
  143.     turtle.back()
  144.     turtle.turnRight()
  145.     turtle.back()
  146.     for x=1, 13 do
  147.         buildVines()
  148.     end
  149.     turtle.turnLeft()
  150.     for x=1, 3 do
  151.         buildVines()
  152.     end
  153.     turtle.turnLeft()
  154.     for x=1, 14 do
  155.         buildVines()
  156.     end
  157.     turtle.turnLeft()
  158.     for x=1, 4 do
  159.         buildVines()
  160.     end
  161. end
  162.        
  163. base()     
  164. layers()       
  165. vines()
  166. for x=1, 47 do
  167.     turtle.down()
  168. end
  169. print("Ender1 is done!")
  170. print("'Bring 26 buttons and 26 vines to finish the trap'")
  171. print("Start Ender2 to proceed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement