Posted 16 April 2013 - 08:43 AM
term.clear()
term.setCursorPos(1,1)
print("DrumOS 2.0")
sleep(1)
print "Welcome To The Drumstick Operating System Version 2.0"
sleep(1)
term.setCursorPos("25,6")
print "1.)Log"
term.setCursorPos("25,7")
print "2.)Open Rednet"
term.setCursorPos("25,8")
print "3.)Close rednet"
term.setCursorPos("25,9")
print "4.)Reboot Computer"
term.setCursorPos("25,10")
print "5.)Shutdown")
write "Please Enter Which Number You Would Like To Do"
answer=read()
if answer==1 then
shell.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()
if answer==3 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==4 then
os.reboot()
end
answer=read()
if answer=5 then
os.shutdown()
end
end
I created This Code As A run Off Of My Other Drum OS Version 1.2. I Just Started Experimenting With Menus And Need 2 Know I This Will Work Please Give Constructive Feedback