Advertisement
Guest User

chat

a guest
Sep 26th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. loger = function()
  2.     while true do
  3.         local e, p1, p2 = os.pullEvent ()
  4.         file = fs.open ("serverlog", "a")
  5.         file.writeLine (e.. " " ..p1..": ".. p2)
  6.         file.close()
  7.     end
  8. end
  9.  
  10. system = function()
  11.     while true do
  12.         term.setCursorPos (1, 1)
  13.         term.clear()
  14.         if fs.exists ("startup1") then
  15.             shell.run ("startup1")
  16.         else
  17.             shell.run ("shell")  
  18.         end
  19.     end
  20. end
  21.  
  22. parallel.waitForAny (loger, system)BarrBarr: test 1
  23. BarrBarr: test 1
  24. BarrBarr: test 2
  25. BarrBarr: test 2
  26. BarrBarr: test 3
  27. BarrBarr: test 3
  28. BarrBarr: test 4
  29. BarrBarr: test 4
  30. BarrBarr: test 5
  31. BarrBarr: test 5
  32. BarrBarr: test 6
  33. BarrBarr: test 6
  34. BarrBarr: test 7
  35. BarrBarr: test 7
  36. BarrBarr: test 8
  37. BarrBarr: test 8
  38. BarrBarr: test 9
  39. BarrBarr: test 9
  40. BarrBarr: test 10
  41. BarrBarr: test 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement