Advertisement
Guest User

quai2

a guest
Mar 30th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. component = require("component")
  2. sides = require("sides")
  3.  
  4. redstone = component.proxy("d2a084df-2d78-4ccb-b09c-599d884b33f4")
  5. quai = component.proxy("5ee9248a-c015-4ecf-b0f6-5094dec9dec3")
  6. detector1 = component.proxy("6514cff6-5ee6-4d85-9f76-49be4998370f")
  7. detector2 = component.proxy("9cc426a9-6ea3-448e-8915-4fe3e43cb95e")
  8. detector3 = component.proxy("cd788da4-fba9-4ba1-b67c-d0dc524e777a")
  9.  
  10. while true do
  11.     local tag1 = detector1.getTag()
  12.     local tag2 = detector2.getTag()
  13.     local tag3 = detector3.getTag()
  14.    
  15.     if tag2 == "Ligne2" then
  16.         redstone.setOutput(sides.bottom, 25)
  17.         quai.horn()
  18.         quai.setThrottle(0)
  19.         quai.setBrake(1)
  20.    
  21.         while tag3 == "Ligne3" do
  22.             os.sleep(3)
  23.         end
  24.    
  25.         while tag1 == "Ligne1" do
  26.             os.sleep(3)
  27.         end
  28.    
  29.         os.sleep(120)
  30.         quai.horn()
  31.         quai.setBrake(0)
  32.         quai.setThrottle(1)
  33.         tag2 = ""
  34.         os.sleep(7)
  35.         redstone.setOutput(sides.bottom, 0)
  36.     end
  37.     os.sleep(1)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement