Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor
- reactor = peripheral.wrap("back")
- reactor.open(10)
- rednet.open("back")
- while true do
- local function GetString()
- write("Active/Desactive/Fuel/Heat ")
- return read()
- end
- local command = GetString()
- if (command == "Active") then
- reactor.transmit(10, 10, "active")
- print("active")
- end
- if (command == "Desactive") then
- reactor.transmit(10, 10, "desactive")
- end
- if (command == "Fuel") then
- reactor.transmit(10, 10, "fuel")
- end
- if (command == "Heat") then
- reactor.transmit(10, 10, "heat")
- end
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- print(message)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement