Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- pastebin get yGQWBTve syncro
- -- std PB yGQWBTve syncro
- syncpath = ".syncro"
- seed = math.random(1,65535)
- local dennis = false
- local tArg = {...}
- function writeDown(evtbl)
- if not evtbl then return false, "no event table, you idiot" end
- if type(evtbl[1]) == "string" then
- evtbl[1] = "'"..evtbl[1].."'"
- end
- local file = fs.open(syncpath,"a")
- file.writeLine("if seed~="..seed.." then os.queueEvent("..table.concat(evtbl,",")..") end")
- file.close()
- end
- function record()
- local evt
- while true do
- evt = {os.pullEvent()}
- if evt[1] == "timer" then
- dofile(syncpath)
- fs.delete(syncpath)
- else
- writeDown(evt)
- end
- dennis = false
- end
- end
- function carryOn(...)
- if arg then
- dofile(...)
- else
- dofile("/rom/programs/shell")
- end
- write("Goodbye")
- sleep(1)
- return
- end
- parallel.waitForAny(record,function() carryOn(unpack(tArg) or {"rom/programs/shell"}) end)
Add Comment
Please, Sign In to add comment