Advertisement
raphael76280

Untitled

Aug 4th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local reactor
  2. reactor = peripheral.wrap("back")
  3. reactor.open(10)
  4. rednet.open("back")
  5.  
  6. while true do
  7.  
  8. local function GetString()
  9.   write("Active/Desactive/Fuel/Heat  ")
  10.   return read()
  11. end
  12.  
  13. local command = GetString()
  14.  
  15.  
  16. if (command == "Active") then
  17. reactor.transmit(10, 10, "active")
  18. print("active")
  19. end
  20.  
  21. if (command == "Desactive") then
  22. reactor.transmit(10, 10, "desactive")
  23. end
  24.  
  25. if (command == "Fuel") then
  26. reactor.transmit(10, 10, "fuel")
  27. end
  28.  
  29. if (command == "Heat") then
  30. reactor.transmit(10, 10, "heat")
  31. end
  32.  
  33. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  34. print(message)
  35.  
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement