public void AddToGump(Gump g, int x, int y) { if (Hue > 0) { if (AssetType == IconType.ItemArt) { g.AddItem(x, y, AssetID, Hue); } else { g.AddImage(x, y, AssetID, Hue); } } else { if (AssetType == IconType.ItemArt) { g.AddItem(x, y, AssetID); } else { g.AddImage(x, y, AssetID); } } }
public override void WriteToGump(Gump g, ref int y) { if (ShowDetailed) { string amount = m_DesiredAmount.ToString(); g.AddHtmlLocalized(98, y, 350, 16, 1072205, 0x15F90, false, false); // Obtain g.AddLabel(143, y, 0x481, amount); if (m_Name.Number > 0) { g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, m_Name.Number, 0x77BF, false, false); g.AddItem(350, y, LabelToItemID(m_Name.Number)); } else if (m_Name.String != null) { g.AddLabel(143 + amount.Length * 15, y, 0x481, m_Name.String); } } else { if (m_Name.Number > 0) { g.AddHtmlLocalized(98, y, 312, 32, m_Name.Number, 0x15F90, false, false); } else if (m_Name.String != null) { g.AddLabel(98, y, 0x481, m_Name.String); } } y += 32; }
public void OnForensicEval(Mobile m) { if (!m.Player) { return; } var quest = QuestHelper.GetQuest <GoingGumshoeQuest2>((PlayerMobile)m); if (quest != null) { if (HasFoundClue1(quest)) { m.SendLocalizedMessage(1158613); // You have already documented this clue. } else { m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Forensics", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item* m.SendLocalizedMessage(1158612, null, 0x23); // You have identified a clue! This item seems pertinent to the investigation! m.SendSound(quest.UpdateSound); var gump = new Gump(50, 50); gump.AddBackground(0, 0, 500, 500, 9380); gump.AddItem(84, 130, ItemID, Hue); gump.AddHtml(167, 50, 310, 20, "<center><basefont color=#B22222>Book</center>", false, false); gump.AddHtmlLocalized(167, 70, 310, 380, 1158577, true, false); m.SendGump(gump); SetFoundClue1(quest); } } }
public override void OnDoubleClick(Mobile m) { if (m.InRange(GetWorldLocation(), 2)) { if (m.Skills[SkillName.Carpentry].Value >= 100) { Gump g = new Gump(100, 100); g.AddBackground(0, 0, 454, 400, 0x24A4); g.AddItem(35, 120, 0xA2C6); g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1158935", 0x3442, false, false); // Mysterious Statue g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1158936", 0x3442, false, false); // Purchased from a Pirate Merchant g.AddHtmlLocalized(177, 122, 250, 228, 1158937, 0xC63, true, true); /*This mysterious statue towers above you. Even as skilled a mason as you are, the craftsmanship is uncanny, and unlike anything you have encountered before. * The stone appears to be smooth and special attention was taken to sculpt the statue as a perfect likeness. According to the pirate you purchased the statue * from, it was recovered somewhere at sea. The amount of marine growth seems to reinforce this claim, yet you cannot discern how long it may have been * submerged and are thus unsure of its age.Whatever its origins, one thing is clear - the figure is one you hope you do not encounter anytime soon... */ m.SendGump(g); m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Carpentry", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item* } else { m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157693, "Carpentry", m.NetState); // *You lack the required ~1_SKILL~ skill to make anything of it.* m.SendSound(m.Female ? 0x31F : 0x42F); } } }
internal void BaseSkinByType(Gump g) { if (relplug == null) { SkillSettings.DoTell("Base Type is invalid. Cannot skin."); } g.AddPage(0); string switchby = relplug.getGumpType(); if (switchby == "Control") { //this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY; g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Control")) { SkillSettings.DoTell("No key for Control gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Control"]; g.X = inf.X; g.Y = inf.Y; //this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID); g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH); g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false); //<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont> } else if (switchby == "Master") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Master")) { SkillSettings.DoTell("No key for Master gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Master"]; //this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID); g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH); g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV); g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor); } else if (switchby == "Underbar") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Underbar")) { SkillSettings.DoTell("No key for Underbar gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Underbar"]; g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); //this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID); } else { SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin."); } }
public override void OnDoubleClick(Mobile from) { Gump g = new Gump(100, 100); g.AddBackground(0, 0, 454, 400, 0x24A4); g.AddItem(75, 120, 0xEBF); g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159343", 0x3442, false, false); // Sheet Music for Stones g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159344", 0x3442, false, false); // Recovered from a Strongbox in Castle British with a Musical Lock g.AddHtmlLocalized(177, 122, 250, 228, 1159345, 0xC63, true, true); // Standard sheet music for the seminal <i>Stones</i> by Iolo the Bard. Written, unsurprisingly, for the lute. from.SendGump(g); from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "its origin", from.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item* from.SendSound(from.Female ? 0x30B : 0x41A); }
public override void OnDoubleClick(Mobile from) { Gump g = new Gump(100, 100); g.AddBackground(0, 0, 454, 400, 0x24A4); g.AddItem(75, 120, ItemID, Hue); g.AddHtmlLocalized(177, 50, 250, 18, 1114513, "#1159025", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV> g.AddHtmlLocalized(177, 77, 250, 36, 1114513, "#1159026", 0x3442, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV> g.AddHtmlLocalized(177, 122, 250, 228, 1159027, 0xC63, true, true); // The item appears to be the jagged fragment of a larger piece. While you cannot quite discern the origins or purpose of such a piece, it is no doubt fascinating. The color shimmers with a strange brilliance that you feel you have seen before, yet cannot quite place. Whatever created this fragment did so with awesome force. from.SendGump(g); from.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "its origin", from.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item* from.SendSound(from.Female ? 0x30B : 0x41A); }
public void OnForensicEval(Mobile m) { if (!m.Player) { return; } var quest = QuestHelper.GetQuest <GoingGumshoeQuest2>((PlayerMobile)m); if (quest != null) { if (HasFoundClue(quest)) { m.SendLocalizedMessage(1158613); // You have already documented this clue. } else { m.PrivateOverheadMessage(MessageType.Regular, 0x47E, 1157722, "Forensics", m.NetState); // *Your proficiency in ~1_SKILL~ reveals more about the item* m.SendLocalizedMessage(1158612, null, 0x23); // You have identified a clue! This item seems pertinent to the investigation! m.SendSound(quest.UpdateSound); var gump = new Gump(50, 50); gump.AddBackground(0, 0, 500, 500, 9380); gump.AddItem(84, 130, ItemID, Hue); gump.AddHtml(167, 50, 310, 20, "<center><basefont color=#B22222>a dust pile</center>", false, false); gump.AddHtmlLocalized(167, 70, 310, 380, 1158617, true, false); m.SendGump(gump); /*The dust seems to have have settled in a distinct pattern around whatever once was placed at this location. * Whatever it was, it was certainly small enough to be taken away in a hurry.*/ SetFoundClue(quest); } } }
public override void WriteToGump(Gump g, ref int y) { string amount = Amount.ToString(); g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x15F90); // Deliver g.AddLabel(143, y, 0x481, amount); if (Name.Number > 0) { g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF); g.AddItem(350, y, CollectObjective.LabelToItemID(Name.Number)); } else if (Name.String != null) { g.AddLabel(143 + amount.Length * 15, y, 0x481, Name.String); } y += 32; g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x15F90); // Deliver to g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Destination)); y += 16; }
public static void AddItemCentered(int x, int y, int w, int h, int itemID, Gump gump) { Rectangle2D r = ItemBounds.Table[itemID]; gump.AddItem(x + ((w - r.Width) / 2) - r.X, y + ((h - r.Height) / 2) - r.Y, itemID); }
public virtual void AddToGump(Gump g, int x, int y, int hue) { if (IsEmpty) { return; } x += OffsetX; y += OffsetY; if (hue < 0) { hue = Hue; } switch (AssetType) { case IconType.ItemArt: { if (ComputeOffset) { var o = ArtExtUtility.GetImageOffset(AssetID); if (o != Point.Empty) { x += o.X; y += o.Y; } } x = Math.Max(0, x); y = Math.Max(0, y); if (hue > 0) { g.AddItem(x, y, AssetID, hue); } else { g.AddItem(x, y, AssetID); } } break; case IconType.GumpArt: { x = Math.Max(0, x); y = Math.Max(0, y); if (hue > 0) { g.AddImage(x, y, AssetID, hue); } else { g.AddImage(x, y, AssetID); } } break; } }