SHOW:
|
|
- or go back to the newest paste.
| 1 | whitelist = {
| |
| 2 | - | ['jona8773'] = true, |
| 2 | + | ['jona8773'] = true, |
| 3 | - | ['plazter'] = true, |
| 3 | + | ['plazter'] = true, |
| 4 | - | ['lantow'] = true, |
| 4 | + | ['lantow'] = true, |
| 5 | - | ['antol2765'] = true, |
| 5 | + | ['antol2765'] = true, |
| 6 | - | ['steenkiller'] = true, |
| 6 | + | ['steenkiller'] = true, |
| 7 | - | ['layzeedk'] = true, |
| 7 | + | ['layzeedk'] = true, |
| 8 | - | ['bunyipcrush'] = true, |
| 8 | + | ['bunyipcrush'] = true, |
| 9 | } | |
| 10 | ||
| 11 | chat = peripheral.wrap("top")
| |
| 12 | ||
| 13 | function open() | |
| 14 | - | rs.setBundledOutput("left", colors.white)
|
| 14 | + | rs.setBundledOutput("left", colors.white)
|
| 15 | - | sleep(5) |
| 15 | + | sleep(5) |
| 16 | - | rs.setBundledOutput("left", 0)
|
| 16 | + | rs.setBundledOutput("left", 0)
|
| 17 | end | |
| 18 | ||
| 19 | while true do | |
| 20 | local event, p1, chat = os.pullEvent("chat")
| |
| 21 | - | local event, p1, chat = os.pullEvent("chat")
|
| 21 | + | |
| 22 | - | |
| 22 | + | if whitelist[p1:lower()] then |
| 23 | - | if whitelist [ p1:lower() ] then |
| 23 | + | if chat == "open" then |
| 24 | - | if chat == "open" then |
| 24 | + | open() |
| 25 | - | open() |
| 25 | + | elseif chat == "stay" then |
| 26 | - | elseif chat == "stay" then |
| 26 | + | rs.setBundledOutput("left", colors.white)
|
| 27 | - | rs.setBundledOutput("left", colors.white)
|
| 27 | + | elseif chat == "close" then |
| 28 | - | elseif chat == "close" then |
| 28 | + | rs.setBundledOutput("left", 0)
|
| 29 | - | rs.setBundledOutput("left", 0)
|
| 29 | + | end |
| 30 | end | |
| 31 | - | end |
| 31 | + | |
| 32 | - | sleep(1) |
| 32 | + | sleep(1) |
| 33 | end |