smilerryan

[LUA] ComputerCraft AutoMovie

Oct 13th, 2014
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tSides = {"left","right","bottom","top","front","back"}
  2.  
  3. while true do
  4. if rs.getInput("front") == true then
  5.  
  6. redstone.setOutput("top", true)
  7. redstone.setOutput("bottom", true)
  8. redstone.setOutput("left", true)
  9. redstone.setOutput("right", true)
  10. redstone.setOutput("back", true)
  11.  
  12. local side = peripheral.find("monitor")
  13.  
  14. for i = 1, #tSides do
  15.   monitor = peripheral.wrap(tSides[i])
  16.   if monitor then
  17. shell.run("monitor", tSides[i], "movie-code")
  18.   end
  19. end
  20. else
  21. redstone.setOutput("top", false)
  22. redstone.setOutput("bottom", false)
  23. redstone.setOutput("left", false)
  24. redstone.setOutput("right", false)
  25. redstone.setOutput("back", false)
  26. end
  27. sleep(0.25)
  28. end
Add Comment
Please, Sign In to add comment