Advertisement
Belzebub

Check Online (Radar)

Mar 10th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. -- Для работы программы нужен радар из мода Computronics --
  2. local term = require('term')
  3. local com = require('component')
  4. local sensor = com.radar
  5. local gpu = com.gpu
  6. floor = math.floor
  7.  
  8.  
  9. color = {
  10.   green = 0x00ff00,
  11.   yellow = 0xffb600,
  12.   red = 0xff0000
  13. }
  14.  
  15. -- Белый список (Эти ники будут красными)---
  16. white = {
  17.   Be1zebub = true,
  18.   Dycedarg = true,
  19.   Hugo14 = true
  20. }
  21.  
  22. gpu.setResolution(60,15)
  23.  
  24. while true do
  25.   pl = sensor.getPlayers()
  26.   term.clear()
  27.   gpu.setForeground(color.yellow)
  28.   gpu.set(2,1, 'В данный момент в таверне находятся:')
  29.       for i = 1, #pl do
  30.           if white[pl[i].name] then gpu.setForeground(color.red)
  31.           else gpu.setForeground(color.green) end
  32.           gpu.set(2, i+1, pl[i].name)
  33.       end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement