Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --functions that will be useful
- --turtle.compareTo(slot) - compares selected slot to argument slot. returns boolean
- --turtle.drop(count) - drops [count] numbeer of items from selected slot into inventory or into world. dropDown and dropUp exist
- --put a short delay between attempts to mine forward to allow for water cooling of lava. turtles now get stuck as cobble forms between
- -- digging and moving. a short delay between testing if digging was successful should allow the water to flow into the spot and
- -- cool any adjacent lava
- os.loadAPI("tMV.lua")
- local sideLength = 8
- --mines and moves forward
- function mineForward()
- while turtle.dig() do
- os.sleep(0.1)
- end
- while not tMV.tForward() do
- os.sleep(0.1)
- end
- turtle.digDown()
- turtle.digUp()
- end
- --mines an 8x8 layer, 3 high
- function mineLayer()
- for i=1,sideLength do
- mineForward()
- end
- tMV.tTurnRight()
- for i=(sideLength-1),1,-1 do
- for j=1,2 do
- for k=1,i do
- mineForward()
- end
- tMV.tTurnRight()
- end
- dumpCobble()
- end
- end
- --mines to the next layer down
- function layerDown(layerDepth)
- tMV.face(1)
- for i=1,layerDepth do
- turtle.digDown()
- tMV.tDown()
- end
- end
- --return to home and dump ores
- function dropOffOres()
- tMV.goHome()
- tMV.face(3)
- for slot=2,16 do
- turtle.select(slot)
- turtle.drop()
- end
- end
- --dumps all cobble on the ground
- function dumpCobble()
- for slot=2,16 do
- turtle.select(slot)
- if turtle.compareTo(1) then
- turtle.dropDown(64)
- end
- end
- end
- for layerDepth=3,12,3 do
- mineLayer()
- dropOffOres()
- layerDown(layerDepth)
- end
- tMV.goHome()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement