Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs == 1 then
- height = tonumber(tArgs[1])
- else
- print("Usage: stairs <current height>")
- return
- end
- function forward(num)
- for x = 1, num do
- while not turtle.forward() do
- turtle.dig()
- end
- end
- end
- function down(num)
- for x = 1, num do
- while not turtle.down() do
- turtle.digDown()
- end
- end
- end
- function up(num)
- for x = 1, num do
- while not turtle.up() do
- turtle.digUp()
- end
- end
- end
- for x = 1, height do
- forward(1)
- turtle.digUp()
- down(1)
- turtle.digDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement