Advertisement
Darking560

OuvertureItem

Nov 14th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. local coteporte = "back"
  2. local colorPipe = "color.bleu"
  3. local colorPorte = "color.red"
  4. local colorTel = "color.green"
  5. local time = 500
  6.  
  7. while true do
  8.     print("attente...")
  9.     event,side = os.pullEvent("redstone")
  10.     if event == "redstone" then
  11.         redstone.setBundledOutput("bottom",colorPipe)
  12.         redstone.setBundledOutput("bottom",colorPorte)
  13.         print("Porte ouverte")
  14.         event,side = os.pullEvent("redstone")
  15.         if side == coteporte then
  16.             redstone.setBundledOutput("bottom",0)
  17.             print("Porte fermΓ©")
  18.             redstone.setBundledOutput("bottom",colorPipe)
  19.             sleep(time)
  20.             redstone.setBundledOutput("bottom",colorTel)
  21.             redstone.setBundledOutput("bottom",0)
  22.             print("Tp")
  23.         end
  24.         turtle.drop()
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement