private static void CountGold() { int totalgold = 0; int numberofchecks = 0; int pilesofsixtyk = 0; foreach (Item item in World.Items.Values) { if (item is CheckBook) { CheckBook cb = (CheckBook)item; totalgold += cb.Token; } if (item is BankCheck) { BankCheck bc = (BankCheck)item; totalgold += bc.Worth; } else if (item is Gold) { Gold g = (Gold)item; totalgold += g.Amount; } } World.Broadcast(0x35, true, "Total Gold in world is : {0}", totalgold); numberofchecks = totalgold / 1000000; World.Broadcast(0x35, true, "This is enough for {0} one million gold bank checks", numberofchecks); totalgold = totalgold - 1000000 * numberofchecks; pilesofsixtyk = totalgold / 60000; World.Broadcast(0x35, true, "This is enough for {0} piles of 60K", pilesofsixtyk); totalgold = totalgold - 60000 * pilesofsixtyk; World.Broadcast(0x35, true, "And this leaves {0} spare change :)", totalgold); }
public CheckBookTarget(CheckBook book) : base(18, false, TargetFlags.None) { m_Book = book; }
public CheckBookTarget( CheckBook book ) : base( 18, false, TargetFlags.None ) { m_Book = book; }
public CheckBookGump( PlayerMobile from, Item item ): base( 0, 0 ) { m_From = from; if (!(item is CheckBook)) return; CheckBook book = item as CheckBook; m_Book = book; m_From.CloseGump( typeof( CheckBookGump ) ); // this.Closable=true; // this.Disposable=true; // this.Dragable=true; // this.Resizable=false; // this.AddPage(0); // this.AddImageTiled(53, 94, 511, 247, 3504); // this.AddImage(560, 338, 3508); // this.AddImage(31, 73, 3500); // this.AddImage(31, 338, 3506); // this.AddImageTiled(56, 73, 507, 24, 3501); // this.AddImageTiled(57, 338, 504, 24, 3507); // this.AddImageTiled(31, 98, 25, 245, 3503); // this.AddImageTiled(560, 95, 25, 245, 3505); // this.AddLabel(259, 89, 0, @"Bank of HyperCube"); // this.AddImage(537, 176, 3502); // this.AddImage(537, 218, 3508); // this.AddImage(381, 218, 3506); // this.AddImage(381, 176, 3500); // this.AddImageTiled(406, 176, 135, 24, 3501); // this.AddImageTiled(406, 218, 132, 24, 3507); // this.AddImageTiled(381, 200, 25, 20, 3503); // this.AddImageTiled(537, 201, 25, 17, 3505); // this.AddImage(560, 73, 3502); // this.AddImageTiled(65, 234, 302, 5, 3007); // this.AddImageTiled(59, 283, 203, 5, 3007); // this.AddImageTiled(320, 283, 230, 5, 3007); // this.AddLabel(64, 265, 0, @"Note:"); // this.AddLabel(325, 262, 0, @"Signature:"); // this.AddImageTiled(65, 184, 302, 5, 3007); // this.AddLabel(510, 89, 0, @"# 001"); // this.AddLabel(70, 164, 0, @"Pay to:"); // this.AddLabel(318, 215, 0, @"Tokens"); // this.AddLabel(59, 321, 0, @":1943859762: 113 || 089193 || 0009"); // this.AddLabel(398, 262, 0, from.Name.ToString()); // this.AddLabel(462, 310, 0, @"Make a deposit"); // this.AddLabel(462, 333, 0, @"Write check"); // this.AddLabel(462, 288, 0, @"Make a withdraw"); // this.AddButton(445, 295, 2103, 2104, 2, GumpButtonType.Reply, 0); // Deposit // this.AddButton(445, 315, 2103, 2104, 1, GumpButtonType.Reply, 0); // withdraw // this.AddButton(445, 336, 2103, 2104, 3, GumpButtonType.Reply, 0); // Check // this.AddLabel(399, 200, 0, @"Balance:"); // this.AddLabel(450, 200, 0, book.Token.ToString()); // AddTextEntry(68, 216, 242, 20, 0, 1, "0"); //************************************************************************* this.Closable=true; this.Disposable=true; this.Dragable=true; this.Resizable=false; this.AddPage(0); this.AddImageTiled(0, 0, 26, 324, 10464); this.AddImageTiled(27, 12, 200, 300, 9394); this.AddImageTiled(228, 0, 26, 324, 10464); this.AddLabel(114, 164, 0, @"Deposit"); this.AddLabel(114, 200, 0, @"Withdraw"); this.AddLabel(114, 235, 0, @"Write Check"); this.AddButton(73, 164, 5224, 5231, 1, GumpButtonType.Reply, 0); this.AddButton(73, 199, 5224, 5231, 2, GumpButtonType.Reply, 0); this.AddButton(73, 235, 5224, 5231, 3, GumpButtonType.Reply, 0); this.AddLabel(73, 275, 0, @"____________"); this.AddTextEntry(73, 272, 150, 20, 0, 1, "0"); this.AddLabel(120, 21, 0, @"World Bank"); this.AddLabel(120, 88, 0, book.Token.ToString()); this.AddLabel(120, 63, 0, @"Balance :"); this.AddImageTiled(0, 0, 96, 142, 5536); //************************************************************************* }