public ShowLokaiSkillsGump(Mobile mobile, bool value) : base(0, 0) { m_Mobile = mobile; m_Value = value; bool GM = mobile.AccessLevel >= AccessLevel.GameMaster; LokaiSkills skils = LokaiSkillUtilities.XMLGetSkills(m_Mobile); m_Mobile.CloseGump(typeof(ShowLokaiSkillsGump)); AddPage(0); AddBackground(564, 17, 220, 574, 9200); AddBackground(592, 21, 189, 537, 9300); AddButton(590, 560, value ? 0x25FF : 0x2602, value ? 0x2602 : 0x25FF, 19, GumpButtonType.Reply, 0); AddButton(680, 560, value ? 0x2602 : 0x25FF, value ? 0x25FF : 0x2602, 29, GumpButtonType.Reply, 0); AddHtml(621, 567, 55, 20, Color("BASE", value ? 0x20 : 0x777), false, false); AddHtml(711, 567, 55, 20, Color("VALUE", value ? 0x777 : 0x20), false, false); int y = 32; int hue = 0; for (int x = 0; x < LokaiSkillInfo.Table.Length; x++) { if (LokaiSkillUtilities.ShowLokaiSkill(x)) { if (LokaiSkillInfo.Table[x].ClickToUse || LokaiSkillInfo.Table[x].Callback != null) { AddButton(573, y + 3, 1210, 1209, x + 100, GumpButtonType.Reply, 0); AddButton(555, y + 7, 2101, 2101, x + 200, GumpButtonType.Reply, 0); } if (GM) { AddButton(761, y + 2, 5401, 5401, x + 300, GumpButtonType.Reply, 0); } hue = 0; } else { if (GM) { AddButton(761, y + 2, 5402, 5402, x + 300, GumpButtonType.Reply, 0); } hue = 1152; } string skill = value ? skils[x].Value.ToString("F1") : skils[x].Base.ToString("F1"); if (LokaiSkillUtilities.ShowLokaiSkill(x) || GM) { AddLabel(647, y, hue, LokaiSkillInfo.Table[x].Name); } if (LokaiSkillUtilities.ShowLokaiSkill(x) || GM) { AddLabel(602, y, hue, skill); } y += 17; } }
public IncreaseLokaiSkillsGump(PlayerMobile mobile, LokaiSkillBall ball, bool first, int page) : base(50, 50) { m_Page = page; m_Ball = ball; m_Points = m_Ball.Points; m_Mobile = mobile; m_LokaiSkills = LokaiSkillUtilities.XMLGetSkills(m_Mobile); if (first) { m_StartValue = new double[30]; m_Page = 0; for (int x = 0; x < 30; x++) { m_StartValue[x] = m_LokaiSkills[x].Base; } } m_Mobile.CloseGump(typeof(IncreaseLokaiSkillsGump)); AddPage(0); AddBackground(0, 0, 476, 440, 0x13BE); AddLabel(10, 7, 2100, "Choose Skills"); if (m_Page > 0) { AddButton(275, 7, 250, 251, 2, GumpButtonType.Reply, 0); // Prev Page } if (m_Page < 2) { AddButton(275, 395, 252, 253, 3, GumpButtonType.Reply, 0); // Next Page } AddLabel(160, 7, 2100, "Points Left: " + m_Points.ToString()); // We only need this "if" condition if we want to make them use it all up right now. // if ( m_Points == 0 ) // { AddButton(305, 335, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0); // OK button // } AddImage(170, -10, 0x58A); m_StartPos = m_Page * 10; int z = 0; for (int i = m_StartPos; i < m_StartPos + 10; i++) { int y = 20 + (30 * (++z)); if (LokaiSkillUtilities.ShowLokaiSkill(i)) { m_LokaiSkill = m_LokaiSkills[i]; AddLabel(10, y, 2124, m_LokaiSkill.Name.ToString()); AddLabel(170, y, 2100, (((double)m_LokaiSkill.BaseFixedPoint) / 10).ToString()); if (CanLowerLokaiSkill(m_LokaiSkill, i, 1)) { AddButton(220, y, 0x1519, 0x1519, 1000 + i, GumpButtonType.Reply, 0); // Decrease } if (CanRaiseLokaiSkill(m_LokaiSkill, i, 1)) { AddButton(240, y, 0x151A, 0x151A, 2000 + i, GumpButtonType.Reply, 0); // Increase } if (CanLowerLokaiSkill(m_LokaiSkill, i, 5)) { AddButton(200, y - 2, 2229, 2229, 3000 + i, GumpButtonType.Reply, 0); // Decrease by 5 } if (CanRaiseLokaiSkill(m_LokaiSkill, i, 5)) { AddButton(256, y - 2, 2229, 2229, 4000 + i, GumpButtonType.Reply, 0); // Increase by 5 } } } }