Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Setting up the screen
- local ver = "1.2.1"
- rednet.open("back")
- function start()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.yellow)
- print("Message Board V."..ver)
- term.setTextColor(colors.white)
- end
- start()
- --Actual code starts...
- --now:
- function getInfo()
- term.write("Please enter your username: ")
- usr = read()
- print("Enter your message:")
- message = read()
- end
- function fill()
- msg = nil
- local id, msg, dist = rednet.receive(15)
- if msg == nil then
- term.setTextColor(colors.red)
- print("Error! Please tell Austin or Panda!")
- sleep(10)
- os.reboot()
- end
- end
- function msgSend()
- rednet.broadcast("start")
- local id, msg, dist = rednet.receive(15)
- if msg == "go on" then
- rednet.broadcast("user")
- fill()
- rednet.broadcast(usr)
- fill()
- rednet.broadcast("message")
- fill()
- rednet.broadcast(message)
- fill()
- rednet.broadcast("end")
- else
- term.setTextColor(colors.red)
- print("Error! Please tell Austin or Panda!")
- sleep(10)
- os.reboot()
- end
- os.reboot()
- end
- getInfo()
- msgSend()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement