Advertisement
jared314

Elevator Control - GalacticCraft

Jul 13th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.61 KB | None | 0 0
  1. function default()
  2. m = peripheral.wrap("right")
  3. m.clear()
  4. m.setTextColor(colors.blue)
  5. m.setCursorPos(1,1)
  6. m.write("GalacticCraft")
  7. m.setCursorPos(1,2)
  8. m.write("Agency Floors:")
  9. m.setTextColor(colors.white)
  10. m.setCursorPos(1,4)
  11. m.write(" Space Station")
  12. m.setCursorPos(1,5)
  13. m.write(" -Block Lvl 1200")
  14. m.setCursorPos(1,7)
  15. m.write(" 3rd - Launch Pads")
  16. m.setCursorPos(1,9)
  17. m.write(" 2nd - Workshop")
  18. m.setCursorPos(1,11)
  19. m.write(" Lobby")
  20.  
  21. end
  22.  
  23. while true do
  24. default()
  25.   event,side,x,y = os.pullEvent()
  26.   if event == "monitor_touch" then
  27.         if y == 4 then
  28.                 rednet.open("back")
  29.                 rednet.broadcast("SPACE")
  30.                 m.setTextColor(colors.red)
  31.         m.setCursorPos(1,4)
  32.         m.write(" Space Station")
  33.         m.setCursorPos(1,5)
  34.         m.write(" -Block Lvl 1200")
  35.                 m.write(" 3rd - Launch Pads  ")
  36.                 sleep(2)
  37.         else if y == 7 then
  38.                 rednet.open("back")
  39.                 rednet.broadcast("3g")
  40.                 m.setTextColor(colors.red)
  41.         m.setCursorPos(1,7)
  42.         m.write(" 3rd - Launch Pads")
  43.                 sleep(2)
  44.         else if y == 9 then
  45.                 rednet.open("back")
  46.                 rednet.broadcast("2g")
  47.                 m.setTextColor(colors.red)
  48.         m.setCursorPos(1,9)
  49.         m.write(" 2nd - Workshop")
  50.                 sleep(2)
  51.         else if y == 11 then
  52.                 rednet.open("back")
  53.                 rednet.broadcast("Lg")
  54.                 m.setTextColor(colors.red)
  55.         m.setCursorPos(1,11)
  56.         m.write(" Lobby")
  57.                 sleep(2)
  58.        
  59.         end
  60.         end
  61.         end
  62.         end
  63.         end
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement