Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------
- --Define Variables
- -----------------------------------------------
- computerName = os.getComputerLabel()
- local loop = true
- -----------------------------------------------
- --Checking To Make Sure Computer Has Name
- -----------------------------------------------
- term.clear()
- term.setCursorPos(1,1)
- if computerName == nil then
- print("Please select a name for your computer.")
- term.write("Name: ")
- local name = read()
- os.setComputerLabel(tostring(name))
- computerName = os.getComputerLabel()
- end
- -----------------------------------------------
- --Checking And Opening Rednet
- -----------------------------------------------
- for _,v in pairs( rs.getSides() ) do
- if peripheral.getType( v ) == "modem" then
- rednet.open( v )
- end
- end
- -----------------------------------------------
- --Loading theMCcm's API
- local file = fs.exists("themccm")
- if file == false then
- fs.makeDir("themccm")
- end
- local file = fs.exists("themccm/mc")
- if file == false then
- shell.run("pastebin", "get", "5ww6Pb8i", "themccm/mc")
- end
- os.unloadAPI("themccm/mc")
- os.loadAPI("themccm/mc")
- -----------------------------------------------
- --Program
- -----------------------------------------------
- mc.clear()
- print("Hello. I'm "..computerName..", at your service.")
- while loop == true do
- term.write(computerName..": ")
- input = read()
- shell.run(tostring(input))
- end
Advertisement
Add Comment
Please, Sign In to add comment