Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Code for Recieving PCs
- function listen()
- local modem = peripheral.wrap("right")
- modem.open(3)
- local event, modemSide, senderChannel,
- replyChannel, message, senderDistance = os.pullEvent("modem_message")
- end
- function Box1()
- print("Box 1?")
- print(message)
- end
- function Box2()
- print("Box 2?")
- print(message)
- end
- function Box3()
- print("Box 3?")
- print(message)
- end
- function restart()
- listen()
- end
- function CheckMessage(message1)
- if message1 == box1
- then
- Box1()
- elseif message1 == box2
- then
- Box2()
- elseif message == box3
- then
- Box3()
- else
- end
- end
- listen()
- CheckMessage(message)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement