Advertisement
xmann110

ultidrive-terminal

Feb 15th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement