Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("/apis/tpSys")
- rednet.open("right")
- rednet.host("TP", "TPSERV")
- while(true) do
- print("Waiting...")
- id, message = rednet.receive("TP")
- print("Received")
- if message == "GET" then
- print(id .. " wants destinations")
- rednet.send(id, "Auth", "TP")
- id, user = rednet.receive("TP", 10)
- id, pass = rednet.receive("TP", 10)
- print(id .. " is " .. user)
- tpSys.sendDests(id, user, pass)
- elseif message == "GOTO" then
- print(id .. " wants to teleport")
- rednet.send(id, "Auth", "TP")
- id, user = rednet.receive("TP", 1)
- id, pass = rednet.receive("TP", 1)
- print(id.. " is " .. user)
- id, dest = rednet.receive("TP", 1)
- tpSys.teleport(id, user, pass, dest)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement