Advertisement
Guest User

quarry

a guest
Jul 30th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. -- 1, 3 Landmarks
  2. -- 2, Quarry
  3. -- 3, Energy Tesseract
  4. -- 4, Dump Enderchest
  5. -- 5, Fuel Enderchest
  6.  
  7. function reFuel()
  8.   turtle.select(16)
  9.   turtle.digDown()
  10.   turtle.dropUp()
  11.   turtle.select(5)
  12.   turtle.placeDown()
  13.   turtle.select(15)
  14.   turtle.suckDown()
  15.   turtle.refuel(64)
  16.   turtle.select(5)
  17.   turtle.digDown()
  18. end
  19.  
  20.  
  21.  
  22. function mFor()
  23.     turtle.detect()
  24.     if turtle.detect() == true then
  25.         turtle.select(16)
  26.         turtle.dig()
  27.         turtle.dropUp()
  28.         turtle.select(1)
  29.     end
  30.     turtle.forward()
  31. end
  32.  
  33. function quarryPlace()
  34.  
  35.     turtle.select(3)
  36.     turtle.dig()
  37.     turtle.forward()
  38.     turtle.turnLeft()
  39.     turtle.dig()
  40.     turtle.place()
  41.     turtle.digUp()
  42.     turtle.select(4)
  43.     turtle.placeUp()
  44.     turtle.turnRight()
  45.     turtle.back()
  46.     turtle.select(2)
  47.     turtle.place()
  48. end
  49.  
  50. function forBack()
  51.  
  52.     local dis = 0
  53.  turtle.select(16)
  54.  turtle.digDown()
  55.  turtle.placeUp()
  56.  turtle.select(5)
  57.  turtle.placeDown()
  58.  turtle.select(1)
  59.     while dis < 63 do
  60.         mFor()
  61.         dis = dis + 1
  62.     end
  63.  
  64.     turtle.select(1)
  65.     turtle.place()
  66.     turtle.turnLeft()
  67.     turtle.turnLeft()
  68.  
  69.  turtle.select(5)
  70.  
  71.  turtle.compareDown()
  72.     while turtle.compareDown() == false do
  73.    
  74.  mFor()
  75.  end
  76.  
  77.     turtle.turnLeft()
  78.     turtle.turnLeft()
  79.  turtle.select(5)
  80.  turtle.digDown()
  81.  turtle.select(1)
  82. end
  83.  
  84. function quarryBreak()
  85.     turtle.select(2)
  86.     turtle.dig()
  87.     turtle.forward()
  88.     turtle.turnLeft()
  89.     turtle.select(3)
  90.     turtle.dig()
  91.     turtle.select(4)
  92.     turtle.digUp()
  93.     turtle.turnLeft()
  94.     turtle.back()
  95. end
  96.  
  97.  
  98. -- Actual Running Program
  99.  
  100. reFuel()
  101. turtle.select(1)
  102. forBack()
  103. mFor()
  104. turtle.turnLeft()
  105. mFor()
  106. turtle.turnLeft()
  107. turtle.turnLeft()
  108. forBack()
  109. turtle.forward()
  110. turtle.turnLeft()
  111. turtle.back()
  112. turtle.place()
  113. turtle.attack()
  114.  
  115. quarryPlace()
  116.  
  117. print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement