Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- local Path = tArg[1]
- local X = textutils.unserialize(tArg[2])
- local Y = textutils.unserialize(tArg[3])
- local FrameRate = 1
- local Frames = {}
- local file = fs.open(Path,"r")
- FrameRate = textutils.unserialize(file.readLine())
- local Content
- local I = 1
- Frames[I] = file.readLine()
- while true do
- Content = file.readLine()
- if Content ~= nil then
- if Content == "frameEnd" then
- I = I + 1
- Frames[I] = file.readLine()
- else
- Frames[I] = Frames[I].."\n"
- Frames[I] = Frames[I]..Content
- end
- end
- if Content == nil then break end
- end
- file.close()
- for i = 1, I do
- local Image = paintutils.parseImage(Frames[i])
- paintutils.drawImage(Image,X,Y)
- os.sleep(FrameRate)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement