Posted 09 May 2013 - 09:03 AM
OK I Have Been Taking A Break From LUA Coding To Work On My Real Operating System. So Lately I Got Bored With The OS Programming So I Went Back TO Lua and finished the 2nd Update Of Drum OS Here It Is
term.clear()
term.setCursorPos(1,1)
print("DrumOS 2.0")
sleep(1)
print "Welcome To The Drumstick Operating System Version 2.0"
sleep(1)
cursor.setPos("25,6")
print "1.)Log"
cursor.setPos("25,7")
print "2.)Open Rednet"
cursor.setPos("25,8")
print "3.)Send Launch Command To Turtles"
cursor.setPos("25,9")
print "4.)Close rednet"
cursor.setPos("25,10")
print "5.)Reboot Computer"
curser.setPos("25,11")
print "6.)Shutdown")
write "Please Enter Which Number You Would Like To Do"
answer=read()
if answer==1 then
os.run edit Log
end
answer=read()
if answer==2 then
local function openAll()
for _,side in pairs(rs.getSides()) do
if peripheral.getType(side) == "modem" then
rednet.open(side)
return true
end
end
return false
end
openAll()
print ("Rednet Opened")
end
answer=read()
rednet.broadcast("Launch")
print "Launch Sequence Complete"
end
answer=read()
if answer==4 then
local function openAll()
for _,side in pairs(rs.getSides()) do
if peripheral.getType(side) == "modem" then
rednet.close(side)
return true
end
end
return false
end
openAll()
print ("Rednet Closed")
end
answer=read()
if answer==5 then
os.reboot
end
answer=read()
if answer=6 then
os.shutdown
end