public TurboSlotsStatGump(Mobile from, ArrayList t) : base(25, 25) { m_SlotArray = t; string text = null; int starty = 40; Closable = true; Disposable = true; Dragable = true; Resizable = false; AddPage(0); AddBackground(0, 0, 530, 325, 5170); if (from.AccessLevel >= AccessLevel.GameMaster && m_SlotArray != null && m_SlotArray.Count > 0) { AddButton(478, 30, 0xFAB, 0xFAD, 100, GumpButtonType.Reply, 0); } AddLabel(165, 3, 55, "Top Ten Recent Jackpot Winners"); m_SlotArray.Sort(new ListAmountSorter()); AddLabel(55, 20, 1149, "Name"); AddLabel(235, 20, 1149, "Date"); AddLabel(390, 20, 1149, "Value/Gold"); AddImageTiled(40, 65, 450, 45, 0xBBC); AddImageTiled(40, 115, 450, 170, 9204); for (int i = 0; i < 10; i++) { text = String.Format("{0:##}.", i + 1); AddLabel(20, starty + i * 25, 1152, @text); } if (m_SlotArray != null && m_SlotArray.Count > 0) { int count = m_SlotArray.Count > 9 ? 10 : m_SlotArray.Count; for (int i = 0; i < count; i++) { if (m_SlotArray[i] == null || ((TurboSlot)m_SlotArray[i]).LastWonBy == null) { break; } else { TurboSlot ts = (TurboSlot)m_SlotArray[i]; text = String.Format("{0}", ts.LastWonBy.Name); AddLabel(45, starty, ts.Hue - 1, @text); text = String.Format("{0}", ts.LastWonByDate); AddLabel(175, starty, ts.Hue - 1, @text); text = String.Format("{0:##,###,##0}", ts.LastWonAmount); AddLabel(385, starty, ts.Hue - 1, @text); } starty += 25; } } }
public TurboSlotsAdminGump(Mobile from, ArrayList t, int page, bool sort, int sorttype) : base(192, 135) { m_SlotArray = t; m_page = page; m_sort = sort; m_sorttype = sorttype; int starty = 33; int slotHue = 0; string text = null; int[] buttonx = new int[] { 610, 70, 210, 290, 400, 510 }; string[] pstring = new string[] { "L", "N", "T", "E", "C", "R" }; decimal Collected = 0; decimal Won = 0; decimal WinningPercentage = 0; decimal NetProfit = 0; TurboSlot ts = null; int index = 0; Closable = true; Disposable = true; Dragable = true; Resizable = false; if (m_sort) { this.m_SlotArray.Sort(new SortArray(m_sorttype)); } AddPage(0); AddBackground(0, 0, 735, 410, 5120); AddBackground(10, 340, 683, 35, 5054); AddLabel(80, 11, 0x384, "Theme/Odds"); AddLabel(220, 11, 0x384, "Spins"); AddLabel(300, 11, 0x384, "Collected"); AddLabel(415, 11, 0x384, "Won"); AddLabel(520, 11, 0x384, "Net Profit"); AddLabel(620, 11, 0x384, "Payback %"); AddLabel(245, 380, 0x384, "Set all Active"); AddLabel(460, 380, 0x384, "Set all Inactive"); AddButton(210, 380, 0xFA8, 0xFAA, 1150, GumpButtonType.Reply, 0); //Active AddButton(425, 380, 0xFA2, 0xFA3, 1250, GumpButtonType.Reply, 0); //Set Active for (int i = 0; i < m_SlotArray.Count; i++) { ts = (TurboSlot)m_SlotArray[i]; Collected += ts.TotalCollected; Won += ts.TotalWon; } try { WinningPercentage = Won / Collected; } // Avoid Divide by Zero catch { WinningPercentage = 0; } for (int i = 0; i < 6; i++) { if (m_sorttype == i) { AddButton(buttonx[i], 3, 2224, 2224, 200 + i, GumpButtonType.Reply, 0); } else { AddButton(buttonx[i], 3, 2103, 2224, 200 + i, GumpButtonType.Reply, 0); } } if (m_page < 9) { AddButton(22, 5, 0x8B1 + m_page, 0x8B1 + m_page, 0, GumpButtonType.Page, 0); } else { AddLabel(26, 5, 1149, (m_page + 1).ToString()); } if ((m_page * 12) + 12 < m_SlotArray.Count) { AddButton(41, 7, 0x15E1, 0x15E5, 101, GumpButtonType.Reply, 0);// Forward Arrow } if (m_page != 0) { AddButton(5, 7, 0x15E3, 0x15E7, 102, GumpButtonType.Reply, 0); // Backward Arrow } for (int i = 0; i < 12; i++) { index = (m_page * 12) + i; if (index < m_SlotArray.Count) { ts = (TurboSlot)m_SlotArray[index]; if (ts.Deleted) { AddImageTiled(65, starty, 630, 21, 5124); slotHue = 0; } else { slotHue = ts.Hue - 1; AddButton(5, starty, 0xFAB, 0xFAD, 900 + i, GumpButtonType.Reply, 0); // Properties AddButton(30, starty, 0xFAE, 0xFAF, 1000 + i, GumpButtonType.Reply, 0); // Go to if (ts.Active) { AddImageTiled(65, starty, 630, 21, 0xBBC); AddButton(700, starty, 0xFA8, 0xFA2, 1100 + i, GumpButtonType.Reply, 0); //Set Inactive } else { AddImageTiled(65, starty, 630, 21, 9204); AddButton(700, starty, 0xFA2, 0xFA8, 1200 + i, GumpButtonType.Reply, 0); //Set Active } } text = String.Format("{0}", ts.SlotTheme); AddLabel(70, starty, slotHue, @text); text = String.Format("({0})", pstring[(int)ts.CurrentPayback]); if ((int)ts.SlotPaybackOdds == 5) { AddLabel(180, starty, 0, @text); } else { AddLabel(180, starty, slotHue, @text); } if (ts.InUseBy != null) { AddLabel(201, starty, slotHue, @"*"); } text = String.Format("{0:#,###,##0}", ts.TotalSpins); AddLabel(215, starty, slotHue, @text); text = String.Format("{0:##,###,##0}", ts.TotalCollected); AddLabel(295, starty, slotHue, @text); text = String.Format("{0:##,###,##0}", ts.TotalWon); AddLabel(410, starty, slotHue, @text); NetProfit = ts.TotalCollected - ts.TotalWon; text = String.Format("{0:##,###,##0}", NetProfit); if (NetProfit < 0) { AddLabel(515, starty, 36, @text); } else { AddLabel(515, starty, slotHue, @text); } if (ts.ProgIsMaster) { AddLabel(612, starty, slotHue, "P"); } else if (ts.ProgSlotMaster != null) { AddLabel(612, starty, slotHue, "p"); } text = String.Format("{0,-10:##0.00}", ts.WinningPercentage); if (ts.WinningPercentage > 99.5) { AddLabel(645, starty, 36, @text); } else { AddLabel(645, starty, slotHue, @text); } } else { break; } starty += 25; } starty = 348; text = String.Format("({0:##0} Slots)", m_SlotArray.Count); AddLabel(10, starty - 15, 1149, @text); NetProfit = Collected - Won; AddLabel(32, starty, 55, "<Totals>"); text = String.Format("{0:###,###,##0}", Collected); AddLabel(95, starty, 0x384, "Collected:"); AddLabel(155, starty, 2212, @text); text = String.Format("{0:###,###,##0}", Won); AddLabel(265, starty, 0x384, @"Won:"); AddLabel(300, starty, 2212, @text); text = String.Format(" {0:###,###,##0}", NetProfit); AddLabel(404, starty, 0x384, @"Net Profit:"); if (NetProfit < 0) { AddLabel(470, starty, 36, @text); } else { AddLabel(470, starty, 267, @text); } try { WinningPercentage = (Won / Collected) * 100; } catch { WinningPercentage = 0; } int PaybackHue = 267; if (WinningPercentage > 99.5m) { PaybackHue = 37; } else if (WinningPercentage > 90.0m) { PaybackHue = 267; } else if (WinningPercentage > 80.0m) { PaybackHue = 87; } else if (WinningPercentage > 60.0m) { PaybackHue = 55; } else { PaybackHue = 37; } AddLabel(571, starty, 0x384, @"PayBack %:"); text = String.Format("{0:##0.00}", WinningPercentage); AddLabel(645, starty, PaybackHue, @text); }
public TurboSlotPayTableGump(TurboSlot Slot, int[] Symbols) : base(25, 25) { m_Slot = Slot; m_Symbols = Symbols; int anybarsindex = m_Symbols[10]; int totalsymbols = m_Symbols[11]; int dispx = m_Symbols[12]; int dispy = m_Symbols[13]; int backgroundcolor = m_Symbols[14]; int titlecolor = m_Symbols[15]; int titlestyle = m_Symbols[16]; int headingcolor1 = m_Symbols[17]; int headingcolor2 = m_Symbols[18]; int paycolor = m_Symbols[19]; decimal payout; int tilecolor = 9304; if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.GruesomeGambling || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.StatScrolls) { tilecolor = 9204; } else if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.Holiday1) { tilecolor = 0xBBC; } else if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.FarmerFaceoff || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.OffToTheRaces || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.TrophyHunter) { tilecolor = 2524; } string text = null; if (backgroundcolor == 0) { text = string.Format("<body bgcolor=\"black\"><basefont SIZE={0} COLOR=\"#{1:x6}\"><CENTER>{2}</CENTER></basefont></body>", titlestyle, titlecolor, m_Slot.Name); } else if (backgroundcolor < 0) { text = string.Format("<basefont SIZE={0} COLOR=\"#{1:x6}\"><CENTER>{2}</CENTER></basefont>", titlestyle, titlecolor, m_Slot.Name); } else { text = string.Format("<body bgcolor=\"#{0:x6}\"><basefont SIZE={1} COLOR=\"#{2:x6}\"><CENTER>{3}</CENTER></basefont></body>", backgroundcolor, titlestyle, titlecolor, m_Slot.Name); } bool progressive = false; int ProgressiveHue = 0; if ((m_Slot.ProgSlotMaster != null && !m_Slot.ProgSlotMaster.Deleted && ((TurboSlot)m_Slot.ProgSlotMaster).ProgIsMaster) || m_Slot.ProgIsMaster) { progressive = true; if (m_Slot.ProgIsMaster) { ProgressiveHue = m_Slot.Hue; } else { ProgressiveHue = ((TurboSlot)m_Slot.ProgSlotMaster).Hue; } ProgressiveHue += -1; if (ProgressiveHue < 0) { ProgressiveHue = 1149; } } bool bonusround = ((BonusRoundType)m_Slot.BonusRound != BonusRoundType.None); // ? true:false; int tiledlength = (30 * totalsymbols) + (dispy * 7); //int backgroundlength = 425 (30 * totalsymbols) + (dispy * 10); int backgroundlength = 185 + (30 * totalsymbols) + (dispy * 10); if ((ScatterType)m_Slot.ScatterPay == ScatterType.None) { backgroundlength = (backgroundlength - 90) - (dispy * 2); } else if ((ScatterType)m_Slot.ScatterPay == ScatterType.LeftOnly) { backgroundlength = (backgroundlength - 30); tiledlength += 60 + (dispy * 2); } if (m_Slot.AnyBars) { tiledlength += 30 + dispy; } else { backgroundlength = (backgroundlength - 30) - dispy; } if (bonusround) { tiledlength -= (30 + dispy); backgroundlength = backgroundlength + 30; } if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.PowerScrolls) { tiledlength += 35; backgroundlength += 35; } Closable = true; Disposable = true; Draggable = true; Resizable = false; AddPage(0); int backgroundx = 0; if ((int)m_Slot.JackpotRewards != 0) { backgroundx = 35; } AddBackground(37, 34, 180 + backgroundx + dispx * 3, backgroundlength, 5120); AddHtml(45, 41, 165 + backgroundx + dispx * 3, 22, @text, (bool)false, (bool)false); AddImageTiled(45, 84, 102 + dispx * 3, tiledlength, tilecolor); AddLabel(45, 64, headingcolor1, @"Pay Table"); if (progressive) { m_Slot.GetJackpotPayoutStr(0, out payout); payout = payout * 100; AddLabel(147 + dispx * 3, 67, ProgressiveHue, @"(Progessive)"); } int starty = 85; for (int i = 0; i < totalsymbols; i++) { if (!bonusround || (bonusround && i != m_Symbols[8])) { ShowSymbol(45, starty, m_Symbols[i]); ShowSymbol(75 + dispx, starty, m_Symbols[i]); ShowSymbol(105 + dispx * 2, starty, m_Symbols[i]); if (i == 0 && progressive) { ShowPayout(155 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(0, out payout)); } else { ShowPayout(155 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(i, out payout)); } starty += 30 + dispy; } if (i == anybarsindex && m_Slot.AnyBars) { ShowSymbol(45, starty, m_Symbols[0]); ShowSymbol(105 + dispx * 2, starty, m_Symbols[anybarsindex]); AddLabel(46 + dispx + dispx / 2, starty + 3, headingcolor2, @"Any Three Above"); // was 65 ShowPayout(155 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(8, out payout)); starty += 30 + dispy; } } if ((ScatterType)Slot.ScatterPay != ScatterType.None) { if ((ScatterType)Slot.ScatterPay == ScatterType.Any) { starty += 5; int ScatterSymbol = m_Symbols[m_Symbols[9]]; if ((ScatterType)m_Slot.ScatterPay == ScatterType.Any) { AddLabel(45, starty, headingcolor1, @"Scatter Pay"); } else { AddLabel(45, starty, headingcolor1, @"Extra Chance"); } starty += 25; AddImageTiled(45, starty - 4, 101 + dispx * 3, 64 + dispy, tilecolor); ShowSymbol(45, starty, ScatterSymbol); AddLabel(74 + dispx + dispx / 2, starty - 2, headingcolor2, @"Any One"); ShowPayout(154 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(9, out payout)); starty += 30 + dispy / 2; ShowSymbol(45, starty, ScatterSymbol); ShowSymbol(75 + dispx, starty, ScatterSymbol); AddLabel(74 + dispx + dispx / 2, starty - 2, headingcolor2, @"Any Two"); ShowPayout(154 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(10, out payout)); } else { int ScatterSymbol = m_Symbols[m_Symbols[9]]; ShowSymbol(45, starty, ScatterSymbol); ShowSymbol(75 + dispx, starty, ScatterSymbol); AddLabel(105 + dispx * 2 + dispx / 2, starty + 2, headingcolor2, @"Any"); ShowPayout(154 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(10, out payout)); starty += 30 + dispy; ShowSymbol(45, starty, ScatterSymbol); AddLabel(75 + dispx + dispx / 2, starty + 2, headingcolor2, @"Any"); AddLabel(105 + dispx * 2 + dispx / 2, starty + 2, headingcolor2, @"Any"); ShowPayout(154 + dispx * 3, starty, paycolor, m_Slot.GetJackpotPayoutStr(9, out payout)); } starty += 35 + dispy; } if (bonusround) { int BonusSymbol = m_Symbols[m_Symbols[8]]; AddLabel(45, starty, headingcolor1, @"Bonus Round"); //426 starty += 25; AddImageTiled(45, starty - 4, 101 + dispx * 3, 35 + dispy / 2, tilecolor); ShowSymbol(45, starty, BonusSymbol); ShowSymbol(75 + dispx, starty, BonusSymbol); ShowSymbol(105 + dispx * 2, starty, BonusSymbol); } }
public TurboSlotGump(TurboSlot Slot, int[] Symbols) : base(25, 25) { m_Slot = Slot; m_Symbols = Symbols; if (m_Slot == null) { return; // Something is obviously wrong! } int dispy = m_Symbols[13]; int backgroundcolor = m_Symbols[14]; int titlecolor = m_Symbols[15]; int titlestyle = m_Symbols[16]; int headingcolor1 = m_Symbols[17]; int headingcolor2 = m_Symbols[18]; int paycolor = m_Symbols[19]; int slotart = m_Symbols[20]; decimal payout = 0; string[] Jackpot = { null, null }; bool progressive = false; int ProgressiveHue = 0; int PayoutHue = 37; int lastjackpotstarty = 85; int progstarty = 65; int symbolxoffset = 0; string text = null; int tilecolor = 9304; if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.GruesomeGambling || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.StatScrolls) { tilecolor = 9204; } else if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.Holiday1) { tilecolor = 0xBBC; } else if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.FarmerFaceoff || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.OffToTheRaces || (SlotThemeType)m_Slot.SlotTheme == SlotThemeType.TrophyHunter) { tilecolor = 2524; } else if ((SlotThemeType)m_Slot.SlotTheme == SlotThemeType.PowerScrolls) { tilecolor = 9354; symbolxoffset = 16; } if (backgroundcolor == 0) { text = String.Format("<body bgcolor=\"black\"><basefont SIZE={0} COLOR=\"#{1:x6}\"><CENTER>{2}</CENTER></basefont></body>", titlestyle, titlecolor, m_Slot.Name); } else if (backgroundcolor < 0) { text = String.Format("<basefont SIZE={0} COLOR=\"#{1:x6}\"><CENTER>{2}</CENTER></basefont>", titlestyle, titlecolor, m_Slot.Name); } else { text = String.Format("<body bgcolor=\"#{0:x6}\"><basefont SIZE={1} COLOR=\"#{2:x6}\"><CENTER>{3}</CENTER></basefont></body>", backgroundcolor, titlestyle, titlecolor, m_Slot.Name); } if ((m_Slot.ProgSlotMaster != null && !m_Slot.ProgSlotMaster.Deleted && ((TurboSlot)m_Slot.ProgSlotMaster).ProgIsMaster) || m_Slot.ProgIsMaster) { progressive = true; lastjackpotstarty = 110; if (m_Slot.ProgIsMaster) { //pjackpot += m_Slot.ProgJackpot; ProgressiveHue = m_Slot.Hue; } else { //pjackpot += ((TurboSlot) m_Slot.ProgSlotMaster).ProgJackpot; ProgressiveHue = (m_Slot.ProgSlotMaster).Hue; } ProgressiveHue += -1; if (ProgressiveHue < 0) { ProgressiveHue = 661; } } Closable = true; Disposable = true; Dragable = true; Resizable = false; AddPage(0); AddBackground(18, 64, 371, 278, 5120); AddBackground(32, 193, 345, 100, 2620); AddImageTiled(23, 298, 363, 10, 5121); AddHtml(30, 65, 170, 23, @text, false, false); if (m_Slot.ShowPayback || (m_Slot.InUseBy != null && m_Slot.InUseBy.AccessLevel != AccessLevel.Player)) { float payoutdif = Math.Abs(m_Slot.w_Percentage - m_Slot.WinningPercentage); PayoutHue = 267; if (payoutdif > 15.0f || m_Slot.WinningPercentage > 100.0f) { PayoutHue = 37; } else if (payoutdif > 7.0f) { PayoutHue = 55; } else if (payoutdif > 3.0f) { PayoutHue = 87; } text = String.Format("{0:##0.00}%", m_Slot.WinningPercentage); AddLabel(205, 65, headingcolor1, @"Payback Percentage:"); AddLabel(330, 65, PayoutHue, @text); progstarty = 85; if (progressive) { lastjackpotstarty = 125; } if (m_Slot.InUseBy != null && m_Slot.InUseBy.AccessLevel != AccessLevel.Player) { if (m_Slot.w_Percentage > 99.5f) { PayoutHue = 37; } else if (m_Slot.w_Percentage > 90.0f) { PayoutHue = 267; } else if (m_Slot.w_Percentage > 80.0f) { PayoutHue = 87; } else if (m_Slot.w_Percentage > 60.0f) { PayoutHue = 55; } else if (m_Slot.w_Percentage > 40.0f) { PayoutHue = 37; } string[] pstring = new string[] { "L", "N", "T", "E", "C", "R" }; text = String.Format("({0})", pstring[(int)m_Slot.CurrentPayback]); if ((int)m_Slot.SlotPaybackOdds == 5) { AddLabel(208, 80, 37, @text); } else { AddLabel(208, 80, headingcolor1, @text); } AddLabel(232, 80, headingcolor1, @"Statisical Odds:"); text = String.Format("{0:##0.00}%", m_Slot.w_Percentage); AddLabel(330, 80, PayoutHue, @text); progstarty = 155; lastjackpotstarty = 94; } } AddImageTiled(37, 200, 335, 86, 9354); AddImageTiled(150, 202, 2, 83, 9353); AddLabel(30, 100, headingcolor2, @"Cost: "); AddLabel(65, 100, paycolor, m_Slot.Cost.ToString()); AddLabel(30, 120, headingcolor2, @"Credits: "); AddLabel(80, 120, paycolor, m_Slot.Won.ToString()); AddLabel(30, 140, headingcolor2, @"Last Pay: "); AddLabel(92, 140, paycolor, m_Slot.LastPay.ToString()); AddButton(30, 163, 4026, 4027, 11, GumpButtonType.Reply, 0); AddLabel(65, 164, headingcolor1, @"View Pay Table"); AddButton(30, 307, 4020, 4021, 12, GumpButtonType.Reply, 0); if (m_Slot.FreeSpin) { AddLabel(65, 307, headingcolor2, @"Free"); } else { AddLabel(65, 307, headingcolor1, @"Spin"); } AddButton(118, 307, 4029, 4030, 13, GumpButtonType.Reply, 0); AddLabel(153, 307, headingcolor1, @"Cash Out"); AddButton(235, 300, 4037, 4036, 14, GumpButtonType.Reply, 0); AddLabel(270, 307, headingcolor1, @"ATM"); AddImageTiled(60, 205, 75, 75, tilecolor); AddImageTiled(167, 205, 75, 75, tilecolor); AddImageTiled(274, 205, 75, 75, tilecolor); AddImageTiled(258, 202, 2, 83, 9353); if (slotart != 0) { ShowSymbol(155, 90, slotart); } if (m_Slot.LastWonBy != null && !m_Slot.LastWonBy.Deleted) { AddLabel(230, lastjackpotstarty, headingcolor2, "Last Jackpot won by:"); text = String.Format("<BASEFONT COLOR=#FFFFFF><Center>{0}<//Center></BASEFONT>", m_Slot.LastWonBy.Name); AddHtml(205, lastjackpotstarty + 15, 180, 15, @text, false, false); text = String.Format("{0:MM/dd/yy hh:mm:ss tt}", m_Slot.LastWonByDate); AddLabel(205, lastjackpotstarty + 30, headingcolor2, "Date:"); AddLabel(237, lastjackpotstarty + 30, paycolor, text); text = String.Format("{0:##,###,### Gold!}", m_Slot.LastWonAmount); AddLabel(202, lastjackpotstarty + 45, headingcolor2, "Value:"); AddLabel(237, lastjackpotstarty + 45, paycolor, text); } if (progressive) { Jackpot = m_Slot.GetJackpotPayoutStr(0, out payout); AddHtml(245, progstarty, 356, 23, @"<BASEFONT COLOR=#FFFFFF><U>Progressive Jackpot</U></BASEFONT>", false, false); AddLabel(280, progstarty + 15, ProgressiveHue, Jackpot[0]); } ShowSymbol(75 - symbolxoffset, 220 - dispy / 3, m_Slot.ReelOne); ShowSymbol(183 - symbolxoffset, 220 - dispy / 3, m_Slot.ReelTwo); ShowSymbol(290 - symbolxoffset, 220 - dispy / 3, m_Slot.ReelThree); if (Utility.Random(25000) == 45) { CEOCookie(headingcolor2); } }
public NewMinerBonusGump(TurboSlot Slot, int[] Symbols, bool initialize, bool[] b, int[] c, int totalwon) : base(25, 25) { m_Slot = Slot; m_Symbols = Symbols; m_b = b; m_c = c; m_TotalWon = totalwon; if (initialize) { double zerochance = .40; bool fiftyk = false; for (int i = 0; i < 9; i++) { b[i] = false; if (fiftyk || (i == 3 && 0.10 < Utility.RandomDouble())) // Only allow one fifty K spot and worsen the odds and rarely on the top button! :P { if (zerochance < Utility.RandomDouble()) { c[i] = Utility.RandomList(5000, 5000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50); } else { c[i] = 0; } if (i == 1) { c[i] = 111; } } else { if (zerochance < Utility.RandomDouble()) { c[i] = Utility.RandomList(50000, 10000, 5000, 5000, 1000, 1000, 1000, 1000, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 100, 100, 100, 100, 100, 100, 100, 100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50); } else { c[i] = 0; } if (c[i] == 50000) { fiftyk = true; zerochance += .28; } } if (c[i] != 0) { zerochance += .05; } } } Disposable = true; Dragable = true; Closable = true; for (int i = 0; i < 9; i++) { if (!b[i]) { Disposable = false; Dragable = true; Closable = false; break; } } Resizable = false; AddPage(0); AddBackground(52, 25, 393, 430, 5120); AddImage(59, 63, 5528); AddImage(60, 30, 5573); AddLabel(123, 26, 1149, @"Pick a location to mine, If you mine up coal you lose."); AddLabel(123, 42, 1149, @"You keep mining till you find coal or all are gone."); for (int i = 0; i < 9; i++) { if (!b[i]) { AddButton(buttonx[i], buttony[i], 2117, 2118, i + 1, GumpButtonType.Reply, 0); #if TestMode if (m_Slot.TestMode) { AddLabel(buttonx[i], buttony[i] + 10, 1160, c[i].ToString()); } #endif } else { AddImage(buttonx[i], buttony[i], 5231); if (c[i] != 0) { AddLabel(buttonx[i], buttony[i], 1160, c[i].ToString()); } else { AddLabel(buttonx[i], buttony[i], 1160, @"!! Coal !!"); } } } }