public GoldTokenGump(Mobile from, GoldVendorStone stone) : base(25, 25) { m_Stone = stone; m_SubmitData = new ArrayList(); AddPage(0); from.CloseGump(typeof(GoldTokenGump)); if (m_SubmitData.Count == 0) { m_SubmitData.Add(m_Stone.Hued); m_SubmitData.Add(m_Stone.Blessed); m_SubmitData.Add(m_Stone.Bonded); } AddBackground(0, 0, 530, 480, 5054); AddAlphaRegion(10, 10, 510, 460); AddImageTiled(10, 40, 510, 5, 2624); AddImageTiled(400, 40, 5, 430, 2624); AddImageTiled(90, 40, 5, 430, 2624); AddImageTiled(310, 40, 5, 430, 2624); AddImageTiled(10, 58, 390, 5, 2624); AddImageTiled(400, 100, 120, 3, 2624); AddImageTiled(400, 123, 120, 3, 2624); AddImageTiled(400, 146, 120, 3, 2624); AddImageTiled(400, 169, 120, 3, 2624); if (m_Stone.Name != null && m_Stone.Name != "") { AddLabel(235, 20, 1152, m_Stone.Name); } else { AddLabel(235, 20, 1152, "!STONE NAME GOES HERE!"); } AddLabel(420, 60, 5, "Stone Currency:"); if (m_Stone.Currency != null) { AddLabel(420, 80, 5, m_Stone.Currency); } else { AddLabel(420, 80, 33, "None"); } if (!m_Stone.CustomHues) { if (m_Stone.HuedPrice > 0) { AddCheck(405, 103, 0x2342, 0x2343, (bool)m_SubmitData[0], 1); AddLabel(430, 100, 1152, "Hue: " + m_Stone.HuedPrice); } } else { AddCheck(405, 103, 0x2342, 0x2343, (bool)m_SubmitData[0], 1); AddLabel(430, 100, 1152, "Custom Hues"); } if (m_Stone.BlessedPrice > 0) { AddCheck(405, 126, 0x2342, 0x2343, (bool)m_SubmitData[1], 2); AddLabel(430, 123, 1152, "Bless: " + m_Stone.BlessedPrice); } if (m_Stone.BondedPrice > 0) { AddCheck(405, 149, 0x2342, 0x2343, (bool)m_SubmitData[2], 3); AddLabel(430, 146, 1152, "Bond: " + m_Stone.BondedPrice); } AddLabel(15, 42, 1152, "Item Amount"); AddLabel(170, 42, 1152, "Item"); AddLabel(340, 42, 1152, "Price"); AddLabel(420, 400, 906, "Created By"); AddLabel(420, 420, 906, "~Raelis~"); AddButton(420, 440, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(450, 440, 33, "Close"); int index = 0; int page = 1; AddPage(1); for (int i = 0; i < m_Stone.Item.Count; ++i) { if (index >= AmountPerPage) { AddButton(420, 365, 0x1196, 0x1196, 1152, GumpButtonType.Page, page + 1); AddLabel(420, 350, 1152, "Next page"); ++page; index = 0; AddPage(page); AddButton(420, 315, 0x119a, 0x119a, 1152, GumpButtonType.Page, page - 1); AddLabel(420, 300, 1152, "Previous page"); } int price = (int)m_Stone.Price[i]; int amount = (int)m_Stone.ItemAmount[i]; string gumpname = m_Stone.GumpName[i].ToString(); AddLabel(130, 60 + (index * 20), 1152, gumpname); AddLabel(25, 60 + (index * 20), 1152, "" + amount); AddLabel(320, 60 + (index * 20), 1152, "" + price); AddButton(100, 60 + (index * 20), 4005, 4007, i + 1, GumpButtonType.Reply, 0); AddImageTiled(10, 80 + (index * 20), 390, 3, 2624); index++; } }
public GoldVendorStoneAddItemGump(Mobile mobile, GoldVendorStone stone) : base(25, 50) { Closable = false; Dragable = false; m_Mobile = mobile; m_Stone = stone; //07FEB2008 Random Price *** START *** int price = Utility.RandomMinMax(5000, 20000); int amount = 1; AddPage(0); AddBackground(25, 10, 420, 270, 5054); AddImageTiled(33, 20, 401, 251, 2624); AddAlphaRegion(33, 20, 401, 251); AddLabel(125, 40, 1152, "Vendor Stone"); AddLabel(40, 60, 1152, "Add a Mobile or Item:"); AddTextEntry(40, 80, 225, 15, 5, 0, "Item Here"); AddLabel(40, 100, 1152, "Gump Name:"); AddTextEntry(40, 120, 225, 15, 5, 1, "Name Here"); AddLabel(40, 140, 1152, "Price:"); //AddTextEntry(40, 160, 225, 15, 5, 2, "0"); AddTextEntry(40, 160, 225, 15, 5, 2, "" + price); AddLabel(40, 180, 1152, "Item Amount:"); //AddTextEntry(40, 200, 225, 15, 5, 3, "0"); AddTextEntry(40, 200, 225, 15, 5, 3, ""+ amount); AddButton(40, 230, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(70, 233, 1152, "Back"); AddButton(120, 230, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(150, 233, 1152, "Apply"); //07FEB2008 Random Price *** END *** }
public GoldVendorStoneMobileHueGump(Mobile from, GoldVendorStone stone, Mobile mobile, string gumpname) : base(25, 50) { Closable = false; m_From = from; m_Stone = stone; m_Mobile = mobile; m_GumpName = gumpname; AddPage(0); AddBackground(25, 10, 220, 480, 5054); AddImageTiled(33, 20, 200, 460, 2624); AddAlphaRegion(33, 20, 200, 460); AddLabel(40, 40, 1152, "Hue Mobile: " + m_GumpName); AddButton(200, 420, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(200, 420, 1152, "Hue"); AddButton(170, 400, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(200, 400, 33, "Close"); for (int i = 0; i < m_Stone.HueList.Count; ++i) { if ((i % 20) == 0) { if (i != 0) { AddButton(120, 380, 0x1196, 0x1196, 1152, GumpButtonType.Page, (i / 20) + 1); AddLabel(150, 360, 1152, "Next page"); } AddPage((i / 20) + 1); if (i != 0) { AddButton(120, 340, 0x119a, 0x119a, 1152, GumpButtonType.Page, (i / 20)); AddLabel(150, 320, 1152, "Previous page"); } } int hue = (int)m_Stone.HueList[i]; int price = (int)m_Stone.HuePrices[i]; AddLabel(70, 60 + ((i % 20) * 20), hue - 1, "" + hue); AddLabel(120, 60 + ((i % 20) * 20), 1152, "" + price); AddRadio(40, 60 + ((i % 20) * 20), 210, 211, false, i); AddButton(40, 60 + ((i % 20) * 20), 4005, 4007, i, GumpButtonType.Reply, 0); } }
public StaffGoldTokenGump(Mobile from, GoldVendorStone stone) : base(125, 125) { m_Stone = stone; AddPage(0); from.CloseGump(typeof(StaffGoldTokenGump)); AddBackground(0, 0, 160, 260, 5054); AddButton(10, 10, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(40, 10, 1152, "Vendor Gump"); AddButton(10, 30, 4005, 4007, 2, GumpButtonType.Reply, 0); AddLabel(40, 30, 1152, "Add Item"); AddButton(10, 50, 4005, 4007, 3, GumpButtonType.Reply, 0); AddLabel(40, 50, 1152, "Add Hues"); AddButton(10, 70, 4005, 4007, 4, GumpButtonType.Reply, 0); AddLabel(40, 70, 1152, "Remove Hues"); AddButton(10, 90, 4005, 4007, 5, GumpButtonType.Reply, 0); if (m_Stone.CustomHues) AddLabel(40, 90, 1152, "Use Custom Hues"); else AddLabel(40, 90, 1152, "Use Normal Hues"); if (from.AccessLevel == AccessLevel.Administrator) AddButton(10, 110, 4005, 4007, 6, GumpButtonType.Reply, 0); if (m_Stone.AccessLevel == AccessLevel.Administrator) AddLabel(40, 110, 1302, "Administrator"); else if (m_Stone.AccessLevel == AccessLevel.Seer) AddLabel(40, 110, 324, "Seer"); else if (m_Stone.AccessLevel == AccessLevel.GameMaster) AddLabel(40, 110, 33, "Game Master"); else if (m_Stone.AccessLevel == AccessLevel.Counselor) AddLabel(40, 110, 2, "Counselor"); else if (m_Stone.AccessLevel == AccessLevel.Player) AddLabel(40, 110, 88, "Player"); AddButton(10, 130, 4005, 4007, 7, GumpButtonType.Reply, 0); if (m_Stone.EditMode) AddLabel(40, 130, 5, "Edit Mode"); else AddLabel(40, 130, 33, "Edit Mode"); AddLabel(10, 150, 1152, "Bless Price:"); AddTextEntry(85, 150, 225, 15, 1152, 0, "" + m_Stone.BlessedPrice); AddLabel(10, 170, 1152, "Bond Price:"); AddTextEntry(80, 170, 225, 15, 1152, 1, "" + m_Stone.BondedPrice); AddLabel(10, 190, 1152, "Hue Price:"); AddTextEntry(75, 190, 225, 15, 1152, 2, "" + m_Stone.HuedPrice); AddLabel(10, 210, 1152, "Currency:"); AddTextEntry(70, 210, 225, 15, 1152, 3, m_Stone.Currency); AddButton(10, 230, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(40, 230, 33, "Close"); }
public static void RemoveItem(GoldVendorStone stone, string item, string gumpname, int price, int amount) { if (stone.Item.Contains(item)) if (stone.Item.Contains(item)) stone.Item.Remove(item); if (stone.GumpName.Contains(gumpname)) stone.GumpName.Remove(gumpname); if (stone.Price.Contains(price)) stone.Price.Remove(price); if (stone.ItemAmount.Contains(amount)) stone.ItemAmount.Remove(amount); }
public static void RemoveHue(GoldVendorStone stone, int hue, int hueprice) { if (stone.HueList.Contains(hue)) stone.HueList.Remove(hue); if (stone.HuePrices.Contains(hueprice)) stone.HuePrices.Remove(hueprice); }
public GoldVendorStoneRemoveHueGump(Mobile mobile, GoldVendorStone stone) : base(25, 25) { m_Stone = stone; m_RemoveList = new RemoveInfo[m_Stone.HueList.Count]; for (int i = 0; i < m_Stone.HueList.Count; i++) { m_RemoveList[i] = new RemoveInfo((int)m_Stone.HueList[i], (int)m_Stone.HuePrices[i]); } Closable = false; Dragable = false; m_Mobile = mobile; AddPage(0); AddBackground(25, 10, 220, 490, 5054); AddImageTiled(33, 20, 200, 470, 2624); AddAlphaRegion(33, 20, 200, 470); AddLabel(100, 40, 1152, "Vendor Stone Hues"); AddButton(170, 380, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(170, 363, 1152, "Back"); AddButton(170, 450, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(170, 403, 1152, "Remove"); AddLabel(170, 418, 1152, "Selected"); AddLabel(170, 433, 1152, "Hues"); for (int i = 0; i < m_Stone.HueList.Count; ++i) { if ((i % 20) == 0) { if (i != 0) { AddButton(170, 315, 0x1196, 0x1196, 1152, GumpButtonType.Page, (i / 20) + 1); AddLabel(170, 300, 1152, "Next page"); } AddPage((i / 20) + 1); if (i != 0) { AddButton(170, 275, 0x119a, 0x119a, 1152, GumpButtonType.Page, (i / 20)); AddLabel(170, 260, 1152, "Previous page"); } } int hue = (int)m_Stone.HueList[i]; int price = (int)m_Stone.HuePrices[i]; AddLabel(70, 60 + ((i % 20) * 20), hue - 1, "" + hue); AddLabel(120, 60 + ((i % 20) * 20), 1152, "" + price); AddCheck(40, 60 + ((i % 20) * 20), 0x2342, 0x2343, m_RemoveList[i].toRemove, i); } }
private GoldVendorStoneRemoveHueGump(Mobile from, GoldVendorStone stone, RemoveInfo[] removelist) : base(25, 25) { m_RemoveList = removelist; }
public GoldVendorStoneAddHueGump(Mobile mobile, GoldVendorStone stone) : base(25, 50) { Closable = false; Dragable = false; m_Mobile = mobile; m_Stone = stone; AddPage(0); AddBackground(25, 10, 420, 200, 5054); AddImageTiled(33, 20, 401, 181, 2624); AddAlphaRegion(33, 20, 401, 181); AddLabel(100, 40, 1152, "Vendor Stone"); AddLabel(40, 60, 1152, "Add A Hue:"); AddTextEntry(40, 80, 225, 15, 5, 0, "0"); AddLabel(40, 100, 1152, "Set Hue Price:"); AddTextEntry(40, 120, 225, 15, 5, 1, "0"); AddButton(40, 140, 4005, 4007, 0, GumpButtonType.Reply, 0); AddLabel(70, 143, 1152, "Back"); AddButton(120, 140, 4005, 4007, 1, GumpButtonType.Reply, 0); AddLabel(150, 143, 1152, "Apply"); }