Advertisement
Guest User

quai3

a guest
Mar 30th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.91 KB | None | 0 0
  1. component = require("component")
  2. sides = require("sides")
  3.  
  4. redstone = component.proxy("6e7b4628-2e4b-45de-80f5-32cce1810b06")
  5. quai = component.proxy("f6980a13-bf49-4c09-9f66-6d676f5cd571")
  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 tag3 == "Ligne3" then
  16.         redstone.setOutput(sides.bottom, 25)
  17.         quai.horn()
  18.         quai.setThrottle(0)
  19.         quai.setBrake(1)
  20.    
  21.         while tag1 == "Ligne1" do
  22.             os.sleep(3)
  23.         end
  24.    
  25.         while tag2 == "Ligne2" do
  26.             os.sleep(3)
  27.         end
  28.    
  29.         os.sleep(120)
  30.         quai.horn()
  31.         quai.setBrake(0)
  32.         quai.setThrottle(1)
  33.         tag3 = ""
  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