Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- turtle.select(1)
- print("How long do you want the foor to be?")
- write("> ")
- l = tonumber( read() )
- print()
- print("How wide do you want the floor to be?")
- write("> ")
- w = tonumber( read() )
- print()
- print("Build left or right?")
- write("> ")
- left = read()
- print("")
- print("would you like the turlte to dig the floor also? yes/no")
- write("> ")
- dig = read()
- print("")
- s = 1
- l = l - 1
- function floor()
- if dig == "yes" then
- while not turtle.placeDown() do
- turtle.digDown()
- turtle.attackDown()
- sleep(0.1)
- end
- else
- turtle.placeDown()
- end
- while not turtle.forward() do
- turtle.dig()
- sleep(0.6)
- end
- if turtle.getItemCount(s) == 0 then
- s = s + 1
- turtle.select(s)
- turtle.placeDown()
- end
- end
- function turn()
- if left == "left" then
- turtle.turnLeft()
- floor()
- turtle.turnLeft()
- left = "right"
- else
- turtle.turnRight()
- floor()
- turtle.turnRight()
- left = "left"
- end
- end
- for a=1,w do
- for b=1,l do
- floor()
- end
- turn()
- end
Advertisement
Add Comment
Please, Sign In to add comment