All pastes #38523 Raw Edit

Unnamed

public text v1 · immutable
#38523 ·published 2006-01-25 16:06 UTC
rendered paste body
            Regex ItemsPosted = new Regex("<a href=\"itemref://([0-9]{6})/([0-9]{6})/([0-9]{1,3})\">([^<]+)</[^<]+>");
            MatchCollection matches = ItemsPosted.Matches(PostedString);
            String ReturnString = "";
            if (matches.Count <  1 && Complain == true)
            {
                ReturnString = "You have to post something to analyze.";
            }
            else
            {
                RichTextWindow replyWindow = new RichTextWindow(this.Bot);
                replyWindow.AppendTitle("Alien Invasion - Clump");

                foreach (Match match in matches)
                {
                    int ql = Convert.ToInt16(match.Groups[3].Value);
                    int id = Convert.ToInt16(match.Groups[1].Value);
                    string name = match.Groups[4].Value;
                    if (this.Clumps.ContainsKey(id))
                    {
                        replyWindow.AppendHighlight("QL " + ql + " | " + Clumps[id].Clump);
                        foreach (AIWeapon weapon in this.Clumps[id].Weapons)
                        {
                            double hql = (ql * 0.9);
                            if (hql >= weapon.LowQL && hql <= weapon.HighQL)
                            {
                                replyWindow.AppendLineBreak(1, true);
                                replyWindow.AppendNormal("      " + weapon.LowQL + " | " + weapon.HighQL + " | " + weapon.Name);
                            }
                        }
                        replyWindow.AppendLineBreak(1, false);
                    }
                    else if (name == "Solid Clump of Kyr'Ozch Bio-Material")
                    {
                        replyWindow.AppendLineBreak(1, true);
                        replyWindow.AppendHighlight("This Clump is unknown.");
                    }
                    else
                    {
                        replyWindow.AppendLineBreak(1, true);
                        replyWindow.AppendHighlight("This is not a Clump.");
                    }

                }
                ReturnString = replyWindow.ToString("Click here");
            }
            return ReturnString;