Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function menu(id, text)
- if sid == id then
- print("["..text.."]")
- else
- print(" "..text)
- end
- end
- function installer()
- sid = 0
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("TurtleControl V "..version.." Installer")
- menu(0, "Install")
- menu(1, "Install with tutorial")
- menu(2, "Abort")
- local sEvent, param = os.pullEvent("key")
- if(sEvent == "key") then
- if(param == 200) then
- if sid > 0 then
- sid = sid - 1
- elseif sid == 0 then
- sid = 2
- end
- elseif (param == 208) then
- if sid < 2 then
- sid = sid + 1
- elseif sid == 2 then
- sid = 0
- end
- elseif (param == 28) then
- if sid == 0 then
- print("Installing...")
- shell.run("pastebin get m6jMQJEx RC_Console")
- sleep(.5)
- shell.run("pastebin get g8Y65Z7N RC_Turtle")
- shell.run("move", "RC_Turtle", "disk")
- sleep(.5)
- print("Done! Enjoy the remote controller. Rebooting.")
- sleep(4)
- shell.run("delete", "startup")
- os.reboot()
- elseif sid == 1 then
- print("Installing with tutorial...")
- shell.run("pastebin get m6jMQJEx RC_Console")
- sleep(.5)
- shell.run("pastebin get g8Y65Z7N RC_Turtle")
- shell.run("move", "RC_Turtle", "disk")
- sleep(.5)
- shell.run("pastebin get tNu1XQRV Tutorial")
- sleep(.5)
- print("Done! Enjoy the remote controller. Rebooting.")
- sleep(4)
- shell.run("delete", "startup")
- shell.run("rename", "Tutorial", "startup")
- os.reboot()
- elseif sid == 2 then
- print("Aborting...")
- sleep(4)
- shell.run("delete", "startup")
- os.reboot()
- end
- end
- end
- end
- end
- version=1.0
- term.clear()
- term.setCursorPos(1,1)
- print("Proceeding to install Turtle Remote Control, make sure you have a floppy disk attached to the terminal.")
- sleep(5)
- installer()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement