Advertisement
CodeCrafter

Update

Feb 17th, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. --==[CONFIG]==--
  2.  
  3. local Side = "Top" -- change this to the side of the modem.
  4.  
  5.  
  6.  
  7. local Frame = {
  8. " _________________________ ",
  9. " | Update | ",
  10. " | | ",
  11. " | | ",
  12. " | No update anable | ",
  13. " | | ",
  14. " |_______________________| ",
  15. }
  16. local Frame2 = {
  17. " _________________________ ",
  18. " | Update | ",
  19. " | | ",
  20. " | | ",
  21. " | No update anable | ",
  22. " | | ",
  23. " |_______________________| ",
  24.  
  25. }
  26.  
  27.  
  28. rednet.open("Side") -- here its begins...
  29.  
  30. id , message = rednet.receive(10)
  31.  
  32.  
  33. print("UpdateControl: " ..id.." has broadcast a update
  34. print("the update is: ")
  35. print(message)
  36.  
  37. if message == "Update" then
  38. print(Frame2)
  39. shell.run("Updater")
  40.  
  41. else
  42. print(Frame)
  43. sleep(3)
  44. term.clear()
  45. shell.run("menu")
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement