Exemple #1
0
    private void InitializeComponent()
    {
        moveOnResize = _form1.getMoveOverlay();

        this.panel1          = new System.Windows.Forms.Panel();
        panel1.Visible       = false;
        this.label13         = new System.Windows.Forms.Label();
        this.label14         = new System.Windows.Forms.Label();
        this.label15         = new System.Windows.Forms.Label();
        this.label16         = new System.Windows.Forms.Label();
        this.label17         = new System.Windows.Forms.Label();
        this.label18         = new System.Windows.Forms.Label();
        this.label19         = new System.Windows.Forms.Label();
        this.label20         = new System.Windows.Forms.Label();
        this.label21         = new System.Windows.Forms.Label();
        this.label22         = new System.Windows.Forms.Label();
        this.label23         = new System.Windows.Forms.Label();
        this.label24         = new System.Windows.Forms.Label();
        this.panelConsole    = new System.Windows.Forms.Panel();
        panelConsole.Visible = false;
        this.textConsole     = new IOU_Helper.TextConsole(this, _form1);
        this.labelConsole    = new System.Windows.Forms.Label();
        this.labelHeader     = new System.Windows.Forms.Label();
        this.buttonClose     = new System.Windows.Forms.Button();
        this.label1          = new System.Windows.Forms.Label();
        this.label2          = new System.Windows.Forms.Label();
        this.panel1.SuspendLayout();
        this.panelConsole.SuspendLayout();
        this.SuspendLayout();
        //
        // panel1
        //
        this.panel1.BackColor   = _form1.getOverlayColor();
        this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        this.panel1.Controls.Add(this.label1);
        this.panel1.Controls.Add(this.label2);
        this.panel1.Controls.Add(this.label13);
        this.panel1.Controls.Add(this.label14);
        this.panel1.Controls.Add(this.label15);
        this.panel1.Controls.Add(this.label16);
        this.panel1.Controls.Add(this.label17);
        this.panel1.Controls.Add(this.label18);
        this.panel1.Controls.Add(this.label19);
        this.panel1.Controls.Add(this.label20);
        this.panel1.Controls.Add(this.label21);
        this.panel1.Controls.Add(this.label22);
        this.panel1.Controls.Add(this.label23);
        this.panel1.Controls.Add(this.label24);
        this.panel1.Location   = new System.Drawing.Point(88, 462);
        this.panel1.Name       = "panel1";
        this.panel1.Size       = new System.Drawing.Size(451, 325);
        this.panel1.TabIndex   = 2;
        this.panel1.Paint     += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
        this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
        this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
        //
        // label13
        //
        this.label13.AutoSize = true;
        this.label13.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label13.Location = new System.Drawing.Point(100, 114);
        this.label13.Name     = "label13";
        this.label13.Size     = new System.Drawing.Size(131, 38);
        this.label13.TabIndex = 23;
        this.label13.Text     = "unknown";
        //
        // label14
        //
        this.label14.AutoSize = true;
        this.label14.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label14.Location = new System.Drawing.Point(2, 114);
        this.label14.Name     = "label14";
        this.label14.Size     = new System.Drawing.Size(165, 38);
        this.label14.TabIndex = 22;
        this.label14.Text     = "Total kills, time :";
        //
        // label15
        //
        this.label15.AutoSize = true;
        this.label15.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label15.Location = new System.Drawing.Point(100, 96);
        this.label15.Name     = "label15";
        this.label15.Size     = new System.Drawing.Size(131, 38);
        this.label15.TabIndex = 21;
        this.label15.Text     = "unknown";
        //
        // label16
        //
        this.label16.AutoSize = true;
        this.label16.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label16.Location = new System.Drawing.Point(2, 96);
        this.label16.Name     = "label16";
        this.label16.Size     = new System.Drawing.Size(93, 38);
        this.label16.TabIndex = 20;
        if (_form1.getCardDropTime() == "Minute")
        {
            this.label16.Text = "Est cards/min :";
        }
        else if (_form1.getCardDropTime() == "Hour")
        {
            this.label16.Text = "Est cards/hour :";
        }
        else if (_form1.getCardDropTime() == "Day")
        {
            this.label16.Text = "Est cards/day :";
        }
        //
        // label17
        //
        this.label17.AutoSize = true;
        this.label17.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label17.Location = new System.Drawing.Point(100, 78);
        this.label17.Name     = "label17";
        this.label17.Size     = new System.Drawing.Size(131, 38);
        this.label17.TabIndex = 19;
        this.label17.Text     = "unknown";
        //
        // label18
        //
        this.label18.AutoSize = true;
        this.label18.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label18.Location = new System.Drawing.Point(2, 78);
        this.label18.Name     = "label18";
        this.label18.Size     = new System.Drawing.Size(195, 38);
        this.label18.TabIndex = 18;
        this.label18.Text     = "Avg KillTime/Spawn :";
        //
        // label19
        //
        this.label19.AutoSize = true;
        this.label19.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label19.Location = new System.Drawing.Point(100, 60);
        this.label19.Name     = "label19";
        this.label19.Size     = new System.Drawing.Size(131, 38);
        this.label19.TabIndex = 17;
        this.label19.Text     = "unknown";
        //
        // label20 - Party damage
        //
        this.label20.AutoSize = true;
        this.label20.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label20.Location = new System.Drawing.Point(2, 60);
        this.label20.Name     = "label20";
        this.label20.Size     = new System.Drawing.Size(179, 38);
        this.label20.TabIndex = 16;
        if (_form1.getUnitXPGold() == "Minute")
        {
            this.label20.Text = "Party dmg/min :";
            this.label22.Text = "Est G/min :";
            this.label24.Text = "Est XP/min :";
        }
        else if (_form1.getUnitXPGold() == "Hour")
        {
            this.label20.Text = "Party dmg/hour :";
            this.label22.Text = "Est G/hour :";
            this.label24.Text = "Est XP/hour :";
        }

        //
        // label21
        //
        this.label21.AutoSize = true;
        this.label21.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label21.Location = new System.Drawing.Point(100, 42);
        this.label21.Name     = "label21";
        this.label21.Size     = new System.Drawing.Size(131, 30);
        this.label21.TabIndex = 15;
        this.label21.Text     = "unknown";
        //
        // label22 - Gold
        //
        this.label22.AutoSize = true;
        this.label22.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label22.Location = new System.Drawing.Point(2, 42);
        this.label22.Name     = "label22";
        this.label22.Size     = new System.Drawing.Size(116, 38);
        this.label22.TabIndex = 14;
        //
        // label23
        //
        this.label23.AutoSize = true;
        this.label23.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label23.Location = new System.Drawing.Point(100, 24);
        this.label23.Name     = "label23";
        this.label23.Size     = new System.Drawing.Size(131, 38);
        this.label23.TabIndex = 13;
        this.label23.Text     = "unknown";
        //
        // label24 - XP
        //
        this.label24.AutoSize = true;
        this.label24.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label24.Location = new System.Drawing.Point(2, 24);
        this.label24.Name     = "label24";
        this.label24.Size     = new System.Drawing.Size(131, 38);
        this.label24.TabIndex = 12;
        //
        // label1
        //
        this.label1.AutoSize = true;
        this.label1.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label1.Location = new System.Drawing.Point(100, 6);
        this.label1.Name     = "label1";
        this.label1.Size     = new System.Drawing.Size(131, 38);
        this.label1.TabIndex = 25;
        this.label1.Text     = "unknown";
        //
        // label2
        //
        this.label2.AutoSize = true;
        this.label2.Font     = new System.Drawing.Font("Segoe UI", 8.1F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label2.Location = new System.Drawing.Point(2, 6);
        this.label2.Name     = "label2";
        this.label2.Size     = new System.Drawing.Size(131, 38);
        this.label2.TabIndex = 24;
        this.label2.Text     = "Filter By Mob :";
        //
        //
        // panelConsole
        //
        this.panelConsole.BackColor   = _form1.getOverlayColor();
        this.panelConsole.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
        this.panelConsole.Controls.Add(this.textConsole);
        this.panelConsole.Controls.Add(this.labelConsole);
        this.panelConsole.Location   = new System.Drawing.Point(88, 175);
        this.panelConsole.Name       = "panelConsole";
        this.panelConsole.Size       = new System.Drawing.Size(451, 233);
        this.panelConsole.TabIndex   = 3;
        this.panelConsole.Paint     += new System.Windows.Forms.PaintEventHandler(this.panelConsole_Paint);
        this.panelConsole.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panelConsole_MouseMove);
        //
        // textConsole
        //
        this.textConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                         | System.Windows.Forms.AnchorStyles.Left)
                                                                        | System.Windows.Forms.AnchorStyles.Right)));
        this.textConsole.Font         = new System.Drawing.Font("Segoe UI", 6.9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.textConsole.Location     = new System.Drawing.Point(3, 20);
        this.textConsole.Multiline    = true;
        this.textConsole.Name         = "textConsole";
        this.textConsole.Size         = new System.Drawing.Size(443, 208);
        this.textConsole.TabIndex     = 0;
        this.textConsole.TextChanged += new System.EventHandler(this.Plexiglass_Resize);
        //
        // labelConsole
        //
        this.labelConsole.AutoSize = true;
        this.labelConsole.Font     = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.labelConsole.Location = new System.Drawing.Point(60, 2);
        this.labelConsole.Name     = "labelConsole";
        this.labelConsole.Size     = new System.Drawing.Size(129, 41);
        this.labelConsole.TabIndex = 1;
        this.labelConsole.Text     = "Console";
        //
        // labelHeader
        //
        this.labelHeader.AutoSize = true;
        this.labelHeader.Font     = new System.Drawing.Font("Segoe UI", 20.1F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.labelHeader.Location = new System.Drawing.Point(158, 37);
        this.labelHeader.Name     = "labelHeader";
        this.labelHeader.Size     = new System.Drawing.Size(734, 91);
        this.labelHeader.TabIndex = 4;
        this.labelHeader.Text     = "Adjustable Panel Mode";
        this.labelHeader.Visible  = false;
        //
        // buttonClose
        //
        this.buttonClose.Location = new System.Drawing.Point(681, 775);
        this.buttonClose.Name     = "buttonClose";
        this.buttonClose.Size     = new System.Drawing.Size(350, 90);
        this.buttonClose.TabIndex = 5;
        this.buttonClose.Text     = "Close Adjustable Mode";
        this.buttonClose.UseVisualStyleBackColor = true;
        this.buttonClose.Visible    = false;
        this.buttonClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.buttonClose_MouseDown);
        // Plexiglass
        //
        this.ClientSize = new System.Drawing.Size(1058, 877);
        this.Controls.Add(this.buttonClose);
        this.Controls.Add(this.labelHeader);
        this.Controls.Add(this.panelConsole);
        this.Controls.Add(this.panel1);
        this.Name       = "Plexiglass";
        this.Load      += new System.EventHandler(this.Plexiglass_Load);
        this.ResizeEnd += new System.EventHandler(this.Plexiglass_ResizeEnd);
        this.panel1.ResumeLayout(false);
        this.panel1.PerformLayout();
        this.panelConsole.ResumeLayout(false);
        this.panelConsole.PerformLayout();
        this.ResumeLayout(false);
        this.PerformLayout();
    }
Exemple #2
0
        /// <summary>
        /// Updates spawn information
        /// </summary>
        public void updateSpawn()
        {
            ulong  pDamagePerMinute = 0;
            double ptotalTime       = 0;
            double averageTime      = 0;
            ulong  totalHP          = 0;
            ulong  pDamagePerSecond;
            int    sigFig       = _form1.getSigFigures();
            uint   mobFilter    = _form1.getMobFilter();
            string filterString = mobFilter.ToString();
            int    spawnCounter = 0;
            string cardDrop     = _form1.getCardDropTime();

            if (mobFilter == 0)
            {
                if (spawnList.Count != 0)
                {
                    foreach (Spawn s in spawnList)
                    {
                        ptotalTime = ptotalTime + s.getTime();
                        totalHP    = totalHP + s.getHp();
                    }
                    averageTime  = ptotalTime / spawnList.Count;
                    filterString = "None";
                }
                else
                {
                    _plexiglass.updateLabels(filterString, "0", "0", "0", "0", "0", "0, 0");
                    return;
                }
            }
            else
            {
                if (spawnList.Count != 0)
                {
                    foreach (Spawn s in spawnList)
                    {
                        if (mobFilter == s.getMobLevel())
                        {
                            ptotalTime = ptotalTime + s.getTime();
                            totalHP    = totalHP + s.getHp();
                            spawnCounter++;
                        }
                    }
                    averageTime = ptotalTime / spawnCounter;
                    pmobLevel   = mobFilter;
                    if (mobFilter > 250)
                    {
                        infernoLevel = Math.Floor((((double)mobFilter - 100) / 150));
                    }
                    if (spawnCounter == 0)
                    {
                        _plexiglass.updateLabels(filterString, "0", "0", "0", "0", "0", "0, 0");
                        return;
                    }
                }
                else
                {
                    _plexiglass.updateLabels(filterString, "0", "0", "0", "0", "0", "0, 0");
                    return;
                }
            }

            try
            {
                if (mobFilter == 0)
                {
                    pDamagePerSecond = ((ulong)totalHP / (ulong)spawnList.Count) / ((ulong)averageTime);
                }
                else
                {
                    pDamagePerSecond = ((ulong)totalHP / (ulong)spawnCounter) / ((ulong)averageTime);
                }

                if (_form1.getUnitXPGold() == "Minute")
                {
                    pDamagePerMinute = pDamagePerSecond * 60;
                }
                else if (_form1.getUnitXPGold() == "Hour")
                {
                    pDamagePerMinute = pDamagePerSecond * 3600;
                }

                //Convert to Million
                double pDamage = pDamagePerMinute;
                pDamage = pDamage / 1000000;

                //Kills per minute
                double kPerMin = (60 / averageTime);
                //Cards
                double estCards = 0;
                if (cardDrop == "Minute")
                {
                    estCards = ((1 + (infernoLevel / 2)) * kPerMin);
                }
                else if (cardDrop == "Hour")
                {
                    estCards = ((1 + (infernoLevel / 2)) * kPerMin) * 60;
                }
                else if (cardDrop == "Day")
                {
                    estCards = (((1 + (infernoLevel / 2)) * kPerMin) * 60) * 24;
                }
                estCards = estCards * 0.002;
                if (_form1.getDoubleCards() == true)
                {
                    estCards = estCards * 2;
                }

                //Round down to whatever significant figures
                //Math.Round(pDamage, sigFig);
                averageTime = Math.Round(averageTime, sigFig);
                estCards    = Math.Round(estCards, sigFig);
                pDamage     = Math.Round(pDamage, sigFig);
                ptotalTime  = Math.Round(ptotalTime, sigFig);

                string pDamageString = pDamage.ToString() + "M";
                string totalStats    = "";
                if (mobFilter == 0)
                {
                    totalStats = spawnList.Count.ToString() + ", " + ptotalTime.ToString() + "s";
                }
                else
                {
                    totalStats = spawnCounter + ", " + ptotalTime.ToString() + "s";
                }

                //Gold and XP calculations
                //BaseXP = MobLevel*(1+(MobLevel*0.003)) XP/Kill = Round((1+%XPBonus)*BaseXP*PartyModifier*(1+(infTier*0.003))*(1+Floor(infTier*0.001,1)*0.03))*(1+%XPOrb))
                int playerLevel = _form1.getPlayerLevel();
                //Otherwise will multiply negatively
                if (playerLevel < 200)
                {
                    playerLevel = 200;
                }
                int    xpOrb       = _form1.getXpOrb();
                int    goldOrb     = _form1.getGoldOrb();
                double partyBoost  = _form1.getPartyBoost();
                int    players     = _form1.getPlayers();
                double playerBonus = 1;
                int    globalXp    = _form1.getGlobalXp();
                int    globalGold  = _form1.getGlobalGold();
                if (players == 2)
                {
                    playerBonus = 0.7;
                }
                else if (players == 3)
                {
                    playerBonus = 0.5;
                }
                else if (players == 4)
                {
                    playerBonus = 0.4;
                }
                double partyModifier = (playerBonus) * (1 + partyBoost);
                double xpOrbBonus    = Math.Pow(xpOrb, 2) * 2;
                double goldOrbBonus  = Math.Pow(goldOrb, 2) * 2;
                xpOrbBonus   = xpOrbBonus / 100;
                goldOrbBonus = goldOrbBonus / 100;
                double xpBonus   = ((double)_form1.getXpAdd() * (1 + ((double)globalXp / 100))) / 100;
                double goldBonus = ((((double)_form1.getGoldAdd()) + (0.03 * (playerLevel - 200) + 0.25)) * (1 + ((double)globalGold / 100))) / 100;

                double baseXp    = pmobLevel * (1 + (pmobLevel * 0.003));
                double xpPerKill = Math.Round((1 + xpBonus) * baseXp * partyModifier * (1 + (infernoLevel * 0.003)) * (1 + Math.Floor(infernoLevel * 0.01) * 0.03)) * (1 + xpOrbBonus);

                double baseCoin  = Math.Pow(pmobLevel, (1.3 + 0.18));
                double coinValue = Math.Round((baseCoin * (1 + goldBonus) * partyModifier) * (1 + goldOrbBonus));
                if (players == 1)
                {
                    coinValue = coinValue * 1.5;
                }

                string unitXpGold = _form1.getUnitXPGold();
                double gold       = 0;
                double xp         = 0;

                if (unitXpGold == "Minute")
                {
                    //4.13 is average number of coins for max. - (1 - triplesize%) * (1 + coincount/2) + triplesize% * 3 *  (1 + coincount/2)
                    gold = kPerMin * (coinValue * 4.13);
                    xp   = (xpPerKill * kPerMin);
                }
                else if (unitXpGold == "Hour")
                {
                    gold = (kPerMin * (coinValue * 4.13)) * 60;
                    xp   = (xpPerKill * kPerMin) * 60;
                }

                gold = gold / 1000000;
                xp   = xp / 1000000;
                gold = Math.Round(gold, sigFig);
                xp   = Math.Round(xp, sigFig);

                string goldString = gold.ToString() + "M";
                string xpString   = xp.ToString() + "M";

                _plexiglass.updateLabels(filterString, xpString, goldString, pDamageString, averageTime.ToString() + "s", estCards.ToString(), totalStats);
            }
            catch
            {
            }
        }