Advertisement
Ubidibity

NetherStairs

May 2nd, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.96 KB | None | 0 0
  1. -- The idea here is to keep the stairs enclosed to bridge gaps of air or lava
  2. -- GhastGuard[R]
  3. placed=0
  4. place=1
  5.  
  6. function blocksides()
  7.   turtle.turnRight()
  8.   if turtle.place() then
  9.     placed=placed+1
  10.   end
  11.   turtle.turnRight()
  12.   turtle.turnRight()
  13.   if turtle.place() then
  14.     placed=placed+1
  15.   end
  16.   turtle.turnRight()
  17. end
  18.  
  19. function tup()
  20.   -- turtle up
  21.   turtle.digUp()
  22.   turtle.up()
  23. end
  24.  
  25. function digstep()
  26.   -- wub wub
  27.   -- we need 1 to stand on below us, one for our feet, one for our head, one to jump into, and one above that for a roof...
  28.   if turtle.placeDown() then
  29.     placed=placed+1
  30.   end
  31.   blocksides()
  32.   tup()
  33.   blocksides()
  34.   tup()
  35.   blocksides()
  36.   -- roof
  37.   if turtle.placeUp() then
  38.     placed=placed+1
  39.   end
  40.   -- return to head, move forward
  41.   turtle.down()
  42.   turtle.dig()
  43.   turtle.forward()
  44. end
  45.  
  46. for x=1, 50 do
  47.   digstep()
  48.   if placed>57 then
  49.     placed=0
  50.     place=place+1
  51.     turtle.select(place)
  52.   end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement