xmann110

ultidrive-terminal

Feb 15th, 2020
83
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("left")
  2.  
  3. while true do
  4.     command = read()
  5.     if command == "search" then
  6.         command = {}
  7.  
  8.         term.write("Enter item name: ")
  9.  
  10.         command["name"] = "search"
  11.         command["item_name"] = read()
  12.        
  13.         rednet.broadcast(command, "commands")
  14.  
  15.         while true do
  16.             sender, message, protocol = rednet.receive(1)
  17.             if sender then
  18.                 print(sender)
  19.             else
  20.                 break
  21.             end
  22.         end
  23.     end
  24. end
RAW Paste Data