Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --1 Chunk Manual
- local l = 0
- local z = 0
- function fuelcheck(y)
- local level = turtle.getFuelLevel()
- if (level < 256*y+16)
- then
- write("There is not enough fuel")
- os.shutdown()
- else
- write("There will be "..level - 256*y.." fuel left")
- end
- end
- function layer()
- turtle.digDown()
- turtle.down()
- z = z + 1
- for i = 1, w, 1 do
- for e = 1, p, 1 do
- turtle.dig()
- turtle.forward()
- end
- if(i ~= 16)
- then
- if(i % 2 == 0)
- then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- end
- else
- turtle.turnRight()
- end
- end
- end
- function initialchestDeposit()
- turtle.select(1)
- turtle.placeUp()
- local s = 1
- for i = 1, 15, 1 do
- s = s + 1
- turtle.select(s)
- turtle.dropUp()
- end
- end
- function invCheck()
- local s = 1
- for i = 1, 15, 1 do
- s = s + 1
- turtle.select(s)
- local data = turtle.getItemDetail()
- if data
- then
- turtle.down()
- deposit()
- l = l - 1
- end
- end
- end
- function chestDeposit()
- l = 0
- for i = 1, z - 1, 1 do
- turtle.up()
- l = l + 1
- end
- local s = 1
- for i = 1, 15, 1 do
- s = s + 1
- turtle.select(s)
- turtle.dropUp()
- end
- invCheck()
- for i = 1, l, 1 do
- turtle.down()
- end
- end
- function deposit()
- turtle.select(1)
- turtle.placeUp()
- local s = 1
- for i = 1, 15, 1 do
- s = s + 1
- turtle.select(s)
- turtle.dropUp()
- end
- end
- function lavaFuel()
- turtle.select(2)
- turtle.placeUp()
- turtle.select(3)
- turtle.suckUp()
- turtle.refuel()
- turtle.dropUp()
- sleep()
- turtle.suckUp()
- turtle.refuel()
- turtle.dropUp()
- turtle.select(2)
- turtle.digUp()
- turtle.select(1)
- end
- function startPosition()
- for i = 1, 15, 1 do
- turtle.forward()
- end
- turtle.turnRight()
- end
- function chunk(y)
- for i = 1, y, 1 do
- layer()
- startPosition()
- print(z)
- if (z == 1)
- then
- initialchestDeposit()
- else
- chestDeposit()
- end
- end
- end
- write("How Many Layers to Remove?")
- local y = read()
- local x = y
- write("Width")
- local w = read()
- write("Length")
- local p = read()
- fuelcheck(y)
- print("Removing "..y.." Layers ...")
- chunk(y)
Advertisement
Add Comment
Please, Sign In to add comment