Advertisement
natie3

Placer

Nov 16th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. function checkItems()
  2.   currentSlot = 2
  3.   while turtle.getItemCount() < 64 and currentSlot < 17 do
  4.     turtle.select(currentSlot)
  5.     turtle.transferTo(1)
  6.     turtle.select(1)
  7.     currentSlot = currentSlot + 1
  8.   end
  9.   if currentSlot == 17 then
  10.     chat.say("I ran out of items, please bring more")
  11.     turtle.select(1)
  12.     while turtle.getItemCount() == 0 do
  13.       os.sleep(5)
  14.     end
  15.     checkItems()
  16.   end
  17. end  
  18.  
  19. i = 1
  20. while turtle.back() do
  21.   turtle.place()
  22.   i = i + 1
  23.   if i % 50 == 0 then
  24.     checkItems()
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement