Advertisement
Guest User

buildPillar.lua

a guest
Apr 9th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. local runif = 1
  2. local pillarHeight = 0
  3. turtle.select(1)
  4. turtle.refuel()
  5. print(turtle.getFuelLevel())
  6. local selectedSlot = 2
  7. turtle.select(selectedSlot)
  8.  
  9. while runif do
  10.     if turtle.getItemCount() == 0 then
  11.         selectedSlot = selectedSlot + 1
  12.         turtle.select(selectedSlot)
  13.     end
  14.     if (turtle.detectUp()) or (pillarHeight > 200) then
  15.         runif = 0
  16.         turtle.back()
  17.         turtle.place()
  18.         for i = 0, pillarHeight do
  19.             turtle.down()
  20.         end
  21.     else
  22.         pillarHeight = pillarHeight + 1
  23.         turtle.up()
  24.         turtle.placeDown()
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement