Advertisement
StuBob

Spiral Staircase Computercraft

Mar 13th, 2015
1,874
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local arg = {...}
  2.  
  3. function step()
  4.   turtle.digUp()
  5.   turtle.up()
  6.   turtle.digUp()
  7.   turtle.dig()
  8.   turtle.forward()
  9.   checkAndPlace()
  10.   turtle.digUp()
  11.   turtle.up()
  12.   turtle.digUp()
  13.   turtle.dig()
  14.   turtle.forward()
  15.   checkAndPlace()
  16.   turtle.digUp()
  17.   turtle.turnLeft()
  18. end
  19.  
  20. function checkAndPlace()
  21.   if(not turtle.detectDown()) then
  22.     turtle.placeDown()
  23. end
  24.  
  25.  
  26. for  i = 1, tonumber(arg[1]) do
  27.   step()
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement