Advertisement
Loneranger419

itemDetail

Feb 1st, 2025 (edited)
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. local logFile = "/.me_item_details_tmp"
  2. local searchItem = "minecraft:oak_planks" -- Change this to the item you are looking for
  3.  
  4. local device = peripheral.find("meBridge")
  5.  
  6. if not device then
  7.     print("No ME Bridge found!")
  8.     return
  9. end
  10.  
  11. local itemFilter = {
  12.     name = searchItem
  13. }
  14.  
  15. local success, itemDetails = pcall(device.getItem, itemFilter)
  16.  
  17. if not success or not itemDetails then
  18.     print("Item '" .. searchItem .. "' not found in the ME system.")
  19.     return
  20. end
  21.  
  22. local file = fs.open(logFile, "w")
  23. file.writeLine("ME Bridge - Item Details for: " .. searchItem .. "\n")
  24. file.writeLine(textutils.serialize(itemDetails))
  25. file.close()
  26.  
  27. print("\nUploading to Pastebin...")
  28. local pastebinSuccess = shell.run("pastebin", "put", logFile)
  29.  
  30. if pastebinSuccess then
  31.     print("\nPastebin upload successful!")
  32. end
  33.  
  34. fs.delete(logFile)
  35. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement