Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interface = peripheral.find("crystal_interface")
- function dial(address)
- local addressLength = #address
- local start = interface.getChevronsEngaged() + 1
- for chevron = start, addressLength, 1
- do
- local symbol = address[chevron]
- if chevron % 2 == 0 then
- interface.rotateClockwise(symbol)
- else
- interface.rotateAntiClockwise(symbol)
- end
- while(not interface.isCurrentSymbol(symbol))
- do
- sleep(0)
- end
- sleep(1)
- interface.openChevron()
- sleep(1)
- interface.closeChevron()
- sleep(1)
- end
- end
- abydosAddress = {13,28,34,3,22,18,35,9,0}
- overworldAddress = {26,17,7,19,4,24,21,10,0}
- cavumAddress = {18, 7, 3, 36, 25, 15, 0}
- chulakAddress = {18,14,21,15,2,13,19,35,0}
- othersideAddress = {10, 28, 17, 21, 3, 27, 0}
- print("Awaiting input:")
- print("1 = Abydos")
- print("2 = Overworld")
- print("3 = Cavum Tenebrae")
- print("4 = Chulak")
- print("5 = Otherside")
- input = tonumber(io.read())
- sleep(0)
- if input == 1 then
- dial(abydosAddress)
- elseif input == 2 then
- dial(overworldAddress)
- elseif input == 3 then
- dial(cavumAddress)
- elseif input == 4 then
- dial(chulakAddress)
- elseif input == 5 then
- dial(othersideAddress)
- else
- print("Invalid input")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement