krom

Dispenser-01

Mar 24th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.77 KB | None | 0 0
  1. local alternate = 0
  2. local done = false
  3.  
  4. local nOne = 0
  5. local nTwo = 0
  6.  
  7. while not done do
  8.  
  9.     local bOne = false
  10.     local bTwo = false
  11.  
  12.     bOne = redstone.getInput("left")
  13.     bTwo = redstone.getInput("front")
  14.  
  15.     if bOne == true and nOne < 3 then
  16.         redstone.setOutput("back", true)
  17.         redstone.setOutput("back", false)
  18.         nOne = nOne + 1
  19.         print("Dispensing One")
  20.     end
  21.  
  22.     if bTwo == true and nTwo < 3 then
  23.         redstone.setOutput("right", true)
  24.         redstone.setOutput("right", false)
  25.         nTwo = nTwo + 1
  26.         print("Dispensing Two")
  27.     end
  28.  
  29.     if nOne == 3 and nTwo == 3 then
  30.         print("Should be building...")
  31.         sleep(10)
  32.         nOne = 0
  33.         nTwo = 0
  34.     else
  35.         sleep(5)
  36.     end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment