Advertisement
Guest User

Untitled

a guest
May 6th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Threading;
  7. using MySql.Data.MySqlClient;
  8.  
  9. namespace CCRandomizer
  10. {
  11. class Program
  12. {
  13.  
  14.  
  15. static void Main(string[] args)
  16. {
  17.  
  18. string conStr = "server=192.168.0.23;uid=kartershop;pwd=ShQP7U2TrEVLzUFA;database=kartershop;port=3306;Charset=utf8";
  19. MySqlConnection conn = new MySqlConnection(conStr);
  20. conn.Open();
  21. //connection doesn't work cause I don't have the database url D:
  22.  
  23. string cleanCCTable = ""; //table cleaning for every week xDD
  24. string getPlayersCommand = "SELECT COUNT(*) FROM Users WHERE CurrentRoom = 1";
  25.  
  26.  
  27. Console.WriteLine("Welcome to the CC Generator. Please wait while we generate a CC for you!");
  28. var class1 = "150cc";
  29. var class2 = "200cc";
  30. var class3 = "Mirror";
  31.  
  32. Random rand = new Random();
  33. var classchosen = rand.Next(0, 3);
  34. Thread.Sleep(5500);
  35.  
  36. if (classchosen == 0)
  37. {
  38. Console.WriteLine("The CC chosen is " + class1);
  39. Thread.Sleep(5500);
  40.  
  41. }
  42. else if (classchosen == 1)
  43. {
  44. Console.WriteLine("The CC chosen is " + class2);
  45. Thread.Sleep(5500);
  46. }
  47. else if (classchosen == 2)
  48. {
  49. Console.WriteLine("The CC chosen is " + class3);
  50. Thread.Sleep(5500);
  51. }
  52.  
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement