Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Clears The Screen
- term.clear();
- local run = false;
- print("Starting...");
- print("Checking For Wireless Modem...");
- --Checks to make sure that the computer has a modem installed.
- local hasModem = false;
- local modemSide;
- if peripheral.getType("right") == "modem" then hasModem = true; modemSide = "right";
- elseif peripheral.getType("left") == "modem" then hasModem= true; modemSide = "left";
- elseif peripheral.getType("front") == "modem" then hasModem= true; modemSide = "front";
- elseif peripheral.getType("back") == "modem" then hasModem= true; modemSide = "back";
- elseif peripheral.getType("top") == "modem" then hasModem= true; modemSide = "top";
- elseif peripheral.getType("bottom") == "modem" then hasModem= true; modemSide = "bottom";
- else term.setTextColor(colors.red); print("Error: No Modem Found! Please ensure that a modem is connected to the pc."); term.setTextColor(colors.white);
- end
- if hasModem then
- term.setTextColor(colors.green);
- print("Successfully found modem on " .. modemSide .. "side!");
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement