Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- local destination = tArgs[1]
- local currentLocation = tArgs[2]
- rednet.send(18, destination)
- os.sleep(1)
- rednet.send(18, currentLocation)
- term.setTextColor(2)
- print("Please wait while the Teleporter is prepared...")
- while true do
- local event, senderId, message, distance = os.pullEvent("rednet_message")
- if senderId==18 and message==true then
- print("The Teleporter is ready")
- print("Would you like to log out?")
- term.setTextColor(1)
- print("1)Yes")
- print("2)No")
- local event, key = os.pullEvent("key")
- if key==2 then
- shell.run("logout")
- elseif key==3 then
- term.setTextColor(2)
- print("Goodbye...")
- os.sleep(1)
- os.shutdown()
- end
- elseif senderId==18 and message==false then
- print("There was a system error. Please try again later")
- os.sleep(3)
- os.shutdown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement