se7enek

farma cobbla2

Sep 14th, 2013
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function counter()
  2. local i = 0
  3. return function() i = i + 1 return i end
  4. end
  5. function modStr(num)
  6. if num < 10 then
  7. return "0" .. num
  8. else
  9. return num
  10. end
  11. end
  12. while true do
  13. if turtle.detect() then
  14. turtle.dig()
  15. term.clear()
  16. term.setCursorPos(1,1)
  17. local total = 0
  18. for i=1,16,1 do
  19. total = total + turtle.getItemCount(i)
  20. end
  21. print("Lacznie: " .. total)
  22. print("-----------------")
  23. local iterator = counter()
  24. print(" ___ ___ ___ ___ ")
  25. print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")
  26. print("|___|___|___|___|")
  27. print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")
  28. print("|---|---|---|---|")
  29. print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")
  30. print("|---|---|---|---|")
  31. print("|" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |" .. modStr(turtle.getItemCount(iterator())) .. " |")
  32. print("|___|___|___|___|")
  33. print(" ")
  34. print("-----------------")
  35. print("Generator Cobblestone")
  36. print(" by se7en")
  37. end
  38. totalcount = turtle.getItemCount(16)
  39. if totalcount == 64 then
  40. term.clear()
  41. term.setCursorPos(1,1)
  42. print("Wyrzucanie stackow")
  43. print("...Prosze czekac.")
  44. sleep(1)
  45. turtle.turnLeft()
  46. for i=1,16 do
  47. turtle.select(i)
  48. turtle.drop()
  49. end
  50. turtle.turnRight()
  51. turtle.select(1)
  52. end
  53. end
Advertisement
Add Comment
Please, Sign In to add comment