Advertisement
osmarks

CCAd

Aug 22nd, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. local mon = peripheral.find("monitor")
  2. local adURL = "https://osmarks.ml/py/mc-ad"
  3.  
  4. term.clear()
  5. print("GolCo Advertising Network")
  6.  
  7. term.redirect(mon)
  8.  
  9. function download()
  10.     return http.get(adURL).readAll()
  11. end
  12.  
  13. function display(text)
  14.     term.setCursorPos(1, 1)
  15.     term.clear()
  16.     print(text)
  17. end
  18.  
  19. function run()
  20.     local ad = download()
  21.     display(ad)
  22. end
  23.  
  24. while true do
  25.     pcall(run)
  26.     sleep(60)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement