drProfessorGTA

BSMAaquit

Jun 2nd, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. rednet.open("right")
  2. mon = peripheral.wrap("left")
  3. laut = peripheral.wrap("top")
  4. druck = peripheral.wrap("bottom")
  5.  
  6. q = 25
  7.  
  8.  
  9. while (q > 1) do
  10. rednet.send(6,"aquit")
  11. rednet.send(9,"aquit")
  12. rednet.send(12,"aquit")
  13. sleep(2)
  14. q = q-1
  15. end
  16. local ex = fs.exists("BSMA/AktivAlarm")
  17. if ex == true then
  18. file = fs.open("BSMA/AktivAlarm","r")
  19.  
  20. local fileData = {}
  21. local line = file.readLine()
  22. repeat
  23. table.insert(fileData,line)
  24. line = file.readLine()
  25. until line == nil
  26. file.close()
  27. for i = 1,1000,1 do
  28.     if fileData[i] == nil then
  29.     break
  30.     end
  31. local wert = fileData[i]
  32. wert2 = tonumber(wert)
  33. q2 = 25
  34. while (q2 > 1) do
  35. rednet.send(wert2,"aquit")
  36. sleep(2)
  37. q2 = q2-1
  38. end
  39. end
  40. end
  41.  
  42.  
  43.  
  44.  
  45. print("Akustischer Alarm abgeschaltet!")
Advertisement
Add Comment
Please, Sign In to add comment