drProfessorGTA

BSMAquit

Jun 1st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 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. local ex = fs.exists("BSMA/AktivAlarm")
  7. if ex == true then
  8. file = fs.open("BSMA/AktivAlarm","r")
  9.  
  10. local fileData = {}
  11. local line = file.readLine()
  12. repeat
  13. table.insert(fileData,line)
  14. line = file.readLine()
  15. until line == nil
  16. file.close()
  17. for i = 1,1000,1 do
  18.     if fileData[i] == nil then
  19.     fs.delete("BSMA/AktivAlarm")
  20.     break
  21.     end
  22. local wert = fileData[i]
  23. wert2 = tonumber(wert)
  24. q2 = 25
  25. while (q2 > 1) do
  26. rednet.send(wert2,"quit")
  27. sleep(2)
  28. q2 = q2-1
  29. end
  30. end
  31. end
  32.  
  33. q = 25
  34. while (q > 1) do
  35. rednet.send(6,"quit")
  36. rednet.send(9,"quit")
  37. rednet.send(12,"quit")
  38. sleep(2)
  39. q = q-1
  40. end
  41. mon.clear()
  42.  
  43.  
  44.  
  45.  
  46. print("Quitierung abgeschlossen!")
  47. sleep(3)
  48. os.reboot()
Add Comment
Please, Sign In to add comment