Advertisement
CCninja86

Secret Staircase Control Computer Main Program

May 13th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. print ("Select the time for the staircase to be open for:")
  4.  
  5. term.setCursorPos(1,3)
  6. print ("[10 Seconds]")
  7. print ("[15 Seconds]")
  8. print ("[20 Seconds]")
  9. print ("[Maintenance Mode (permanent)]")
  10.  
  11. event,button, xPos, yPos = os.pullEvent("mouse_click")
  12.  
  13. if xPos >= 1 and xPos <= 12 and yPos == 3 then
  14.   rs.setOutput("bottom", true)
  15.   sleep(10)
  16.   rs.setOutput("bottom", false)
  17. end
  18.  
  19. if xPos >= 1 and xPos <= 12 and yPos == 4 then
  20.   rs.setOutput("bottom", true)
  21.   sleep(15)
  22.   rs.setOutput("bottom", false)
  23. end
  24.  
  25. if xPos >= 1 and xPos <= 12 and yPos == 5 then
  26.   rs.setOutput("bottom", true)
  27.   sleep(20)
  28.   rs.setOutput("bottom", false)
  29. end
  30.  
  31. if xPos >= 1 and xPos <= 30 and yPos == 6 then
  32.   rs.setOutput("bottom", true)
  33.   local exitMaintenanceMode = io.read()
  34.  
  35.   if exitMaintenanceMode == ABORT then
  36.     rs.setOutput("bottom", false)
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement