SHARE
TWEET

Untitled

a guest Dec 21st, 2016 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function placef()
  2.   turtle.select(1)
  3.   x = 1
  4.   if turtle.getItemCount(x) == 0 then
  5.   repeat turtle.select(x+1)
  6.   x = x + 1
  7.   if x == 17 then
  8.   x = 1
  9.   y = 2
  10.   end
  11.   if y == 2 then
  12.   os.reboot()
  13.   end
  14.   until turtle.getItemCount(x) > 0
  15.   end
  16.  turtle.place()
  17. end
  18.  
  19. function placeup()
  20.   turtle.select(9)
  21.   x = 9
  22.   if turtle.getItemCount(x) == 0 then
  23.   repeat turtle.select(x+1)
  24.   x = x + 1
  25.   if x == 17 then
  26.   x = 9
  27.   y = 2
  28.   end
  29.   if y == 2 then
  30.   os.reboot()
  31.   end
  32.   until turtle.getItemCount(x) > 0
  33.   end
  34.   turtle.placeUp()
  35. end  
  36.  
  37. function place()
  38.   turtle.select(9)
  39.   x = 9
  40.   if turtle.getItemCount(x) == 0 then
  41.   repeat turtle.select(x+1)
  42.   x = x + 1
  43.   if x == 17 then
  44.   x = 9
  45.   y = 2
  46.   end
  47.   if y == 16 then
  48.   os.reboot()
  49.   end
  50.   until turtle.getItemCount(x) > 0
  51.   end
  52.   turtle.placeDown()
  53. end
  54.  
  55. function repairOT()
  56.   turtle.select(1)
  57.   x = 1
  58.   if turtle.getItemCount(x) == 0 then
  59.   repeat turtle.select(x+1)
  60.   x = x + 1
  61.  
  62.   if x == 17 then
  63.   x = 1
  64.   y = 2
  65.   end
  66.   if y == 2 then
  67.   os.reboot()
  68.   end
  69.   until turtle.getItemCount(x) > 0
  70.   end
  71.   if turtle.compareDown() == false then
  72.   place()
  73.   turtle.turnRight()
  74.   else
  75.   turtle.turnRight()
  76.   end
  77.   if turtle.compare() == false then
  78.   placef()
  79.   turtle.turnLeft()
  80.   else
  81.   turtle.turnLeft()
  82.   end
  83.  
  84. turtle.forward()
  85. end
  86.  
  87. function repairBI()
  88.   turtle.select(1)
  89.   x = 1
  90.   if turtle.getItemCount(x) == 0 then
  91.   repeat turtle.select(x+1)
  92.   x = x + 1
  93.   if x == 17 then
  94.   x = 1
  95.   y = 2
  96.   end
  97.   if y == 16 then
  98.   os.reboot()
  99.   end
  100.   until turtle.getItemCount(x) > 0
  101.   end
  102.   if turtle.compareUp() == false then
  103.   placeup()
  104.   turtle.turnLeft()
  105.   else
  106.   turtle.turnLeft()
  107.   end
  108.   if turtle.compare() == false then
  109.   placef()
  110.   turtle.turnRight()
  111.   else
  112.   turtle.turnRight()
  113.   end
  114.  turtle.forward()
  115. end  
  116.  
  117. for k = 1, 3 do
  118.   for i = 1, 64 do
  119.  
  120. repairOT()  
  121.   end
  122. place()
  123. turtle.turnRight()
  124. turtle.forward()
  125. end
  126.  
  127. for k = 1,63 do
  128. repairOT()
  129. end
  130.  
  131. place()
  132. turtle.forward()
  133. turtle.down()
  134. turtle.down()
  135. placeup()  
  136. turtle.back()
  137. turtle.back()
  138. turtle.turnRight()
  139. turtle.forward()
  140. turtle.forward()
  141.  
  142. for k = 1, 3 do
  143.   for i = 1,61 do
  144.   repairBI()
  145.   end
  146.  turtle.forward()
  147.  turtle.turnLeft()
  148.  placef()
  149.  turtle.turnRight()
  150.  turtle.back()
  151.  turtle.turnRight()
  152. end
  153.  
  154. turtle.turnRight()
  155. turtle.turnRight()
  156. placef()
  157. placeup()
  158. turtle.turnRight()
  159. turtle.turnRight()
  160.  
  161. for k = 1, 60  do
  162.   repairBI()
  163. end
  164. turtle.down()
  165. turtle.forward()
  166. turtle.turnLeft()
  167. turtle.forward()
  168. placeup()
  169.  
  170.  
  171.  
  172.  
  173. print("Place me back in the same postition I started in to repair the Particle accelerator")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top