public void CollectGold(Mobile to) { if (HoldGold > 0) { SayTo(to, "How much of the {0} that I'm holding would you like?", HoldGold.ToString()); to.Prompt = new CollectGoldPrompt(this); } else { SayTo(to, 503215); // I am holding no gold for you. } }
public void CollectGold(Mobile to) { if (HoldGold > 0) { SayTo(to, "How much of the {0} that I'm holding would you like?", HoldGold.ToString()); to.SendMessage("Enter the amount of gold you wish to withdraw (ESC = CANCEL):"); to.Prompt = new CollectGoldPrompt(this); } else { SayTo(to, 503215); // I am holding no gold for you. } }
public int GiveGold(Mobile to, int amount) { if (amount <= 0) { return(0); } if (amount > HoldGold) { SayTo(to, "I'm sorry, but I'm only holding {0} gold for you.", HoldGold.ToString()); return(0); } int amountGiven = Banker.DepositUpTo(to, amount); HoldGold -= amountGiven; if (amountGiven > 0) { to.SendLocalizedMessage(1060397, amountGiven.ToString()); // ~1_AMOUNT~ gold has been deposited into your bank box. } if (amountGiven == 0) { SayTo(to, 1070755); // Your bank box cannot hold the gold you are requesting. I will keep the gold until you can take it. } else if (amount > amountGiven) { SayTo(to, 1070756); // I can only give you part of the gold now, as your bank box is too full to hold the full amount. } else if (HoldGold > 0) { SayTo(to, 1042639); // Your gold has been transferred. } else { SayTo(to, 503234); // All the gold I have been carrying for you has been deposited into your bank account. } return(amountGiven); }