Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function reFuel()
- if turtle.getFuelLevel() <= 200 then
- turtle.select(1)
- turtle.refuel(1)
- end
- end
- function backTrack()
- turtle.turnLeft()
- turtle.turnLeft()
- repeat
- local success, data = turtle.forward()
- if success then
- end
- until not success
- end
- function chestStore()
- turtle.turnLeft()
- turtle.turnLeft()
- repeat
- local success, fata = turtle.inspectDown()
- if success then
- end
- turtle.forward()
- until fata.name=="IronChest:BlockIronChest"
- turtle.back()
- for i=3,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- repeat
- turtle.forward()
- until turtle.detect()
- turtle.select(1)
- end
- function tunnelV2(x)
- for i = 1,x do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.turnLeft()
- turtle.dig()
- turtle.up()
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.down()
- turtle.dig()
- turtle.turnLeft()
- reFuel()
- if turtle.getItemCount(16) > 0 then
- chestStore()
- end
- end
- backTrack()
- end
- local args={...}
- x=args[1]
- y=args[2]
- for i=1,y do
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- if i%4==0 then
- print("i is : ",i)
- turtle.turnLeft()
- tunnelV2(x)
- i=i-1
- turtle.turnLeft()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement