Advertisement
4N3M

ee bot update detect

Nov 12th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using PlayerIOClient;
  4. using System.Threading;
  5.  
  6. namespace UpdateDetect
  7. {
  8. class UpdateDetect
  9. {
  10. static void Main(string[] args)
  11. {
  12. new Engine();
  13. Console.ReadLine();
  14. }
  15. }
  16.  
  17. class Engine
  18. {
  19. string currentVERSION = "2.0"; // change this to your current bot version
  20. string newVERSION;
  21. bool latestVERSION = false;
  22. bool ERROR = false;
  23.  
  24. public Engine()
  25. {
  26. System.Net.WebClient WebsiteClient = new System.Net.WebClient();
  27. try
  28. {
  29. newVERSION = WebsiteClient.DownloadString("http://pastebin.com/raw/MP5jXpVH"); // change this to your raw pastebin
  30. }
  31. catch
  32. {
  33. ERROR = true;
  34. }
  35.  
  36. if (ERROR == false)
  37. {
  38. if (currentVERSION == newVERSION)
  39. {
  40. Console.WriteLine("You have the latest version, no updating needed.");
  41. latestVERSION = true;
  42. }
  43. else
  44. {
  45. Console.WriteLine("Your version is " + currentVERSION + ", while the new version is " + newVERSION + ", updating needed.");
  46. latestVERSION = false;
  47. }
  48. }
  49. else
  50. {
  51. {
  52. Console.WriteLine("Error connecting to file, check your internet connection or pastebin file.");
  53. }
  54. }
  55.  
  56. if (latestVERSION == true)
  57. {
  58. Client cli;
  59. Connection con;
  60. Dictionary<int, string> players = new Dictionary<int, string>();
  61. cli = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "email", "password");
  62. con = cli.Multiplayer.CreateJoinRoom("world", "Everybodyedits217", true, null, null);
  63. con.Send("init");
  64. Thread.Sleep(20);
  65. con.Send("init2");
  66. }
  67. }
  68. }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement