Advertisement
TeoremaPi

Construir linea recta

Apr 11th, 2020
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. -- programa que construye un muro en linea recta hasta que choca con algo
  2.  
  3. turtle.select(1)
  4.  
  5. while turtle.forward() do
  6.     while (turtle.getItemCount() == 0) and (turtle.getSelectedSlot() < 16) do
  7.         turtle.select(turtle.getSelectedSlot() + 1)
  8.     end
  9.  
  10.     if (turtle.getItemCount() == 0) and (turtle.getSelectedSlot() == 16) then
  11.         return
  12.     end
  13.  
  14.     turtle.digDown()
  15.     turtle.placeDown()
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement