Advertisement
JMANN2400

FoundryWorker[Top]

Aug 14th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1.  
  2.  
  3.  
  4. x = 0
  5.  
  6. slot = 2
  7.  
  8. function selectSlot()
  9.     if turtle.getItemCount(slot) == 0 and slot < 16 then
  10.         slot = slot + 1
  11.     end
  12.     turtle.select(slot)
  13. end
  14.  
  15. print("+-------------------------------------+")
  16. print("| Foundry Worker                      |")
  17. print("+-------------------------------------+")
  18. print("| Slot 1: Fuel                        |")
  19. print("| Slot 2-16: Raw Materials            |")
  20. print("+-------------------------------------+")
  21. print("| Array length = ?                    |")
  22. print("+-------------------------------------+")
  23. l = tonumber(read())
  24.  
  25. while x < l do
  26.     turtle.select(1)
  27.     turtle.refuel()
  28.     selectSlot()
  29.     turtle.dropDown(16)
  30.     turtle.forward()
  31.     x = x + 1
  32. end
  33.  
  34. while x > 0 do
  35.     turtle.back()
  36.     x = x - 1
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement