Advertisement
Guest User

server

a guest
Jul 23rd, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. local mainId = 1
  2. local stationName = "Oak"
  3. while true do
  4. rednet.open("top")
  5. id1,msg1 = rednet.receive()
  6. rednet.send(mainId,msg1 .. "-1")
  7. id2,msg2 = rednet.receive()
  8. if id2 == mainId then
  9.     if msg2 == "ok" then
  10.         rednet.send(mainId,msg1 .. "-2")
  11.         id3,msg3 = rednet.receive()
  12.         rednet.send(id1,"Bienvenue à :" .. stationName)
  13.         redstone.setOutput("left",true)
  14.         os.sleep(0.5)
  15.         redstone.setOutput("left",false)
  16.     else
  17.         rednet.send(id1,"Tu n'as plus de tickets")
  18.     end
  19. else
  20.     rednet.send(id1,"Une erreur c'est produite")
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement