Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function digCross()
- if turtle.detect()
- then turtle.dig()
- turtle.forward()
- else turtle.forward()
- end
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.turnLeft()
- end
- function depositInv()
- turtle.select(1)
- if turtle.detect()
- then turtle.dig()
- turtle.place()
- else turtle.place()
- end
- for i = 3, 16, 1 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(1)
- turtle.dig()
- end
- function checkInv()
- if turtle.getItemCount(15) > 0
- then depositInv()
- end
- end
- function checkFuel()
- if turtle.getFuelLevel() < 500
- then turtle.select(2)
- z=turtle.getItemCount(2)-1
- turtle.refuel(z)
- end
- end
- function checkEnderChest()
- if turtle.getItemDetail(1)="EnderStorage:EnderChest"
- then print "Ender Chest is safely at home."
- else print "WHERE'S MY BABY?!"
- end
- end
- checkEnderChest()
- while true do
- for i= 1, 64, 1 do
- digCross()
- checkInv()
- end
- checkFuel()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement