Advertisement
Lebarra

stairs up

Jun 18th, 2024 (edited)
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local tArgs = { ... }
  2.  
  3. if #tArgs ~= 1 then
  4.     print( "Usage: stairs <size>" )
  5.     return
  6. end
  7.  
  8. local size = tonumber( tArgs[1] )
  9. if size < 1 then
  10.     print( "Size must be positive" )
  11.     return
  12. end
  13.  
  14. for n=1,size do
  15.     turtle.dig()
  16.     turtle.place()
  17.  
  18.     turtle.digUp()
  19.     turtle.up()
  20.     turtle.dig()
  21.  
  22.     turtle.forward()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement