abuklao84

Herba Automation

Apr 26th, 2014
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. --barrel_0
  2. --variables
  3. p_name = "tt_aspectContainer_0"
  4. r_side = "back"
  5. s_Side = "right"
  6. p = peripheral.wrap(p_name)
  7. s = peripheral.wrap(s_Side)
  8.  
  9. function reload_screen(counts)
  10.     s.clear()
  11.     s.setCursorPos(1,1)
  12.     s.write(counts)
  13.     s.setCursorPos(1,2)
  14.     s.write("herba")
  15.    
  16. end
  17.  
  18. while true do
  19.     count = p.getAspectCount("herba")
  20.     reload_screen(count)
  21.     if count == 0 then
  22.         redstone.setOutput(r_side,true)
  23.         sleep(32)
  24.         redstone.setOutput(r_side,false)
  25.     end
  26. sleep(5)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment