Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JUKEBOX_ID = 1
- JUKEBOX_BACKEND_ID = -1
- function main()
- peripheral.find("modem", rednet.open)
- term.clear()
- term.setCursorPos(1, 1)
- print("Jukebox OS Alpha //")
- print("Loading...")
- local protocol = "jukebox_" .. tostring(JUKEBOX_ID)
- repeat
- local id, message = rednet.receive(protocol)
- if message == "ping" then
- JUKEBOX_BACKEND_ID = id
- rednet.send(JUKEBOX_BACKEND_ID, "pong", protocol)
- end
- until JUKEBOX_BACKEND_ID ~= -1
- textutils.slowPrint("####################")
- sleep(1)
- shell.run("jukebox_frontend", JUKEBOX_ID, JUKEBOX_BACKEND_ID)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment