Advertisement
Guest User

startup

a guest
Sep 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1.  
  2. SleepTime = 60
  3.  
  4. local m = peripheral.wrap("bottom")  
  5. local mx,my = m.getSize()    
  6.  
  7. while true do
  8.     m.setCursorPos(1,1)
  9.     m.setBackgroundColor(colors.lime)
  10.     m.setTextColor(colors.white)
  11.    
  12.     m.clear()
  13.  m.setTextScale(1)
  14.  m.write("_____________________________")
  15.  m.setCursorPos(1,2)
  16.  m.write("|                           |")
  17.  m.setCursorPos(1,3)
  18.  m.write("|  ##### ##### ####   ####  |")
  19.  m.setCursorPos(1,4)
  20.  m.write("|    #     #   #   # #      |")
  21.  m.setCursorPos(1,5)
  22.  m.write("|    #     #   ####   ###   |")
  23.  m.setCursorPos(1,6)
  24.  m.write("|    #     #   #         #  |")
  25.  m.setCursorPos(1,7)
  26.  m.write("|    #   ##### #     ####   |")        
  27.  m.setCursorPos(1,8)
  28.  m.write("|___________________________|")
  29.  
  30.  i = 10
  31.  subs = http.get("http://www.as2pik.tv/lastTip.php").readAll()
  32.  
  33.  for sub in subs:gmatch(".-[|]+") do
  34.    m.setCursorPos(16 - sub:len()/2,i)
  35.    if (sub:sub(1,1) == "N") then
  36.      m.setTextColor(colors.red)
  37.    else
  38.      m.setTextColor(colors.white)
  39.    end
  40.    m.write(sub:sub(1,sub:len()-1))
  41.    print(sub:sub(1,1))
  42.    i = i+1
  43.  end   
  44.  
  45.     sleep(SleepTime)
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement