Whiskee

income.lua

Apr 12th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local c = require("component")
  2. local g = c.getPrimary("stargate")
  3.  
  4.  
  5. repeat
  6.  
  7. if g.irisState() == "Open" then
  8. else
  9.  
  10. repeat
  11.  
  12. state, engaged, direction = g.stargateState()
  13. print("Waiting")
  14.  
  15.  
  16. until direction == "Incoming"
  17.  
  18. repeat
  19. g.openIris()
  20. --state, engaged, direction = g.stargateState()
  21. iris = g.irisState()
  22. print("Opening")
  23. until iris == "Open" or iris == "Opening"
  24. print("Opened")
  25. end
  26.  
  27. until false
Add Comment
Please, Sign In to add comment