示例#1
0
			public override void OnClick()
			{
				Mobile from = this.Owner.From;
				
				if(HuntingPermit.HasPermit(from))
					from.SendLocalizedMessage(1155702); // You already have a hunting permit.
				else if(Banker.Withdraw(from, 5000))
				{
					Banker.Withdraw(from, 5000);
					HuntingPermit permit = new HuntingPermit(from);
					
					if(from.Backpack == null || !from.Backpack.TryDropItem(from, permit, false))
					{
						from.SendLocalizedMessage(1155703); // Your backpack was too full so the permit was deleted. Empty your backpack and try again.
						permit.Delete();
					}
					//TODO: Message???
				}
                else
                    from.SendLocalizedMessage(500382); // Thou dost not have sufficient funds in thy account to withdraw that much.
			}