Advertisement
virtualdxs

Moon Buggy Door Control

Jul 30th, 2015
322
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.  
  3. openCommand = "openbuggy"
  4.  
  5. a = peripheral.wrap("JAKJ_RIM_CarriageController_25")
  6. b = peripheral.wrap("JAKJ_RIM_CarriageController_24")
  7. c = peripheral.wrap("JAKJ_RIM_CarriageController_26")
  8. b = peripheral.wrap("JAKJ_RIM_CarriageController_27")
  9. c = peripheral.wrap("JAKJ_RIM_CarriageController_28")
  10.  
  11.  
  12. --0:Down
  13. --1:Up
  14. --2:North
  15. --3:South
  16. --4:West
  17. --5:East
  18.  
  19. function open ()
  20.   a.move(1,false,true)
  21.   sleep(1)
  22.   b.move(1,false,true)
  23.   sleep(1)
  24.   c.move(1,false,true)
  25.   sleep(1)
  26.   d.move(1,false,true)
  27.   sleep(10)
  28.   e.move(0,false,true)
  29.   sleep(1)
  30.   d.move(0,false,true)
  31.   sleep(1)
  32.   c.move(0,false,true)
  33.   sleep(1)
  34.   b.move(0,false,true)
  35.   sleep(1)
  36. end
  37.  
  38. while 1 do
  39.   evt,cmd = os.pullEvent("chat_command")
  40.   if cmd == openCommand then open() end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement