Advertisement
1ng0

Modular Forcefield System Quarry without Redpower

Oct 11th, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Modular Forcefield System Quarry without Redpower--
  2. -->Redpower version -> http://www.youtube.com/watch?v=Yrjo253-m6A
  3. -->Computercraft version -> http://postimg.org/image/c20l21d37/
  4.  
  5. local exitTime = 27 -- change to whatever you want
  6. local timer = os.startTimer(exitTime) -- starts the timer
  7. local cp = 0
  8. local cm = 0
  9. while true do
  10.   local evt, arg = os.pullEvent() -- wait for an event
  11.  
  12.     if evt == "timer" then
  13.             if arg == timer then -- check if it's the correct timer
  14.                 redstone.setOutput("top",true)
  15.             cp = cp +0.5
  16.                 print ("Next move!")
  17.         end
  18.     elseif evt == "redstone" then
  19.             timer = os.startTimer(exitTime) -- restarts the timer
  20.             redstone.setOutput("top",false)
  21.         cm = cm +0.5
  22.         print (cm.."x Send items! ")
  23.     end
  24.   if cm >= 250 then --Lava protect
  25.         redstone.setOutput("top",true)
  26.         print ("Send redstonsignal! "..cp)
  27.   end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement