sofi311d

roof2

Sep 26th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.05 KB | None | 0 0
  1. local function fuel()
  2.     print("use coal")
  3.     print("2 - 6 = stairs and 7 - 11 = blocks")
  4.     turtle.select(1)
  5.     turtle.refuel()
  6. end
  7.  
  8. local function start()
  9.     turtle.up()
  10. end
  11.  
  12. local function l2()
  13.     a = 24
  14.     while a > 0 do
  15.         turtle.select(5)
  16.         turtle.placeDown()
  17.         turtle.forward()
  18.         turtle.select(10)
  19.         turtle.placeDown()
  20.         turtle.turnLeft()
  21.         turtle.forward()
  22.         turtle.turnRight()
  23.         turtle.back()
  24.         a = a - 1
  25.     end
  26. end
  27.  
  28. local function turn()
  29.     turtle.turnLeft()
  30. end
  31.  
  32. local function d2()
  33.     f = 25
  34.     while f > 0 do
  35.         turtle.select(6)
  36.         turtle.placeDown()
  37.         turtle.forward()
  38.         turtle.select(11)
  39.         turtle.placeDown()
  40.         turtle.turnLeft()
  41.         turtle.forward()
  42.         turtle.turnRight()
  43.         turtle.back()
  44.         f = f - 1
  45.     end
  46. end
  47.  
  48. local function o2()
  49.     turtle.forward()
  50.     turtle.turnRight()
  51. end
  52.  
  53. local function u2()
  54.     y = 16
  55.     while y > 0 do  
  56.         turtle.select(4)
  57.         turtle.placeDown()
  58.         turtle.forward()
  59.         turtle.select(9)
  60.         turtle.placeDown()
  61.         turtle.turnLeft()
  62.         turtle.forward()
  63.         turtle.turnRight()
  64.         turtle.back()
  65.         y = y - 1
  66.     end
  67. end
  68.  
  69. local function o()
  70.     turtle.forward()
  71.     turtle.turnLeft()
  72. end
  73.  
  74. local function b2()
  75.     x = 42
  76.     while x > 0 do
  77.         turtle.select(8)
  78.         turtle.placeDown()
  79.         turtle.back()
  80.         turtle.select(3)
  81.         turtle.placeDown()
  82.         turtle.turnLeft()
  83.         turtle.forward()
  84.         turtle.turnRight()
  85.         turtle.forward()
  86.         x = x - 1
  87.     end
  88. end
  89.  
  90. local function m()
  91.     turtle.forward()
  92.     turtle.turnRight()
  93.     turtle.forward()
  94. end
  95.  
  96. local function i()
  97.     z = 4
  98.     while z > 0 do
  99.         turtle.turnLeft()
  100.         turtle.turnLeft()
  101.         turtle.select(5)
  102.         turtle.placeDown()
  103.         turtle.turnRight()
  104.         turtle.turnRight()
  105.         turtle.back()
  106.         turtle.select(10)
  107.         turtle.placeDown()
  108.         turtle.turnRight()
  109.         turtle.forward()
  110.         turtle.turnLeft()
  111.         turtle.forward()
  112.         z = z - 1
  113.     end
  114. end
  115.  
  116. local function u()
  117.     y = 16
  118.     while y > 0 do
  119.         turtle.select(9)
  120.         turtle.placeDown()
  121.         turtle.forward()
  122.         turtle.turnLeft()
  123.         turtle.turnLeft()
  124.         turtle.select(4)
  125.         turtle.placeDown()
  126.         turtle.turnLeft()
  127.         turtle.turnLeft()
  128.         turtle.turnRight()
  129.         turtle.forward()
  130.         turtle.turnLeft()
  131.         turtle.back()
  132.         y = y - 1
  133.     end
  134. end
  135.  
  136. local function v()
  137.     turtle.back()
  138.     turtle.turnRight()
  139.     turtle.back()
  140.     turtle.turnLeft()
  141.     turtle.forward()
  142.     turtle.turnRight()
  143. end
  144.  
  145. local function l()
  146.     a = 24
  147.     while a > 0 do
  148.         turtle.select(10)
  149.         turtle.place()
  150.         turtle.back()
  151.         turtle.select(5)
  152.         turtle.place()
  153.         turtle.turnRight()
  154.         turtle.forward()
  155.         turtle.turnLeft()
  156.         turtle.forward()
  157.         a = a - 1
  158.     end
  159. end
  160.  
  161. local function e()
  162.     turtle.turnRight()
  163. end
  164.    
  165. local function i2()
  166.     c = 4
  167.     while c > 0 do
  168.         turtle.select(5)
  169.         turtle.placeDown()
  170.         turtle.forward()
  171.         turtle.select(10)
  172.         turtle.placeDown()
  173.         turtle.turnRight()
  174.         turtle.forward()
  175.         turtle.turnLeft()
  176.         turtle.back()
  177.         c = c - 1
  178.     end
  179. end  
  180.  
  181. local function b()
  182.     x = 42
  183.     while x > 0 do
  184.         turtle.select(7)
  185.         turtle.placeDown()
  186.         turtle.forward()
  187.         turtle.turnLeft()
  188.         turtle.turnLeft()
  189.         turtle.select(2)
  190.         turtle.placeDown()
  191.         turtle.turnLeft()
  192.         turtle.turnLeft()
  193.         turtle.turnRight()
  194.         turtle.forward()
  195.         turtle.turnLeft()
  196.         turtle.back()
  197.         x = x - 1
  198.     end
  199. end      
  200.  
  201. local function d()
  202.     f = 25
  203.     while f > 0 do
  204.         turtle.select(11)
  205.         turtle.placeDown()
  206.         turtle.forward()
  207.         turtle.turnLeft()
  208.         turtle.turnLeft()
  209.         turtle.select(6)
  210.         turtle.placeDown()
  211.         turtle.turnLeft()
  212.         turtle.turnLeft()
  213.         turtle.turnRight()
  214.         turtle.forward()
  215.         turtle.turnLeft()
  216.         turtle.back()
  217.         f = f - 1
  218.     end
  219. end
  220.  
  221. local function roof1()
  222.     start()
  223.     l2()
  224.     turn()
  225.     d2()
  226.     o2()
  227.     u2()
  228.     o2()
  229.     b2()
  230.     m()
  231.     u2()
  232.     o()
  233.     i()
  234.     v()
  235.     l2()
  236.     e()
  237.     i()
  238.     v()
  239.     u()
  240.     o2()
  241.     b()
  242.     o()
  243.     u2()
  244.     o()
  245.     d()
  246. end
  247.  
  248. local function l3()
  249.     a = 20
  250.     while a > 0 do
  251.         turtle.select(5)
  252.         turtle.placeDown()
  253.         turtle.forward()
  254.         turtle.select(10)
  255.         turtle.placeDown()
  256.         turtle.turnLeft()
  257.         turtle.forward()
  258.         turtle.turnRight()
  259.         turtle.back()
  260.         a = a - 1
  261.     end
  262. end
  263.  
  264. local function turn2()
  265.     turtle.turnLeft()
  266.     turtle.forward()
  267.     turtle.forward()
  268.     turtle.turnLeft()
  269.     turtle.foreward()
  270.     turtle.forward()
  271.     turtle.turnRight()
  272. end
  273.  
  274. local function d3()
  275.     f = 21
  276.     while f > 0 do
  277.         turtle.select(6)
  278.         turtle.placeDown()
  279.         turtle.forward()
  280.         turtle.select(11)
  281.         turtle.placeDown()
  282.         turtle.turnLeft()
  283.         turtle.forward()
  284.         turtle.turnRight()
  285.         turtle.back()
  286.         f = f - 1
  287.     end
  288. end
  289.  
  290. local function u3()
  291.     y = 12
  292.     while y > 0 do  
  293.         turtle.select(4)
  294.         turtle.placeDown()
  295.         turtle.forward()
  296.         turtle.select(9)
  297.         turtle.placeDown()
  298.         turtle.turnLeft()
  299.         turtle.forward()
  300.         turtle.turnRight()
  301.         turtle.back()
  302.         y = y - 1
  303.     end
  304. end
  305.  
  306. local function b3()
  307.     x = 38
  308.     while x > 0 do
  309.         turtle.select(8)
  310.         turtle.placeDown()
  311.         turtle.back()
  312.         turtle.select(3)
  313.         turtle.placeDown()
  314.         turtle.turnLeft()
  315.         turtle.forward()
  316.         turtle.turnRight()
  317.         turtle.forward()
  318.         x = x - 1
  319.     end
  320. end
  321.  
  322. local function u4()
  323.     y = 12
  324.     while y > 0 do
  325.         turtle.select(9)
  326.         turtle.placeDown()
  327.         turtle.forward()
  328.         turtle.turnLeft()
  329.         turtle.turnLeft()
  330.         turtle.select(4)
  331.         turtle.placeDown()
  332.         turtle.turnLeft()
  333.         turtle.turnLeft()
  334.         turtle.turnRight()
  335.         turtle.forward()
  336.         turtle.turnLeft()
  337.         turtle.back()
  338.         y = y - 1
  339.     end
  340. end
  341.  
  342. local function b4()
  343.     x = 38
  344.     while x > 0 do
  345.         turtle.select(7)
  346.         turtle.placeDown()
  347.         turtle.forward()
  348.         turtle.turnLeft()
  349.         turtle.turnLeft()
  350.         turtle.select(2)
  351.         turtle.placeDown()
  352.         turtle.turnLeft()
  353.         turtle.turnLeft()
  354.         turtle.turnRight()
  355.         turtle.forward()
  356.         turtle.turnLeft()
  357.         turtle.back()
  358.         x = x - 1
  359.     end
  360. end
  361.  
  362. local function d4()
  363.     f = 21
  364.     while f > 0 do
  365.         turtle.select(11)
  366.         turtle.placeDown()
  367.         turtle.forward()
  368.         turtle.turnLeft()
  369.         turtle.turnLeft()
  370.         turtle.select(6)
  371.         turtle.placeDown()
  372.         turtle.turnLeft()
  373.         turtle.turnLeft()
  374.         turtle.turnRight()
  375.         turtle.forward()
  376.         turtle.turnLeft()
  377.         turtle.back()
  378.         f = f - 1
  379.     end
  380. end
  381.  
  382. local function roof2()
  383.     start()
  384.     l3()
  385.     turn2()
  386.     d3()
  387.     o2()
  388.     u3()
  389.     o2()
  390.     b3()
  391.     m()
  392.     u3()
  393.     o()
  394.     v()
  395.     l3()
  396.     e()
  397.     v()
  398.     u4()
  399.     o2()
  400.     b4()
  401.     o()
  402.     u3()
  403.     o()
  404.     d4()
  405. end
  406.  
  407. fuel()
  408. roof1()
  409. roof2()
Advertisement
Add Comment
Please, Sign In to add comment