SHOW:
|
|
- or go back to the newest paste.
| 1 | function serumfiller() | |
| 2 | if rs.getInput("bottom") then
| |
| 3 | rs.setOutput("back", true)
| |
| 4 | sleep(0.05) | |
| 5 | rs.setOutput("back", false)
| |
| 6 | end | |
| 7 | sleep(0.3) | |
| 8 | if rs.getInput("top") then
| |
| 9 | rs.setOutput("right", true)
| |
| 10 | sleep(0.05) | |
| 11 | rs.setOutput("right", false)
| |
| 12 | end | |
| 13 | end | |
| 14 | ||
| 15 | local on = true | |
| 16 | local interval = 3 | |
| 17 | ||
| 18 | local timer = os.startTimer(0) | |
| 19 | while on do | |
| 20 | local event, p1, p2, p3 = os.pullEvent() | |
| 21 | if event == "timer" then | |
| 22 | --Update program | |
| 23 | timer = os.startTimer(interval) | |
| 24 | serumfiller() | |
| 25 | elseif event == "key" then | |
| 26 | if p1 == 45 then --x | |
| 27 | on = false | |
| 28 | end | |
| 29 | end | |
| 30 | end |