Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dofile("config")
- dofile("compat")
- listgate()
- rs.setOutput(a,true) --keeps the worldanchor off till needed
- while true do
- if rs.getBundledInput(net)>0 then
- if rs.testBundledInput(net,32768) then
- gate.disconnect()
- sleep(1)
- else
- rs.setOutput(a,false)
- for it=1,#ads do
- if rs.testBundledInput(net,c[it]) then
- local ok,err=pcall(gate.connect,ads[it])
- if not ok then
- print("There was a problem...")
- print(err)
- else
- m.clear()
- m.setCursorPos(1,1)
- m.write("connecting to:")
- m.setCursorPos(2,2)
- if adname[it]=="name" then
- m.write("address "..ads[it])
- else
- m.write(adname[it])
- end
- m.setTextScale(2)
- m.setCursorPos(4,4)
- m.write("CHEVRON")
- m.setCursorPos(4,6)
- m.write("ENCODED")
- while not gate.isConnected() do
- m.setCursorPos(7,5)
- m.clearLine()
- m.write(string.format("%d",gate.getLockedChevronCount()))
- sleep(0.3)
- end
- m.clear()
- m.setCursorPos(5,4)
- m.write("GATE")
- m.setCursorPos(3,5)
- m.write("CONNECTED")
- while gate.isConnected() do
- if rs.testBundledInput(net,32768) then
- gate.disconnect()
- sleep(0.3)
- else
- sleep(1)
- end
- end
- end
- rs.setOutput(a,true)
- m.clear()
- m.setTextScale(1)
- m.setCursorPos(1,1)
- m.write("Gate Dialer Online")
- listgate()
- end
- end
- end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement