Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- server_id = 58
- state = true
- function run()
- term.setBackgroundColor(colors.gray)
- term.clear()
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,1)
- term.write("Shield Client v1.0")
- term.setCursorPos(1,2)
- term.write("==================")
- while(state) do
- term.setTextColor(colors.yellow)
- term.setCursorPos(1,4)
- term.write("#<<Enter Password>>#")
- term.setCursorPos(1,5)
- term.setTextColor(colors.lightBlue)
- local password = read("*")
- term.setCursorPos(1,5)
- term.clearLine()
- term.setCursorPos(1,4)
- term.setTextColor(colors.yellow)
- term.write("#<<Enter Function(ON/OFF)>>#")
- term.setCursorPos(1,5)
- term.setTextColor(colors.lightBlue)
- local request = read()
- term.clearLine()
- term.setCursorPos(1,4)
- term.clearLine()
- term.setTextColor(colors.yellow)
- term.write("Waiting on server for verification...")
- os.sleep(1)
- local packet = "<p>"..password.."</p>".."<r>"..request:lower().."</r>"
- rednet.send(server_id, packet)
- local id, message, protocol = rednet.receive()
- term.setCursorPos(1,4)
- term.clearLine()
- term.write(message)
- os.sleep(1)
- term.clearLine()
- state = false
- end
- os.sleep(1)
- term.clear()
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment