Advertisement
DestapTM

Untitled

Oct 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. local computer = require("computer")
  2. local term = require("term")
  3. local component = require("component")
  4. local sides = require("sides")
  5. local cb = component.chat_box
  6. local gpu = component.gpu
  7. local g = component.gpu
  8. local w, h = gpu.maxResolution()
  9. local redstone = component.redstone
  10. local redstan = component.redstone.setOutput
  11. local ravno = "═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════"
  12. local event = require("event")
  13. cb.setName("§fL§7")
  14. term.clear()
  15. print("Запуск программы...")
  16. os.sleep(0.5)
  17. print("Подготовка библиотек...")
  18. os.sleep(0.5)
  19. local SIRI = "§8[§9Бункер§8] §dSiri§f: "
  20. function screen()
  21. g.fill(1, 1, w, h, " ")
  22. g.setResolution(w/3, h/3)
  23. gpu.setBackground(0x130049)
  24. gpu.setForeground(0xAB00B4)
  25. term.clear()
  26. gpu.set(1,1,ravno)
  27. gpu.set(1,16,ravno)
  28. gpu.fill(53,1,1,50,"║")
  29. gpu.fill(1,1,1,50,"║")
  30. g.setForeground(0x00FF00)
  31. term.setCursor(1, 1)
  32. g.set(20,3,"► Бункер ")
  33. g.set(8,5,"► На основе Event.pull технологии! ツ")
  34. g.set(5,7,"Секретные команды.")
  35. g.set(5,9,"Помощница SIRI")
  36. g.set(14,15," By DestapTM для /warp Лkaluga")
  37. end
  38. while true do
  39. print("Hello")
  40. screen()
  41. type, address, name, message = event.pull("chat_message")
  42. print( message)
  43.  
  44. ---------------------------------------------------------
  45.  
  46. if name == "DestapTM" or name == "SilverGamers" then
  47. end
  48. if message == "Привет Siri" then
  49. component.chat_box.say(SIRI.."Здравствуйте!")
  50. end
  51. if message == "Siri Ты можешь открыть" then
  52. component.chat_box.say(SIRI.."Что открыть?")
  53. end
  54. if message == "Siri Как меня зовут?" then
  55. component.chat_box.say(SIRI.."DestapTM")
  56. end
  57. if message == "Технический отдел" then
  58. component.redstone.setOutput(4, 0)
  59. component.chat_box.say(SIRI.."Хорошо Открываю Технический отдел")
  60. end
  61. if message == "Закрой Технический отдел" then
  62. component.chat_box.say(SIRI.."Хорошо Закрываю Технический отдел")
  63. component.redstone.setOutput(4,255)
  64. end
  65. if message == "Бункер" then
  66. component.chat_box.say(SIRI.."Хорошо Открываю Бункер")
  67. component.redstone.setOutput(2,0)
  68. end
  69. if message == "Закрой Бункер" then
  70. component.chat_box.say(SIRI.."Хорошо Закрываю Бункер")
  71. component.redstone.setOutput(2,255)
  72. end
  73. if message == "Энергитический отдел" then
  74. component.chat_box.say(SIRI.."Хорошо Открываю Энергитический отдел")
  75. component.redstone.setOutput(5, 0)
  76. end
  77. if message == "Закрой Энергитический отдел" then
  78. component.chat_box.say(SIRI.."Хорошо Закрываю Энергитический отдел")
  79. component.redstone.setOutput(5,255)
  80. end
  81. if message == "Свое сердце" then
  82. component.chat_box.say(SIRI.."Слушаюсь Хозяйн :D")
  83. component.redstone.setOutput(3,0)
  84. end
  85. if message == "Закрой Свое сердце" then
  86. component.chat_box.say(SIRI.."Слушаюсь Хозяйн :D")
  87. component.redstone.setOutput(3,255)
  88. end
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement