Advertisement
Guest User

SG1

a guest
Sep 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. sg = peripheral.find("stargate")
  2. term.clear()
  3. while true do
  4. term.setCursorPos(0,0)
  5. print("type in command here")
  6. print("type help for a list of commands")
  7. input = read()
  8. if input == "Iris" then
  9. if sg.irisState() == "Open" then
  10. sg.closeIris()
  11. else
  12. sg.openIris()
  13. end
  14. end
  15. if input == "help" then
  16. term.clear()
  17. print("Iris -- toggles the Iris")
  18. print(" -- Any unkown command will be dialed in so to dial just type in the gate address")
  19. print("Term --Terminates Connection to other gate")
  20. end
  21.  
  22.  
  23. sg.dial(input)
  24.  
  25. if input == "Address" then
  26. print(sg.localAddress())
  27. end
  28. if input == "Term" then
  29. sg.diconnect()
  30. end
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement