Advertisement
funnybunnyofdoom

itemScan

Dec 20th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. --This program scans the slot for
  2. --item Name and Damage, then inputs it into itemcheck
  3. while true do
  4.  
  5. x = turtle.getItemDetail()
  6. if x then
  7. print(x.name)
  8. print(x.damage)
  9. end
  10. print("Would you like to add this item to the")
  11. print("Sorting program? (Y/N)")
  12. choice = read()
  13.  
  14. if choice == 'Y' or choice == 'y' then
  15. shell.run("dir /path")
  16. print("what is the item-path name?")
  17. bunnypath = read()
  18.  
  19. file = fs.open("itemcheck",'a')
  20. file.write("if itemID then")
  21. file.write("if itemID.name == "..x.name.." and itemID.damage == "..x.damage.." then"
  22. file.write("shell.run("("/path/"..bunnypath)")")
  23. file.write("end")
  24. file.close()
  25. end
  26.  
  27.  
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement