Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PlayerInfoPHOTON
- {
- public string name = "[9933FF]NAME";
- public string guildname = "PLACE GUILD HERE";
- public string resourceId = "not choose";
- public string id;
- public PhotonPlayer networkplayer;
- public int kills;
- public int die;
- public int maxDamage;
- public int totalDamage;
- public int assistancePt;
- public bool dead;
- public bool SET;
- public int totalKills;
- public int totalDeaths;
- public int totalKillsInOneLifeNormal;
- public int totalKillsInOneLifeHard;
- public int totalKillsInOneLifeAB;
- public int airKills;
- public int totalCrawlerKills;
- public int totalJumperKills;
- public int totalNonAIKills;
- public string nameChat;
- public void initAsGuest()
- {
- string[] array = System.IO.File.ReadAllLines("config.txt");
- string[] array2 = array;
- for (int i = 0; i < array2.Length; i++)
- {
- string text = array2[i];
- if (text.Length >= 2 && !text.StartsWith("//"))
- {
- if (!text.StartsWith("name=") && !text.StartsWith("guildname="))
- {
- if (text.StartsWith("chatname="))
- {
- string text2 = text.Remove(0, text.IndexOf("=", System.StringComparison.Ordinal) + 1);
- int startIndex = 0;
- System.Collections.Generic.List<string> list = new System.Collections.Generic.List<string>();
- System.Collections.Generic.List<int> list2 = new System.Collections.Generic.List<int>();
- while (text2.IndexOf("[", startIndex, System.StringComparison.Ordinal) != -1)
- {
- int num = text2.IndexOf("[", startIndex, System.StringComparison.Ordinal);
- if (text2[num + 1] != '/')
- {
- if (text2[num + 7] != ']')
- {
- startIndex = num + 1;
- }
- else
- {
- try
- {
- System.Convert.ToInt32(text2.Substring(num + 1, 6), 16);
- }
- catch (System.Exception)
- {
- continue;
- }
- list.Add(text2.Substring(num + 1, 6));
- list2.Add(num + 1);
- startIndex = num + 1;
- }
- }
- else
- {
- if (text2[num + 8] != ']')
- {
- startIndex = num + 1;
- }
- else
- {
- try
- {
- System.Convert.ToInt32(text2.Substring(num + 2, 6), 16);
- }
- catch (System.Exception)
- {
- continue;
- }
- list.Add(text2.Substring(num + 1, 7));
- list2.Add(num + 1);
- startIndex = num + 1;
- }
- }
- }
- string text3 = string.Empty;
- for (int j = 0; j < list.Count; j++)
- {
- if (list[j][0] == '/')
- {
- if (j != 0)
- {
- int num2 = System.Convert.ToInt32(list[j].Substring(1, 2), 16);
- int num3 = System.Convert.ToInt32(list[j].Substring(3, 2), 16);
- int num4 = System.Convert.ToInt32(list[j].Substring(5, 2), 16);
- int num5;
- int num6;
- int num7;
- int num8;
- if (list[j - 1][0] == '/')
- {
- num5 = System.Convert.ToInt32(list[j - 1].Substring(1, 2), 16);
- num6 = System.Convert.ToInt32(list[j - 1].Substring(3, 2), 16);
- num7 = System.Convert.ToInt32(list[j - 1].Substring(5, 2), 16);
- num8 = list2[j - 1] + 8;
- }
- else
- {
- num5 = System.Convert.ToInt32(list[j - 1].Substring(0, 2), 16);
- num6 = System.Convert.ToInt32(list[j - 1].Substring(2, 2), 16);
- num7 = System.Convert.ToInt32(list[j - 1].Substring(4, 2), 16);
- num8 = list2[j - 1] + 7;
- }
- for (int k = num8; k < list2[j] - 1; k++)
- {
- int num9 = list2[j] - 1 - num8;
- int num10 = num5 + (num2 - num5) / num9 * (k - num8);
- int num11 = num6 + (num3 - num6) / num9 * (k - num8);
- int num12 = num7 + (num4 - num7) / num9 * (k - num8);
- string arg = string.Format("#{0:X2}{1:X2}{2:X2}", num10, num11, num12).ToLower();
- text3 += string.Format("<color={0}ff>{1}</color>", arg, text2[k]);
- }
- }
- else
- {
- int num13 = System.Convert.ToInt32(list[j].Substring(1, 2), 16);
- int num14 = System.Convert.ToInt32(list[j].Substring(3, 2), 16);
- int num15 = System.Convert.ToInt32(list[j].Substring(5, 2), 16);
- int num16 = 255;
- int num17 = 255;
- int num18 = 255;
- for (int l = 0; l < list2[j] - 1; l++)
- {
- int num19 = list2[j] - 1;
- int num20 = num16 + (num13 - num16) / num19 * l;
- int num21 = num17 + (num14 - num17) / num19 * l;
- int num22 = num18 + (num15 - num18) / num19 * l;
- string arg2 = string.Format("#{0:X2}{1:X2}{2:X2}", num20, num21, num22).ToLower();
- text3 += string.Format("<color={0}ff>{1}</color>", arg2, text2[l]);
- }
- }
- }
- else
- {
- if (j == list.Count - 1 || text2[list2[j + 1]] != '/')
- {
- if (j == 0)
- {
- text3 += text2.Substring(0, list2[j] - 1);
- }
- int num23 = System.Convert.ToInt32(list[j].Substring(0, 2), 16);
- int num24 = System.Convert.ToInt32(list[j].Substring(2, 2), 16);
- int num25 = System.Convert.ToInt32(list[j].Substring(4, 2), 16);
- string arg3 = string.Format("#{0:X2}{1:X2}{2:X2}", num23, num24, num25).ToLower();
- text3 += string.Format("<color={0}ff>", arg3);
- if (j != list.Count - 1)
- {
- text3 = text3 + text2.Substring(list2[j] + 7, list2[j + 1] - list2[j] - 8) + "</color>";
- }
- else
- {
- text3 = text3 + text2.Substring(list2[j] + 7) + "</color>";
- }
- }
- }
- }
- if (list.Count == 0)
- {
- text3 = text2;
- }
- while (text3.IndexOf("[/", System.StringComparison.Ordinal) != -1)
- {
- text3 = text3.Remove(text3.IndexOf("[/", System.StringComparison.Ordinal), 9);
- }
- while (text3.IndexOf("[", System.StringComparison.Ordinal) != -1)
- {
- text3 = text3.Remove(text3.IndexOf("[", System.StringComparison.Ordinal), 8);
- }
- this.nameChat = text3;
- }
- }
- else
- {
- string text4 = text.Remove(0, text.IndexOf("=", System.StringComparison.Ordinal) + 1);
- int startIndex2 = 0;
- System.Collections.Generic.List<string> list3 = new System.Collections.Generic.List<string>();
- System.Collections.Generic.List<int> list4 = new System.Collections.Generic.List<int>();
- while (text4.IndexOf("[", startIndex2, System.StringComparison.Ordinal) != -1)
- {
- int num26 = text4.IndexOf("[", startIndex2, System.StringComparison.Ordinal);
- if (text4[num26 + 1] != '/')
- {
- if (text4[num26 + 7] != ']')
- {
- startIndex2 = num26 + 1;
- }
- else
- {
- try
- {
- System.Convert.ToInt32(text4.Substring(num26 + 1, 6), 16);
- }
- catch (System.Exception)
- {
- continue;
- }
- list3.Add(text4.Substring(num26 + 1, 6));
- list4.Add(num26 + 1);
- startIndex2 = num26 + 1;
- }
- }
- else
- {
- if (text4[num26 + 8] != ']')
- {
- startIndex2 = num26 + 1;
- }
- else
- {
- try
- {
- System.Convert.ToInt32(text4.Substring(num26 + 2, 6), 16);
- }
- catch (System.Exception)
- {
- continue;
- }
- list3.Add(text4.Substring(num26 + 1, 7));
- list4.Add(num26 + 1);
- startIndex2 = num26 + 1;
- }
- }
- }
- string text5 = string.Empty;
- for (int m = 0; m < list3.Count; m++)
- {
- if (list3[m][0] == '/')
- {
- if (m != 0)
- {
- int num27 = System.Convert.ToInt32(list3[m].Substring(1, 2), 16);
- int num28 = System.Convert.ToInt32(list3[m].Substring(3, 2), 16);
- int num29 = System.Convert.ToInt32(list3[m].Substring(5, 2), 16);
- int num30;
- int num31;
- int num32;
- int num33;
- if (list3[m - 1][0] == '/')
- {
- num30 = System.Convert.ToInt32(list3[m - 1].Substring(1, 2), 16);
- num31 = System.Convert.ToInt32(list3[m - 1].Substring(3, 2), 16);
- num32 = System.Convert.ToInt32(list3[m - 1].Substring(5, 2), 16);
- num33 = list4[m - 1] + 8;
- }
- else
- {
- num30 = System.Convert.ToInt32(list3[m - 1].Substring(0, 2), 16);
- num31 = System.Convert.ToInt32(list3[m - 1].Substring(2, 2), 16);
- num32 = System.Convert.ToInt32(list3[m - 1].Substring(4, 2), 16);
- num33 = list4[m - 1] + 7;
- }
- for (int n = num33; n < list4[m] - 1; n++)
- {
- int num34 = list4[m] - 1 - num33;
- int num35 = num30 + (num27 - num30) / num34 * (n - num33);
- int num36 = num31 + (num28 - num31) / num34 * (n - num33);
- int num37 = num32 + (num29 - num32) / num34 * (n - num33);
- text5 += string.Format("[{0:X2}{1:X2}{2:X2}]{3}", new object[]
- {
- num35,
- num36,
- num37,
- text4[n]
- });
- }
- }
- else
- {
- int num38 = System.Convert.ToInt32(list3[m].Substring(1, 2), 16);
- int num39 = System.Convert.ToInt32(list3[m].Substring(3, 2), 16);
- int num40 = System.Convert.ToInt32(list3[m].Substring(5, 2), 16);
- int num41 = 255;
- int num42 = 255;
- int num43 = 255;
- for (int num44 = 0; num44 < list4[m] - 1; num44++)
- {
- int num45 = list4[m] - 1;
- int num46 = num41 + (num38 - num41) / num45 * num44;
- int num47 = num42 + (num39 - num42) / num45 * num44;
- int num48 = num43 + (num40 - num43) / num45 * num44;
- text5 += string.Format("[{0:X2}{1:X2}{2:X2}]{3}", new object[]
- {
- num46,
- num47,
- num48,
- text4[num44]
- });
- }
- }
- }
- else
- {
- if (m != 0)
- {
- text5 += text4.Substring(list4[m - 1] - 1, list4[m] - list4[m - 1]);
- }
- else
- {
- text5 += text4.Substring(0, list4[m] - 1);
- }
- }
- }
- if (list3.Count == 0)
- {
- text5 = text4;
- }
- else
- {
- text5 += text4.Substring(list4[list3.Count - 1] - 1);
- }
- while (text5.IndexOf("[/", System.StringComparison.Ordinal) != -1)
- {
- text5 = text5.Remove(text5.IndexOf("[/", System.StringComparison.Ordinal), 9);
- }
- if (text.StartsWith("name"))
- {
- this.name = text5;
- }
- else
- {
- this.guildname = text5;
- }
- }
- }
- }
- this.kills = 0;
- this.die = 0;
- this.maxDamage = 0;
- this.totalDamage = 0;
- this.assistancePt = 0;
- this.dead = false;
- this.resourceId = "not choose";
- this.SET = false;
- this.totalKills = 0;
- this.totalDeaths = 0;
- this.totalKillsInOneLifeNormal = 0;
- this.totalKillsInOneLifeHard = 0;
- this.totalKillsInOneLifeAB = 0;
- this.airKills = 0;
- this.totalCrawlerKills = 0;
- this.totalJumperKills = 0;
- this.totalNonAIKills = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement