sofi311d

stair

Sep 20th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local function fuel()
  2.     print("Use two turtles")
  3.     print("Use blocks in 1 and stairs in 2")
  4.     print("Refuel")
  5.     turtle.select(1)
  6.     turtle.refuel()
  7. end
  8.  
  9. local function place()
  10.     x = 4
  11.     while x > 0 do
  12.         turtle.select(2)
  13.         turtle.place()
  14.         turtle.turnLeft()
  15.         turtle.forward()
  16.         turtle.turnRight()
  17.         x = x - 1
  18.     end
  19. end
  20.  
  21. local function move()
  22.     turtle.turnRight()
  23.     turtle.forward()
  24.     turtle.forward()
  25.     turtle.forward()
  26.     turtle.forward()
  27.     turtle.turnLeft()
  28.     turtle.up()
  29.     turtle.forward()
  30. end
  31.  
  32. local function topstair()
  33.     place()
  34.     move()
  35.     place()
  36.     move()
  37.     place()
  38.     move()
  39.     place()
  40.     move()
  41. end
  42.  
  43. local function start() -- moves to start
  44.     x = 4
  45.     while x > 0 do
  46.         turtle.back()
  47.         turtle.down()
  48.         x = x - 1
  49.     end
  50.     turtle.back()
  51. end
  52.  
  53. local function places()
  54.     x = 4
  55.     while x > 0 do
  56.         turtle.select(3)
  57.         turtle.place()
  58.         turtle.turnLeft()
  59.         turtle.forward()
  60.         turtle.turnRight()
  61.         x = x - 1
  62.     end
  63. end
  64.  
  65. local function beta() -- builds second line og stairs
  66.     start()
  67.     places()
  68.     move()
  69.     places()
  70.     move()
  71.     places()
  72.     move()
  73.     places()
  74.     move()
  75. end
  76.    
  77.  
  78. fuel()
  79. topstair()
  80. beta()
Advertisement
Add Comment
Please, Sign In to add comment