Advertisement
PakyZG

Config

Oct 26th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 11.03 KB | None | 0 0
  1. public class PlayerInfoPHOTON
  2. {
  3.     public string name = "[9933FF]NAME";
  4.     public string guildname = "PLACE GUILD HERE";
  5.     public string resourceId = "not choose";
  6.     public string id;
  7.     public PhotonPlayer networkplayer;
  8.     public int kills;
  9.     public int die;
  10.     public int maxDamage;
  11.     public int totalDamage;
  12.     public int assistancePt;
  13.     public bool dead;
  14.     public bool SET;
  15.     public int totalKills;
  16.     public int totalDeaths;
  17.     public int totalKillsInOneLifeNormal;
  18.     public int totalKillsInOneLifeHard;
  19.     public int totalKillsInOneLifeAB;
  20.     public int airKills;
  21.     public int totalCrawlerKills;
  22.     public int totalJumperKills;
  23.     public int totalNonAIKills;
  24.     public string nameChat;
  25.     public void initAsGuest()
  26.     {
  27.         string[] array = System.IO.File.ReadAllLines("config.txt");
  28.         string[] array2 = array;
  29.         for (int i = 0; i < array2.Length; i++)
  30.         {
  31.             string text = array2[i];
  32.             if (text.Length >= 2 && !text.StartsWith("//"))
  33.             {
  34.                 if (!text.StartsWith("name=") && !text.StartsWith("guildname="))
  35.                 {
  36.                     if (text.StartsWith("chatname="))
  37.                     {
  38.                         string text2 = text.Remove(0, text.IndexOf("=", System.StringComparison.Ordinal) + 1);
  39.                         int startIndex = 0;
  40.                         System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();
  41.                         System.Collections.Generic.List<int> list2 = new System.Collections.Generic.List<int>();
  42.                         while (text2.IndexOf("[", startIndex, System.StringComparison.Ordinal) != -1)
  43.                         {
  44.                             int num = text2.IndexOf("[", startIndex, System.StringComparison.Ordinal);
  45.                             if (text2[num + 1] != '/')
  46.                             {
  47.                                 if (text2[num + 7] != ']')
  48.                                 {
  49.                                     startIndex = num + 1;
  50.                                 }
  51.                                 else
  52.                                 {
  53.                                     try
  54.                                     {
  55.                                         System.Convert.ToInt32(text2.Substring(num + 1, 6), 16);
  56.                                     }
  57.                                     catch (System.Exception)
  58.                                     {
  59.                                         continue;
  60.                                     }
  61.                                     list.Add(text2.Substring(num + 1, 6));
  62.                                     list2.Add(num + 1);
  63.                                     startIndex = num + 1;
  64.                                 }
  65.                             }
  66.                             else
  67.                             {
  68.                                 if (text2[num + 8] != ']')
  69.                                 {
  70.                                     startIndex = num + 1;
  71.                                 }
  72.                                 else
  73.                                 {
  74.                                     try
  75.                                     {
  76.                                         System.Convert.ToInt32(text2.Substring(num + 2, 6), 16);
  77.                                     }
  78.                                     catch (System.Exception)
  79.                                     {
  80.                                         continue;
  81.                                     }
  82.                                     list.Add(text2.Substring(num + 1, 7));
  83.                                     list2.Add(num + 1);
  84.                                     startIndex = num + 1;
  85.                                 }
  86.                             }
  87.                         }
  88.                         string text3 = string.Empty;
  89.                         for (int j = 0; j < list.Count; j++)
  90.                         {
  91.                             if (list[j][0] == '/')
  92.                             {
  93.                                 if (j != 0)
  94.                                 {
  95.                                     int num2 = System.Convert.ToInt32(list[j].Substring(1, 2), 16);
  96.                                     int num3 = System.Convert.ToInt32(list[j].Substring(3, 2), 16);
  97.                                     int num4 = System.Convert.ToInt32(list[j].Substring(5, 2), 16);
  98.                                     int num5;
  99.                                     int num6;
  100.                                     int num7;
  101.                                     int num8;
  102.                                     if (list[j - 1][0] == '/')
  103.                                     {
  104.                                         num5 = System.Convert.ToInt32(list[j - 1].Substring(1, 2), 16);
  105.                                         num6 = System.Convert.ToInt32(list[j - 1].Substring(3, 2), 16);
  106.                                         num7 = System.Convert.ToInt32(list[j - 1].Substring(5, 2), 16);
  107.                                         num8 = list2[j - 1] + 8;
  108.                                     }
  109.                                     else
  110.                                     {
  111.                                         num5 = System.Convert.ToInt32(list[j - 1].Substring(0, 2), 16);
  112.                                         num6 = System.Convert.ToInt32(list[j - 1].Substring(2, 2), 16);
  113.                                         num7 = System.Convert.ToInt32(list[j - 1].Substring(4, 2), 16);
  114.                                         num8 = list2[j - 1] + 7;
  115.                                     }
  116.                                     for (int k = num8; k < list2[j] - 1; k++)
  117.                                     {
  118.                                         int num9 = list2[j] - 1 - num8;
  119.                                         int num10 = num5 + (num2 - num5) / num9 * (k - num8);
  120.                                         int num11 = num6 + (num3 - num6) / num9 * (k - num8);
  121.                                         int num12 = num7 + (num4 - num7) / num9 * (k - num8);
  122.                                         string arg = string.Format("#{0:X2}{1:X2}{2:X2}", num10, num11, num12).ToLower();
  123.                                         text3 += string.Format("<color={0}ff>{1}</color>", arg, text2[k]);
  124.                                     }
  125.                                 }
  126.                                 else
  127.                                 {
  128.                                     int num13 = System.Convert.ToInt32(list[j].Substring(1, 2), 16);
  129.                                     int num14 = System.Convert.ToInt32(list[j].Substring(3, 2), 16);
  130.                                     int num15 = System.Convert.ToInt32(list[j].Substring(5, 2), 16);
  131.                                     int num16 = 255;
  132.                                     int num17 = 255;
  133.                                     int num18 = 255;
  134.                                     for (int l = 0; l < list2[j] - 1; l++)
  135.                                     {
  136.                                         int num19 = list2[j] - 1;
  137.                                         int num20 = num16 + (num13 - num16) / num19 * l;
  138.                                         int num21 = num17 + (num14 - num17) / num19 * l;
  139.                                         int num22 = num18 + (num15 - num18) / num19 * l;
  140.                                         string arg2 = string.Format("#{0:X2}{1:X2}{2:X2}", num20, num21, num22).ToLower();
  141.                                         text3 += string.Format("<color={0}ff>{1}</color>", arg2, text2[l]);
  142.                                     }
  143.                                 }
  144.                             }
  145.                             else
  146.                             {
  147.                                 if (j == list.Count - 1 || text2[list2[j + 1]] != '/')
  148.                                 {
  149.                                     if (j == 0)
  150.                                     {
  151.                                         text3 += text2.Substring(0, list2[j] - 1);
  152.                                     }
  153.                                     int num23 = System.Convert.ToInt32(list[j].Substring(0, 2), 16);
  154.                                     int num24 = System.Convert.ToInt32(list[j].Substring(2, 2), 16);
  155.                                     int num25 = System.Convert.ToInt32(list[j].Substring(4, 2), 16);
  156.                                     string arg3 = string.Format("#{0:X2}{1:X2}{2:X2}", num23, num24, num25).ToLower();
  157.                                     text3 += string.Format("<color={0}ff>", arg3);
  158.                                     if (j != list.Count - 1)
  159.                                     {
  160.                                         text3 = text3 + text2.Substring(list2[j] + 7, list2[j + 1] - list2[j] - 8) + "</color>";
  161.                                     }
  162.                                     else
  163.                                     {
  164.                                         text3 = text3 + text2.Substring(list2[j] + 7) + "</color>";
  165.                                     }
  166.                                 }
  167.                             }
  168.                         }
  169.                         if (list.Count == 0)
  170.                         {
  171.                             text3 = text2;
  172.                         }
  173.                         while (text3.IndexOf("[/", System.StringComparison.Ordinal) != -1)
  174.                         {
  175.                             text3 = text3.Remove(text3.IndexOf("[/", System.StringComparison.Ordinal), 9);
  176.                         }
  177.                         while (text3.IndexOf("[", System.StringComparison.Ordinal) != -1)
  178.                         {
  179.                             text3 = text3.Remove(text3.IndexOf("[", System.StringComparison.Ordinal), 8);
  180.                         }
  181.                         this.nameChat = text3;
  182.                     }
  183.                 }
  184.                 else
  185.                 {
  186.                     string text4 = text.Remove(0, text.IndexOf("=", System.StringComparison.Ordinal) + 1);
  187.                     int startIndex2 = 0;
  188.                     System.Collections.Generic.List<string> list3 = new System.Collections.Generic.List<string>();
  189.                     System.Collections.Generic.List<int> list4 = new System.Collections.Generic.List<int>();
  190.                     while (text4.IndexOf("[", startIndex2, System.StringComparison.Ordinal) != -1)
  191.                     {
  192.                         int num26 = text4.IndexOf("[", startIndex2, System.StringComparison.Ordinal);
  193.                         if (text4[num26 + 1] != '/')
  194.                         {
  195.                             if (text4[num26 + 7] != ']')
  196.                             {
  197.                                 startIndex2 = num26 + 1;
  198.                             }
  199.                             else
  200.                             {
  201.                                 try
  202.                                 {
  203.                                     System.Convert.ToInt32(text4.Substring(num26 + 1, 6), 16);
  204.                                 }
  205.                                 catch (System.Exception)
  206.                                 {
  207.                                     continue;
  208.                                 }
  209.                                 list3.Add(text4.Substring(num26 + 1, 6));
  210.                                 list4.Add(num26 + 1);
  211.                                 startIndex2 = num26 + 1;
  212.                             }
  213.                         }
  214.                         else
  215.                         {
  216.                             if (text4[num26 + 8] != ']')
  217.                             {
  218.                                 startIndex2 = num26 + 1;
  219.                             }
  220.                             else
  221.                             {
  222.                                 try
  223.                                 {
  224.                                     System.Convert.ToInt32(text4.Substring(num26 + 2, 6), 16);
  225.                                 }
  226.                                 catch (System.Exception)
  227.                                 {
  228.                                     continue;
  229.                                 }
  230.                                 list3.Add(text4.Substring(num26 + 1, 7));
  231.                                 list4.Add(num26 + 1);
  232.                                 startIndex2 = num26 + 1;
  233.                             }
  234.                         }
  235.                     }
  236.                     string text5 = string.Empty;
  237.                     for (int m = 0; m < list3.Count; m++)
  238.                     {
  239.                         if (list3[m][0] == '/')
  240.                         {
  241.                             if (m != 0)
  242.                             {
  243.                                 int num27 = System.Convert.ToInt32(list3[m].Substring(1, 2), 16);
  244.                                 int num28 = System.Convert.ToInt32(list3[m].Substring(3, 2), 16);
  245.                                 int num29 = System.Convert.ToInt32(list3[m].Substring(5, 2), 16);
  246.                                 int num30;
  247.                                 int num31;
  248.                                 int num32;
  249.                                 int num33;
  250.                                 if (list3[m - 1][0] == '/')
  251.                                 {
  252.                                     num30 = System.Convert.ToInt32(list3[m - 1].Substring(1, 2), 16);
  253.                                     num31 = System.Convert.ToInt32(list3[m - 1].Substring(3, 2), 16);
  254.                                     num32 = System.Convert.ToInt32(list3[m - 1].Substring(5, 2), 16);
  255.                                     num33 = list4[m - 1] + 8;
  256.                                 }
  257.                                 else
  258.                                 {
  259.                                     num30 = System.Convert.ToInt32(list3[m - 1].Substring(0, 2), 16);
  260.                                     num31 = System.Convert.ToInt32(list3[m - 1].Substring(2, 2), 16);
  261.                                     num32 = System.Convert.ToInt32(list3[m - 1].Substring(4, 2), 16);
  262.                                     num33 = list4[m - 1] + 7;
  263.                                 }
  264.                                 for (int n = num33; n < list4[m] - 1; n++)
  265.                                 {
  266.                                     int num34 = list4[m] - 1 - num33;
  267.                                     int num35 = num30 + (num27 - num30) / num34 * (n - num33);
  268.                                     int num36 = num31 + (num28 - num31) / num34 * (n - num33);
  269.                                     int num37 = num32 + (num29 - num32) / num34 * (n - num33);
  270.                                     text5 += string.Format("[{0:X2}{1:X2}{2:X2}]{3}", new object[]
  271.                                     {
  272.                                         num35,
  273.                                         num36,
  274.                                         num37,
  275.                                         text4[n]
  276.                                     });
  277.                                 }
  278.                             }
  279.                             else
  280.                             {
  281.                                 int num38 = System.Convert.ToInt32(list3[m].Substring(1, 2), 16);
  282.                                 int num39 = System.Convert.ToInt32(list3[m].Substring(3, 2), 16);
  283.                                 int num40 = System.Convert.ToInt32(list3[m].Substring(5, 2), 16);
  284.                                 int num41 = 255;
  285.                                 int num42 = 255;
  286.                                 int num43 = 255;
  287.                                 for (int num44 = 0; num44 < list4[m] - 1; num44++)
  288.                                 {
  289.                                     int num45 = list4[m] - 1;
  290.                                     int num46 = num41 + (num38 - num41) / num45 * num44;
  291.                                     int num47 = num42 + (num39 - num42) / num45 * num44;
  292.                                     int num48 = num43 + (num40 - num43) / num45 * num44;
  293.                                     text5 += string.Format("[{0:X2}{1:X2}{2:X2}]{3}", new object[]
  294.                                     {
  295.                                         num46,
  296.                                         num47,
  297.                                         num48,
  298.                                         text4[num44]
  299.                                     });
  300.                                 }
  301.                             }
  302.                         }
  303.                         else
  304.                         {
  305.                             if (m != 0)
  306.                             {
  307.                                 text5 += text4.Substring(list4[m - 1] - 1, list4[m] - list4[m - 1]);
  308.                             }
  309.                             else
  310.                             {
  311.                                 text5 += text4.Substring(0, list4[m] - 1);
  312.                             }
  313.                         }
  314.                     }
  315.                     if (list3.Count == 0)
  316.                     {
  317.                         text5 = text4;
  318.                     }
  319.                     else
  320.                     {
  321.                         text5 += text4.Substring(list4[list3.Count - 1] - 1);
  322.                     }
  323.                     while (text5.IndexOf("[/", System.StringComparison.Ordinal) != -1)
  324.                     {
  325.                         text5 = text5.Remove(text5.IndexOf("[/", System.StringComparison.Ordinal), 9);
  326.                     }
  327.                     if (text.StartsWith("name"))
  328.                     {
  329.                         this.name = text5;
  330.                     }
  331.                     else
  332.                     {
  333.                         this.guildname = text5;
  334.                     }
  335.                 }
  336.             }
  337.         }
  338.         this.kills = 0;
  339.         this.die = 0;
  340.         this.maxDamage = 0;
  341.         this.totalDamage = 0;
  342.         this.assistancePt = 0;
  343.         this.dead = false;
  344.         this.resourceId = "not choose";
  345.         this.SET = false;
  346.         this.totalKills = 0;
  347.         this.totalDeaths = 0;
  348.         this.totalKillsInOneLifeNormal = 0;
  349.         this.totalKillsInOneLifeHard = 0;
  350.         this.totalKillsInOneLifeAB = 0;
  351.         this.airKills = 0;
  352.         this.totalCrawlerKills = 0;
  353.         this.totalJumperKills = 0;
  354.         this.totalNonAIKills = 0;
  355.     }
  356. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement