Advertisement
Guest User

JailCtrl-Teck

a guest
Nov 26th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. --Jailcont 1.1--
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. print ("Loading: JailCont")
  5. sleep(6)
  6. print ("Done")
  7. sleep(1)
  8. term.clear()
  9. term.setCursorPos(1,1)
  10. print ("On the wall to the left of the computer")
  11. print ("is a panel of sixteen buttons. These")
  12. print ("control the jail.")
  13. print ("")
  14. print ("+----------------------------+")
  15. print ("| Black Red Green Brown |")
  16. print ("| Blue Purple Cyan LGray |")
  17. print ("| DGray Pink LGreen Yellow |")
  18. print ("| LBlue Magent Orange White |")
  19. print ("+----------------------------+")
  20. print ("")
  21. print ("Type the color name for it's function or Exit.")
  22. term.setCursorPos(1,13)
  23. local Color =read("")
  24. term.clearLine()
  25.  
  26. while color != "Exit" do
  27. colorcheck
  28. end
  29.  
  30. function colorcheck ()
  31. - -row 1--
  32. if Color == "Black" then
  33. print ("Black turns on and off the light in cell red.")
  34. goto = 23
  35. end
  36. if Color == "Red" then
  37. print ("Red opens and closes door to cell red.")
  38. goto = 23
  39. end
  40. if Color == "Green" then
  41. print ("Green opens and closes door to cell green.")
  42. goto = 23
  43. end
  44. if Color == "Brown" then
  45. print ("Brown turns on and off the light in cell green.")
  46. goto = 23
  47. end
  48.  
  49. --row 2--
  50. if Color == "Blue" then
  51. print ("Blue turns on and off the light in cell purple.")
  52. goto = 23
  53. end
  54. if Color == "Purple" then
  55. print ("Purple opens and closes door to cell purple.")
  56. goto = 23
  57. end
  58. if Color == "Cyan" then
  59. print ("Cyan opens and closes door to cell cyan.")
  60. goto = 23
  61. end
  62. if Color == "LGray" then
  63. print ("LGray turns on and off the light in cell cyan.")
  64. goto = 23
  65. end
  66.  
  67. --row 3--
  68. if Color == "DGray" then
  69. print ("DGray turns on and off the light in cell pink.")
  70. goto = 23
  71. end
  72. if Color == Pink then
  73. print ("Pink opens and closes door to cell pink.")
  74. goto = 23
  75. end
  76. if Color == "LGreen" then
  77. print ("LGreen opens and closes door to cell lgreen.")
  78. goto = 23
  79. end
  80. if Color == "Yellow" then
  81. print ("Yellow turns on and off the light in cell lgreen.")
  82. goto = 23
  83. end
  84.  
  85. --row 4--
  86. if Color == "LBlue" then
  87. print ("LBlue turns on and off the light in hallway.")
  88. goto = 23
  89. end
  90. if Color == "Magent" then
  91. print ("Unused.")
  92. goto = 23
  93. end
  94. if Color == "Orange" then
  95. print ("Unused.")
  96. goto = 23
  97. end
  98. if Color == "White" then
  99. print ("White opens and closes the door to the hallway.")
  100. goto = 23
  101. end
  102. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement