Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- To install
- -- pastebin get PQr3vPv0 player
- -- Define all reels in DEFINE REELS section below
- -- Define several useful variables up here
- -- Change top to (bottom, left, right, front, back) when needed
- local m = peripheral.wrap("top")
- -- Frames Per Second
- local fps = 15
- -- Left margin in characters (starting from 1 not 0)
- local leftMargin = 4
- -- Top margin in characters (starting from 1 not 0)
- local topMargin = 4
- -- Sets the scale of the text
- local textScale = 20/15
- -- changeReelOn, if true, Outputs redstone all around
- -- the computer for ten seconds and prints Changing Reel
- -- in big text. Does nothing if false.
- local changeReelOn = true
- -- playReel function
- function playReel(reel, lengthInFrames, frameHeight)
- m.setTextScale(textScale)
- m.setCursorPos(leftMargin,topMargin)
- local reel = fs.open(reel,"r")
- for k = 1,lengthInFrames do
- m.clear() -- Clears the screen for the next frame.
- -- Updates frameCount (If this is giving an error,
- -- make sure your frameHeight is correct)
- local frameCount = tonumber(reel.readLine())
- for i = 1, frameHeight do
- m.setCursorPos(leftMargin,i+topMargin)
- m.write(reel.readLine())
- end
- sleep(frameCount/fps) -- This determines the FPS
- end
- reel.close()
- end
- -- DEFINE REELS DEFINE REELS DEFINE REELS DEFINE REELS DEFINE REELS
- --
- -- Each reel should be a list within the reel list
- -- Format: playReel("title.txt", length of reel in unique frames, height to display at)
- --
- --playReel("star1", 794, 13)
- --playReel("star2", 724, 13)
- --playReel("star3", 727, 13)
- --playReel("star4", 594, 13)
- --playReel("star5", 571, 13)
- --
- -- END DEFINE REELS END DEFINE REELS END DEFINE REELS END DEFINE REELS
- -- STARWARS EP IV REELS
- -- pastebin get tj7vUqcJ star1
- -- pastebin get jGXWJ0QB star2
- -- pastebin get S4bzEx3j star3
- -- pastebin get yifuceXV star4
- -- pastebin get whhNhKZr star5
- -- Signals next computer to start playing, or that someone should play from the next computer.
- if changeReelOn == true then
- m.clear()
- m.setCursorPos(1,1)
- m.setTextScale(4)
- m.write("Changing Reel")
- redstone.setOutput("left", true)
- sleep(15)
- redstone.setOutput("left", false)
- end
Advertisement
Add Comment
Please, Sign In to add comment