Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- y = 0
- slot = 1
- function selectSlot()
- if turtle.getItemCount(slot) == 0 then
- slot = slot + 1
- end
- turtle.select(slot)
- end
- function column()
- selectSlot()
- turtle.dig()
- turtle.place()
- while y < h - 1 do
- turtle.up()
- y = y + 1
- turtle.dig()
- turtle.place()
- end
- while y > 0 do
- turtle.down()
- y = y - 1
- end
- end
- print("+-------------------------------------+")
- print("| Wall Maker |")
- print("+-------------------------------------+")
- print("| Slot 16: Fuel |")
- print("| Slot 1-15: Blocks |")
- print("+-------------------------------------+")
- print("| Place turtle at bottom left of the |")
- print("| wall. Specify width and height. |")
- print("| Press enter to start. |")
- print("+-------------------------------------+")
- read()
- print("+-------------------------------------+")
- print("| Wall Width = ? |")
- print("+-------------------------------------+")
- w = tonumber(read())
- print("+-------------------------------------+")
- print("| Wall height = ? |")
- print("+-------------------------------------+")
- h = tonumber(read())
- column()
- for i = 1,w - 1,1 do
- turtle.turnRight()
- turtle.forward()
- x = x + 1
- turtle.turnLeft()
- column()
- end
- turtle.turnLeft()
- for i = 1,w - 1,1 do
- turtle.forward()
- x = x - 1
- end
- turtle.turnRight()
- print("Done! :D")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement