public void HeraldMessage(Mobile to, int message) { if (Herald != null) { Herald.SayTo(to, message); } else { to.SendLocalizedMessage(message); } }
public override void OnClick() { if (Player.Prompt != null) { Player.SendLocalizedMessage(1079166); // You already have a text entry request pending. } else { Player.SendLocalizedMessage(1155865); // Enter amount to deposit: Player.BeginPrompt( (from, text) => { int amount = Utility.ToInt32(text); if (amount > 0) { if (Banker.Withdraw(from, amount, true)) { CityLoyaltySystem.GetCityInstance(Herald.City).AddToTreasury(from, amount, true); Herald.SayTo(from, 1152926); // The City thanks you for your generosity! } else { from.SendLocalizedMessage(1155867); // The amount entered is invalid. Verify that there are sufficient funds to complete this transaction. } } else { from.SendLocalizedMessage(1155867); // The amount entered is invalid. Verify that there are sufficient funds to complete this transaction. } }, (from, text) => { from.SendLocalizedMessage(1155867); // The amount entered is invalid. Verify that there are sufficient funds to complete this transaction. }); } }