daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3.  
  4. function gototop()
  5.   while turtle.detect() do
  6.     turtle.up()
  7.   end
  8.   -- body
  9. end
  10. function godown()
  11.   while turtle.detectDown()==false do
  12.     turtle.down()
  13.   end
  14. end
  15.  
  16. function eck()
  17.   turtle.turnRight()
  18.   turtle.forward()
  19. end
  20.  
  21. function build()
  22.   turtle.up()
  23.   turtle.forward()
  24.   turtle.placeDown()
  25.   turtle.turnLeft()
  26.   turtle.forward()
  27.   for i=2,1,-1
  28.     turtle.placeDown()
  29.     turtle.forward()
  30.   end
  31.   eck()
  32.   for j=3,1,-1
  33.     for i=5,1,-1
  34.       turtle.placeDown()
  35.       turtle.forward()
  36.     end
  37.     eck()
  38.   end
  39.   turtle.placeDown()
  40.   turtle.forward()
  41.   turtle.placeDown()
  42.   turtle.turnLeft()
  43.   for i=2,1,-1
  44.     turtle.forward()
  45.     turtle.turnRight()
  46.   end
  47.  
  48.   if turtle.getItemCount(1)>20 then
  49.     --gototop()
  50.     build()
  51.   end
  52. end
  53.  
  54.  
  55.  
  56. function refill()
  57.   turtle.select(1)
  58.   repeat
  59.     turtle.suckDown()
  60.   until(turtle.getItemCount(1)>20)
  61.   turtle.turnLeft()
  62.   for i=3,1,-1 do turtle.forward() end
  63.   turtle.select(16)
  64.   remaining=turtle.getItemSpace()
  65.   turtle.suckDown(remaining)
  66.   turtle.refuel()
  67.   for i=2,1,-1 do turtle.turnRight() end
  68.   for i=3,1,-1 do turtle.forward() end
  69.   turtle.turnLeft()
  70.   turtle.select(1)
  71. end
  72.  
  73. while true do
  74.   refill()
  75.   gototop()
  76.   build()
  77.   godown()
  78. end
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