Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mysplit (inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- local t={}
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- table.insert(t, str)
- end
- return t
- end
- term.redirect(peripheral.wrap("top"))
- while true do -- # Main Loop
- term.clear()
- term.setCursorPos(1,1)
- local success, output = commands.exec("seasons get")
- if success then
- stringTable = mysplit(output)
- season=stringTable[3]
- day=stringTable[5]
- shell.run("time")
- print("Current Season :" .. season)
- print("Current Day :" .. day)
- end
- sleep(0.75)
- end -- #End Main Loop
- term.restore()
Add Comment
Please, Sign In to add comment