Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lenght = 196
- fuelSlot = 1
- buildSlot = 2
- cobbleSlot = buildSlot
- y = 0
- level = 0
- turnBuild = "turn"
- function refuel()
- turtle.select(fuelSlot)
- if turtle.getFuelLevel() < 1 then
- turtle.refuel(1)
- print("Refueled")
- end
- end
- function height()
- refuel()
- if level == 0 then
- while turtle.detectUp() == true do
- turtle.digUp()
- end
- turtle.Up()
- level = 1
- else
- while turtle.detectDown() == true do
- turtle.digDown()
- end
- turtle.Down()
- level = 0
- end
- end
- function build()
- if level == 0 then
- turtle.buildDown()
- else
- turtle.buildUp()
- end
- end
- function move()
- refuel()
- while turtle.detect() == true do
- turtle.dig()
- end
- turtle.forward()
- end
- function seal()
- turtle.turnLeft()
- turtle.build()
- turtle.turnRight()
- build()
- turtle.turnRight()
- turtle.build()
- height()
- turtle.build()
- turtle.turnLeft()
- build()
- turtle.turnLeft()
- turtle.build()
- turtle.turnRight()
- move()
- end
- function cobble()
- for slot = buildSlot, buildSlot + 3, 1 do
- if turtle.getSlotCount(slot) > 6 then
- cobbleSlot = slot
- else
- print("Low on cobble")
- cobbleSlot = buildSlot
- end
- end
- end
- --~Start of run
- move()
- y = y + 1
- for y, length, 1 do
- seal()
- end
- for i = 0, 2, 1 do
- height()
- level = 0
- end
- turtle.turnRight()
- turtle.turnRight()
- move()
- y = y - 1
- for y, 0, -1 do
- seal()
- end
- for i = 0, 2, 1 do
- height()
- level = 1
- end
- turtle.turnRight()
- turtle.turnRight()
- print("Finished")
Advertisement
Add Comment
Please, Sign In to add comment