Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- term.clear()
- term.setCursorPos(1,1)
- rednet.open("left")
- serv = 36
- while true do
- write("Select a floor: ")
- x = read()
- rednet.send(serv, x)
- q, i = rednet.receive()
- if i == "pass" then
- write("Requires password: ")
- b = read("*")
- rednet.send(serv, b)
- e, f = rednet.receive()
- if f == "true" and e == serv then
- rednet.send(serv, x)
- z, y = rednet.receive()
- if y == "error" then
- print("Not a valid selection.")
- elseif y == "correct" then
- term.clear()
- term.setCursorPos(1,1)
- print("Teleporting!")
- end
- else
- print("Password incorrect.")
- end
- elseif i == "breakpass" then
- print ("Break command requires password: ")
- g = read("*")
- rednet.send(serv, g)
- q, i = rednet.receive()
- if i == "true" and q == serv then
- break
- else
- print("Incorrect")
- end
- else
- if i == "error" then
- print("Not a valid selection.")
- elseif i == "correct" then
- term.clear()
- term.setCursorPos(1,1)
- print("teleporting!")
- end
- end
- os.sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
Advertisement
Add Comment
Please, Sign In to add comment