Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sg = peripheral.find("stargate")
- if fs.exists("saves") then
- else
- fs.makeDir("saves")
- end
- term.clear()
- while true do
- term.setCursorPos(0,0)
- print("welcome to Stargate Commander ")
- print("your address is",sg.localAddress())
- print("and you have",sg.energyAvailable(),"SU left in your Stargate")
- print("type in command here")
- print("type help for a list of commands")
- input = read()
- if input == "Iris" then
- if sg.irisState() == "Open" then
- sg.closeIris()
- else
- sg.openIris()
- end
- end
- if input == "help" then
- term.clear()
- print("Iris -- toggles the Iris")
- print(" -- Any unkown command will be dialed in so to dial just type in the gate address")
- print("Term --Terminates Connection to other gate")
- print("Exit --exits program")
- print("save (1-5) --Saves the Address your currently connected to")
- print("load (1-5) --loads a save")
- end
- sg.dial(input)
- if input == "Exit" then
- exit()
- end
- if input == "Term" then
- sg.disconnect()
- end
- if input == "save 1" then save = sg.remoteAddress()
- end
- if input == "load 1" then
- sg.dial(save)
- end
- if input == "save 2" then save2 = sg.remoteAddress() end
- if input == "save 3" then save3 = sg.remoteAddress() end
- if input == "save 4" then save4 = sg.remoteAddress() end
- if input == "save 5" then save5 = sg.remoteAddress() end
- if input == "load 2" then sg.dial(save2) end
- if input == "load 3" then sg.dial(save3) end
- if input == "load 4" then sg.dial(save4) end
- if input == "load 5" then sg.dial(save5) end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement