View difference between Paste ID: 9JLjhYn9 and hxkiUahv
SHOW: | | - or go back to the newest paste.
1-
sg = peripheral.wrap("stargate_1")
1+
sg = peripheral.wrap("StargateBase_0")
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
address = string.sub(address, 2)
12
print(address .. " -> Dialing, Please Wait...")
13
sg.dial(address)
14
sleep(30)
15
sg.disconnect()
16
end
17
shell.run("clear")
18
end