Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkFuel()
- turtle.select(1)
- while turtle.getFuelLevel() < 30 do
- turtle.refuel(1)
- end
- end
- function forwardDig()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- end
- function startTime()
- term.clear()
- term.setCursorPos(1,1)
- write("Num Floors? ")
- num = tonumber(read())
- write("1 for Down or 2 for Up. ")
- direc = tonumber(read())
- end
- function stairBit()
- for i=1,4 do
- forwardDig()
- turtle.turnRight()
- forwardDig()
- if direc ~= 1 then
- turtle.up()
- turtle.digUp()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.digUp()
- turtle.turnRight()
- else
- turtle.down()
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.digDown()
- turtle.turnRight()
- end
- end
- end
- function landingBit()
- forwardDig()
- forwardDig()
- turtle.turnRight()
- forwardDig()
- turtle.turnRight()
- forwardDig()
- turtle.turnLeft()
- forwardDig()
- turtle.turnLeft()
- forwardDig()
- turtle.turnRight()
- forwardDig()
- turtle.turnRight()
- forwardDig()
- end
- startTime()
- term.clear()
- print(num)
- print(direc)
- for i=1,num do
- checkFuel()
- stairBit()
- landingBit()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement