Advertisement
babulm

Untitled

Dec 12th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. atmid =
  2.  
  3. pipe = peripheral.wrap("bottom")
  4. rednet.open("top")
  5. function empfangen()
  6. id,uebertragung = rednet.receive()
  7. if id == atmid then
  8. data = textutils.unserialize(uebertragung)
  9. item = data.item
  10. menge = data.menge
  11. end
  12. end
  13.  
  14.  
  15.  
  16.  
  17. identicobble = pipe.getItemIdentifierIDFor(900:3, 0) -- ME drive
  18. identicontroller = pipe.getItemIdentifierIDFor(900, 2) --Controller
  19. identiacces = pipe.getItemIdentifierIDFor(900, 6) -- Acces
  20. identiinterface = pipe.getItemIdentifierIDFor(900, 8) --interface
  21. identiimport = pipe.getItemIdentifierIDFor(901, 1) -- import
  22. identiexport = pipe.getItemIdentifierIDFor(901, 0) -- export
  23. identistorage = pipe.getItemIdentifierIDFor(901, 9) --storage
  24.  
  25.  
  26.  
  27.  
  28.  
  29. while true do
  30. empfangen()
  31. if item == "ME Drive" then
  32. pipe.makeRequest(identicobble, menge)
  33. end
  34. if item == "ME Controller" then
  35. pipe.makeRequest(identicontroller, menge)
  36. end
  37. if item == "ME Access Terminal" then
  38. pipe.makeRequest(identiacces, menge)
  39. end
  40. if item == "ME Interface" then
  41. pipe.makeRequest(identiinterface, menge)
  42. end
  43. if item == "ME Import Bus" then
  44. pipe.makeRequest(identiimport, menge)
  45. end
  46. if item == "ME Export Bus" then
  47. pipe.makeRequest(identiexport, menge)
  48. end
  49. if item == "ME Storage Bus" then
  50. pipe.makeRequest(identistorage, menge)
  51. end
  52.  
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement