AdslHouba

Live

Apr 10th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. monitor=peripheral.find("monitor")
  2. monitor.setTextScale(0.5)
  3. w,h=monitor.getSize()
  4. while true do
  5.     tmp=http.get("http://www.adslhouba.fr/_comment/live2.php")
  6.     if tmp==nil then
  7.        
  8.     else
  9.         test=tmp.readAll()
  10.         print(test)
  11.         donne=textutils.unserialize(test)
  12.  
  13.         for i, dt in pairs(donne) do
  14.             monitor.scroll(1)
  15.             monitor.setCursorPos(1,h)
  16.             monitor.write(dt.auteur..' : '..dt.msg)        
  17.             os.sleep(0.5)
  18.         end
  19.     end
  20.     os.sleep(3)
  21. end
Add Comment
Please, Sign In to add comment