Advertisement
Guest User

startup

a guest
Apr 6th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. rednet.open("right")
  2. timer = 0
  3. while true do
  4.   sender, message, protocol = rednet.receive(1)
  5.   print("dideldi")
  6.   if message == "start" then
  7.     print("System gestartet")
  8.     rednet.send(23, "start")
  9.     while true do
  10.       print("Sensoren Aktiv")
  11.       senderB, messageB, protocolB = rednet.receive()
  12.       if messageB == "CheckTrack" then
  13.         print("CheckTrack")
  14.         if redstone.getInput("back") == true then
  15.           timer = timer + 1
  16.           print("Timer erhoeht")
  17.           if timer >= 15 then
  18.             print("ZugLang")
  19.             rednet.send(23, "LangB")
  20.           else
  21.             rednet.send(23, "Belegt")
  22.             print("Belegt")
  23.           end
  24.         else
  25.           rednet.send(23, "Frei")
  26.           timer = 0
  27.           print("frei")
  28.         end
  29.       end
  30.     end
  31.   end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement