Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w, h = term.getSize()
- term.setCursorPos(10, (h/2)-6)
- rednet.open("right")
- dl = {}
- while true do
- term.clear()
- term.setCursorPos((w/2)-13,(h/2)-6)
- print("Press corresponding number")
- print(" ")
- print("1. New mine")
- print("2. Run download on turtles")
- print("3. Download pastebin")
- print("4. Send turtles to layer")
- event, key = os.pullEvent("key")
- if key == 2 then
- rednet.broadcast("new")
- elseif key == 3 then
- rednet.broadcast("download")
- elseif key == 4 then
- rednet.broadcast("pastebin")
- term.clear()
- term.setCursorPos((w/2)-19,(h/2))
- print("Enter pastebin code")
- term.setCursorPos((w/2)-2, (h/2)+1)
- code = io.read()
- term.clear()
- term.setCursorPos((w/2)-19,(h/2))
- print("Enter name for file")
- term.setCursorPos((w/2)-2, (h/2)+1)
- name = io.read()
- dl["placement"] = name
- dl["fileName"] = code
- pastebin = textutil.serialize(dl)
- rednet.broadcast(pastebin)
- elseif key == 5 then
- rednet.broadcast("go up")
- term.clear()
- term.setCursorPos((w/2)-17,(h/2))
- print("Enter Y level to go to")
- level = io.read()
- rednet.broadcast(level)
- end
- term.clear()
- term.setCursorPos((w/2)-9, (h/2))
- print("Sending command")
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement