Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strLine1 = " # ### "
- strLine2 = " # # ##### # # ###### ##### ##### # #### ###### # # ###### ##### ###### ### "
- strLine3 = " # # # # # # # # # # # # # # # # # # # ### "
- strLine4 = "# # # # # # ##### # # # # #### ##### ###### ##### # # ##### # "
- strLine5 = "####### # # # # # ##### # # # # # # # ##### # "
- strLine6 = "# # # # # # # # # # # # # # # # # # # # ### "
- strLine7 = "# # ##### ## ###### # # # # #### ###### # # ###### # # ###### ### "
- local marchTextRtoL = function (strMessage,intLine,strHeader,mon,strSep)
- local intOffset = 1
- local strHeader = strHeader or "" --Optional
- local mon = mon or term.native --Optional
- local strSep = strSep or " | " --Optional
- local intWidth = mon.getSize()
- local strBlank = string.rep(" ",intWidth)
- local _, y = mon.getCursorPos()
- local intLine = intLine or y -- Optional
- local strMsgBuilder = tostring(strMessage)
- local strMsgText = strBlank..strHeader..strSep..strMsgBuilder..strBlank
- return function ()
- local intOff = intOffset
- if intOff > string.len(strMsgText) then
- intOffset = 1
- end
- intOffset = intOffset + 1
- local strMsgDisplay = string.sub(strMsgText, intOff, intOff + intWidth - 1)
- mon.setCursorPos(1, intLine)
- mon.clearLine()
- mon.write(strMsgDisplay)
- end
- end
- local scrollLine1 = marchTextRtoL(strLine1,1,"",_,"")
- local scrollLine2 = marchTextRtoL(strLine2,2,"",_,"")
- local scrollLine3 = marchTextRtoL(strLine3,3,"",_,"")
- local scrollLine4 = marchTextRtoL(strLine4,4,"",_,"")
- local scrollLine5 = marchTextRtoL(strLine5,5,"",_,"")
- local scrollLine6 = marchTextRtoL(strLine6,6,"",_,"")
- local scrollLine7 = marchTextRtoL(strLine7,7,"",_,"")
- while true do
- scrollLine1()
- scrollLine2()
- scrollLine3()
- scrollLine4()
- scrollLine5()
- scrollLine6()
- scrollLine7()
- sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment