Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("buildSupport.lua")
- os.loadAPI("userInput.lua")
- -- make the turtle go down until it can't
- function goDown()
- local blocksDown = 0
- while turtle.down() do
- blocksDown = blocksDown + 1
- end
- return blocksDown
- end
- -- make the turtle go up a certain number of blocks
- function goUp(blocks)
- for i = 1, blocks do
- turtle.up()
- buildSupport.placeDown()
- end
- end
- function fillY()
- local blocksDown = goDown()
- goUp(blocksDown)
- end
- width = tonumber(userInput.getUserInput("Please Enter a Length: "))
- length = tonumber(userInput.getUserInput("Please Enter a Width: "))
- print("Fuel And Blocks Cannot be Predicted")
- print("Fuel")
- print("currently: " .. turtle.getFuelLevel() .. " out of " .. turtle.getFuelLimit())
- print("or " .. (turtle.getFuelLevel()/turtle.getFuelLimit()) * 100 .. "%")
- userInput.getUserInput("Press anything to continue: ")
- turtle.forward()
- for i = 1, length do
- for j = 1, width do
- fillY()
- if j < width then
- turtle.forward()
- end
- end
- if i < length then
- if i % 2 == 0 then
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- else
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement