Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,12)
- print("Enter your desired username.")
- name = read()
- rednet.open("right")
- rednet.broadcast(name .. " has joined the room.. do not welcome him/her..")
- term.clear()
- term.setCursorPos(1,1)
- print("Orangutang chatt 1.0, say hi to your moma in style..")
- term.setCursorPos(1,2)
- print("--------------------------------------------")
- term.setCursorPos(1, 17)
- print("----------------- Chat ---------------------")
- term.setCursorPos(1, 18)
- function main()
- term.setCursorPos(1,3)
- while true do
- chat = read()
- if chat == "" then
- print("You can't send an empty message, fool.")
- elseif chat == "disconnect" then
- print("NOT FENESHED SKRIPTED JETT.")
- else
- rednet.broadcast(name .. ": " .. chat)
- print("You: " .. chat)
- end
- end
- end
- function listen()
- while true do
- id, message, dist = rednet.receive()
- if message ~= "" and message ~= nil then
- print(message)
- end
- end
- end
- parallel.waitForAll(listen, main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement