Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setTextColour(colors.lime)
- term.clear()
- os.pullEvent = os.pullEventRaw
- print("ATS V1.0")
- local IT = 60
- local J = 0
- local LoopLimit = 20
- time = {}
- local L = 1
- local BL = 0
- while true do
- J = J + 1
- if J == LoopLimit then
- print("LoopLimit reached")
- print("REBOOT? [Y]")
- J = 0
- if read() == "Y" then
- os.reboot()
- end
- end
- print(os.date())
- sleep(1)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- if multishell.getCount() == 1 or multishell.getFocus() == 1 then
- term.setBackgroundColor(colors.red)
- print("New Task")
- shell.run("fg "..read())
- time[multishell.getFocus()] = 0
- sleep(0.5)
- else
- term.setBackgroundColor(colors.black)
- print("RUNNING")
- local TASKS = multishell.getCount()
- X = time[multishell.getFocus()]
- if X == nil then
- print(X)
- else
- time[multishell.getFocus()] = X+1
- print(time[multishell.getFocus()])
- print(x)
- if multishell.getFocus() == multishell.getCount() then
- sleep(IT - L)
- L = 1
- print("Reseting small loop")
- end
- if time[multishell.getFocus()] == IT then
- term.setBackgroundColor(colors.orange)
- print("LIMIT")
- if multishell.getFocus() == L then
- print("OK")
- else
- print("POSSIBLE TIME CHEAT DETECTED")
- print("WAITING A WHILE THEN FORCING WINDOW")
- sleep(IT/2)
- multishell.setFocus(1)
- sleep(0.5)
- multishell.setFocus(L)
- end
- if L == multishell.getCount() then
- L = 1
- print("Small loop reset")
- sleep(IT)
- end
- print("Next Task "..L)
- L = L + 1
- multishell.setFocus(1)
- sleep(3)
- multishell.setFocus(L)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement