Advertisement
se7enek

Untitled

Jun 4th, 2015
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local plastic = false
  2. local worldSensor = false
  3.  
  4. if fs.exists("/ocs/apis/sensor") then
  5.     os.loadAPI("ocs/apis/sensor")
  6. end
  7.  
  8. for k,v in pairs(rs.getSides()) do
  9.     if (peripheral.getType(v) == "openperipheral_bridge") then
  10.         plastic = peripheral.wrap(v)
  11.         break
  12.     elseif (peripheral.getType(v) == "sensor") and (not worldSensor) then
  13.         worldSensor = sensor.wrap(v)
  14.         if not (worldSensor.getSensorName() == "worldCard") then
  15.             worldSensor = false
  16.         end
  17.     end
  18. end
  19.  
  20. if not plastic then print("Could not find Glass Bridge!") error() end
  21.  
  22.  
  23. local function reliableSleep(time)
  24.     sleep(time)
  25. end
  26.  
  27. local gColors = {}
  28. gColors.red = 0xff3333
  29. gColors.blue = 0x7dd2e4
  30. gColors.yellow = 0xffff4d
  31. gColors.green = 0x4dff4d
  32. gColors.gray = 0xe0e0e0
  33. gColors.textGray = 0x818181
  34. gColors.text = 0x5a5a5a
  35. gColors.rain = 0x2e679f
  36.  
  37. while true do
  38.  
  39. plastic.clear()
  40. local mainBox = plastic.addBox(20, 20, 1, 48, gColors.gray, 0.7)
  41. local outlineT = plastic.addBox(18,18,2,2,gColors.blue,0.7)
  42. local outlineB = plastic.addBox(18,68,2,2,gColors.blue,0.7)
  43.  
  44. mainBox.setWidth(136)
  45. outlineT.setWidth(140)
  46. outlineB.setWidth(140)
  47. mainBox.setHeight(48)
  48.  
  49. local header = plastic.addText(75, 25, "Wiadomosc", gColors.textGray)
  50. local secondText = plastic.addText(50, 40, "Szybko do domu!", gColors.blue)
  51. local forthText = plastic.addText(40, 55, "Bo bedzie zle", gColors.text)
  52.  
  53. header.setZ(5)
  54. secondText.setZ(5)
  55. forthText.setZ(5)
  56. plastic.sync()
  57. sleep(2)
  58.  
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement