zPandro

statuePlacer

Dec 21st, 2020 (edited)
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. local arg1= ...
  2.  
  3. nItems = arg1
  4. placedFlag = false
  5.  
  6.  
  7. function placeThatShit(items)
  8.     for i=1, items do
  9.         turtle.up()
  10.         turtle.place()
  11.     end
  12.     return true
  13. end
  14.  
  15. function tornaGiu()
  16.     while (placedFlag) do
  17.         turtle.down()
  18.         if(not turtle.down()) then
  19.             break
  20.         end
  21.     end
  22. end
  23.  
  24. while (not placedFlag) do
  25.     if(not placedFlag) then
  26.         if(not turtle.place() and turtle.getItemDetail() ~= nil and not placedFlag) then
  27.             turtle.up()
  28.         else
  29.             placedFlag = placeThatShit(nItems)
  30.             tornaGiu()
  31.         end
  32.     end
  33. end
Add Comment
Please, Sign In to add comment