Advertisement
Guest User

startup

a guest
May 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. monitor = peripheral.wrap("top")
  2. modem = peripheral.wrap("back")
  3.  
  4. modem.open(697)
  5.  
  6. function Launch()
  7.   print("Which silo would you like to launch? 1-5 or all")
  8.   local input = io.read()
  9.   if tonumber(input) == True then
  10.     input = input + 6
  11.     modem.transmit(697,697,input)
  12.   elseif tostring(input) == "all" then
  13.     modem.transmit(697,697,12)
  14.   else
  15.     print("Incorrect Input. Rebooting.")
  16.   end
  17. end
  18.  
  19. function Open()
  20.   print("Which door would you like to open? 1-5 or all")
  21.   local input = io.read()
  22.   if tonumber(input) == True then
  23.     modem.transmit(697,697,input)
  24.   elseif tostring(input) == "all" then
  25.     modem.transmit(697,697,6)
  26.   else
  27.     print("Incorrect Input. Rebooting.")
  28.   end
  29. end
  30.  
  31. Launch()
  32. Open()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement