public MurderPenaltyGump(PlayerMobile player, bool previewMode, int selectionIndex, bool confirmed) : base(400, 25) { m_Player = player; m_PreviewMode = previewMode; m_SelectionIndex = selectionIndex; m_Confirmed = confirmed; if (m_Player == null) { return; } Account account = m_Player.Account as Account; if (account == null) { return; } if (selectionIndex > 2) { selectionIndex = 0; } #region Images AddImage(57, 56, 103, 2075); AddImage(190, 153, 103, 2075); AddImage(191, 196, 103, 2075); AddImage(191, 282, 103, 2075); AddImage(191, 372, 103, 2075); AddImage(193, 472, 103, 2075); AddImage(57, 472, 103, 2075); AddImage(57, 281, 103, 2075); AddImage(189, 56, 103, 2075); AddImage(56, 195, 103, 2075); AddImage(57, 152, 103, 2075); AddImage(67, 194, 3604, 2052); AddImage(195, 184, 3604, 2052); AddImage(67, 66, 3604, 2052); AddImage(195, 66, 3604, 2052); AddImage(57, 371, 103, 2075); AddImage(67, 242, 3604, 2052); AddImage(196, 241, 3604, 2052); AddImage(67, 334, 3604, 2052); AddImage(195, 333, 3604, 2052); AddImage(67, 434, 3604, 2052); AddImage(195, 434, 3604, 2052); AddImage(77, -28, 102, 1107); AddItem(297, 58, 3812, 2101); #endregion AddLabel(161, 31, 149, "Punishable"); AddLabel(147, 51, 149, "Murder Counts"); AddLabel(143, 71, 2550, "(counts above " + Mobile.MurderCountsRequiredForMurderer.ToString() + ")"); int punishableMurderCounts = m_Player.MurderCounts - Mobile.MurderCountsRequiredForMurderer; if (punishableMurderCounts < 0) { punishableMurderCounts = 0; } AddItem(158, 102, 7574); if (punishableMurderCounts >= 1) { AddLabel(200, 112, 2116, punishableMurderCounts.ToString()); } else { AddLabel(200, 112, WhiteTextHue, punishableMurderCounts.ToString()); } AddLabel(134, 161, WhiteTextHue, "Counts Will Reset"); AddLabel(118, 178, WhiteTextHue, "to 5 Upon Resurrection"); if (m_PreviewMode) { AddLabel(147, 214, 2603, "Preview Mode"); } else { AddLabel(127, 214, 2603, "Resurrection Options"); } AddButton(49, 49, 2094, 2095, 1, GumpButtonType.Reply, 0); AddLabel(45, 38, 149, "Guide"); int resurrectionTotalCost = 0; int goldAvailableInBank = 0; int goldAvailableInAccount = 0; foreach (Mobile mobile in account.accountMobiles) { if (mobile == null) { continue; } if (mobile.Deleted) { continue; } if (mobile == m_Player) { goldAvailableInBank += Banker.GetBalance(m_Player); } goldAvailableInAccount += Banker.GetBalance(mobile); } if (m_SelectionIndex == 0) { resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount; AddButton(75, 258, 9724, 9721, 2, GumpButtonType.Reply, 0); AddLabel(110, 254, 63, "Pay " + PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount.ToString() + " Gold Per Murder Count"); } else { AddButton(75, 258, 9721, 9724, 2, GumpButtonType.Reply, 0); AddLabel(110, 254, 2599, "Pay " + PlayerMobile.RessPenaltyAccountWideAggressionRestrictionFeePerCount.ToString() + " Gold Per Murder Count"); } AddLabel(110, 274, WhiteTextHue, "No Aggressive Actions Allowed"); AddLabel(110, 294, WhiteTextHue, "Account-Wide for 24 Hours"); if (m_SelectionIndex == 1) { resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount; AddButton(75, 330, 9724, 9721, 3, GumpButtonType.Reply, 0); AddLabel(110, 325, 63, "Pay " + PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount.ToString() + " Gold Per Murder Count"); } else { AddButton(75, 330, 9721, 9724, 3, GumpButtonType.Reply, 0); AddLabel(110, 325, 2599, "Pay " + PlayerMobile.RessPenaltyEffectivenessReductionFeePerCount.ToString() + " Gold Per Murder Count"); } double damagePenalty = PlayerMobile.RessPenaltyDamageScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1); double healingPenalty = PlayerMobile.RessPenaltyHealingScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1); double fizzlePenalty = PlayerMobile.RessPenaltyFizzleScalar * (m_Player.m_RessPenaltyEffectivenessReductionCount + 1); AddLabel(110, 344, WhiteTextHue, "-" + Utility.CreatePercentageString(damagePenalty) + " Damage Dealt"); AddLabel(110, 364, WhiteTextHue, "-" + Utility.CreatePercentageString(healingPenalty) + " Healing Amounts"); AddLabel(110, 384, WhiteTextHue, Utility.CreatePercentageString(fizzlePenalty) + " Chance to Fizzle Field"); AddLabel(110, 404, WhiteTextHue, "and Paralyze Spells for 24 Hours"); AddLabel(130, 423, 2550, "(Penalties are Stackable)"); if (m_SelectionIndex == 2) { resurrectionTotalCost = punishableMurderCounts * PlayerMobile.RessPenaltyNoPenaltyFeePerCount; AddButton(75, 446, 9724, 9721, 4, GumpButtonType.Reply, 0); AddLabel(112, 451, 63, "Pay " + PlayerMobile.RessPenaltyNoPenaltyFeePerCount.ToString() + " Gold Per Murder Count"); } else { AddButton(75, 446, 9721, 9724, 4, GumpButtonType.Reply, 0); AddLabel(112, 451, 2599, "Pay " + PlayerMobile.RessPenaltyNoPenaltyFeePerCount.ToString() + " Gold Per Murder Count"); } AddLabel(85, 483, 2603, "Selected Option Cost:"); AddLabel(230, 483, 63, Utility.CreateCurrencyString(resurrectionTotalCost)); AddLabel(85, 511, 149, "Gold Available in Bank:"); AddLabel(230, 511, WhiteTextHue, Utility.CreateCurrencyString(goldAvailableInBank)); AddLabel(85, 531, 149, "Gold Across Account:"); AddLabel(230, 531, WhiteTextHue, Utility.CreateCurrencyString(goldAvailableInAccount)); if (!m_PreviewMode) { AddButton(159, 555, 239, 240, 5, GumpButtonType.Reply, 0); //Apply } }
public ConsiderSinsGump(PlayerMobile player) : base(10, 10) { m_Player = player; if (m_Player == null) { return; } #region Background AddImage(16, 12, 103, 2499); AddImage(151, 12, 103, 2499); AddImage(277, 12, 103, 2499); AddImage(152, 99, 103, 2499); AddImage(18, 99, 103, 2499); AddImage(279, 99, 103, 2499); AddImage(151, 187, 103, 2499); AddImage(16, 187, 103, 2499); AddImage(277, 187, 103, 2499); AddImage(151, 271, 103, 2499); AddImage(16, 271, 103, 2499); AddImage(277, 271, 103, 2499); AddBackground(31, 30, 377, 329, 5120); AddBackground(16, 24, 403, 335, 9380); AddItem(84, 52, 7574); AddImage(83, 25, 1142); #endregion AddLabel(162, 26, WhiteTextHue, "Criminal Summary"); //Guide AddButton(10, 13, 2094, 2095, 1, GumpButtonType.Reply, 0); AddLabel(6, 1, 149, "Guide"); int startY = 65; int rowSpacing = 30; AddLabel(128, startY, 149, "Current Murder Counts:"); if (m_Player.MurderCounts >= Mobile.MurderCountsRequiredForMurderer) { AddLabel(287, startY, 2116, m_Player.MurderCounts.ToString()); } else { AddLabel(287, startY, WhiteTextHue, m_Player.MurderCounts.ToString()); } startY += rowSpacing; if (m_Player.MurderCounts > 0) { string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, DateTime.UtcNow + (m_Player.m_MurderCountDecayTimeRemaining - m_Player.GameTime), true, true, true, true, false); AddItem(57, startY - 2, 6169); AddLabel(96, startY, 149, "Next Murder Count Decays in:"); AddLabel(288, startY, WhiteTextHue, timeRemaining); startY += rowSpacing; } AddLabel(125, startY, 149, "Lifetime Murder Counts:"); AddLabel(287, startY, WhiteTextHue, m_Player.m_LifetimeMurderCounts.ToString()); AddItem(82, startY + 2, 6884); AddItem(89, startY + 2, 6884); AddItem(84, startY + 7, 6884); startY += rowSpacing; startY += rowSpacing; rowSpacing = 25; //Ress Penalties if (m_Player.RessPenaltyExpiration > DateTime.UtcNow) { AddLabel(117, startY, 2599, "Current Resurrection Penalties"); startY += rowSpacing; if (m_Player.m_RessPenaltyEffectivenessReductionCount > 0) { double damagePenalty = PlayerMobile.RessPenaltyDamageScalar * m_Player.m_RessPenaltyEffectivenessReductionCount; double healingPenalty = PlayerMobile.RessPenaltyHealingScalar * m_Player.m_RessPenaltyEffectivenessReductionCount; double fizzlePenalty = PlayerMobile.RessPenaltyFizzleScalar * m_Player.m_RessPenaltyEffectivenessReductionCount; AddLabel(145, startY, WhiteTextHue, "-" + Utility.CreatePercentageString(damagePenalty) + " Damage Dealt"); startY += rowSpacing; AddLabel(140, startY, WhiteTextHue, "-" + Utility.CreatePercentageString(healingPenalty) + " Healing Amounts"); startY += rowSpacing; AddLabel(67, startY, WhiteTextHue, Utility.CreatePercentageString(fizzlePenalty) + " Chance to Fizzle Field and Paralyze Spells"); startY += rowSpacing; } if (m_Player.m_RessPenaltyAccountWideAggressionRestriction) { AddLabel(80, startY, 2550, "Cannot Attack Other Players (Account Wide)"); startY += rowSpacing; } string timeRemaining = Utility.CreateTimeRemainingString(DateTime.UtcNow, m_Player.RessPenaltyExpiration, true, true, true, true, false); AddItem(122, startY - 6, 6227); AddLabel(160, startY, 63, "Expires in " + timeRemaining + ")"); } else { AddLabel(154, startY, 2599, "Current Penalties"); startY += rowSpacing; AddLabel(194, startY, WhiteTextHue, "None"); } AddButton(76, 332, 2151, 2154, 2, GumpButtonType.Reply, 0); AddLabel(109, 336, 2603, "Preview Murderer Penalty Options"); }