Advertisement
1ng0

Untitled

Oct 11th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local exitTime = 22 -- change to whatever you want
  2. local timer = os.startTimer(exitTime) -- starts the timer
  3. local cp = 0
  4. local cm = 0
  5. while true do
  6.   local evt, arg = os.pullEvent() -- wait for an event
  7.   if evt == "timer" then
  8.         if arg == timer then -- check if it's the correct timer
  9.             redstone.setOutput("top",true)
  10.         cp = cp +1
  11.             textutils.slowPrint ("Send redstonsignal! "..cp)
  12.     end
  13.   elseif evt == "redstone" then
  14.         timer = os.startTimer(exitTime) -- restarts the timer
  15.         redstone.setOutput("top",false)
  16.     cm = cm +0,5
  17.     textutils.slowPrint ("Dont send redstonsignal! "..cm)
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement