wv1106

computercraft advertisement

Mar 31st, 2021 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. --this script allows you to display images to a monitor from a disk
  2. --name your first image 1.nfp and your second 2.nfp ...
  3. --put those files on a disk
  4. --run this script on a computer with a monitor beside and your disk
  5.  
  6. local files = fs.list("disk/")
  7. local images = {}
  8. local monitor = peripheral.find("monitor")
  9. term.redirect(monitor)
  10. for i=1,#files do
  11.     images[i] = paintutils.loadImage("disk/"..tostring(i)..".nfp")
  12. end
  13. term.clear()
  14. term.setCursorPos(1, 1)
  15. while 1 do
  16.    for j=1,#files do
  17.         term.clear()
  18.         paintutils.drawImage(images[j], 1, 1)
  19.         sleep(5)
  20.    end
  21. end
Add Comment
Please, Sign In to add comment