Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- while true do
- term.setBackgroundColor(colors.orange)
- term.setTextColor(colors.black)
- term.setCursorPos(1, 1)
- print("Chat hot online con Hiro")
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.setCursorPos(1, 17)
- print("<Tu> ")
- term.setCursorPos(6, 17)
- rold = read()
- if rold == "quit" or rold == "exit" then
- shell.run("startup")
- end
- rq = string.gsub(rold, "%s", "%%20")
- if rq ~= nil and rq ~= "" then
- id = os.getComputerID()
- rsp = http.get("http://172.16.20.220/luanet/servlets/foxbot/?ask=" .. rq .. "&id=" .. id)
- response = rsp.readAll()
- rsp.close()
- if response == nil then
- response = "(La richiesta non e' arrivata al server!)"
- end
- else
- response = "<ErrorHandler> Richiesta vuota!"
- end
- print("<Hiro> " .. response)
- print("")
- print("")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement