Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Quarry a function by Maximumrider999
- --Vars
- local tArgs = {...}
- local loops = tonumber(tArgs[1])
- local torch = 2
- local fuel = 1
- local chest = 3
- local j = 0
- --Functions
- function tfuel(amount)
- if turtle.getFuelLevel() < amount then do
- turtle.select(fuel)
- turtle.refuel()
- end
- end
- end
- function digForward(amount)
- if amount < 1 then
- amount = 1
- end
- for i = 1, amount do
- while turtle.detect() == true do
- turtle.dig()
- end
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- end
- function placeTorch()
- turtle.select(torch)
- turtle.placeDown()
- end
- function turnAround()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- --Main
- for i = 0, loops do
- if j == 3 then
- j = 0
- else
- j = j + 1
- end
- for k = 0,2 do
- tfuel(1000)
- turtle.select(16)
- if turtle.getItemCount() > 0 then
- turnAround()
- turtle.select(chest)
- turtle.place()
- for i = 4, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turnAround()
- end
- turtle.select(1)
- digForward(1)
- turtle.turnLeft()
- digForward(5)
- if j == 3 and k == 0 then
- placeTorch()
- end
- digForward(6)
- if j == 3 and k == 0 then
- placeTorch()
- end
- turtle.turnRight()
- digForward(1)
- turtle.turnRight()
- digForward(11)
- turtle.turnLeft()
- if j == 3 and k == 0 then
- placeTorch()
- end
- if k ~= 2 then
- turtle.back()
- turtle.back()
- turtle.up()
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.up()
- end
- end
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement