public MSGemGump(Mobile from, Item msgem, MageStaff mstaff) : base(0, 0) { m_Player = (TeiravonMobile)from; gem = (MageStaffGem)msgem; staff = (MageStaff)mstaff; m_Player.CloseGump(typeof(MSGemGump)); int x = 140; int y = 170; int x2 = 116; int y2 = 173; int i = 1; this.Closable = false; this.Disposable = false; this.Dragable = true; this.Resizable = false; AddPage(0); AddBackground(70, 80, 350, 325, 3600); AddBackground(95, 125, 300, 255, 9350); AddHtml(200, 100, 600, 20, "<basefont size=\"8\" color=\"#ffffff\">Mage Staff Gem</basefont>", false, false); AddLabel(155, 135, 150, "Choose your Mage Staff Power:"); AddLabel(x, y + (20 * i), 150, "Mana Reneration"); AddButton(x2, y2 + (20 * i), 2224, 2224, 1, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Increased Spell Damage"); AddButton(x2, y2 + (20 * i), 2224, 2224, 2, GumpButtonType.Reply, 0); i++; if (staff.WeaponAttributes.MageWeapon < 30) { AddLabel(x, y + (20 * i), 150, "Mage Weapon"); AddButton(x2, y2 + (20 * i), 2224, 2224, 3, GumpButtonType.Reply, 0); i++; } AddLabel(x, y + (20 * i), 150, "Faster Casting"); AddButton(x2, y2 + (20 * i), 2224, 2224, 4, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Faster Cast Recovery"); AddButton(x2, y2 + (20 * i), 2224, 2224, 5, GumpButtonType.Reply, 0); i++; if (m_Player.IsAquamancer()) { AddLabel(x, y + (20 * i), 150, "Hit Harm"); AddButton(x2, y2 + (20 * i), 2224, 2224, 6, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Hit Cold Area"); AddButton(x2, y2 + (20 * i), 2224, 2224, 7, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Cold Resist"); AddButton(x2, y2 + (20 * i), 2224, 2224, 8, GumpButtonType.Reply, 0); i++; } else if (m_Player.IsAeromancer()) { AddLabel(x, y + (20 * i), 150, "Hit Lightning"); AddButton(x2, y2 + (20 * i), 2224, 2224, 9, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Hit Energy Area"); AddButton(x2, y2 + (20 * i), 2224, 2224, 10, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Energy Resist"); AddButton(x2, y2 + (20 * i), 2224, 2224, 11, GumpButtonType.Reply, 0); i++; } else if (m_Player.IsPyromancer()) { AddLabel(x, y + (20 * i), 150, "Hit Fireball"); AddButton(x2, y2 + (20 * i), 2224, 2224, 12, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Hit Fire Area"); AddButton(x2, y2 + (20 * i), 2224, 2224, 13, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Fire Resist"); AddButton(x2, y2 + (20 * i), 2224, 2224, 14, GumpButtonType.Reply, 0); i++; } else if (m_Player.IsNecromancer()) { AddLabel(x, y + (20 * i), 150, "Hit Dispel"); AddButton(x2, y2 + (20 * i), 2224, 2224, 15, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Hit Poison Area"); AddButton(x2, y2 + (20 * i), 2224, 2224, 16, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Poison Resist"); AddButton(x2, y2 + (20 * i), 2224, 2224, 17, GumpButtonType.Reply, 0); i++; } else if (m_Player.IsGeomancer()) { AddLabel(x, y + (20 * i), 150, "Hit Magic Arrow"); AddButton(x2, y2 + (20 * i), 2224, 2224, 18, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Hit Physical Area"); AddButton(x2, y2 + (20 * i), 2224, 2224, 19, GumpButtonType.Reply, 0); i++; AddLabel(x, y + (20 * i), 150, "Physical Resist"); AddButton(x2, y2 + (20 * i), 2224, 2224, 20, GumpButtonType.Reply, 0); i++; } }
protected override void OnTarget(Mobile from, object targ) { if (targ is MageStaff) { m_MStaff = (MageStaff)targ; if (m_MStaff.GemsUsed > 3) { from.SendMessage("This Mage Staff is fully advanced."); } else { m_MStaff.GemsUsed = m_MStaff.GemsUsed + 1; if (m_MStaff.GemsUsed > 0) { m_MStaff.Name = "Mage Staff of " + from.Name; m_MStaff.MageType = MageClass; } switch (MageClass) { case 1: // Aquamancer if (m_MStaff.GemsUsed == 4) { m_MStaff.Hue = 98; } break; case 2: // Aeromancer if (m_MStaff.GemsUsed == 4) { m_MStaff.Hue = 18; } break; case 3: // Pyromancer if (m_MStaff.GemsUsed == 4) { m_MStaff.Hue = 43; } break; case 4: // Necromancer if (m_MStaff.GemsUsed == 4) { m_MStaff.Hue = 477; } break; case 5: // Geomancer m_MStaff.Attributes.WeaponDamage = m_MStaff.Attributes.WeaponDamage + 20; if (m_MStaff.GemsUsed == 4) { m_MStaff.Hue = 954; } break; } if (m_MStaff.GemsUsed < 4) { m_MStaff.Hue = 0; } from.SendGump(new MSGemGump(from, m_MGem, m_MStaff)); m_MGem.Delete(); } } else { from.SendMessage("This can only be used on a Mage Staff."); } }