Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- rednet.open("back")
- username = "Chum"
- local chatBuddy = nil
- function help()
- print("Welcome to askenef's chat shizzle 1.0")
- print("Press T to Type")
- end
- clear()
- help()
- while true do
- event, id, msg = os.pullEvent()
- if event == "rednet_message" and id == chatBuddy then
- print(msg)
- elseif event == "char" then
- if id == "t" then
- write(username.." > ")
- msgsent = read()
- if chatBuddy ~= nil then
- rednet.send(chatBuddy,username.." > "..msgsent)
- else
- print("Quit talking to yourself, dumbass!")
- --always punish users for doing stuff wrong
- end
- elseif id == "h" then
- write("New username: ")
- username = read()
- elseif id == "c" then
- write("Chum ID: ") --put your chum's computer ID here
- chatBuddy = tonumber(read())
- clear()
- print("Conncted. You may chat if your chum")
- print("is connected to you right now")
- elseif id == "a" then
- chatBuddy = nil
- clear()
- help()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement