Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. --Mining turtle with fuel refill and dump into chest every x blocks
  2. --Ladders in slot 1
  3. --Fuel in slot 2
  4. --Chests in slot 3
  5.  
  6.  
  7.  
  8. function getReady(top) --Dig hole to layer 13
  9.     height = top
  10.     turtle.select(1) --Make sure ladders are in slot 1
  11.     while height > 13 do
  12.         turtle.digDown()
  13.         turtle.down()
  14.         height = height - 1
  15.         turtle.dig()
  16.         if turtle.place()==false then
  17.             break
  18.         end
  19.                
  20.     end
  21. end
  22.  
  23.  
  24. function digChannels()
  25.     for i = 1,20 do --Layer 13 row
  26.             turtle.dig()
  27.             turtle.forward()
  28.     end
  29.    
  30.     --turn around
  31.     turtle.digDown()
  32.     turtle.down()
  33.     turtle.turnLeft()
  34.     turtle.turnLeft()
  35.  
  36.     for i = 1,20 do --Layer 12 row
  37.             turtle.dig()
  38.             turtle.forward()
  39.     end
  40.    
  41.     --turn around
  42.     turtle.digDown()
  43.     turtle.down()
  44.     turtle.turnLeft()
  45.     turtle.turnLeft()
  46.  
  47.     for i = 1,20 do --Layer 11 row
  48.             turtle.dig()
  49.             turtle.forward()
  50.     end    
  51.    
  52.     --place chest and empty items
  53.     turtle.dig()
  54.     turtle.digDown()
  55.     turtle.down()
  56.     turtle.dig()
  57.     turtle.select(3) --Make sure chests are in slot 3
  58.     turtle.place() --Place chest
  59.    
  60.     turtle.select(4)
  61.     turtle.drop()
  62.     turtle.select(5)
  63.     turtle.drop()
  64.     turtle.select(6)
  65.     turtle.drop()
  66.     turtle.select(7)
  67.     turtle.drop()
  68.     turtle.select(8)
  69.     turtle.drop()
  70.     turtle.select(9)
  71.     turtle.drop()
  72.     turtle.select(10)
  73.     turtle.drop()
  74.     turtle.select(11)
  75.     turtle.drop()
  76.     turtle.select(12)
  77.     turtle.drop()
  78.     turtle.select(13)
  79.     turtle.drop()
  80.     turtle.select(14)
  81.     turtle.drop()
  82.     turtle.select(15)
  83.     turtle.drop()
  84.     turtle.select(16)
  85.     turtle.drop()
  86. end
  87.  
  88. x = 0
  89. y = 64 --Insert y coord
  90. z = 0
  91.  
  92. --Start of program
  93. turtle.select(2)
  94. turtle.refuel()
  95.  
  96. turtle.forward()
  97. getReady(y)
  98. y = 13
  99. digChannels()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement