SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local component = require("component") |
| 1 | + | --Close door if radar see player |
| 2 | - | local sensor = component.openperipheral_sensor |
| 2 | + | --Программа призвана заменить дуратские нажимные плиты |
| 3 | - | local gpu = component.gpu |
| 3 | + | --В комнатах с бесплатными механизмами на варпах) |
| 4 | - | --component.gpu.setResolution(35,10) |
| 4 | + | --Автор Vanilla_ mcskill tmcraft 2018 |
| 5 | - | component.gpu.setResolution(140,40) |
| 5 | + | --Большое спасибо utevaugu36 :) |
| 6 | - | require"term".clear() |
| 6 | + | ----[ Библиотеки ]---- |
| 7 | - | |
| 7 | + | local component = require("component")
|
| 8 | - | while true do |
| 8 | + | local sides = require("sides")
|
| 9 | - | player = sensor.getPlayers() |
| 9 | + | local term = require("term")
|
| 10 | - | gpu.setForeground(0x00FF00) |
| 10 | + | ----[ Константы ]---- |
| 11 | - | gpu.set(1,1,"Здесь сейчас находятся:") |
| 11 | + | local sensor = component.openperipheral_sensor |
| 12 | - | for i = 1, #player do |
| 12 | + | local gpu = component.gpu |
| 13 | - | local _,_,_,_,_,nick = require"event".pull("modem_message") |
| 13 | + | local modem = component.modem |
| 14 | - | gpu.setForeground(0xFF0000) |
| 14 | + | ----[ Код ]---- |
| 15 | - | gpu.set(1,2,player[i].name) |
| 15 | + | gpu.setResolution(35, 10) |
| 16 | - | gpu.set(1,2,nick) |
| 16 | + | --gpu.setResolution(140,40) |
| 17 | - | os.sleep(1) |
| 17 | + | term.clear() |
| 18 | - | end |
| 18 | + | modem.open(999) |
| 19 | - | if player[1] ~= nil then |
| 19 | + | gpu.set(20,10,"Made by:Vanilla_") |
| 20 | - | component.redstone.setOutput(require("sides").up, 15) |
| 20 | + | |
| 21 | - | else |
| 21 | + | while true do |
| 22 | - | component.redstone.setOutput(require("sides").up, 0) |
| 22 | + | player = sensor.getPlayers() |
| 23 | - | end |
| 23 | + | local _,_,_,_,_,nick = require"event".pull(1) |
| 24 | gpu.setForeground(0x00FF00) | |
| 25 | gpu.set(1, 1, "Здесь сейчас находятся:") | |
| 26 | coord = 0 | |
| 27 | for i = 1, #player do | |
| 28 | gpu.setForeground(0xFF0000) | |
| 29 | gpu.set(1, 2 + coord, player[i].name) | |
| 30 | coord = coord + 1 | |
| 31 | end | |
| 32 | if nick ~= nil then | |
| 33 | gpu.set(1, 2 + coord, nick) | |
| 34 | end | |
| 35 | if player[1] ~= nil or nick ~= nil then | |
| 36 | component.redstone.setOutput(sides.up, 15) | |
| 37 | else | |
| 38 | component.redstone.setOutput(sides.up, 0) | |
| 39 | end | |
| 40 | end |