Advertisement
MagmaLP

Trader Item Output Turtle

Jan 20th, 2022
952
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print(" ")
  2. print("Slot Belegung:")
  3. print("~~~~~~~~~~~~~~")
  4. print("1 = HV           9 = Macerator")
  5. print("2 = MV          10 = AE")
  6. print("3 = LV          11 = MFSU")
  7. print("4 = DSU         12 = Amar. Dust")
  8. print("5 = MKII        13 = Verd. Dust")
  9. print("6 = Extruder    14 = Matrix Ident.")
  10. print("7 = Recycler    15 = Dirt")
  11. print("8 = E. Furnace  16 = Dirt")
  12.  
  13. rednet.open("right")
  14.  
  15. while true do
  16.   id, msg = rednet.receive()
  17.  
  18.   package = textutils.unserialize(msg)
  19.  
  20.   for k,v in pairs(package) do
  21.     turtle.select(v["Slot"])
  22.     turtle.drop(v["Amount"])
  23.    
  24.     print(v["Slot"])
  25.     print(v["Amount"])      
  26.    
  27.     file = fs.open("log", "a")
  28.     file:write("\n", " ")
  29.     sleep(0.25)
  30.     file.write("\n", " ")
  31.     file.write(v["Slot"].."        ")
  32.     file.write(v["Amount"].."   ")
  33.     file.close()
  34.   end
  35. end
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement