Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function portal()
- local Locations = {}
- -- Name Your Locations Here:
- Locations[1] = ""
- Locations[2] = ""
- Locations[3] = ""
- Locations[4] = ""
- Locations[5] = ""
- Locations[6] = ""
- Locations[7] = ""
- Locations[8] = ""
- Locations[9] = ""
- Locations[10] = ""
- Locations[11] = ""
- Locations[12] = ""
- Locations[13] = ""
- Locations[14] = ""
- Locations[15] = ""
- Locations[16] = ""
- Locations[99] = "Portal Closed"
- -- Define Portal Turtle Here (if you do not know what this is use the command: print(os.getComputerID()) on the computer you will get a number put it after the equal sign below):
- local pt =
- mon = peripheral.wrap("top")
- mon.setTextScale(2)
- mon.setCursorPos(1,1)
- mon.clearLine(1)
- mon.write("Destination:")
- mon.setCursorPos(1,2)
- term.clear()
- term.setCursorPos(1,1)
- print ("Valid Destinations are:")
- print ("01. " ..Locations[1])
- print ("02. " ..Locations[2])
- print ("03. " ..Locations[3])
- print ("04. " ..Locations[4])
- print ("05. " ..Locations[5])
- print ("06. " ..Locations[6])
- print ("07. " ..Locations[7])
- print ("08. " ..Locations[8])
- print ("09. " ..Locations[9])
- print ("10. " ..Locations[10])
- print ("11. " ..Locations[11])
- print ("12. " ..Locations[12])
- print ("13. " ..Locations[13])
- print ("14. " ..Locations[14])
- print ("15. " ..Locations[15])
- print ("16. " ..Locations[16])
- print ("Enter Destination ID: ")
- Num1 = tonumber( read() )
- mon.clearLine(2)
- mon.write(Locations[Num1])
- rednet.send(pt,""..Num1)
- end
- function close()
- id, message = rednet.receive()
- if message == "close" then
- mon = peripheral.wrap("top")
- mon.setTextScale(2)
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("Destination:")
- mon.setCursorPos(1,2)
- mon.write("Portal Closed")
- end
- end
- while redstone.getInput("left") do
- rednet.open("back")
- parallel.waitForAny(portal, close)
- end
Advertisement
Add Comment
Please, Sign In to add comment