Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("SkiFire13 underground room maker")
- print("Insert 9 coal in the first slot")
- print("Insert 10 glass in the second slot")
- print("Insert 10 glowstone in the third slot")
- print("Press ENTER to start")
- io.read()
- local Start, Finished
- Start = 1
- Finished = 1
- function digThreeForOne()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- turtle.back()
- end
- function digThreeForThree()
- for i=0,2,1 do
- digThreeForOne()
- turtle.forward()
- end
- for i=0,2,1 do
- turtle.back()
- end
- end
- function placeGlowDown()
- if turtle.detectDown() then
- turtle.digDown()
- turtle.down()
- turtle.digDown()
- turtle.select(3)
- turtle.placeDown()
- turtle.up()
- turtle.select(2)
- turtle.placeDown()
- end
- end
- function placeGlowUp()
- if turtle.detectUp() then
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.select(3)
- turtle.placeUp()
- turtle.down()
- turtle.select(2)
- turtle.placeUp()
- end
- end
- function placeGlow(Start, Finished)
- if Start==0 then
- placeGlowDown()
- end
- if Finished==0 then
- placeGlowUp()
- end
- end
- function Flat()
- digThreeForOne()
- turtle.forward()
- turtle.dig()
- turtle.forward()
- placeGlow(Start, Finished)
- turtle.back()
- for i=0,2,1 do
- digThreeForThree()
- for i=0,2,1 do
- turtle.forward()
- end
- end
- digThreeForOne()
- placeGlow(Start, Finished)
- for i=0,1,1 do
- turtle.turnLeft()
- turtle.forward()
- end
- turtle.turnRight()
- digThreeForThree()
- for i=0,1,1 do
- turtle.turnLeft()
- for i=0,2,1 do
- turtle.forward()
- end
- turtle.turnRight()
- digThreeForThree()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- digThreeForThree()
- for i=0,1,1 do
- turtle.turnLeft()
- for i=0,2,1 do
- turtle.forward()
- end
- turtle.turnRight()
- digThreeForThree()
- end
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- digThreeForOne()
- placeGlow(Start, Finished)
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- digThreeForOne()
- placeGlow(Start, Finished)
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.turnRight()
- placeGlow(Start, Finished)
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.back()
- end
- turtle.refuel(9)
- Start = 0
- Flat()
- Start = 1
- turtle.digUp()
- turtle.up()
- Flat()
- turtle.digUp()
- turtle.up()
- Flat()
- turtle.digUp()
- turtle.up()
- Finished = 0
- Flat()
- Finished = 1
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- print("Turtle has finished!")
Advertisement
Add Comment
Please, Sign In to add comment