limebriggs

Minecart storage facilty

Jun 7th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.07 KB | None | 0 0
  1. p1 = "1" --|created by limebriggs, please fill free to use\edit this as you see fit i only
  2. p2 = "2" --|ask that you give crit where its due, this program is to be used in conjunction
  3. p3 = "3" --|with the minecart storage facillity that is posted on my profile but "should"
  4. ac1 = "lime" --| work with any other similar setups that you have this program does require red power
  5.         --|and at least minecraft 1.1 this is the frist realse of this program any issues will be fixed and later relesed agin
  6. term.clear()
  7. term.setCursorPos(1, 1)
  8. print("=============================================")              --|MCSF v1.0 created by limebriggs
  9. print("||welcome to the minecart storage facility ||")
  10. print("||or the MCSF for short                    ||")
  11. print("||please type in your personal pass code   ||")
  12. print("||           1,2,3                         ||")
  13. print("=============================================")
  14. write("Selection: ")
  15. a = io.read()
  16. if a == p1 then --|the sytem for sending and returing the frist cart
  17.     term.clear()
  18.     term.setCursorPos(1, 1)
  19.     print("sending cart")
  20.     write("sending.")
  21.     rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.gray)
  22.     sleep(.2)
  23.     write(".")
  24.     sleep(.2)
  25.     write(".")
  26.     sleep(.1)
  27.     write("Finished")
  28.     sleep(.5)
  29.     rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.gray)
  30.     term.clear()
  31.     term.setCursorPos(1, 1)
  32.     print("=====================================")
  33.     print("||press [r] to got to the main menu||")
  34.     print("=====================================")
  35.     print("selection: ")
  36.    
  37.  b = io.read()
  38.    
  39.         if b == "r" then
  40.             term.clear()
  41.             term.setCursorPos(1, 1)
  42.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  43.             sleep(2)
  44.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pink)
  45.             print("returning")
  46.             sleep(1)
  47.             shell.run("mc.lua")
  48.         else
  49.             print("error 1- invalid entry")
  50.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  51.             sleep(2)
  52.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pinke)
  53.             sleep(1)
  54.             term.clear()
  55.             term.setCursorPos(1, 1)
  56.             print("restarting system")
  57.             sleep(.5)
  58.             shell.run("mc.lua")
  59.         end
  60.            
  61.            
  62.  
  63. elseif a == p2 then --| 2nd carts code
  64.     term.clear()
  65.     term.setCursorPos(1, 1)
  66.     print("sending cart")
  67.     write("sending.")
  68.     rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.white)
  69.     sleep(.2)
  70.     write(".")
  71.     sleep(.2)
  72.     write(".")
  73.     sleep(.1)
  74.     write("Finished")
  75.     sleep(.5)
  76.     rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.white)
  77.     term.clear()
  78.     term.setCursorPos(1, 1)
  79.     print("=====================================")
  80.     print("||press [r] to got to the main menu||")
  81.     print("=====================================")
  82.     print("selection: ")
  83.    
  84.  b = io.read()
  85.    
  86.         if b == "r" then
  87.             term.clear()
  88.             term.setCursorPos(1, 1)
  89.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  90.             sleep(1)
  91.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pink)
  92.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.yellow)
  93.             sleep(3)
  94.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.yellow)
  95.             print("returning")
  96.             sleep(1)
  97.             shell.run("mc.lua")
  98.         else
  99.             print("error 1- invalid entry")
  100.             term.clear()
  101.             term.setCursorPos(1, 1)
  102.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  103.             sleep(1)
  104.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pink)
  105.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.yellow)
  106.             sleep(3)
  107.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.yellow)
  108.             print("returning")
  109.             sleep(1)
  110.             term.clear()
  111.             term.setCursorPos(1, 1)
  112.             print("restarting system")
  113.             sleep(5)
  114.             shell.run("mc.lua")
  115.         end
  116.            
  117. elseif a == p3 then --| 3rd carts codeing
  118.     term.clear()
  119.     term.setCursorPos(1, 1)
  120.     print("sending cart")
  121.     write("sending.")
  122.     rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.orange)
  123.     sleep(.2)
  124.     write(".")
  125.     sleep(.2)
  126.     write(".")
  127.     sleep(.1)
  128.     write("Finished")
  129.     sleep(.5)
  130.     rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.orange)
  131.     term.clear()
  132.     term.setCursorPos(1, 1)
  133.     print("=====================================")
  134.     print("||press [r] to got to the main menu||")
  135.     print("=====================================")
  136.     print("selection: ")
  137.    
  138.  b = io.read()
  139.    
  140.         if b == "r" then
  141.             term.clear()
  142.             term.setCursorPos(1, 1)
  143.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  144.             sleep(1)
  145.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pink)
  146.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.lime)
  147.             sleep(3)
  148.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.lime)  
  149.             print("returning")
  150.             sleep(1)
  151.             shell.run("mc.lua")
  152.         else
  153.             print("error 1- invalid entry")
  154.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.pink)
  155.             sleep(1)
  156.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.pink)
  157.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.lime)
  158.             sleep(3)
  159.             rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.lime)
  160.             term.clear()
  161.             term.setCursorPos(1, 1)
  162.             print("restarting system")
  163.             sleep(.5)
  164.             shell.run("mc.lua")
  165.         end
  166. elseif a == ac1 then --|asess door code
  167.     term.clear()
  168.     term.setCursorPos(1, 1)
  169.     if a1 == ac then
  170.             print("welcome, please re-enter your access code to close the door: ")
  171.             rs.setBundledOutput("back", rs.getBundledOutput("back") + colors.green)
  172.             a2 = io.read()
  173.             if a2 == ac1 then
  174.                 print("have a nice day")
  175.                 sleep(2)
  176.                 rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.green)
  177.                 sleep(1)
  178.                 shell.run("mc.lua")
  179.             else
  180.                 print("retard wrong code")
  181.                 rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.green)
  182.                 sleep(2)
  183.                 shell.run("mc.lua")
  184.             end
  185.         end
  186. else
  187.     print("error 1- invaild input")
  188.     term.clear()
  189.     term.setCursorPos(1, 1)
  190.     print("restarting system")
  191.     sleep(2)
  192.     shell.run("mc.lua")
  193. end
Advertisement
Add Comment
Please, Sign In to add comment