This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BeaTtheDruM247's profile picture

Realistic startup scrips v1.3

Started by BeaTtheDruM247, 11 August 2012 - 10:09 AM
BeaTtheDruM247 #1
Posted 11 August 2012 - 12:09 PM
Startup Scripts

Realistic startup scripts just for the fun of it like a startup terminal for a real computer.

Just add this to your computer as startup or use it as a api for one of your programs like a OS and adjust code to your specifications.



function wait(seconds, event)
local waitdelay = os.startTimer(seconds)
local chk, p1, p2, p3;
repeat chk, p1, p2, p3 = os.pullEvent() until (event ~= nil and chk == event) or (chk == "timer" and p1 == waitdelay)
return chk, p1, p2, p3
end

term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Running Startup Program...")
wait(1)
term.setCursorPos(1,1)
term.clearLine()
print("Running Startup Program..")
wait(1)
term.setCursorPos(1,1)
term.clearLine()
print("Running Startup Program...")
wait(1)
term.setCursorPos(1,1)
term.clearLine()
print("Running Startup Program..")
wait(1)
term.setCursorPos(1,1)
term.clearLine()
print("Running Startup Program...")
wait(1)
--1st line

textutils.slowPrint("Processing Scripts...")
wait(1)
term.setCursorPos(1,2)
term.clearLine()
print("Processing Scripts..")
wait(1)
term.setCursorPos(1,2)
term.clearLine()
print("Processing Scripts...")
wait(1)
--2nd line

textutils.slowPrint("Checking files:")
number = 1
repeat
print("Checking files: " .. number .."/429")
number = number + 1
wait(0.01)
until number == 144
wait(1)
print("Checking files: Done")
wait(1)
textutils.slowPrint("Clearing Console...")
wait(0.5)
--line 148
textutils.slowPrint("----------------------------------------")
wait(1)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("CraftOS 1.4")
Cruor #2
Posted 11 August 2012 - 09:53 PM
Would be nice if you made it check for actual files, and wait X long depending on THAT files size :(/>/>

I can see this being pretty cool to use with said function ;)/>/>