Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.lightGray)
- print("--------------------------")
- print("---")
- term.setTextColor(colors.lightBlue)
- term.setCursorPos(4, 2)
- print("Bubble Bot Computers")
- term.setTextColor(colors.lightGray)
- term.setCursorPos(24, 2)
- print("---")
- print("--------------------------")
- term.setCursorPos(1, 5)
- term.setTextColor(colors.white)
- term.setTextColor(colors.white)
- term.setCursorPos(1, 5)
- print("[M] Menu")
- term.setCursorPos(1, 7)
- print("[1] Remote")
- term.setCursorPos(1, 9)
- print("[2] Rename")
- term.setCursorPos(1, 11)
- print("[3] Refuel")
- term.setCursorPos(1, 13)
- print("[4] Restart Turtle")
- term.setCursorPos(1, 15)
- print("[5] Turn Off Turtle")
- function RCmaster()
- while true do
- local sEvent, param = os.pullEvent("key")
- if(sEvent == "key" ) then
- if (param == 2) then
- rednet.broadcast("TurtleRemote")
- sleep(.1)
- term.clear()
- term.setCursorPos(1, 1)
- shell.run("remote")
- elseif (param == 3) then
- rednet.broadcast("TurtleName")
- sleep(1)
- term.clear()
- term.setCursorPos(1, 1)
- print("Name:")
- term.setCursorPos(6, 1)
- input = read()
- sleep(3)
- rednet.broadcast(input)
- sleep(2.5)
- shell.run("turtlemenu")
- elseif (param == 50) then
- term.clear()
- term.setCursorPos(1, 1)
- term.setTextColor(colors.white)
- shell.run("menu")
- elseif (param == 4) then
- rednet.broadcast("TurtleRefuel")
- elseif (param == 5) then
- term.clear()
- term.setCursorPos(1, 1)
- print("Restarting...")
- rednet.broadcast("TurtleRestart")
- sleep(1)
- shell.run("turtlemenu")
- elseif (param == 6) then
- term.clear()
- term.setCursorPos(1, 1)
- print("Turtle: Goodbye...")
- sleep(2.5)
- rednet.broadcast("TurtleShutdown")
- end
- end
- end
- end
- RCmaster()
Advertisement
RAW Paste Data
Copied
Advertisement