View difference between Paste ID: PVxYYXeL and 9pKm8UJ2
SHOW: | | - or go back to the newest paste.
1
sg = peripheral.wrap("stargate_1")
2
while true do
3
print("Please enter a gate address: ")
4
address = read()
5
address = http.get("http://intranet.pdglobal.net/?sid=dial&name=" .. address)
6
address = address.readAll()
7
if address == " 0" then
8
print("No such Gate found. Try again.")
9
sleep(5)
10
else
11
print("\n Dialing " .. address)
12
address = string.sub(address, 2) 
13
sg.dial(address)
14
sleep(30)
15
sg.disconnect()
16
end
17
shell.run("clear")
18
end