Hiranus icon

Serum Filling Automation

Hiranus | PRO | 05/07/14 06:06:52 PM UTC | 0 ⭐ | 441 👁️ | Never ⏰ | []
Lua |

650 B

|

None

|

0 👍

/

0 👎

function serumfiller()
  if rs.getInput("bottom") then
    rs.setOutput("back", true)
    sleep(0.05)
    rs.setOutput("back", false)
  end
  sleep(0.3)
  if rs.getInput("top") then
    rs.setOutput("right", true)
    sleep(0.05)
    rs.setOutput("right", false)  
  end
end
 
local on = true
local interval = 3
 
local timer = os.startTimer(0)
while on do
   local event, p1, p2, p3 = os.pullEvent()
   if event == "timer" then
           --Update program
           timer = os.startTimer(interval)
           serumfiller()
   elseif event == "key" then
           if p1 == 45 then --x
                   on = false
           end
   end
end

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎