Advertisement
robbim97

WallChanger

Sep 22nd, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. selectedSlot = 1
  2.  
  3. function items()
  4.     if turtle.getItemCount(selectedSlot) <= 1 then
  5.         selectedSlot = selectedSlot + 1
  6.         if selectedSlot == 17 then
  7.           selectedSlot = 1
  8.         end
  9.         turtle.select(selectedSlot)
  10.     end
  11. end
  12.  
  13. turtle.turnRight()
  14. while not turtle.detect() do
  15.   turtle.turnLeft()
  16.   turtle.dig()
  17.   turtle.forward()
  18.   while turtle.digUp() do
  19.     turtle.up()
  20.   end
  21.   while not turtle.detectUp() do
  22.     turtle.up()
  23.   end
  24.   while turtle.down() do
  25.     items()
  26.     turtle.placeUp()
  27.   end
  28.   turtle.turnRight()
  29.   turtle.turnRight()
  30.   turtle.forward()
  31.   turtle.turnLeft()
  32.   turtle.forward()
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement