Advertisement
Guest User

new

a guest
Jun 29th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.02 KB | None | 0 0
  1. rednet.open("back")
  2. local cell = peripheral.wrap("tile_thermalexpansion_cell_resonant_name_15")
  3.  
  4.  
  5. local function main()
  6.   term.setCursorPos(9,2)
  7.   term.setTextColor(colors.lightBlue)
  8.   write("Uebersicht")
  9.   term.setCursorPos(1,3)
  10.   write("--------------------------")
  11.   -- Verbraucher
  12.   term.setTextColor(colors.red)
  13.   term.setCursorPos(2,5)
  14.   write("1 ... Quarry")
  15.   term.setCursorPos(2,6)
  16.   write("2 ... ME - System")
  17.   term.setCursorPos(2,7)
  18.   write("3 ... Dimensionen")
  19.   term.setCursorPos(2,8)
  20.   write("4 ... Sonstige Maschinen")
  21.   term.setCursorPos(2,9)
  22.   write("5 ... Thermal Expansion")
  23.   term.setCursorPos(2,10)
  24.   write("6 ... Schaf Farm")
  25.   -- Erzeuger
  26.   term.setTextColor(colors.green)
  27.   term.setCursorPos(2,11)
  28.   write("7 ... Reaktor 1")
  29.   term.setCursorPos(2,12)
  30.   write("8 ... Notreaktor")
  31.   term.setCursorPos(2,13)
  32.   write("9 ... Solar Panels")
  33.   -- Eingabe des Benutzers
  34.   term.setCursorPos(2,15)
  35.   term.setTextColor(colors.yellow)
  36.   write("Ihre Eingabe: ")
  37.   input = read()
  38. end
  39.  
  40. local function buttonInterface()
  41.   term.setCursorPos(4,17)
  42.  -- term.setBackgroundColor(colors.red)
  43.   term.setTextColor(colors.white)
  44.   write(" Akt.")
  45.   term.setCursorPos(12,17)
  46.   write(" ON ")
  47.   term.setCursorPos(19,17)
  48.   write(" OFF ")
  49.   term.setCursorPos(8,19)
  50.   write(" Main Menu ")
  51. end
  52.  
  53. local function info()
  54.   term.setCursorPos(4,14)
  55.   term.setTextColor(colors.magenta)
  56.   write("0 ... Aus")
  57.   term.setCursorPos(4,15)
  58.   write("1 ... Ein")
  59.   term.setCursorPos(5,16)
  60.   write("2 ... Aktualisieren")
  61.   term.setCursorPos(5,17)
  62.   write("3 ... Main Menu")
  63. end
  64.  
  65. local function diversifyButtons()
  66.   info()
  67.    while true do
  68.     if input == "1" then
  69.       id, msg, dis = rednet.receive()
  70.       id, msg2, dis = rednet.receive()
  71.       term.setCursorPos(2,3)
  72.       term.setTextColor(colors.red)
  73.       write(msg)
  74.       term.setTextColor(colors.lightBlue) write(" / ")
  75.       term.setTextColor(colors.green)
  76.       write(msg2)
  77.       end
  78.     end
  79. end  
  80.     main()
  81.     term.clear()
  82.     diversifyButtons()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement