Advertisement
virtualdxs

Untitled

Jul 20th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Redstone In Motion Hidden Door Control Program by VirtualDXS
  2. modem = peripheral.wrap("top")
  3. modem.open(7331)
  4. a = peripheral.wrap("JAKJ_RIM_CarriageController_21")
  5. b = peripheral.wrap("JAKJ_RIM_CarriageController_22")
  6. c = peripheral.wrap("JAKJ_RIM_CarriageController_23")
  7.  
  8.  
  9. --0:Down
  10. --1:Up
  11. --2:North
  12. --3:South
  13. --4:West
  14. --5:East
  15. function openGate ()
  16. a.move(0,false,true)
  17. sleep(1)
  18. b.move(0,false,true)
  19. sleep(10)
  20. c.move(1,false,true)
  21. sleep(1)
  22. b.move(1,false,true)
  23. sleep(1)
  24. end
  25. while true do
  26.   msg = {os.pullEvent("modem_message")}
  27.   if msg[5] == "openGate" then openGate() end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement