MaLittlePwny

Untitled

Apr 1st, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. me = peripheral.wrap("top")
  2. pushDir = "DOWN"
  3.  
  4. sleep(1)
  5. items = me.getAvailableItems()
  6.  
  7.  
  8. function pullItem(v, pushDir)
  9. me.exportItem(v, pushDir,1)
  10. sleep(0.1)
  11. turtle.dropDown()
  12. end
  13.  
  14.  
  15.  
  16.  
  17. for k, v in pairs(items) do
  18. if string.find(v.fingerprint.id, "-1") then
  19.  
  20. else
  21. print(v.fingerprint.id)
  22. v.qty = 1
  23. v.id = v.fingerprint.id
  24.  
  25. if lua_pcall(pullItem, v, pushDir) then
  26. print("Success")
  27. else
  28. print("Failure")
  29. end
  30.  
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment