Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void ParseData(string mMode, string mLine, Boolean Button)
- {
- Parsed = false;
- ChatMode = mMode;
- RawLine = Line = mLine;
- lType = "";
- tCaused = "";
- tAffected = "";
- tDefeats = "";
- tDefeated = "";
- tAbility = "";
- tMonster = "";
- tDirection = "";
- bodyPart = "";
- tDamage = "";
- damageType = "";
- food = "";
- gaveItem = "";
- tDrop = "";
- expType = "";
- expValue = "";
- expJob = "";
- rlaValue = "";
- rlaType = "";
- tRegimen = "";
- tStatus = "";
- tSRGainLose = "";
- switch (ChatMode)
- {
- #region " 0020 "
- case "0020":
- if (Line.IndexOf("You throw away") != -1)
- {
- lType = "Throw Away";
- break;
- }
- else if (Line.IndexOf("engaged") != -1 && Line.IndexOf("battle") == -1)
- {
- //mobx is engaged.
- //mobx has been engaged.
- lType = "Mob Engaged";
- if (Line.IndexOf(" has been engaged") != -1)
- {
- tMonster = Line.Substring(0, Line.IndexOf(" has"));
- }
- else if (Line.IndexOf(" is engaged") != -1)
- {
- tMonster = Line.Substring(0, Line.IndexOf(" is eng"));
- }
- else
- {
- break;
- }
- tMonster = tMonster.Replace("The ", "");
- }
- else if (Line.IndexOf("eats") != -1)
- {
- //playerx eats a foodx(,).
- lType = "You Eats";
- if (Line.Substring(0, 4) == "You ")
- {
- tCaused = You;
- Line = Line.Replace("You eat a ", "");
- if (Line.Contains(", "))
- {
- Line = Line.Substring(0, Line.IndexOf(", "));
- }
- else
- {
- Line = Line.Substring(0, Line.IndexOf("."));
- }
- food = Line;
- }
- else
- {
- lType = "Player Eats";
- tCaused = Line.Substring(0, Line.IndexOf(" eats"));
- Line = Regex.Replace(Line, "\\w+\\s\\w+\\seats\\sa\\s", "");
- if (Line.Contains(", "))
- {
- Line = Line.Substring(0, Line.IndexOf(", "));
- }
- else
- {
- Line = Line.Substring(0, Line.IndexOf("."));
- }
- food = Line;
- }
- }
- else if (Line.IndexOf("obtain") != -1)
- {
- if (Line.Contains("(")) { break; }
- //all party members obtain an x.
- //all party members obtain a x.
- //all party members obtain # x.
- //all party members obtain # gil.
- //you obtain an x.
- //you obtain x gil.
- //you obtain the x.
- if (Line.Substring(0, 4) == "You ")
- {
- lType = "You Obtain";
- tCaused = You;
- Line = Regex.Replace(Line, ".+obtain\\s[a-z]+\\s.+of\\s", "");
- Line = Regex.Replace(Line,".+obtain\\s[a-z]+\\s","");
- Line = Regex.Replace(Line, ".+obtain\\s", "");
- Line = Line.Replace(".", "");
- tDrop = Line;
- }
- else if (Line.Substring(0, 3) == "All")
- {
- lType = "Party Obtains";
- tCaused = "All";
- Line = Regex.Replace(Line, ".+obtain\\s[a-z]+\\s", "");
- Line = Regex.Replace(Line, ".+obtain\\s", "");
- Line = Line.Replace(".", "");
- tDrop = Line;
- }
- }
- else if (Line.IndexOf("loot list") != -1)
- {
- //playerx's loot list now contains a x.
- //playerx's loot list now contains an x.
- //your loot list now contains a x.
- //your loot list now contains an x.
- if (Line.IndexOf("Your ") != -1)
- {
- lType = "Your Loot";
- tCaused = You;
- Line = Regex.Replace(Line, ".+contains\\s[a-z]+\\s.+of\\s", "");
- Line = Regex.Replace(Line, ".+contains\\s[a-z]+\\s", "");
- Line = Regex.Replace(Line, ".+contains\\s", "");
- Line = Line.Replace(".", "");
- tDrop = Line;
- }
- else
- {
- lType = "Player Loot";
- tCaused = Line.Substring(0, Line.IndexOf("'s loot list"));
- Line = Regex.Replace(Line, ".+contains\\s[a-z]+\\s.+of\\s", "");
- Line = Regex.Replace(Line, ".+contains\\s[a-z]+\\s", "");
- Line = Regex.Replace(Line, ".+contains\\s", "");
- Line = Line.Replace(".", "");
- tDrop = Line;
- }
- }
- else if (Line.IndexOf("gives") != -1)
- {
- lType = "Player Gives";
- //playerx gives x to playery
- //playerx gives x to you.
- tCaused = Line.Substring(0, Line.IndexOf(" gives"));
- tAffected = Line.Substring(Line.IndexOf(" to ") + 4).Replace(".", "");
- gaveItem = Line.Substring(Line.IndexOf("gives ") + 6);
- gaveItem = gaveItem.Substring(0, gaveItem.IndexOf(" to "));
- gaveItem = gaveItem.Replace("the ", "");
- }
- else
- {
- break;
- }
- //outParse();
- Parsed = true;
- break;
- #endregion
- #region " 0043 "
- case "0043":
- //you gain x experience points.
- //you gain x jobx skill points.
- if (Line.IndexOf("gain") != -1)
- {
- lType = "You Gain";
- tCaused = You;
- Line = Line.Replace("You gain ", "");
- Line = Line.Replace(" points.", "");
- if (Line.IndexOf("skill") != -1)
- {
- Line = Line.Replace(" skill", "");
- string[] split = Line.Split(' ');
- expType = "Skill";
- expValue = split[0];
- expJob = split[1];
- }
- else if (Line.IndexOf("experience") != -1)
- {
- Line = Line.Replace(" experience", "");
- expType = "Physical";
- expValue = Line;
- }
- }
- else
- {
- break;
- }
- //outParse();
- Parsed = true;
- break;
- #endregion
- #region " 0045 "
- case "0045":
- //mobx defeats playerx.
- //mobx defeats you.
- //mobx is defeated.
- //mobx party is defeated.
- //playerx defeats mobx.
- if (Line.IndexOf("defeats you") != -1)
- {
- lType = "Defeat You";
- Line = Line.Replace(" defeats you.", "");
- Line = Line.Replace("The ", "");
- tDefeats = Line;
- tDefeated = You;
- }
- else if (Line.IndexOf("is defeated") != -1)
- {
- lType = "Mob Defeated";
- lType = "Defeated";
- Line = Line.Replace(" is defeated.", "");
- Line = Line.Replace("The ", "");
- tDefeated = Line;
- }
- else if (Line.IndexOf(" defeats ") != -1)
- {
- lType = "X Defeats X";
- Line = Line.Replace(" defeats ", "|");
- Line = Line.Replace("The ", "");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tDefeats = split[0];
- tDefeated = split[1];
- }
- else
- {
- break;
- }
- //outParse();
- Parsed = true;
- break;
- #endregion
- #region " 0050 "
- case "0050":
- tCaused = You;
- if (Line.Contains("Critical!"))
- {
- //Critical! Your abilityx hits mobx from the dirx(rear, right, left) for x points of damage.
- //Critical! Your abilityx hits mobx for x points of damage.
- //Critical! Your abilityx hits mobx's partx for x points of damage.
- lType = "Critical Attack";
- Line = Line.Substring(10);
- damageType = "Critical";
- }
- if (Line.ToLower().Substring(0, 4) == "your")
- {
- if (damageType == "") { damageType = "Normal"; lType = "Normal Attack"; }
- //your spellx hits mobx for x points of damage.
- //your spellx hits mobx's partx for x points of damage.
- //your abilityx hits mobx from the dirx(rear,right,left) for x points of damage.
- //your abilityx hits mobx for x points of damage.
- //your abilityx hits mobx's partx for x points of damage.
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" hits ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(" for ", "|");
- Line = Line.Replace(" points of damage.", "");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDirection = split[2];
- tDamage = split[3];
- }
- else if (split.Length == 3)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDamage = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else if (Line.ToLower().Substring(0, 7) == "you use" && Line.Contains(" on "))
- {
- if (!Line.Contains("loses")) { break; }
- lType = "You Use. Mob Loses X";
- tCaused = You;
- //you use spellx on mobx. mobx loses x MP.
- //you use spellx on mobx. mobx loses x TP.
- //you use spellx on mobx. mobx loses x HP.
- Line = Line.Replace("You use ", "");
- tAbility = Line.Substring(0, Line.IndexOf(" on "));
- Line = Line.Substring(Line.IndexOf(" on ") + 4);
- tMonster = Line.Substring(0, Line.IndexOf("."));
- Line = Line.Substring(Line.IndexOf(" loses ") + 7);
- Line = Line.Replace(".", "");
- split = Line.Split(' ');
- rlaValue = split[0];
- rlaType = "Loses " + split[1];
- }
- else if (Line.Contains("resists"))
- {
- lType = "Mob Resists Your X";
- //mobx partially resists your spellx, taking x points of damage.
- //mobx resists your spellx.
- if (Line.Contains("partially"))
- {
- lType = "Partial Resist";
- tMonster = Line.Substring(0, Line.IndexOf(" partially"));
- Line = Line.Substring(Line.IndexOf(" your ") + 5);
- tAbility = Line.Substring(0, Line.IndexOf(","));
- Line = Line.Substring(Line.IndexOf(", ") + 2);
- Line = Line.Replace("taking ", "");
- Line = Line.Replace(" points of damage.", "");
- tDamage = Line;
- }
- else
- {
- tMonster = Line.Substring(0, Line.IndexOf(" resists"));
- Line = Line.Substring(Line.IndexOf(" your ") + 5);
- tAbility = Line.Replace(".", "");
- tDamage = "0";
- }
- }
- else
- {
- break;
- }
- //outParse();
- Parsed = true;
- break;
- #endregion
- #region " 0051 "
- case "0051":
- tCaused = You;
- if (Line.Contains("Critical!"))
- {
- //Critical! mobx's ability/spellx hits you for x points of damage.
- //Critical! mobx's ability/spellx hits you from the dirx(rear,right,left) for x points of damage.
- lType = "Mob Critical Attack";
- Line = Line.Substring(10);
- damageType = "Critical";
- }
- if (Line.Contains("Counter!"))
- {
- //Counter! you hit mobx for x points of damage.
- lType = "You Counter Mob";
- Line = Line.Substring(9);
- damageType = "Counter";
- Line = Line.Replace("You hit ", "");
- tMonster = Line.Substring(0, Line.IndexOf(" for "));
- Line = Line.Substring(Line.IndexOf(" for ") + 5);
- Line = Line.Replace(" points of damage.", "");
- tDamage = Line;
- }
- else if (Line.Contains(" hits you ") && Line.Contains("points of damage"))
- {
- //mobx's ability/spellx hits you for x points of damage.
- //mobx's ability/spellx hits you from the dirx(rear,right,left) for x points of damage.
- if (damageType == "") { damageType = "Normal"; lType = "Mob Normal Attack"; }
- Line = Line.Replace(" hits you for ", "|");
- Line = Line.Replace(" hits you from the ", "|");
- Line = Line.Replace(" for ", "|");
- Line = Line.Replace(" points of damage.", "");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDirection = split[2];
- tDamage = split[3];
- }
- else if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDamage = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else if (Line.Contains("resist"))
- {
- //you partially resist mobx's spellx, taking x points of damage.
- lType = "You Resist X";
- if (Line.Contains("partially"))
- {
- lType = "Partial Resist";
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace("You partially resist ", "");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- tMonster = split[0];
- tAbility = split[1];
- }
- else
- {
- //you resist mobx's spellx.
- Line = Line.Replace("You resist ", "");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tMonster = split[0];
- tAbility = split[1];
- tDamage = "0";
- }
- }
- else if (Line.Contains("parry") && Line.Contains("points of damage"))
- {
- lType = "You Parry X";
- if (Line.IndexOf("partially") != -1)
- {
- lType = "Partial Parry";
- //you partially parry mobx ability/spellx, taking x points of damage.
- //you partially parry mobx ability/spellx from the dirx(rear, right, left), taking x points of damage.
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace("You partially parry ", "");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tMonster = split[0];
- tAbility = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- //you parry mobx's ability/spellx, taking x points of damage.
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace("You parry ", "");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tMonster = split[0];
- tAbility = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- }
- else if (Line.Contains("block") && Line.Contains("points of damage"))
- {
- lType = "You Block X";
- if (Line.IndexOf("partially") != -1)
- {
- lType = "Partial Block";
- //you partially block mobx's ability/spellx, taking x points of damage.
- //you partially block mobx's ability/spellx from the dirx(rear, right, left), taking x points of damage.
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace("You partially block ", "");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tMonster = split[0];
- tAbility = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- //you block mobx's ability/spellx, taking x points of damage.
- //you block mobx's ability/spellx from the dirx(rear, right, left), taking x points of damage.
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace("You block ", "");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tMonster = split[0];
- tAbility = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0052 "
- case "0052":
- //playerx stacks ability/spellx against mobx.
- //mobx's partx is incapacitated.
- //playerx nocks an arrow.
- if (Line.Contains("Critical!"))
- {
- //Critical! playerx's ability/spellx hits mobx from the dirx(rear,right,left) for x points of damage.
- //Critical! playerx's ability/spellx hits mobx for x points of damage.
- //Critical! playerx's ability/spellx hits mobx's partx for x points of damage.
- lType = "Player Critical Attack";
- Line = Line.Substring(10);
- damageType = "Critical";
- }
- if (Line.Contains(" hits ") && Line.Contains(" for ") && Line.Contains(" points of damage."))
- {
- if (damageType == "") { damageType = "Normal"; lType = "Player Normal Attack"; }
- //playerx's ability/spellx hits mobx from the dirx(rear,right,left) for x points of damage.
- //playerx's ability/spellx hits mobx for x points of damage.
- //playerx's ability/spellx hits mobx's partx for x points of damage.
- tCaused = Line.Substring(0, Line.IndexOf("'s "));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" hits ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(" for ", "|");
- Line = Line.Replace(" points of damage.", "");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDirection = split[2];
- tDamage = split[3];
- }
- else if (split.Length == 3)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDamage = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else if (Line.Contains(" uses ") && Line.Contains(" on "))
- {
- if (!Line.Contains("loses")) { break; }
- lType = "Player Use. Mob Loses X";
- //playerx uses spellx on mobx. mobx loses x MP.
- //playerx uses spellx on mobx. mobx loses x TP.
- //playerx uses spellx on mobx. mobx loses x HP.
- tCaused = Line.Substring(0, Line.IndexOf(" uses"));
- Line = Line.Substring(Line.IndexOf(" uses ") + 6);
- tAbility = Line.Substring(0, Line.IndexOf(" on "));
- Line = Line.Substring(Line.IndexOf(" on ") + 4);
- tMonster = Line.Substring(0, Line.IndexOf("."));
- Line = Line.Substring(Line.IndexOf(" loses ") + 7);
- Line = Line.Replace(".", "");
- split = Line.Split(' ');
- rlaValue = split[0];
- rlaType = "Loses " + split[1];
- }
- else if (Line.Contains("resists"))
- {
- lType = "Mob Resist X";
- //mobx partially resists playerx's spellx, taking x points of damage.
- //mobx resists playerx's spellx, taking x points of damage.
- if (Line.Contains("points of damage"))
- {
- if (Line.Contains("partially")) { lType = "Partial Resist"; }
- Line = Line.Replace("partially ", "");
- tMonster = Line.Substring(0, Line.IndexOf(" resists"));
- Line = Line.Substring(Line.IndexOf(" resists ") + 9);
- tCaused = Line.Substring(0, Line.IndexOf("'s "));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- tAbility = Line.Substring(0, Line.IndexOf(","));
- Line = Line.Substring(Line.IndexOf(", ") + 2);
- Line = Line.Replace("taking ", "");
- Line = Line.Replace(" points of damage.", "");
- tDamage = Line;
- }
- else
- {
- //mobx resists playerx's spellx.
- tMonster = Line.Substring(0, Line.IndexOf(" resists"));
- Line = Line.Substring(Line.IndexOf("resists ") + 8);
- Line = Line.Replace("'s ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tCaused = split[0];
- tAbility = split[1];
- tDamage = "0";
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0053 "
- case "0053":
- if (Line.Contains("Critical!"))
- {
- //Critical! mobx's ability/spellx hits playerx for x points of damage.
- //Critical! mobx's ability/spellx hits playerx from the dirx(rear,right,left) for x points of damage.
- lType = "Mob Critical Attack";
- Line = Line.Substring(10);
- damageType = "Critical";
- }
- if (Line.Contains("Counter!"))
- {
- //Counter! playerx hits mobx for x points of damage.
- lType = "Player Counter";
- Line = Line.Substring(9);
- damageType = "Counter";
- tCaused = Line.Substring(0, Line.IndexOf(" hits"));
- Line = Line.Substring(Line.IndexOf(" hits ") + 6);
- tMonster = Line.Substring(0, Line.IndexOf(" for "));
- Line = Line.Substring(Line.IndexOf(" for ") + 5);
- Line = Line.Replace(" points of damage.", "");
- tDamage = Line;
- }
- else if (Line.Contains(" hits ") && Line.Contains("points of damage"))
- {
- //mobx's ability/spellx hits playerx for x points of damage.
- //mobx's ability/spellx hits playerx from the dirx(rear,right,left) for x points of damage.
- if (damageType == "") { damageType = "Normal"; lType = "Mob Normal Attack"; }
- Line = Line.Replace(" for ", "|");
- Line = Line.Replace(" hits ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(" points of damage.", "");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 5)
- {
- tMonster = split[0];
- tAbility = split[1];
- tAffected = split[2];
- tDirection = split[3];
- tDamage = split[4];
- }
- else if (split.Length == 4)
- {
- tMonster = split[0];
- tAbility = split[1];
- tAffected = split[2];
- tDamage = split[3];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else if (Line.Contains("resist"))
- {
- //playerx partially resists mobx spellx, taking x points of damage.
- lType = "Player Resist X";
- if (Line.Contains("points of damage"))
- {
- if (Line.Contains("partially")) { lType = "Partial Resist"; }
- Line = Line.Replace("partially ", "");
- tAffected = Line.Substring(0, Line.IndexOf(" resists"));
- Line = Line.Substring(Line.IndexOf(" resists ") + 9);
- tMonster = Line.Substring(0, Line.LastIndexOf("'s "));
- Line = Line.Substring(Line.LastIndexOf("'s ") + 3);
- tAbility = Line.Substring(0, Line.IndexOf(","));
- Line = Line.Substring(Line.IndexOf(", ") + 2);
- Line = Line.Replace("taking ", "");
- Line = Line.Replace(" points of damage.", "");
- tDamage = Line;
- }
- else
- {
- //playerx resists mobx spellx.
- tAffected = Line.Substring(0, Line.IndexOf(" resists"));
- Line = Line.Substring(Line.IndexOf("resists ") + 8);
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- tMonster = split[0];
- tAbility = split[1];
- tDamage = "0";
- }
- }
- else if (Line.Contains("parries"))
- {
- lType = "Player Parries X";
- //playerx partially parries mobx ability/spellx, taking x points of damage.
- //playerx partially parries mobx ability/spellx from the dirx(rear, right, left), taking x points of damage.
- //playerx parries mobx's ability/spellx, taking x points of damage.
- if (Line.Contains("points of damage"))
- {
- if (Line.Contains("partially")) { lType = "Partial Parry"; }
- Line = Line.Replace("partially ", "");
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace(" parries ", "|");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- tDirection = split[3];
- }
- else if (split.Length == 3)
- {
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- //playerx parries mobx's ability/spellx.
- Line = Line.Replace(" parries ", "|");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- tDamage = "0";
- }
- }
- else if (Line.Contains("blocks") && Line.Contains("points of damage"))
- {
- lType = "Player Blocks X";
- //playerx blocks mobx's ability/spellx, taking x points of damage.
- //playerx blocks mobx's ability/spellx from the dirx(rear, right, left), taking x points of damage.
- //playerx partially blocks mobx's ability/spellx, taking x points of damage.
- //playerx partially blocks mobx's ability/spellx from the dirx(rear, right, left), taking x points of damage.
- if (Line.Contains("points of damage"))
- {
- if (Line.Contains("partially")) { lType = "Partial Block"; }
- Line = Line.Replace("partially ", "");
- Line = Line.Replace(" points of damage.", "");
- Line = Line.Replace(" blocks ", "|");
- Line = Line.Replace(" from the ", "|");
- tDamage = Line.Substring(Line.IndexOf("taking ") + 7);
- Line = Line.Substring(0, Line.IndexOf(","));
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- tDirection = split[3];
- }
- else if (split.Length == 3)
- {
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- //playerx blocks mobx's ability/spellx.
- //playerx blocks mobx's ability/spellx from the dirx(rear, right, left).
- Line = Line.Replace(" blocks ", "|");
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- tDamage = "0";
- }
- }
- else
- {
- break;
- }
- //outParse();
- Parsed = true;
- break;
- #endregion
- #region " 0056 "
- case "0056":
- //mobx evades your ability/spellx.
- tCaused = You;
- if (Line.IndexOf("evades") != -1)
- {
- lType = "Mob Evades Your X";
- Line = Line.Replace(" evades your ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tMonster = split[0];
- tAbility = split[1];
- }
- else if (Line.IndexOf("misses") != -1)
- {
- lType = "Your X Misses Mob";
- //your ability/spellx misses mobx from the dirx(rear, right left).
- //your ability/spellx misses mobx.
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" misses ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tAbility = split[0];
- tMonster = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0058 "
- case "0058":
- //mobx evades playerx's ability/spellx.
- if (Line.IndexOf("evades") != -1)
- {
- lType = "Mob Evades Players X";
- Line = Line.Replace(" evades ", "|");
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tMonster = split[0];
- tCaused = split[1];
- tAbility = split[2];
- }
- else if (Line.IndexOf("misses") != -1)
- {
- lType = "Players X Misses Mob";
- //playerx's ability/spellx misses mobx from the dirx(rear,right,left).
- //playerx's ability/spellx misses mobx.
- tCaused = Line.Substring(0, Line.IndexOf("'s "));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" misses ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tMonster = split[1];
- tDirection = split[2];
- }
- else if (split.Length == 2)
- {
- tAbility = split[0];
- tMonster = split[1];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0059 "
- case "0059":
- //playerx evades mobx's ability/spellx.
- if (Line.IndexOf("evades") != -1)
- {
- lType = "Player Evades Mobs X";
- Line = Line.Replace(" evades ", "|");
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- tAffected = split[0];
- tMonster = split[1];
- tAbility = split[2];
- }
- else if (Line.IndexOf("misses") != -1)
- {
- lType = "Mobs X Misses Player";
- //mobx's ability/spellx misses playerx.
- //mobx's ability/spellx misses playerx from the dirx(rear, right, left).
- index = Line.IndexOf("'s ");
- if (index != Line.LastIndexOf("'s "))
- {
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- }
- else
- {
- Line = Line.Replace("'s ", "|");
- }
- Line = Line.Replace(" misses ", "|");
- Line = Line.Replace(" from the ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tMonster = split[0];
- tAbility = split[1];
- tAffected = split[2];
- tDirection = split[3];
- }
- else if (split.Length == 3)
- {
- tMonster = split[0];
- tAbility = split[1];
- tAffected = split[2];
- }
- else
- {
- break;
- }
- if (!defDirection.Contains(tDirection))
- {
- bodyPart = tDirection;
- tDirection = "";
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 005C "
- case "005C":
- tAffected = You;
- if (Line.Contains("absorb"))
- {
- lType = "You Absorb X from Mob";
- //you absorb x statx from mobx.
- Line = Line.Replace("You absorb ", "");
- index = Line.IndexOf(" ");
- Line = Line.Remove(index, 1).Insert(index, "|");
- Line = Line.Replace(" from ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- rlaValue = split[0];
- rlaType = "Absorb " + split[1];
- tMonster = split[2];
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("recovers "))
- {
- lType = "You Use X. Player Recovers X";
- //you use ability/spellx on playerx. playerx recovers x HP.
- //you use ability/spellx on playerx. playerx recovers x TP.
- //you use ability/spellx on playerx. playerx recovers x MP.
- Line = Line.Replace("You use ", "");
- Line = Line.Replace(" on ", "|");
- Line = Regex.Replace(Line, "\\..+recovers\\s", "|");
- index = Line.LastIndexOf(" ");
- Line = Line.Remove(index, 1).Insert(index, "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tCaused = You;
- tAbility = split[0];
- tAffected = split[1];
- rlaValue = split[2];
- rlaType = "Recovers " + split[3];
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("recover "))
- {
- lType = "You use X. You Recover X";
- //you use ability/spellx. You recover x HP.
- //you use ability/spellx. You recover x TP.
- //you use ability/spellx. You recover x MP.
- Line = Line.Replace("You use ", "");
- tAbility = Line.Substring(0, Line.IndexOf("."));
- Line = Line.Substring(Line.IndexOf(".") + 2);
- Line = Line.Replace("You recover ", "");
- Line = Line.Replace(".", "");
- split = Line.Split(' ');
- tCaused = You;
- rlaValue = split[0];
- rlaType = "Recover " + split[1];
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 005D "
- case "005D":
- //playerx uses ability/spellx. you recover x HP.
- //playerx uses ability/spellx. you recover x TP.
- //playerx uses ability/spellx. you recover x MP.
- lType = "Player Use X. You Recover X";
- if (Line.Contains(" recover "))
- {
- Line = Line.Replace(" uses ", "|");
- Line = Line.Replace(". You recover ", "|");
- index = Line.LastIndexOf(" ");
- Line = Line.Remove(index, 1).Insert(index, "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tCaused = split[0];
- tAbility = split[1];
- tAffected = You;
- rlaValue = split[2];
- rlaType = "Recover " + split[3];
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 005E "
- case "005E":
- //playerx uses ability/spellx on playery. playery recovers x HP.
- //playerx uses ability/spellx on playery. playery recovers x TP.
- //playerx uses ability/spellx on playery. playery recovers x MP.
- lType = "Player Use X. Player Recover X";
- if (Line.Contains(" recovers "))
- {
- Line = Line.Replace(" uses ", "|");
- Line = Line.Replace(" on ", "|");
- Line = Regex.Replace(Line, "\\..+recovers\\s", "|");
- index = Line.LastIndexOf(" ");
- Line = Line.Remove(index, 1).Insert(index, "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 5)
- {
- tCaused = split[0];
- tAbility = split[1];
- tAffected = split[2];
- rlaValue = split[3];
- rlaType = "Recover " + split[4];
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 005F "
- case "005F":
- if (Line.Contains("heals"))
- {
- //mobx's ability/spellx heals playerx for x HP.
- lType = "Mobs X Heals Player For X";
- index = Line.LastIndexOf("'s ");
- Line = Line.Remove(index, 3).Insert(index, "|");
- Line = Line.Replace(" heals ", "|");
- Line = Line.Replace(" for ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 4)
- {
- tMonster = split[0];
- tAbility = split[1];
- tAffected = split[2];
- split = split[3].Split(' ');
- rlaValue = split[0];
- rlaType = "Heals " + split[1];
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("absorbs"))
- {
- //mobx absorbs x HP from playerx.
- //mobx absorbs x TP from playerx.
- //mobx absorbs x MP from playerx.
- lType = "Mob Absorbs X From Player";
- Line = Line.Replace(" absorbs ", "|");
- Line = Line.Replace(" from ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tMonster = split[0];
- tAffected = split[2];
- split = split[1].Split(' ');
- rlaValue = split[0];
- rlaType = "Absorbs " + split[1];
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("regains"))
- {
- //mobx regains x MP.
- lType = "Mob Regains X Stat";
- Line = Line.Replace(".", "");
- Line = Line.Replace(" regains ", "|");
- split = Line.Split('|');
- if (split.Length == 2)
- {
- tMonster = split[0];
- split = split[1].Split(' ');
- rlaValue = split[0];
- rlaType = "Regains " + split[1];
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0062 "
- case "0062":
- if (Line.Contains("You are no longer") && Line.Contains("effect"))
- {
- //you are no longer under the effect of ability/spellx. (cast on self)
- lType = "Self Cast Loss";
- Line = Line.Replace("You are no longer under the effect of ", "");
- Line = Line.Replace(".", "");
- tAffected = You;
- tStatus = Line;
- tSRGainLose = "Loss";
- }
- else if (Line.Contains("You are no longer"))
- {
- //you are no longer under the effect of ability/spellx. (cast on self)
- lType = "Self Cast Loss";
- Line = Line.Replace("You are no longer ", "");
- Line = Line.Replace(".", "");
- tAffected = You;
- tStatus = Line;
- tSRGainLose = "Loss";
- }
- else if (Line.Contains("grants you"))
- {
- //your ability/spellx grants you the effect of ability/spellx.
- lType = "Your X Grants You Effect Of X";
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" grants you the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 2)
- {
- tCaused = You;
- tAffected = You;
- tAbility = split[0];
- tStatus = split[1];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("grants"))
- {
- //your ability/spellx grants playerx the effect of ability/spellx.
- lType = "Your X Grants Player Effect Of X";
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" grants ", "|");
- Line = Line.Replace(" the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tCaused = You;
- tAffected = split[1];
- tStatus = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("inflicts") && Line.Contains("Regimen"))
- {
- //your ability/spellx inflicts mobx with the effect of regimenx.
- lType = "Your X Inflicts Mob With Effect Of Regimen X";
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" inflicts ", "|");
- Line = Line.Replace(" with the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tCaused = You;
- tAffected = split[1];
- tRegimen = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("inflicts") && !Line.Contains("Regimen"))
- {
- //your ability/spellx inflicts mobx with the effect of regimenx.
- lType = "Your X Inflicts Mob With Effect Of X";
- Line = Line.Replace("Your ", "");
- Line = Line.Replace(" inflicts ", "|");
- Line = Line.Replace(" with the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tCaused = You;
- tAffected = split[1];
- tStatus = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0063 "
- case "0063":
- //you are no longer under the effect of ability/spellx. (cast by otheres on you)
- if (Line.Contains("You are no longer"))
- {
- //you are no longer under the effect of ability/spellx. (cast on self)
- lType = "Player Cast Loss";
- Line = Line.Replace("You are no longer under the effect of ", "");
- Line = Line.Replace(".", "");
- tAffected = You;
- tStatus = Line;
- tSRGainLose = "Loss";
- }
- else if (Line.Contains("grants you"))
- {
- //playerx's ability/spellx grants you the effect of ability/spellx.
- lType = "Players X Grants You Effect Of X";
- tCaused = Line.Substring(0, Line.IndexOf("'s"));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" grants you the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 2)
- {
- tAffected = You;
- tAbility = split[0];
- tStatus = split[1];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0064 "
- case "0064":
- //playerx is no longer under the effect of ability/spellx.
- if (Line.Contains("is no longer under"))
- {
- lType = "Player Loses Effect";
- Line = Line.Replace(" is no longer under the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 2)
- {
- tAffected = split[0];
- tStatus = split[1];
- tSRGainLose = "Loss";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("grants"))
- {
- //playerx's ability/spellx grants playery the effect of ability/spellx.
- lType = "Players X Grants Player Effect Of X";
- tCaused = Line.Substring(0, Line.IndexOf("'s"));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" grants ", "|");
- Line = Line.Replace(" the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tAffected = split[1];
- tStatus = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("inflicts") && Line.Contains("Regimen"))
- {
- //playerx's ability/spellx inflicts mobx with the effect of regimenx.
- lType = "Players X Inflicts Mob With Effect Of Regimen X";
- tCaused = Line.Substring(0, Line.IndexOf("'s"));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" inflicts ", "|");
- Line = Line.Replace(" with the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tAffected = split[1];
- tRegimen = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else if (Line.Contains("inflicts") && !Line.Contains("Regimen"))
- {
- //playerx's ability/spellx inflicts mobx with the effect of regimenx.
- lType = "Players X Inflicts Mob With Effect Of X";
- tCaused = Line.Substring(0, Line.IndexOf("'s"));
- Line = Line.Substring(Line.IndexOf("'s ") + 3);
- Line = Line.Replace(" inflicts ", "|");
- Line = Line.Replace(" with the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 3)
- {
- tAbility = split[0];
- tAffected = split[1];
- tStatus = split[2];
- tSRGainLose = "Gain";
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " 0065 "
- case "0065":
- //playerx is no longer under the effect of ability/spellx.
- if (Line.Contains("is no longer under"))
- {
- lType = "Player Loses Effect";
- Line = Line.Replace(" is no longer under the effect of ", "|");
- Line = Line.Replace(".", "");
- split = Line.Split('|');
- if (split.Length == 2)
- {
- tAffected = split[0];
- tStatus = split[1];
- tSRGainLose = "Loss";
- }
- else
- {
- break;
- }
- }
- else
- {
- break;
- }
- Parsed = true;
- break;
- #endregion
- #region " TEST "
- case "0000":
- guiLog.AppendText(Line + "\n");
- break;
- #endregion
- default:
- break;
- }
- if (Parsed)
- {
- lType = textInfo.ToTitleCase(lType);
- tCaused = textInfo.ToTitleCase(tCaused);
- tAffected = textInfo.ToTitleCase(tAffected);
- tDefeats = textInfo.ToTitleCase(tDefeats);
- tDefeated = textInfo.ToTitleCase(tDefeated);
- tAbility = textInfo.ToTitleCase(tAbility);
- tMonster = textInfo.ToTitleCase(tMonster);
- tDirection = textInfo.ToTitleCase(tDirection);
- bodyPart = textInfo.ToTitleCase(bodyPart);
- tDamage = textInfo.ToTitleCase(tDamage);
- damageType = textInfo.ToTitleCase(damageType);
- food = textInfo.ToTitleCase(food);
- gaveItem = textInfo.ToTitleCase(gaveItem);
- tDrop = textInfo.ToTitleCase(tDrop);
- expType = textInfo.ToTitleCase(expType);
- expValue = textInfo.ToTitleCase(expValue);
- expJob = textInfo.ToTitleCase(expJob);
- rlaValue = textInfo.ToTitleCase(rlaValue);
- rlaType = textInfo.ToTitleCase(rlaType);
- tRegimen = textInfo.ToTitleCase(tRegimen);
- tStatus = textInfo.ToTitleCase(tStatus);
- tSRGainLose = textInfo.ToTitleCase(tSRGainLose);
- if (tMonster.Length > 2)
- {
- if (tMonster.ToLower().Substring(0, 3) == "the")
- {
- tMonster = tMonster.Substring(4);
- }
- }
- if (tDefeats.Length > 2)
- {
- if (tDefeats.ToLower().Substring(0, 3) == "the")
- {
- tDefeats = tDefeats.Substring(4);
- }
- }
- if (tDefeated.Length > 2)
- {
- if (tDefeated.ToLower().Substring(0, 3) == "the")
- {
- tDefeated = tDefeated.Substring(4);
- }
- }
- if (Button)
- {
- file.WriteLine(RawLine + "\t" + ChatMode + "\t" + lType + "\t" + tCaused + "\t" + tAffected + "\t" + tDefeats + "\t" + tDefeated + "\t" + tAbility + "\t" + tMonster + "\t" + tDirection + "\t" + bodyPart + "\t" + tDamage + "\t" + damageType + "\t" + gaveItem + "\t" + tDrop + "\t" + expType + "\t" + expValue + "\t" + expJob + "\t" + rlaValue + "\t" + rlaType + "\t" + tRegimen + "\t" + tStatus + "\t" + tSRGainLose);
- }
- else
- {
- using (StreamWriter w = File.AppendText(fName))
- {
- Log(RawLine + "\t" + ChatMode + "\t" + lType + "\t" + tCaused + "\t" + tAffected + "\t" + tDefeats + "\t" + tDefeated + "\t" + tAbility + "\t" + tMonster + "\t" + tDirection + "\t" + bodyPart + "\t" + tDamage + "\t" + damageType + "\t" + gaveItem + "\t" + tDrop + "\t" + expType + "\t" + expValue + "\t" + expJob + "\t" + rlaValue + "\t" + rlaType + "\t" + tRegimen + "\t" + tStatus + "\t" + tSRGainLose, w);
- w.Close();
- }
- }
- }
- else
- {
- if (Button)
- {
- file2.WriteLine("RawLine:[" + RawLine + "]\tCM:[" + ChatMode + "]");
- }
- else
- {
- using (StreamWriter w = File.AppendText(fName2))
- {
- Log("CM:[" + ChatMode + "]\tRaw:[" + RawLine, w);
- w.Close();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement