doctorstone

servo

Apr 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. --test commande piston via computercraft
  2.  
  3.  
  4.  
  5.  
  6. local sSide = "right"
  7. local password = "start"
  8. local opentime = 10
  9.  
  10. while true do
  11.     term.clear()
  12.     term.setCursorPos(1,1)
  13.     print("taper commande start :")
  14.     local input = read("*")
  15.     if input == password then
  16.         term.clear()
  17.         term.setCursorPos(1,1)
  18.         print("démarrage")
  19.         redstone.setBundledOutput(sSide, colors.black)
  20.         sleep(opentime)
  21.         redstone.setBundledOutput(sSide, 0)
  22.     else
  23.     print("commande erronée")
  24.     sleep(2)
  25.     end
  26. end
Add Comment
Please, Sign In to add comment