Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- requires pastebin gt4UdYGf saved as receive on same advanced computer (pastebin get gt4UdYGf receive)--
- function start()
- term.clear()
- term.setCursorPos(1, 1)
- print("---------------------------------------------------")
- print("| Enter the ID you want |")
- print("| to send a messange to |")
- print("| |")
- print("---------------------------------------------------")
- idtext = read()
- id = tonumber(idtext)
- if id == nil then
- start()
- else
- send()
- end
- end
- function send()
- term.clear()
- term.setCursorPos(1, 1)
- if id >= 10 then
- space = " "
- else
- space = " "
- end
- print("---------------------------------------------------")
- print("| Enter the message you want |")
- print("| to send a messange to ID: ", id, space, " |")
- print("| |")
- print("---------------------------------------------------")
- message = read()
- ask()
- end
- function ask()
- print("Are you sure you want to send this message? (y/n)")
- input = read()
- if input == "y" then
- rednet.send(id, message)
- term.clear()
- term.setCursorPos(1, 1)
- print("message has benn sent")
- for i = 1, 5 do
- sleep(0.5)
- print(".")
- end
- start()
- elseif input == "n" then
- send()
- else
- ask()
- end
- end
- shell.openTab("receive")
- start()
Add Comment
Please, Sign In to add comment