Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tMess = {}
- chatbox = peripheral.find("chatbox")
- if not chatbox then
- error("MoarPeripherals Chatbox is needed.")
- end
- function b()
- while true do
- ev, side, playername, mess = os.pullEvent("chat_message")
- thing = playername..": "..mess
- local a = http.post("http://minechat.x10host.com/index.php?words="..textutils.urlEncode(thing))
- end
- end
- function a()
- while true do
- local b = http.post("http://minechat.x10host.com/index.php?true=true")
- b = b.readAll()
- if b ~= tMess[#tMess] then
- tMess[#tMess+1] = b
- chatbox.say(b)
- end
- end
- end
- parallel.waitForAll(a, b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement