Advertisement
bugg94

pc_moniteur_usine

Feb 18th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.63 KB | None | 0 0
  1. -- pc moniteur
  2. rednet.open("front")
  3. m = peripheral.wrap("bottom")
  4. term.redirect(m)
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. term.setCursorBlink(false)
  8.  
  9. while true do
  10.  
  11. Local id, message, dist = rednet.receive()
  12. -- si message = twhite alors le texte s’écrie en blanc ect...
  13.     if message == twhite then
  14.         term.setTextColor(colors.white)
  15.     elseif message == torange then
  16.         term.setTextColor(colors.orange)
  17.     elseif message == tmagenta then
  18.         term.setTextColor(colors.magenta)
  19.     elseif message == tlightBlue then
  20.         term.setTextColor(colors.lightblue)
  21.     elseif message == tyellow then
  22.         term.setTextColor(colors.yellow)
  23.     elseif message == tlime then
  24.         term.setTextColor(colors.lime)
  25.     elseif message == tpink then
  26.         term.setTextColor(colors.pink)
  27.     elseif message == tgray then
  28.         term.setTextColor(colors.gray)
  29.     elseif message == tlightgray then
  30.         term.setTextColor(colors.lightgray)
  31.     elseif message == tcyan then
  32.         term.setTextColor(colors.cyan)
  33.     elseif message == tpurple then
  34.         term.setTextColor(colors.purple)
  35.     elseif message == tblue then
  36.         term.setTextColor(colors.blue)
  37.     elseif message == tbrown then
  38.         term.setTextColor(colors.brown)
  39.     elseif message == tgreen then
  40.         term.setTextColor(colors.green)
  41.     elseif message == tred then
  42.         term.setTextColor(colors.red)
  43.     elseif message == tblack then
  44.         term.setTextColor(colors.black)
  45. -- si message = fwhite alors le font serra blanc ect...
  46.     elseif message == fwhite then
  47.         term.setBackgroundColor(colors.white)
  48.     elseif message == forange then
  49.         term.setBackgroundColor(colors.orange)
  50.     elseif message == fmagenta then
  51.         term.setBackgroundColor(colors.magenta)
  52.     elseif message == flightBlue then
  53.         term.setBackgroundColor(colors.lightblue)
  54.     elseif message == fyellow then
  55.         term.setBackgroundColor(colors.yellow)
  56.     elseif message == flime then
  57.         term.setBackgroundColor(colors.lime)
  58.     elseif message == fpink then
  59.         term.setBackgroundColor(colors.pink)
  60.     elseif message == fgray then
  61.         term.setBackgroundColor(colors.gray)
  62.     elseif message == flightgray then
  63.         term.setBackgroundColor(colors.lightgray)
  64.     elseif message == fcyan then
  65.         term.setBackgroundColor(colors.cyan)
  66.     elseif message == fpurple then
  67.         term.setBackgroundColor(colors.purple)
  68.     elseif message == fblue then
  69.         term.setBackgroundColor(colors.blue)
  70.     elseif message == fbrown then
  71.         term.setBackgroundColor(colors.brown)
  72.     elseif message == fgreen then
  73.         term.setBackgroundColor(colors.green)
  74.     elseif message == fred then
  75.         term.setBackgroundColor(colors.red)
  76.     elseif message == fblack then
  77.         term.setBackgroundColor(colors.black)
  78.     else
  79.  
  80.     end
  81.  
  82. term.write("bienvenu à l'usine !")
  83.      
  84.     term.restore()
  85.  
  86.  
  87. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement