Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getFuel()
- while turtle.getFuelLevel() < 70 do -- checks how many fuel and gets more only if needs to get more --
- while turtle.getItemCount(1) < 15 do
- turtle.select(3)
- turtle.placeUp()
- turtle.select(1)
- turtle.dropUp() --this "should" ensure that it doesn't pull 64 fuel out while you already have some and take up slot 3 with it by dropping existing coal in and getting more --
- turtle.suckUp()
- turtle.select(3)
- turtle.digUp()
- end
- turtle.select(1)
- turtle.refuel(10)
- end
- end
- function enderChest() --Selects ender chest, goes through for loop to drop items off--
- turtle.select(2)
- turtle.placeUp()
- for i = 4 , 16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(2)
- turtle.digUp()
- end
- function dig() -- spin and dig --
- turtle.turnLeft()
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.turnLeft()
- end
- function digMid() -- moves forward then digs out the middle layer--
- turtle.dig()
- turtle.forward()
- dig()
- end
- function digTop() -- moves up and digs out the top layer and then goes back down to middle --
- turtle.digUp()
- turtle.up()
- dig()
- turtle.down()
- end
- function digBot() -- moves down and digs out the bottom layer then back up to middle --
- turtle.digDown()
- turtle.down()
- dig()
- turtle.up()
- end
- -- asks how far to dig, takes the value you give it and goes through a for loop to dig out your 3x3 tunnel --
- local far = 0
- term.write("How far should I dig: ")
- far = read()
- for i = 0, far do
- getFuel()
- digMid()
- digTop()
- digBot()
- enderChest()
- end
Advertisement
Add Comment
Please, Sign In to add comment