Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w, h = term.getSize()
- function printCentered(text, y)
- term.setCursorPos(w/2 - #text/2, y)
- term.write(text)
- end
- term.clear()
- term.setCursorPos(1,1)
- print(string.rep("-", w))
- printCentered("Welcome to the GraviNet Router wizard.", 2)
- printCentered("This will lead you through", 3)
- printCentered("installing a new Router.", 4)
- print(string.rep("-", w))
- os.sleep(0.5)
- print("\n")
- print("Which side is your modem on?")
- print("[top, bottom, back, front, left, right]")
- local side = read()
- print("Modem at side: "..side)
- os.sleep(0.5)
- print("Creating preference file...")
- os.sleep(0.2)
- file = fs.open("gravinet/router/pref", "w")
- file.write(textutils.serialise({side=side}))
- file.close()
- print("Preference file created in gravinet/router/pref. Do not delete this file!")
- os.sleep(0.5)
- print("Removing old startup file...")
- if fs.exists("startup") then
- fs.delete("startup")
- end
- print("Downloading Master server files...")
- shell.run("pastebin","get","https://pastebin.com/5PF0kuEa","startup")
- os.sleep(0.5)
- print("Rebooting...")
- os.sleep(0.5)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement